modelmix 4.5.2 → 4.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -87,7 +87,7 @@ console.log(ETH.price);
87
87
  ```javascript
88
88
  ModelMix.new()
89
89
  .gptOss()
90
- .kimiK2()
90
+ .kimiK25think()
91
91
  .deepseekR1()
92
92
  .hermes3()
93
93
  .addText('What is the capital of France?');
@@ -164,7 +164,6 @@ Here's a comprehensive list of available methods:
164
164
  | `sonarPro()` | Perplexity | sonar-pro | [\$3.00 / \$15.00][4] |
165
165
  | `hermes3()` | Lambda | Hermes-3-Llama-3.1-405B-FP8 | [\$0.80 / \$0.80][8] |
166
166
  | `qwen3()` | Together | Qwen3-235B-A22B-fp8-tput | [\$0.20 / \$0.60][7] |
167
- | `kimiK2()` | Together | Kimi-K2-Instruct | [\$1.00 / \$3.00][7] |
168
167
  | `kimiK25think()` | Together | Kimi-K2.5 | [\$0.50 / \$2.80][7] |
169
168
 
170
169
  [1]: https://platform.openai.com/docs/pricing "Pricing | OpenAI"
package/demo/free.js CHANGED
@@ -3,7 +3,7 @@ try { process.loadEnvFile(); } catch {}
3
3
 
4
4
  const ai = ModelMix.new({ config: { debug: 2 } })
5
5
  .gptOss()
6
- .kimiK2()
6
+ .kimiK25think()
7
7
  .deepseekR1()
8
8
  .hermes3()
9
9
  .addText('What is the capital of France?');
package/index.js CHANGED
@@ -102,12 +102,6 @@ const MODEL_PRICING = {
102
102
  // Qwen3 (Together/Cerebras)
103
103
  'Qwen/Qwen3-235B-A22B-fp8-tput': [0.20, 0.60],
104
104
  'qwen-3-32b': [0.20, 0.60],
105
- // Kimi K2 (Together/Groq/OpenRouter)
106
- 'moonshotai/Kimi-K2-Instruct-0905': [1.00, 3.00],
107
- 'moonshotai/kimi-k2-instruct-0905': [1.00, 3.00],
108
- 'moonshotai/kimi-k2:free': [0, 0],
109
- 'moonshotai/Kimi-K2-Thinking': [1.00, 3.00],
110
- 'moonshotai/kimi-k2-thinking': [1.00, 3.00],
111
105
  // Kimi K2.5 (Together/Fireworks/OpenRouter)
112
106
  'moonshotai/Kimi-K2.5': [0.50, 2.80],
113
107
  'moonshotai/kimi-k2.5': [0.50, 2.80],
@@ -464,14 +458,6 @@ class ModelMix {
464
458
  return this;
465
459
  }
466
460
 
467
- kimiK2({ options = {}, config = {}, mix = {} } = {}) {
468
- mix = { ...this.mix, ...mix };
469
- if (mix.together) this.attach('moonshotai/Kimi-K2-Instruct-0905', new MixTogether({ options, config }));
470
- if (mix.groq) this.attach('moonshotai/kimi-k2-instruct-0905', new MixGroq({ options, config }));
471
- if (mix.openrouter) this.attach('moonshotai/kimi-k2:free', new MixOpenRouter({ options, config }));
472
- return this;
473
- }
474
-
475
461
  kimiK25think({ options = {}, config = {}, mix = { together: true } } = {}) {
476
462
  mix = { ...this.mix, ...mix };
477
463
  if (mix.together) this.attach('moonshotai/Kimi-K2.5', new MixTogether({ options, config }));
@@ -480,13 +466,6 @@ class ModelMix {
480
466
  return this;
481
467
  }
482
468
 
483
- kimiK2think({ options = {}, config = {}, mix = { together: true } } = {}) {
484
- mix = { ...this.mix, ...mix };
485
- if (mix.together) this.attach('moonshotai/Kimi-K2-Thinking', new MixTogether({ options, config }));
486
- if (mix.openrouter) this.attach('moonshotai/kimi-k2-thinking', new MixOpenRouter({ options, config }));
487
- return this;
488
- }
489
-
490
469
  lmstudio(model = 'lmstudio', { options = {}, config = {} } = {}) {
491
470
  return this.attach(model, new MixLMStudio({ options, config }));
492
471
  }
@@ -1053,7 +1032,7 @@ class ModelMix {
1053
1032
  const tokenInfo = result.tokens
1054
1033
  ? ` ${result.tokens.input} → ${result.tokens.output} tok`
1055
1034
  + (result.tokens.cached ? ` (cached:${result.tokens.cached})` : '')
1056
- + (result.tokens.speed ? `| ${result.tokens.speed} t/s` : '')
1035
+ + (result.tokens.speed ? ` | ${result.tokens.speed} t/s` : '')
1057
1036
  + (result.tokens.cost != null ? ` $${result.tokens.cost.toFixed(4)}` : '')
1058
1037
  : '';
1059
1038
  console.log(`✓${tokenInfo}\n${ModelMix.formatOutputSummary(result, currentConfig.debug).trim()}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modelmix",
