modelmix 4.4.0 → 4.4.2

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,10 @@ 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],
53
55
  // Perplexity
54
56
  'sonar': [1.00, 1.00],
55
57
  'sonar-pro': [3.00, 15.00],
@@ -436,6 +438,10 @@ class ModelMix {
436
438
  return this;
437
439
  }
438
440
 
441
+ minimaxM25({ options = {}, config = {} } = {}) {
442
+ return this.attach('MiniMax-M2.5', new MixMiniMax({ options, config }));
443
+ }
444
+
439
445
  minimaxM2Stable({ options = {}, config = {} } = {}) {
440
446
  return this.attach('MiniMax-M2-Stable', new MixMiniMax({ options, config }));
441
447
  }
@@ -447,6 +453,12 @@ class ModelMix {
447
453
  return this;
448
454
  }
449
455
 
456
+ GLM5({ options = {}, config = {}, mix = { fireworks: true } } = {}) {
457
+ mix = { ...this.mix, ...mix };
458
+ if (mix.fireworks) this.attach('fireworks/glm-5', new MixFireworks({ options, config }));
459
+ return this;
460
+ }
461
+
450
462
  GLM47({ options = {}, config = {}, mix = { fireworks: true } } = {}) {
451
463
  mix = { ...this.mix, ...mix };
452
464
  if (mix.fireworks) this.attach('accounts/fireworks/models/glm-4p7', new MixFireworks({ options, config }));
@@ -899,7 +911,7 @@ class ModelMix {
899
911
  // debug level 2: Readable summary of output
900
912
  if (currentConfig.debug >= 2) {
901
913
  const tokenInfo = result.tokens
902
- ? ` ${result.tokens.input}→${result.tokens.output} tok` + (result.tokens.cost != null ? ` $${result.tokens.cost.toFixed(4)}` : '')
914
+ ? ` ${result.tokens.input} → ${result.tokens.output} tok` + (result.tokens.cost != null ? ` $${result.tokens.cost.toFixed(4)}` : '')
903
915
  : '';
904
916
  console.log(`✓${tokenInfo}\n${ModelMix.formatOutputSummary(result, currentConfig.debug).trim()}`);
905
917
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modelmix",
3
- "version": "4.4.0",
3
+ "version": "4.4.2",
4
4
  "description": "🧬 Reliable interface with automatic fallback for AI LLMs.",
5
5
  "main": "index.js",
6
6
  "repository": {