modelmix 5.1.17 → 5.1.19

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
@@ -197,7 +197,10 @@ ModelMix provides convenient shorthand methods for quickly accessing different A
197
197
  | `grok420multiAgent()` | Grok | grok-4.20-multi-agent-0309 | [\$1.25][6] | [\$2.50][6] |
198
198
  | `grok420()` | Grok | grok-4.20-0309 (†) | [\$1.25][6] | [\$2.50][6] |
199
199
  | `museGlimmer30b()` | Fireworks | models/muse-glimmer-30b | [\$0.35][17] | [\$1.50][17] |
200
- | `museSpark12()` | OpenRouter | meta/muse-spark-1.2-contributor | [\$0.10][22] | [\$0.20][22] |
200
+ | `museSpark12()` | OpenRouter | meta/muse-spark-1.2 | [\$1.25][25] | [\$4.25][25] |
201
+ | `museSpark12c()` | OpenRouter | meta/muse-spark-1.2-contributor | [\$0.10][22] | [\$0.20][22] |
202
+ | `museSpark13()` | OpenRouter | meta/muse-spark-1.3 | [\$1.25][24] | [\$4.25][24] |
203
+ | `museSpark13c()` | OpenRouter | meta/muse-spark-1.3-contributor | [\$0.10][26] | [\$0.20][26] |
201
204
  | `qwen35397b()` | OpenRouter | qwen/qwen3.5-397b-a17b | [\$0.385][14] | [\$2.45][14] |
202
205
  | `qwen36plus()` | OpenRouter | qwen/qwen3.6-plus | [\$0.325][18] | [\$1.95][18] |
203
206
  | `qwen37plus()` | Fireworks | models/qwen3p7-plus | [\$0.40][10] | [\$1.60][10] |
@@ -254,6 +257,12 @@ OpenRouter fallbacks are disabled globally by default and are appended only with
254
257
  [21]: https://openrouter.ai/anthropic/claude-fable-5.1 "Claude Fable 5.1 on OpenRouter"
255
258
  [22]: https://openrouter.ai/meta/muse-spark-1.2-contributor "Muse Spark 1.2 Contributor on OpenRouter"
256
259
  [23]: https://openrouter.ai/openai "OpenAI Models on OpenRouter"
260
+ [24]: https://openrouter.ai/meta/muse-spark-1.3 "Muse Spark 1.3 on OpenRouter"
261
+
262
+ [25]: https://openrouter.ai/meta/muse-spark-1.2 "Muse Spark 1.2 on OpenRouter"
263
+ [26]: https://openrouter.ai/meta/muse-spark-1.3-contributor "Muse Spark 1.3 Contributor on OpenRouter"
264
+
265
+ Muse Spark methods ending in `c` select Contributor: prompts and outputs may be used to improve Meta products. Methods without `c` select the standard tier. `museSpark12()` now selects standard; use `museSpark12c()` for the previous Contributor behavior.
257
266
 
258
267
  Each method accepts optional `options`, `config`, and (for multi-provider methods) `mix` parameters to customize behavior.
259
268
 
package/demo/short.js CHANGED
@@ -21,9 +21,12 @@ const mmix = await ModelMix.new(setup)
21
21
  .GLM53() // (fallback 10) OpenRouter z-ai/glm-5.3
22
22
  .GLM53Flash() // (fallback 11) OpenRouter z-ai/glm-5.3-flash
23
23
  .museGlimmer30b({ mix: { fireworks: false, openrouter: true } }) // (fallback 12) OpenRouter meta/muse-glimmer-30b
24
- .museSpark12() // (fallback 13) OpenRouter meta/muse-spark-1.2-contributor
24
+ .museSpark12c() // (fallback 13) OpenRouter meta/muse-spark-1.2-contributor
25
25
  .hermes470b() // (fallback 14) OpenRouter nousresearch/hermes-4-70b
26
26
  .hermes4405b() // (fallback 15) OpenRouter nousresearch/hermes-4-405b
27
+ .museSpark13() // (fallback 16) OpenRouter meta/muse-spark-1.3
28
+ .museSpark12() // (fallback 17) OpenRouter meta/muse-spark-1.2
29
+ .museSpark13c() // (fallback 18) OpenRouter meta/muse-spark-1.3-contributor
27
30
  .addText("What's your name?");
28
31
 
29
32
  console.log(await mmix.message());
