modelmix 4.4.0 → 4.4.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
@@ -159,7 +159,7 @@ Here's a comprehensive list of available methods:
159
159
  | `grok41[think]()` | Grok | grok-4-1-fast | [\$0.20 / \$0.50][6] |
160
160
  | `deepseekV32()` | Fireworks | fireworks/models/deepseek-v3p2 | [\$0.56 / \$1.68][10] |
161
161
  | `GLM47()` | Fireworks | fireworks/models/glm-4p7 | [\$0.55 / \$2.19][10] |
162
- | `minimaxM21()` | MiniMax | MiniMax-M2.1 | [\$0.30 / \$1.20][9] |
162
+ | `minimaxM25()` | MiniMax | MiniMax-M2.5 | [\$0.30 / \$1.20][9] |
163
163
  | `sonar()` | Perplexity | sonar | [\$1.00 / \$1.00][4] |
164
164
  | `sonarPro()` | Perplexity | sonar-pro | [\$3.00 / \$15.00][4] |
165
165
  | `scout()` | Groq | Llama-4-Scout-17B-16E-Instruct | [\$0.11 / \$0.34][5] |
@@ -177,7 +177,7 @@ Here's a comprehensive list of available methods:
177
177
  [6]: https://docs.x.ai/docs/models "xAI"
178
178
  [7]: https://www.together.ai/pricing "Together AI"
179
179
  [8]: https://lambda.ai/inference "Lambda Pricing"
180
- [9]: https://www.minimax.io/price "MiniMax Pricing"
180
+ [9]: https://platform.minimax.io/docs/api-reference/anthropic-api-compatible-cache#supported-models-and-pricing "MiniMax Pricing"
181
181
  [10]: https://fireworks.ai/pricing#serverless-pricing "Fireworks Pricing"
182
182
 
183
183
  Each method accepts optional `options` and `config` parameters to customize the model's behavior. For example:
package/demo/minimax.js CHANGED
@@ -7,7 +7,7 @@ const main = async () => {
7
7
 
8
8
  const bot = ModelMix
9
9
  .new({ config: { debug: 3 } })
10
- .minimaxM21()
10
+ .minimaxM25()
11
11
  .setSystem('You are a helpful assistant.');
12
12
 
13
13
  bot.addText('What is the capital of France?');
package/index.js CHANGED
@@ -48,8 +48,11 @@ const MODEL_PRICING = {
48
48
  'accounts/fireworks/models/deepseek-v3p2': [0.56, 1.68],
49
49
  'accounts/fireworks/models/glm-4p7': [0.55, 2.19],
50
50
  'accounts/fireworks/models/kimi-k2p5': [0.50, 2.80],
51
+ 'fireworks/glm-5': [1.00, 3.20],
51
52
  // MiniMax
52
53
  'MiniMax-M2.1': [0.30, 1.20],
54
+ 'MiniMax-M2.5': [0.30, 1.20],
55
+ 'fireworks/minimax-m2p5': [0.30, 1.20],
53
56
  // Perplexity
54
57
  'sonar': [1.00, 1.00],
55
58
  'sonar-pro': [3.00, 15.00],
@@ -277,14 +280,14 @@ class ModelMix {
277
280
  opus46think({ options = {}, config = {} } = {}) {
278
281
  options = { ...MixAnthropic.thinkingOptions, ...options };
279
282
  return this.attach('claude-opus-4-6', new MixAnthropic({ options, config }));
280
- }
283
+ }
281
284
  opus45think({ options = {}, config = {} } = {}) {
282
285
  options = { ...MixAnthropic.thinkingOptions, ...options };
283
286
  return this.attach('claude-opus-4-5-20251101', new MixAnthropic({ options, config }));
284
- }
287
+ }
285
288
  opus46({ options = {}, config = {} } = {}) {
286
289
  return this.attach('claude-opus-4-6', new MixAnthropic({ options, config }));
287
- }
290
+ }
288
291
  opus45({ options = {}, config = {} } = {}) {
289
292
  return this.attach('claude-opus-4-5-20251101', new MixAnthropic({ options, config }));
290
293
  }
@@ -412,7 +415,7 @@ class ModelMix {
412
415
  if (mix.fireworks) this.attach('accounts/fireworks/models/kimi-k2p5', new MixFireworks({ options, config }));
413
416
  if (mix.openrouter) this.attach('moonshotai/kimi-k2.5', new MixOpenRouter({ options, config }));
414
417
  return this;
415
- }
418
+ }
416
419
 
417
420
  kimiK2think({ options = {}, config = {}, mix = { together: true } } = {}) {
418
421
  mix = { ...this.mix, ...mix };
@@ -436,6 +439,13 @@ class ModelMix {
436
439
  return this;
437
440
  }
438
441
 
442
+ minimaxM25({ options = {}, config = {}, mix = { minimax: true } } = {}) {
443
+ mix = { ...this.mix, ...mix };
444
+ if (mix.minimax) this.attach('MiniMax-M2.5', new MixMiniMax({ options, config }));
445
+ if (mix.fireworks) this.attach('fireworks/minimax-m2p5', new MixFireworks({ options, config }));
446
+ return this;
447
+ }
448
+
439
449
  minimaxM2Stable({ options = {}, config = {} } = {}) {
440
450
  return this.attach('MiniMax-M2-Stable', new MixMiniMax({ options, config }));
441
451
  }
@@ -447,6 +457,12 @@ class ModelMix {
447
457
  return this;
448
458
  }
449
459
 
460
+ GLM5({ options = {}, config = {}, mix = { fireworks: true } } = {}) {
461
+ mix = { ...this.mix, ...mix };
462
+ if (mix.fireworks) this.attach('fireworks/glm-5', new MixFireworks({ options, config }));
463
+ return this;
464
+ }
465
+
450
466
  GLM47({ options = {}, config = {}, mix = { fireworks: true } } = {}) {
451
467
  mix = { ...this.mix, ...mix };
452
468
  if (mix.fireworks) this.attach('accounts/fireworks/models/glm-4p7', new MixFireworks({ options, config }));
@@ -899,7 +915,7 @@ class ModelMix {
899
915
  // debug level 2: Readable summary of output
900
916
  if (currentConfig.debug >= 2) {
901
917
  const tokenInfo = result.tokens
902
- ? ` ${result.tokens.input}→${result.tokens.output} tok` + (result.tokens.cost != null ? ` $${result.tokens.cost.toFixed(4)}` : '')
918
+ ? ` ${result.tokens.input} → ${result.tokens.output} tok` + (result.tokens.cost != null ? ` $${result.tokens.cost.toFixed(4)}` : '')
903
919
  : '';
904
920
  console.log(`✓${tokenInfo}\n${ModelMix.formatOutputSummary(result, currentConfig.debug).trim()}`);
905
921
  }
@@ -2121,7 +2137,7 @@ class MixGoogle extends MixCustom {
2121
2137
  }
2122
2138
 
2123
2139
  const options = {};
2124
-
2140
+
2125
2141
  // Solo incluir tools si el array no está vacío
2126
2142
  if (functionDeclarations.length > 0) {
2127
2143
  options.tools = [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modelmix",
3
- "version": "4.4.0",
3
+ "version": "4.4.4",
4
4
  "description": "🧬 Reliable interface with automatic fallback for AI LLMs.",
5
5
  "main": "index.js",
6
6
  "repository": {