modelmix 4.5.14 → 4.5.16
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/MODELS.md +1 -1
- package/README.md +7 -7
- package/demo/grok.js +1 -1
- package/demo/short.js +1 -1
- package/index.js +20 -24
- package/package.json +1 -1
- package/skills/modelmix/SKILL.md +3 -3
- package/test/deepseek.test.js +20 -0
- package/test/grok.test.js +21 -0
- package/test/live.mcp.js +2 -2
- package/test/live.test.js +28 -8
- package/test/qwen.test.js +20 -0
package/MODELS.md
CHANGED
|
@@ -352,4 +352,4 @@ All providers inherit from `MixCustom` base class which provides common function
|
|
|
352
352
|
- Uses OpenAI-compatible API interface
|
|
353
353
|
- Requires `MINIMAX_API_KEY` environment variable
|
|
354
354
|
- Inherits all OpenAI functionality including tool calling
|
|
355
|
-
- Available models: `MiniMax-M2`
|
|
355
|
+
- Available models: `MiniMax-M2.5`, `MiniMax-M2.7`
|
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ const model = await ModelMix.new(setup)
|
|
|
69
69
|
.sonnet46() // (main model) Anthropic claude-sonnet-4-5-20250929
|
|
70
70
|
.gpt5mini() // (fallback 2) OpenAI gpt-5-mini
|
|
71
71
|
.gemini3flash({ config: { temperature: 0 } }) // (fallback 3) Google gemini-3-flash
|
|
72
|
-
.
|
|
72
|
+
.grok43() // (fallback 4) Grok grok-4.3
|
|
73
73
|
.addText("What's your name?");
|
|
74
74
|
|
|
75
75
|
console.log(await model.message());
|
|
@@ -151,21 +151,20 @@ Here's a comprehensive list of available methods:
|
|
|
151
151
|
| `opus47[think]()` | Anthropic | claude-opus-4-7 | [\$5.00 / \$25.00][2] |
|
|
152
152
|
| `opus46[think]()` | Anthropic | claude-opus-4-6 | [\$5.00 / \$25.00][2] |
|
|
153
153
|
| `sonnet46[think]()` | Anthropic | claude-sonnet-4-6 | [\$3.00 / \$15.00][2] |
|
|
154
|
-
| `sonnet45[think]()` | Anthropic | claude-sonnet-4-5-20250929 | [\$3.00 / \$15.00][2] |
|
|
155
154
|
| `haiku45[think]()` | Anthropic | claude-haiku-4-5-20251001 | [\$1.00 / \$5.00][2] |
|
|
156
155
|
| `gemini31pro()` | Google | gemini-3.1-pro-preview | [\$2.00 / \$12.00][3] |
|
|
157
|
-
| `gemini3pro()` | Google | gemini-3-pro-preview | [\$2.00 / \$12.00][3] |
|
|
158
|
-
| `gemini3flash()` | Google | gemini-3-flash-preview | [\$0.50 / \$3.00][3] |
|
|
159
156
|
| `gemini31flashLite()`| Google | gemini-3.1-flash-lite-preview | [\$0.25 / \$1.50][3] |
|
|
160
|
-
| `
|
|
157
|
+
| `grok43()` | Grok | grok-4.3 | [\$1.25 / \$2.50][6] |
|
|
158
|
+
| `grok420multiAgent()`| Grok | grok-4.20-multi-agent-0309 | [\$1.25 / \$2.50][6] |
|
|
159
|
+
| `grok420[think]()` | Grok | grok-4.20-0309 | [\$1.25 / \$2.50][6] |
|
|
161
160
|
| `grok41[think]()` | Grok | grok-4-1-fast | [\$0.20 / \$0.50][6] |
|
|
161
|
+
| `qwen36plus()` | Fireworks/Together | qwen3p6-plus / Qwen3.6-Plus | [\$0.50 / \$3.00][10] |
|
|
162
162
|
| `deepseekV4Pro()` | Fireworks | models/deepseek-v4-pro | [\$1.74 / \$3.48][10] |
|
|
163
163
|
| `GLM51()` | Fireworks | models/glm-5p1 | [\$1.05 / \$3.50][10] |
|
|
164
164
|
| `minimaxM27()` | MiniMax | MiniMax-M2.7 | [\$0.30 / \$1.20][9] |
|
|
165
165
|
| `sonar()` | Perplexity | sonar | [\$1.00 / \$1.00][4] |
|
|
166
166
|
| `sonarPro()` | Perplexity | sonar-pro | [\$3.00 / \$15.00][4] |
|
|
167
167
|
| `hermes3()` | Lambda | Hermes-3-Llama-3.1-405B-FP8 | [\$0.80 / \$0.80][8] |
|
|
168
|
-
| `qwen3()` | Together | Qwen3-235B-A22B-fp8-tput | [\$0.20 / \$0.60][7] |
|
|
169
168
|
| `kimiK25think()` | Together | Kimi-K2.5 | [\$0.50 / \$2.80][7] |
|
|
170
169
|
| `kimiK26think()` | Fireworks | models/kimi-k2p6 | [\$0.95 / \$4.00][10] |
|
|
171
170
|
|
|
@@ -181,7 +180,8 @@ Here's a comprehensive list of available methods:
|
|
|
181
180
|
[10]: https://fireworks.ai/pricing#serverless-pricing "Fireworks Pricing"
|
|
182
181
|
|
|
183
182
|
Each method accepts optional `options`, `config`, and (for multi-provider methods) `mix` parameters to customize behavior.
|
|
184
|
-
For NVIDIA on DeepSeek V4 Pro, use `deepseekV4Pro({ mix: { nvidia: true
|
|
183
|
+
For NVIDIA on DeepSeek V4 Pro, use `deepseekV4Pro({ mix: { nvidia: true } })`.
|
|
184
|
+
For Together on Qwen 3.6 Plus, use `qwen36plus({ mix: { fireworks: false, together: true } })`.
|
|
185
185
|
|
|
186
186
|
```javascript
|
|
187
187
|
const result = await ModelMix.new({
|
package/demo/grok.js
CHANGED
package/demo/short.js
CHANGED
|
@@ -13,7 +13,7 @@ const mmix = await ModelMix.new(setup)
|
|
|
13
13
|
.o4mini() // (fallback 1) OpenAI o4-mini
|
|
14
14
|
.gemini25proExp({ config: { temperature: 0 } }) // (fallback 2) Google gemini-2.5-pro-exp-03-25
|
|
15
15
|
.gpt41nano() // (fallback 3) OpenAI gpt-4.1-nano
|
|
16
|
-
.
|
|
16
|
+
.grok43() // (fallback 4) Grok grok-4.3
|
|
17
17
|
.addText("What's your name?");
|
|
18
18
|
|
|
19
19
|
console.log(await mmix.message());
|
package/index.js
CHANGED
|
@@ -73,19 +73,23 @@ const MODEL_PRICING = {
|
|
|
73
73
|
'gemini-2.5-flash': [0.30, 2.50],
|
|
74
74
|
'gemini-3.1-flash-lite-preview': [0.25, 1.50],
|
|
75
75
|
// Grok
|
|
76
|
-
'grok-4
|
|
76
|
+
'grok-4.3': [1.25, 2.50],
|
|
77
|
+
'grok-4.20-multi-agent-0309': [1.25, 2.50],
|
|
78
|
+
'grok-4.20-0309-reasoning': [1.25, 2.50],
|
|
79
|
+
'grok-4.20-0309-non-reasoning': [1.25, 2.50],
|
|
77
80
|
'grok-4-1-fast-reasoning': [0.20, 0.50],
|
|
78
81
|
'grok-4-1-fast-non-reasoning': [0.20, 0.50],
|
|
79
82
|
// Fireworks
|
|
80
83
|
'accounts/fireworks/models/deepseek-v3p2': [0.56, 1.68],
|
|
81
84
|
'accounts/fireworks/models/deepseek-v4-pro': [1.74, 3.48],
|
|
85
|
+
'deepseek-ai/DeepSeek-V4-Pro': [2.10, 4.40],
|
|
82
86
|
'accounts/fireworks/models/glm-4p7': [0.55, 2.19],
|
|
83
87
|
'accounts/fireworks/models/glm-5p1': [1.05, 3.50],
|
|
84
88
|
'accounts/fireworks/models/kimi-k2p5': [0.50, 2.80],
|
|
85
89
|
'accounts/fireworks/models/qwen3p6-plus': [0.50, 3.00],
|
|
90
|
+
'Qwen/Qwen3.6-Plus': [0.50, 3.00],
|
|
86
91
|
'fireworks/glm-5': [1.00, 3.20],
|
|
87
92
|
// MiniMax
|
|
88
|
-
'MiniMax-M2.1': [0.30, 1.20],
|
|
89
93
|
'MiniMax-M2.5': [0.30, 1.20],
|
|
90
94
|
'MiniMax-M2.7': [0.30, 1.20],
|
|
91
95
|
'fireworks/minimax-m2p5': [0.30, 1.20],
|
|
@@ -421,14 +425,17 @@ class ModelMix {
|
|
|
421
425
|
return this.attach('sonar', new MixPerplexity({ options, config }));
|
|
422
426
|
}
|
|
423
427
|
|
|
424
|
-
|
|
425
|
-
return this.attach('grok-3', new MixGrok({ options, config }));
|
|
428
|
+
grok43({ options = {}, config = {} } = {}) {
|
|
429
|
+
return this.attach('grok-4.3', new MixGrok({ options, config }));
|
|
426
430
|
}
|
|
427
|
-
|
|
428
|
-
return this.attach('grok-
|
|
431
|
+
grok420multiAgent({ options = {}, config = {} } = {}) {
|
|
432
|
+
return this.attach('grok-4.20-multi-agent-0309', new MixGrok({ options, config }));
|
|
429
433
|
}
|
|
430
|
-
|
|
431
|
-
return this.attach('grok-4-
|
|
434
|
+
grok420think({ options = {}, config = {} } = {}) {
|
|
435
|
+
return this.attach('grok-4.20-0309-reasoning', new MixGrok({ options, config }));
|
|
436
|
+
}
|
|
437
|
+
grok420({ options = {}, config = {} } = {}) {
|
|
438
|
+
return this.attach('grok-4.20-0309-non-reasoning', new MixGrok({ options, config }));
|
|
432
439
|
}
|
|
433
440
|
grok41think({ options = {}, config = {} } = {}) {
|
|
434
441
|
return this.attach('grok-4-1-fast-reasoning', new MixGrok({ options, config }));
|
|
@@ -443,8 +450,11 @@ class ModelMix {
|
|
|
443
450
|
return this;
|
|
444
451
|
}
|
|
445
452
|
|
|
446
|
-
qwen36plus({ options = {}, config = {}, mix = { } } = {}) {
|
|
447
|
-
|
|
453
|
+
qwen36plus({ options = {}, config = {}, mix = { fireworks: true } } = {}) {
|
|
454
|
+
mix = { ...this.mix, ...mix };
|
|
455
|
+
if (mix.fireworks) this.attach('accounts/fireworks/models/qwen3p6-plus', new MixFireworks({ options, config }));
|
|
456
|
+
if (mix.together) this.attach('Qwen/Qwen3.6-Plus', new MixTogether({ options, config }));
|
|
457
|
+
return this;
|
|
448
458
|
}
|
|
449
459
|
|
|
450
460
|
scout({ options = {}, config = {}, mix = {} } = {}) {
|
|
@@ -497,16 +507,6 @@ class ModelMix {
|
|
|
497
507
|
return this.attach(model, new MixLMStudio({ options, config }));
|
|
498
508
|
}
|
|
499
509
|
|
|
500
|
-
minimaxM2({ options = {}, config = {} } = {}) {
|
|
501
|
-
return this.attach('MiniMax-M2', new MixMiniMax({ options, config }));
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
minimaxM21({ options = {}, config = {}, mix = { minimax: true } } = {}) {
|
|
505
|
-
mix = { ...this.mix, ...mix };
|
|
506
|
-
if (mix.minimax) this.attach('MiniMax-M2.1', new MixMiniMax({ options, config }));
|
|
507
|
-
if (mix.cerebras) this.attach('MiniMax-M2.1', new MixCerebras({ options, config }));
|
|
508
|
-
return this;
|
|
509
|
-
}
|
|
510
510
|
|
|
511
511
|
minimaxM25({ options = {}, config = {}, mix = { minimax: true } } = {}) {
|
|
512
512
|
mix = { ...this.mix, ...mix };
|
|
@@ -515,10 +515,6 @@ class ModelMix {
|
|
|
515
515
|
return this;
|
|
516
516
|
}
|
|
517
517
|
|
|
518
|
-
minimaxM2Stable({ options = {}, config = {} } = {}) {
|
|
519
|
-
return this.attach('MiniMax-M2-Stable', new MixMiniMax({ options, config }));
|
|
520
|
-
}
|
|
521
|
-
|
|
522
518
|
minimaxM27({ options = {}, config = {}, mix = { openrouter: true, minimax: true } } = {}) {
|
|
523
519
|
mix = { ...this.mix, ...mix };
|
|
524
520
|
if (mix.nvidia) this.attach('minimaxai/minimax-m2.7', new MixNVIDIA({ options, config }));
|
package/package.json
CHANGED
package/skills/modelmix/SKILL.md
CHANGED
|
@@ -104,7 +104,7 @@ Thinking variants: append `think` — e.g. `opus46think()` `sonnet46think()` `so
|
|
|
104
104
|
`gemini3pro()` `gemini3flash()` `gemini25pro()` `gemini25flash()`
|
|
105
105
|
|
|
106
106
|
### Grok
|
|
107
|
-
`
|
|
107
|
+
`grok43()` `grok420multiAgent()` `grok420()` `grok420think()` `grok41()` `grok41think()`
|
|
108
108
|
|
|
109
109
|
### Perplexity
|
|
110
110
|
`sonar()` `sonarPro()`
|
|
@@ -113,10 +113,10 @@ Thinking variants: append `think` — e.g. `opus46think()` `sonnet46think()` `so
|
|
|
113
113
|
`scout()` `maverick()`
|
|
114
114
|
|
|
115
115
|
### Together
|
|
116
|
-
`
|
|
116
|
+
`qwen36plus()` `kimiK25think()` `gptOss()`
|
|
117
117
|
|
|
118
118
|
### MiniMax
|
|
119
|
-
`minimaxM25()` `
|
|
119
|
+
`minimaxM25()` `minimaxM27()`
|
|
120
120
|
|
|
121
121
|
### Fireworks
|
|
122
122
|
`deepseekV32()` `GLM5()` `GLM47()`
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const { expect } = require('chai');
|
|
2
|
+
const { ModelMix } = require('../index.js');
|
|
3
|
+
|
|
4
|
+
describe('DeepSeek Model Registration Tests', () => {
|
|
5
|
+
it('should register Fireworks DeepSeek V4 Pro by default', () => {
|
|
6
|
+
const model = ModelMix.new();
|
|
7
|
+
model.deepseekV4Pro({ mix: { fireworks: true, openrouter: false } });
|
|
8
|
+
|
|
9
|
+
expect(model.models).to.have.length(1);
|
|
10
|
+
expect(model.models[0].key).to.equal('accounts/fireworks/models/deepseek-v4-pro');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should register Together DeepSeek V4 Pro when together mix is enabled', () => {
|
|
14
|
+
const model = ModelMix.new();
|
|
15
|
+
model.deepseekV4Pro({ mix: { fireworks: false, openrouter: false, together: true } });
|
|
16
|
+
|
|
17
|
+
expect(model.models).to.have.length(1);
|
|
18
|
+
expect(model.models[0].key).to.equal('deepseek-ai/DeepSeek-V4-Pro');
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const { expect } = require('chai');
|
|
2
|
+
const { ModelMix } = require('../index.js');
|
|
3
|
+
|
|
4
|
+
describe('Grok Model Registration Tests', () => {
|
|
5
|
+
const grokModels = [
|
|
6
|
+
{ method: 'grok43', key: 'grok-4.3' },
|
|
7
|
+
{ method: 'grok420multiAgent', key: 'grok-4.20-multi-agent-0309' },
|
|
8
|
+
{ method: 'grok420think', key: 'grok-4.20-0309-reasoning' },
|
|
9
|
+
{ method: 'grok420', key: 'grok-4.20-0309-non-reasoning' }
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
for (const grokModel of grokModels) {
|
|
13
|
+
it(`should register ${grokModel.key} with ${grokModel.method}()`, () => {
|
|
14
|
+
const model = ModelMix.new();
|
|
15
|
+
model[grokModel.method]();
|
|
16
|
+
|
|
17
|
+
expect(model.models).to.have.length(1);
|
|
18
|
+
expect(model.models[0].key).to.equal(grokModel.key);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
package/test/live.mcp.js
CHANGED
|
@@ -191,8 +191,8 @@ describe('Live MCP Integration Tests', function () {
|
|
|
191
191
|
|
|
192
192
|
describe('Advanced MCP Tool Integration', function () {
|
|
193
193
|
|
|
194
|
-
it('should use multiple MCP tools with Grok 3
|
|
195
|
-
const model = ModelMix.new(setup).
|
|
194
|
+
it('should use multiple MCP tools with Grok 4.3', async function () {
|
|
195
|
+
const model = ModelMix.new(setup).grok43();
|
|
196
196
|
|
|
197
197
|
// Add multiple tools
|
|
198
198
|
model.addTools([
|
package/test/live.test.js
CHANGED
|
@@ -204,18 +204,38 @@ describe('Live Integration Tests', function () {
|
|
|
204
204
|
expect(response.toLowerCase()).to.include('gptoss test successful');
|
|
205
205
|
});
|
|
206
206
|
|
|
207
|
-
it('should work with
|
|
208
|
-
const model = ModelMix.new(setup).
|
|
207
|
+
it('should work with Grok 4.1 model', async function () {
|
|
208
|
+
const model = ModelMix.new(setup).grok41();
|
|
209
209
|
|
|
210
|
-
model.addText('Say "
|
|
210
|
+
model.addText('Say "grok41 test successful" and nothing else.');
|
|
211
211
|
|
|
212
212
|
const response = await model.message();
|
|
213
|
-
console.log(`
|
|
213
|
+
console.log(`Grok 4.1 response: ${response}`);
|
|
214
214
|
|
|
215
215
|
expect(response).to.be.a('string');
|
|
216
|
-
expect(response.toLowerCase()).to.include('
|
|
216
|
+
expect(response.toLowerCase()).to.include('grok41 test successful');
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
+
const grokSeriesTests = [
|
|
220
|
+
{ name: 'Grok 4.3', factory: (m) => m.grok43(), token: 'grok43' },
|
|
221
|
+
{ name: 'Grok 4.20 reasoning', factory: (m) => m.grok420think(), token: 'grok420think' },
|
|
222
|
+
{ name: 'Grok 4.20 non-reasoning', factory: (m) => m.grok420(), token: 'grok420' }
|
|
223
|
+
];
|
|
224
|
+
|
|
225
|
+
for (const grokModel of grokSeriesTests) {
|
|
226
|
+
it(`should work with ${grokModel.name} model`, async function () {
|
|
227
|
+
const model = grokModel.factory(ModelMix.new(setup));
|
|
228
|
+
|
|
229
|
+
model.addText(`Say "${grokModel.token} test successful" and nothing else.`);
|
|
230
|
+
|
|
231
|
+
const response = await model.message();
|
|
232
|
+
console.log(`${grokModel.name} response: ${response}`);
|
|
233
|
+
|
|
234
|
+
expect(response).to.be.a('string');
|
|
235
|
+
expect(response.toLowerCase()).to.include(`${grokModel.token} test successful`);
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
219
239
|
});
|
|
220
240
|
|
|
221
241
|
describe('Image Processing with JSON Output', function () {
|
|
@@ -240,8 +260,8 @@ describe('Live Integration Tests', function () {
|
|
|
240
260
|
expect(result.color).to.be.a('string').and.not.empty;
|
|
241
261
|
});
|
|
242
262
|
|
|
243
|
-
it('should process images and return JSON with Grok 4', async function () {
|
|
244
|
-
const model = ModelMix.new(setup).
|
|
263
|
+
it('should process images and return JSON with Grok 4.3', async function () {
|
|
264
|
+
const model = ModelMix.new(setup).grok43();
|
|
245
265
|
|
|
246
266
|
model.addImageFromUrl(blueSquareBase64)
|
|
247
267
|
.addText('Analyze this image and provide details in JSON format.');
|
|
@@ -252,7 +272,7 @@ describe('Live Integration Tests', function () {
|
|
|
252
272
|
description: "string"
|
|
253
273
|
});
|
|
254
274
|
|
|
255
|
-
console.log(`
|
|
275
|
+
console.log(`Grok 4.3 image JSON result:`, result);
|
|
256
276
|
|
|
257
277
|
expect(result).to.be.an('object');
|
|
258
278
|
expect(result).to.have.property('color');
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const { expect } = require('chai');
|
|
2
|
+
const { ModelMix } = require('../index.js');
|
|
3
|
+
|
|
4
|
+
describe('Qwen Model Registration Tests', () => {
|
|
5
|
+
it('should register Fireworks Qwen 3.6 Plus by default', () => {
|
|
6
|
+
const model = ModelMix.new();
|
|
7
|
+
model.qwen36plus({ mix: { fireworks: true, together: false } });
|
|
8
|
+
|
|
9
|
+
expect(model.models).to.have.length(1);
|
|
10
|
+
expect(model.models[0].key).to.equal('accounts/fireworks/models/qwen3p6-plus');
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('should register Together Qwen 3.6 Plus when together mix is enabled', () => {
|
|
14
|
+
const model = ModelMix.new();
|
|
15
|
+
model.qwen36plus({ mix: { fireworks: false, openrouter: false, together: true } });
|
|
16
|
+
|
|
17
|
+
expect(model.models).to.have.length(1);
|
|
18
|
+
expect(model.models[0].key).to.equal('Qwen/Qwen3.6-Plus');
|
|
19
|
+
});
|
|
20
|
+
});
|