package/effort.js CHANGED
@@ -49,7 +49,10 @@ const OPENAI_MODEL_LEVELS = {
49
49
  'meta/muse-glimmer-30b': ['low', 'medium', 'high'],
50
50
  'accounts/fireworks/models/muse-glimmer-30b': ['low', 'medium', 'high', 'xhigh'],
51
51
  'meta-models/Muse-Glimmer-30B': ['low', 'medium', 'high', 'xhigh'],
52
+ 'meta/muse-spark-1.2': ['minimal', 'low', 'medium', 'high', 'xhigh'],
53
+ 'meta/muse-spark-1.3-contributor': ['minimal', 'low', 'medium', 'high', 'xhigh'],
52
54
  'meta/muse-spark-1.2-contributor': ['minimal', 'low', 'medium', 'high', 'xhigh'],
55
+ 'meta/muse-spark-1.3': ['minimal', 'low', 'medium', 'high', 'xhigh'],
53
56
  'accounts/fireworks/models/qwen3p8-2p4t-a95b': ['none', 'low', 'medium', 'high'],
54
57
  'qwen/qwen3.8-27b': ['low', 'medium', 'xhigh'],
55
58
  'qwen/qwen3.8-flash': ['low', 'medium', 'xhigh'],
package/index.d.ts CHANGED
@@ -504,6 +504,9 @@ export declare class ModelMix {
504
504
  // Multi-provider
505
505
  museGlimmer30b(args?: ModelAttachArgs): this;
506
506
  museSpark12(args?: ModelAttachArgs): this;
507
+ museSpark12c(args?: ModelAttachArgs): this;
508
+ museSpark13(args?: ModelAttachArgs): this;
509
+ museSpark13c(args?: ModelAttachArgs): this;
507
510
  qwen35397b(args?: ModelAttachArgs): this;
508
511
  qwen36plus(args?: ModelAttachArgs): this;
509
512
  qwen37plus(args?: ModelAttachArgs): this;
package/index.js CHANGED
@@ -625,9 +625,21 @@ class ModelMix {
625
625
  }
626
626
 
627
627
  museSpark12({ options = {}, config = {} } = {}) {
628
+ return this.attach('meta/muse-spark-1.2', new MixOpenRouter({ options, config }));
629
+ }
630
+
631
+ museSpark12c({ options = {}, config = {} } = {}) {
628
632
  return this.attach('meta/muse-spark-1.2-contributor', new MixOpenRouter({ options, config }));
629
633
  }
630
634
 
635
+ museSpark13({ options = {}, config = {} } = {}) {
636
+ return this.attach('meta/muse-spark-1.3', new MixOpenRouter({ options, config }));
637
+ }
638
+
639
+ museSpark13c({ options = {}, config = {} } = {}) {
640
+ return this.attach('meta/muse-spark-1.3-contributor', new MixOpenRouter({ options, config }));
641
+ }
642
+
631
643
  qwen35397b({ options = {}, config = {} } = {}) {
632
644
  return this.attach('qwen/qwen3.5-397b-a17b', new MixOpenRouter({ options, config }));
633
645
  }
@@ -10,7 +10,7 @@ const CHAIN_MODEL_SHORTCUTS = new Set([
10
10
  'gemini31pro', 'gemini38flash', 'gemini37flash', 'gemini36flash', 'gemini35flash',
11
11
  'gemini35flashLite', 'gemini31flashLite', 'sonarPro', 'sonar',
12
12
  'grok46', 'grok45', 'grok43', 'grok420multiAgent', 'grok420',
13
- 'museGlimmer30b', 'museSpark12',
13
+ 'museGlimmer30b', 'museSpark12', 'museSpark12c', 'museSpark13', 'museSpark13c',
14
14
  'qwen35397b', 'qwen36plus', 'qwen37plus', 'qwen38max', 'qwen3827b', 'qwen38flash',
15
15
  'hermes470b', 'hermes4405b', 'hermes3',
16
16
  'kimiK26', 'kimiK27Code', 'kimiK3', 'kimiK25',
@@ -84,7 +84,10 @@ const MODEL_PRICING = {
84
84
  'meta/muse-glimmer-30b': { input: 0.35, cachedInput: 0.04, output: 1.50 },
85
85
  'accounts/fireworks/models/muse-glimmer-30b': { input: 0.35, cachedInput: 0.04, output: 1.50 },
86
86
  'meta-models/Muse-Glimmer-30B': { input: 0.35, cachedInput: 0.04, output: 1.50 },
87
+ 'meta/muse-spark-1.2': { input: 1.25, cachedInput: 0.15, output: 4.25 },
88
+ 'meta/muse-spark-1.3-contributor': { input: 0.10, cachedInput: 0.002, output: 0.20 },
87
89
  'meta/muse-spark-1.2-contributor': { input: 0.10, cachedInput: 0.002, output: 0.20 },
90
+ 'meta/muse-spark-1.3': { input: 1.25, cachedInput: 0.15, output: 4.25 },
88
91
  // Fireworks
89
92
  'accounts/fireworks/models/deepseek-v4-flash': { input: 0.14, output: 0.28 },
90
93
  'accounts/fireworks/models/deepseek-v4-pro': { input: 1.74, output: 3.48 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "modelmix",
3
- "version": "5.1.17",
3
+ "version": "5.1.19",
4
4
  "description": "🧬 Reliable interface with automatic fallback for AI LLMs.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -24,20 +24,20 @@
24
24
  "fallback",
25
25
  "kimi",
26
26
  "mythos",
27
- "gpt5",
28
- "opus50",
29
- "opus5",
30
- "fable51",
31
- "fable50",
27
+ "gpt6",
28
+ "astra",
29
+ "muse",
30
+ "spark",
31
+ "opus",
32
32
  "fable",
33
33
  "sonnet",
34
34
  "openrouter",
35
35
  "gemini",
36
+ "qwen",
36
37
  "glm",
37
38
  "lmstudio",
38
39
  "deepseek",
39
40
  "oss",
40
- "k26",
41
41
  "reasoning",
42
42
  "minimax",
43
43
  "thinking",
@@ -79,5 +79,6 @@
79
79
  "test:plugins": "mocha test/plugins.test.js --timeout 10000 --require test/setup.js",
80
80
  "test:rlm": "mocha plugins/rlm/test/**/*.test.js --timeout 10000 --require test/setup.js",
81
81
  "test:offline": "mocha test/abort.test.js test/json.test.js test/fallback.test.js test/templates.test.js test/images.test.js test/bottleneck.test.js test/tokens.test.js test/history.test.js test/anthropic.test.js test/effort.test.js test/grok.test.js test/moderation.test.js test/plugins.test.js plugins/rlm/test/**/*.test.js --timeout 10000 --require test/setup.js"
82
- }
83
- }
82
+ },
83
+ "packageManager": "pnpm@11.18.0+sha512.33d83c77da82f49fba836925c6f1b841181ec3132b670639bd012f7075f5c7cf634c5f870147c19aae7478fac01df09d8892e880454896edd23ee9b33757563c"
84
+ }
@@ -190,7 +190,9 @@ Use `.effort(n)` (or `config.effort`) to enable Anthropic thinking — e.g. `.ef
190
190
  `GLM46()`
191
191
 
192
192
  ### OpenRouter
193
- `museGlimmer30b()` `museSpark12()` `gptOss()` `qwen35397b()` `qwen36plus()` `qwen37plus()` `qwen3827b()` `qwen38flash()` `hermes470b()` `hermes4405b()` `qwen38max()` `kimiK27Code()` `kimiK3()` `minimaxM27()` `minimaxM3()` `GLM45()` `GLM52()` `GLM53()` `GLM53Flash()`
193
+ `museGlimmer30b()` `museSpark12()` `museSpark12c()` `museSpark13()` `museSpark13c()` `gptOss()` `qwen35397b()` `qwen36plus()` `qwen37plus()` `qwen3827b()` `qwen38flash()` `hermes470b()` `hermes4405b()` `qwen38max()` `kimiK27Code()` `kimiK3()` `minimaxM27()` `minimaxM3()` `GLM45()` `GLM52()` `GLM53()` `GLM53Flash()`
194
+
195
+ Muse Spark: the `c` suffix selects Contributor, where prompts and outputs may be used to improve Meta products. Without `c`, the standard tier is selected. Use `museSpark12c()` for the former `museSpark12()` Contributor behavior.
194
196
 
195
197
  ### Multi-provider (auto-fallback across free/paid tiers)
196
198
  `hermes3()` `kimiK25()`
@@ -135,14 +135,18 @@ describe('Unified effort scale', () => {
135
135
  });
136
136
  });
137
137
 
138
- it('maps Muse Spark 1.2 Contributor to every supported reasoning level', () => {
139
- const key = 'meta/muse-spark-1.2-contributor';
140
- expect(mapEffort('openai', 0, key)).to.deep.equal({ reasoning_effort: 'minimal' });
141
- expect(mapEffort('openai', 20, key)).to.deep.equal({ reasoning_effort: 'low' });
142
- expect(mapEffort('openai', 40, key)).to.deep.equal({ reasoning_effort: 'medium' });
143
- expect(mapEffort('openai', 60, key)).to.deep.equal({ reasoning_effort: 'high' });
144
- expect(mapEffort('openai', 80, key)).to.deep.equal({ reasoning_effort: 'xhigh' });
145
- expect(mapEffort('openai', -1, key)).to.equal(null);
138
+ it('maps every Muse Spark variant to supported reasoning levels', () => {
139
+ for (const key of [
140
+ 'meta/muse-spark-1.2', 'meta/muse-spark-1.2-contributor',
141
+ 'meta/muse-spark-1.3', 'meta/muse-spark-1.3-contributor'
142
+ ]) {
143
+ expect(mapEffort('openai', 0, key)).to.deep.equal({ reasoning_effort: 'minimal' });
144
+ expect(mapEffort('openai', 20, key)).to.deep.equal({ reasoning_effort: 'low' });
145
+ expect(mapEffort('openai', 40, key)).to.deep.equal({ reasoning_effort: 'medium' });
146
+ expect(mapEffort('openai', 60, key)).to.deep.equal({ reasoning_effort: 'high' });
147
+ expect(mapEffort('openai', 80, key)).to.deep.equal({ reasoning_effort: 'xhigh' });
148
+ expect(mapEffort('openai', -1, key)).to.equal(null);
149
+ }
146
150
  });
147
151
 
148
152
  it('maps Qwen 3.8 27B to its supported reasoning levels', () => {
package/test/muse.test.js CHANGED
@@ -1,4 +1,5 @@
1
1
  const { expect } = require('chai');
2
+ const nock = require('nock');
2
3
  const {
3
4
  ModelMix,
4
5
  MixFireworks,
@@ -8,6 +9,28 @@ const {
8
9
  } = require('../index.js');
9
10
 
10
11
  describe('Muse Model Registration Tests', () => {
12
+ it('sends Muse Spark 1.3 requests through chain() with supported effort and options', async () => {
13
+ const api = nock('https://openrouter.ai')
14
+ .post('/api/v1/chat/completions', body => {
15
+ expect(body.model).to.equal('meta/muse-spark-1.3');
16
+ expect(body.reasoning_effort).to.equal('minimal');
17
+ expect(body.max_tokens).to.equal(2048);
18
+ return true;
19
+ })
20
+ .reply(200, {
21
+ choices: [{ message: { content: 'ok' } }],
22
+ usage: { prompt_tokens: 10, completion_tokens: 2, total_tokens: 12 }
23
+ });
24
+
25
+ const model = ModelMix.new({ config: { apiKey: 'test-key' }, options: { max_tokens: 2048 } })
26
+ .chain('museSpark13@0')
27
+ .addText('Hi');
28
+
29
+ expect(model.models[0].provider).to.be.instanceOf(MixOpenRouter);
30
+ expect(await model.message()).to.equal('ok');
31
+ api.done();
32
+ });
33
+
11
34
  it('registers only Fireworks by default', () => {
12
35
  const model = ModelMix.new().museGlimmer30b();
13
36
 
@@ -56,23 +79,25 @@ describe('Muse Model Registration Tests', () => {
56
79
  ]);
57
80
  });
58
81
 
59
- it('registers Muse Spark 1.2 Contributor through OpenRouter', () => {
60
- const model = ModelMix.new().museSpark12();
82
+ for (const [shortcut, key] of [
83
+ ['museSpark12', 'meta/muse-spark-1.2'],
84
+ ['museSpark12c', 'meta/muse-spark-1.2-contributor'],
85
+ ['museSpark13', 'meta/muse-spark-1.3'],
86
+ ['museSpark13c', 'meta/muse-spark-1.3-contributor']
87
+ ]) {
88
+ it(`registers ${shortcut} directly and through chain()`, () => {
89
+ const direct = ModelMix.new()[shortcut]({
90
+ config: { apiKey: 'test-key' },
91
+ options: { max_tokens: 2048 }
92
+ });
93
+ const chain = ModelMix.new({ config: { apiKey: 'test-key' } }).chain(shortcut);
61
94
 
62
- expect(model.models).to.have.length(1);
63
- expect(model.models[0].key).to.equal('meta/muse-spark-1.2-contributor');
64
- expect(model.models[0].provider).to.be.instanceOf(MixOpenRouter);
65
- expect(ModelMix.calculateCost('meta/muse-spark-1.2-contributor', {
66
- input: 1_000_000,
67
- cached: 250_000,
68
- output: 1_000_000
69
- })).to.equal(0.2755);
70
- });
71
-
72
- it('supports Muse Spark 1.2 Contributor in chain()', () => {
73
- const model = ModelMix.new().chain('museSpark12');
74
-
75
- expect(model.models).to.have.length(1);
76
- expect(model.models[0].key).to.equal('meta/muse-spark-1.2-contributor');
77
- });
95
+ for (const model of [direct, chain]) {
96
+ expect(model.models).to.have.length(1);
97
+ expect(model.models[0].key).to.equal(key);
98
+ expect(model.models[0].provider).to.be.instanceOf(MixOpenRouter);
99
+ }
100
+ expect(direct.models[0].provider.options.max_tokens).to.equal(2048);
101
+ });
102
+ }
78
103
  });