modelmix 4.6.4 → 4.6.6
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 +2 -1
- package/index.js +10 -2
- package/package.json +6 -5
- package/pnpm-workspace.yaml +2 -0
- package/skills/modelmix/SKILL.md +2 -2
- package/test/anthropic.test.js +19 -0
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ try { process.loadEnvFile(); } catch {}
|
|
|
49
49
|
|
|
50
50
|
// Get structured JSON responses
|
|
51
51
|
const model = ModelMix.new()
|
|
52
|
-
.
|
|
52
|
+
.opus5() // Anthropic claude-opus-5
|
|
53
53
|
.addText("Name and capital of 3 South American countries.");
|
|
54
54
|
|
|
55
55
|
const outputExample = { countries: [{ name: "", capital: "" }] };
|
|
@@ -154,6 +154,7 @@ Here's a comprehensive list of available methods:
|
|
|
154
154
|
| `gpt41nano()` | OpenAI | gpt-4.1-nano | [\$0.10 / \$0.40][1] |
|
|
155
155
|
| `gptOss()` | Together | gpt-oss-120B | [\$0.15 / \$0.60][7] |
|
|
156
156
|
| `fable5[think]()` | Anthropic | claude-fable-5 | [\$10.00 / \$50.00][2] |
|
|
157
|
+
| `opus5[think]()` | Anthropic | claude-opus-5 | [\$5.00 / \$25.00][2] |
|
|
157
158
|
| `opus48[think]()` | Anthropic | claude-opus-4-8 | [\$5.00 / \$25.00][2] |
|
|
158
159
|
| `opus47[think]()` | Anthropic | claude-opus-4-7 | [\$5.00 / \$25.00][2] |
|
|
159
160
|
| `opus46[think]()` | Anthropic | claude-opus-4-6 | [\$5.00 / \$25.00][2] |
|
package/index.js
CHANGED
|
@@ -62,6 +62,7 @@ const MODEL_PRICING = {
|
|
|
62
62
|
'openai/gpt-oss-120b:free': [0, 0],
|
|
63
63
|
// Anthropic
|
|
64
64
|
'claude-fable-5': [10.00, 50.00],
|
|
65
|
+
'claude-opus-5': [5.00, 25.00],
|
|
65
66
|
'claude-sonnet-5': [3.00, 15.00],
|
|
66
67
|
'claude-opus-4-8': [5.00, 25.00],
|
|
67
68
|
'claude-opus-4-7': [5.00, 25.00],
|
|
@@ -367,9 +368,16 @@ class ModelMix {
|
|
|
367
368
|
return this.attach('claude-fable-5', new MixAnthropic({ options, config }));
|
|
368
369
|
}
|
|
369
370
|
fable5think({ options = {}, config = {} } = {}) {
|
|
370
|
-
options = { ...MixAnthropic.
|
|
371
|
+
options = { ...MixAnthropic.maxEffortThinkingOptions, ...options };
|
|
371
372
|
return this.attach('claude-fable-5', new MixAnthropic({ options, config }));
|
|
372
373
|
}
|
|
374
|
+
opus5({ options = {}, config = {} } = {}) {
|
|
375
|
+
return this.attach('claude-opus-5', new MixAnthropic({ options, config }));
|
|
376
|
+
}
|
|
377
|
+
opus5think({ options = {}, config = {} } = {}) {
|
|
378
|
+
options = { ...MixAnthropic.maxEffortThinkingOptions, ...options };
|
|
379
|
+
return this.attach('claude-opus-5', new MixAnthropic({ options, config }));
|
|
380
|
+
}
|
|
373
381
|
opus48think({ options = {}, config = {} } = {}) {
|
|
374
382
|
options = { ...MixAnthropic.thinkingOptions, ...options };
|
|
375
383
|
return this.attach('claude-opus-4-8', new MixAnthropic({ options, config }));
|
|
@@ -2176,7 +2184,7 @@ class MixAnthropic extends MixCustom {
|
|
|
2176
2184
|
temperature: 1
|
|
2177
2185
|
};
|
|
2178
2186
|
|
|
2179
|
-
static
|
|
2187
|
+
static maxEffortThinkingOptions = {
|
|
2180
2188
|
output_config: { effort: 'max' },
|
|
2181
2189
|
thinking: { display: 'summarized' },
|
|
2182
2190
|
temperature: 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modelmix",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.6",
|
|
4
4
|
"description": "🧬 Reliable interface with automatic fallback for AI LLMs.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"kimi",
|
|
25
25
|
"mythos",
|
|
26
26
|
"gpt5",
|
|
27
|
+
"opus5",
|
|
27
28
|
"fable",
|
|
28
29
|
"sonnet",
|
|
29
30
|
"openrouter",
|
|
@@ -47,16 +48,16 @@
|
|
|
47
48
|
},
|
|
48
49
|
"homepage": "https://github.com/clasen/ModelMix#readme",
|
|
49
50
|
"dependencies": {
|
|
50
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
51
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
51
52
|
"bottleneck": "^2.19.5",
|
|
52
53
|
"file-type": "^21.3.4",
|
|
53
54
|
"lemonlog": "^1.2.2",
|
|
54
|
-
"ws": "^8.21.
|
|
55
|
+
"ws": "^8.21.1"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
58
|
"chai": "^5.3.3",
|
|
58
|
-
"mocha": "^11.7.
|
|
59
|
-
"nock": "^14.0.
|
|
59
|
+
"mocha": "^11.7.6",
|
|
60
|
+
"nock": "^14.0.16",
|
|
60
61
|
"sinon": "^21.1.2"
|
|
61
62
|
},
|
|
62
63
|
"scripts": {
|
package/pnpm-workspace.yaml
CHANGED
package/skills/modelmix/SKILL.md
CHANGED
|
@@ -96,9 +96,9 @@ If `sonnet46` fails, it automatically tries `gpt52`, then `gemini3flash`.
|
|
|
96
96
|
`gpt52()` `gpt52chat()` `gpt51()` `gpt5()` `gpt5mini()` `gpt5nano()` `gpt45()` `gpt41()` `gpt41mini()` `gpt41nano()` `o3()` `o4mini()`
|
|
97
97
|
|
|
98
98
|
### Anthropic
|
|
99
|
-
`fable5()` `opus48()` `opus47()` `opus46()` `opus41()` `sonnet5()` `sonnet46()` `sonnet45()` `sonnet4()` `haiku45()` `haiku35()`
|
|
99
|
+
`fable5()` `opus5()` `opus48()` `opus47()` `opus46()` `opus41()` `sonnet5()` `sonnet46()` `sonnet45()` `sonnet4()` `haiku45()` `haiku35()`
|
|
100
100
|
|
|
101
|
-
Thinking variants: append `think` — e.g. `fable5think()` `opus48think()` `opus47think()` `opus46think()` `sonnet5think()` `sonnet46think()` `sonnet45think()` `sonnet4think()` `opus41think()` `haiku45think()`
|
|
101
|
+
Thinking variants: append `think` — e.g. `fable5think()` `opus5think()` `opus48think()` `opus47think()` `opus46think()` `sonnet5think()` `sonnet46think()` `sonnet45think()` `sonnet4think()` `opus41think()` `haiku45think()`
|
|
102
102
|
|
|
103
103
|
### Google
|
|
104
104
|
`gemini3pro()` `gemini3flash()` `gemini36flash()` `gemini35flash()` `gemini25pro()` `gemini25flash()`
|
package/test/anthropic.test.js
CHANGED
|
@@ -21,6 +21,25 @@ describe('Anthropic Model Registration Tests', () => {
|
|
|
21
21
|
expect(model.models[0].provider.options.thinking).to.deep.equal({ display: 'summarized' });
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
+
it('should register Claude Opus 5', () => {
|
|
25
|
+
const model = ModelMix.new();
|
|
26
|
+
model.opus5();
|
|
27
|
+
|
|
28
|
+
expect(model.models).to.have.length(1);
|
|
29
|
+
expect(model.models[0].key).to.equal('claude-opus-5');
|
|
30
|
+
expect(model.models[0].provider).to.be.instanceOf(MixAnthropic);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should register Claude Opus 5 with max effort thinking', () => {
|
|
34
|
+
const model = ModelMix.new();
|
|
35
|
+
model.opus5think();
|
|
36
|
+
|
|
37
|
+
expect(model.models).to.have.length(1);
|
|
38
|
+
expect(model.models[0].key).to.equal('claude-opus-5');
|
|
39
|
+
expect(model.models[0].provider.options.output_config).to.deep.equal({ effort: 'max' });
|
|
40
|
+
expect(model.models[0].provider.options.thinking).to.deep.equal({ display: 'summarized' });
|
|
41
|
+
});
|
|
42
|
+
|
|
24
43
|
it('should register Claude Opus 4.8', () => {
|
|
25
44
|
const model = ModelMix.new();
|
|
26
45
|
model.opus48();
|