3
- "version": "4.5.2",
3
+ "version": "4.5.5",
4
4
  "description": "🧬 Reliable interface with automatic fallback for AI LLMs.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -47,15 +47,15 @@
47
47
  },
48
48
  "homepage": "https://github.com/clasen/ModelMix#readme",
49
49
  "dependencies": {
50
- "@modelcontextprotocol/sdk": "^1.27.1",
50
+ "@modelcontextprotocol/sdk": "^1.29.0",
51
51
  "bottleneck": "^2.19.5",
52
52
  "file-type": "^21.3.3",
53
53
  "lemonlog": "^1.2.0",
54
+ "mocha": "^11.7.5",
54
55
  "ws": "^8.19.0"
55
56
  },
56
57
  "devDependencies": {
57
58
  "chai": "^5.2.1",
58
- "mocha": "^11.7.5",
59
59
  "nock": "^14.0.9",
60
60
  "sinon": "^21.0.0"
61
61
  },
@@ -113,7 +113,7 @@ Thinking variants: append `think` — e.g. `opus46think()` `sonnet46think()` `so
113
113
  `scout()` `maverick()`
114
114
 
115
115
  ### Together
116
- `qwen3()` `kimiK2()` `kimiK2think()` `kimiK25think()` `gptOss()`
116
+ `qwen3()` `kimiK25think()` `gptOss()`
117
117
 
118
118
  ### MiniMax
119
119
  `minimaxM25()` `minimaxM21()` `minimaxM2()` `minimaxM2Stable()`
@@ -128,7 +128,7 @@ Thinking variants: append `think` — e.g. `opus46think()` `sonnet46think()` `so
128
128
  `GLM45()`
129
129
 
130
130
  ### Multi-provider (auto-fallback across free/paid tiers)
131
- `deepseekR1()` `hermes3()` `scout()` `maverick()` `kimiK2()` `GLM47()`
131
+ `deepseekR1()` `hermes3()` `scout()` `maverick()` `kimiK25think()` `GLM47()`
132
132
 
133
133
  ### Local
134
134
  `lmstudio()` — for LM Studio local models
@@ -356,7 +356,7 @@ For full debug output, also set: `DEBUG=ModelMix* node script.js`
356
356
  ```javascript
357
357
  const model = ModelMix.new()
358
358
  .gptOss()
359
- .kimiK2()
359
+ .kimiK25think()
360
360
  .deepseekR1()
361
361
  .hermes3()
362
362
  .addText("What is the capital of France?");
package/test/live.test.js CHANGED
@@ -192,18 +192,6 @@ describe('Live Integration Tests', function () {
192
192
  expect(response.toLowerCase()).to.include('scout test successful');
193
193
  });
194
194
 
195
- it('should work with KimiK2 model', async function () {
196
- const model = ModelMix.new(setup).kimiK2();
197
-
198
- model.addText('Say "kimik2 test successful" and nothing else.');
199
-
200
- const response = await model.message();
201
- console.log(`KimiK2 response: ${response}`);
202
-
203
- expect(response).to.be.a('string');
204
- expect(response.toLowerCase()).to.include('kimik2 test successful');
205
- });
206
-
207
195
  it('should work with GPT-OSS model', async function () {
208
196
  const model = ModelMix.new(setup).gptOss();
209
197
 
@@ -311,7 +299,7 @@ describe('Live Integration Tests', function () {
311
299
  manufacturer: "Future Motors"
312
300
  });
313
301
 
314
- console.log(`KimiK2 JSON result:`, result);
302
+ console.log(`KimiK25 JSON result:`, result);
315
303
 
316
304
  expect(result).to.be.an('object');
317
305
  expect(result).to.have.property('name');