modelmix 3.9.0 → 3.9.4

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
@@ -129,6 +129,7 @@ Here's a comprehensive list of available methods:
129
129
  | `sonnet45[think]()`| Anthropic | claude-sonnet-4-5-20250929 | [\$3.00 / \$15.00][2] |
130
130
  | `sonnet4[think]()` | Anthropic | claude-sonnet-4-20250514 | [\$3.00 / \$15.00][2] |
131
131
  | `haiku35()` | Anthropic | claude-3-5-haiku-20241022 | [\$0.80 / \$4.00][2] |
132
+ | `haiku45[think]()` | Anthropic | claude-haiku-4-5-20251001 | [\$1.00 / \$5.00][2] |
132
133
  | `gemini25flash()` | Google | gemini-2.5-flash-preview-04-17 | [\$0.00 / \$0.00][3] |
133
134
  | `gemini25proExp()` | Google | gemini-2.5-pro-exp-03-25 | [\$0.00 / \$0.00][3] |
134
135
  | `gemini25pro()` | Google | gemini-2.5-pro-preview-05-06 | [\$2.50 / \$15.00][3] |
@@ -142,6 +143,7 @@ Here's a comprehensive list of available methods:
142
143
  | `hermes3()` | Lambda | Hermes-3-Llama-3.1-405B-FP8 | [\$0.80 / \$0.80][8] |
143
144
  | `qwen3()` | Together | Qwen3-235B-A22B-fp8-tput | [\$0.20 / \$0.60][7] |
144
145
  | `kimiK2()` | Together | Kimi-K2-Instruct | [\$1.00 / \$3.00][7] |
146
+ | `kimiK2think()` | Together | moonshotai/Kimi-K2-Thinking | [\$1.20 / \$4.00][7] |
145
147
 
146
148
  [1]: https://openai.com/api/pricing/ "Pricing | OpenAI"
147
149
  [2]: https://docs.anthropic.com/en/docs/about-claude/pricing "Pricing - Anthropic"
package/index.js CHANGED
@@ -138,6 +138,13 @@ class ModelMix {
138
138
  haiku35({ options = {}, config = {} } = {}) {
139
139
  return this.attach('claude-3-5-haiku-20241022', new MixAnthropic({ options, config }));
140
140
  }
141
+ haiku45({ options = {}, config = {} } = {}) {
142
+ return this.attach('claude-haiku-4-5-20251001', new MixAnthropic({ options, config }));
143
+ }
144
+ haiku45think({ options = {}, config = {} } = {}) {
145
+ options = { ...MixAnthropic.thinkingOptions, ...options };
146
+ return this.attach('claude-haiku-4-5-20251001', new MixAnthropic({ options, config }));
147
+ }
141
148
  gemini25flash({ options = {}, config = {} } = {}) {
142
149
  return this.attach('gemini-2.5-flash', new MixGoogle({ options, config }));
143
150
  }
@@ -201,6 +208,10 @@ class ModelMix {
201
208
  return this;
202
209
  }
203
210
 
211
+ kimiK2think({ options = {}, config = {} } = {}) {
212
+ return this.attach('moonshotai/Kimi-K2-Thinking', new MixTogether({ options, config }));
213
+ }
214
+
204
215
  lmstudio({ options = {}, config = {} } = {}) {
205
216
  return this.attach('lmstudio', new MixLMStudio({ options, config }));
206
217
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modelmix",
3
- "version": "3.9.0",
3
+ "version": "3.9.4",
4
4
  "description": "🧬 ModelMix - Unified API for Diverse AI LLM.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -33,11 +33,11 @@
33
33
  "nano",
34
34
  "deepseek",
35
35
  "oss",
36
- "nousresearch",
36
+ "k2",
37
37
  "reasoning",
38
38
  "bottleneck",
39
39
  "cerebras",
40
- "scout",
40
+ "thinking",
41
41
  "clasen"
42
42
  ],
43
43
  "author": "Martin Clasen",
package/test/live.mcp.js CHANGED
@@ -2,9 +2,7 @@ const { expect } = require('chai');
2
2
  const { ModelMix } = require('../index.js');
3
3
  const nock = require('nock');
4
4
 
5
- // Completely disable nock for live tests
6
- nock.restore();
7
- nock.cleanAll();
5
+ // Note: This test file makes real API calls and disables nock locally
8
6
 
9
7
  const setup = {
10
8
  options: { temperature: 0 },
@@ -27,7 +25,8 @@ describe('Live MCP Integration Tests', function () {
27
25
  });
28
26
 
29
27
  after(() => {
30
- nock.restore();
28
+ // Re-activate nock for subsequent tests
29
+ nock.activate();
31
30
  });
32
31
 
33
32
  describe('Basic MCP Tool Integration', function () {
@@ -529,7 +528,7 @@ describe('Live MCP Integration Tests', function () {
529
528
  const models = [
530
529
  { name: 'Sonnet 4', model: ModelMix.new(setup).sonnet4() },
531
530
  { name: 'Sonnet 4.5', model: ModelMix.new(setup).sonnet45() },
532
- { name: 'Haiku 3.5', model: ModelMix.new(setup).haiku35() }
531
+ { name: 'Haiku 4.5', model: ModelMix.new(setup).haiku45() }
533
532
  ];
534
533
 
535
534
  const results = [];
package/test/live.test.js CHANGED
@@ -1,5 +1,6 @@
1
1
  const { expect } = require('chai');
2
2
  const { ModelMix, MixOpenAI, MixAnthropic, MixGoogle } = require('../index.js');
3
+ const nock = require('nock');
3
4
  const path = require('path');
4
5
  const fixturesPath = path.join(__dirname, 'fixtures');
5
6
 
@@ -13,6 +14,22 @@ const setup = {
13
14
  describe('Live Integration Tests', function () {
14
15
  // Increase timeout for real API calls
15
16
  this.timeout(30000);
17
+
18
+ // Ensure nock doesn't interfere with live tests but restore it after
19
+ before(() => {
20
+ nock.restore();
21
+ nock.cleanAll();
22
+ });
23
+
24
+ beforeEach(() => {
25
+ nock.restore();
26
+ nock.cleanAll();
27
+ });
28
+
29
+ after(() => {
30
+ // Re-activate nock for subsequent tests
31
+ nock.activate();
32
+ });
16
33
 
17
34
  describe('Image Processing', function () {
18
35