modelmix 4.6.2 → 4.6.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 +9 -8
- package/index.js +4 -0
- package/package.json +1 -1
- package/skills/modelmix/SKILL.md +1 -1
- package/test/tokens.test.js +8 -4
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
|
+
.opus48() // Anthropic claude-opus-4-8
|
|
53
53
|
.addText("Name and capital of 3 South American countries.");
|
|
54
54
|
|
|
55
55
|
const outputExample = { countries: [{ name: "", capital: "" }] };
|
|
@@ -67,9 +67,9 @@ const setup = {
|
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
const model = await ModelMix.new(setup)
|
|
70
|
-
.
|
|
71
|
-
.
|
|
72
|
-
.
|
|
70
|
+
.sonnet5() // (main model) Anthropic claude-sonnet-5
|
|
71
|
+
.gpt56luna() // (fallback 2) OpenAI gpt-5.6-luna
|
|
72
|
+
.gemini36flash({ config: { temperature: 0 } }) // (fallback 3) Google gemini-36-flash
|
|
73
73
|
.grok43() // (fallback 4) Grok grok-4.3
|
|
74
74
|
.addText("What's your name?");
|
|
75
75
|
|
|
@@ -114,7 +114,7 @@ BRAVE_API_KEY="BSA0..._fm"
|
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
```javascript
|
|
117
|
-
const mmix = ModelMix.new({ config: { max_history: 10 } }).
|
|
117
|
+
const mmix = ModelMix.new({ config: { max_history: 10 } }).gpt56sol();
|
|
118
118
|
mmix.setSystem('You are an assistant and today is ' + new Date().toISOString());
|
|
119
119
|
|
|
120
120
|
// Add web search capability through MCP
|
|
@@ -161,7 +161,8 @@ Here's a comprehensive list of available methods:
|
|
|
161
161
|
| `sonnet46[think]()` | Anthropic | claude-sonnet-4-6 | [\$3.00 / \$15.00][2] |
|
|
162
162
|
| `haiku45[think]()` | Anthropic | claude-haiku-4-5-20251001 | [\$1.00 / \$5.00][2] |
|
|
163
163
|
| `gemini31pro()` | Google | gemini-3.1-pro-preview | [\$2.00 / \$12.00][3] |
|
|
164
|
-
| `
|
|
164
|
+
| `gemini36flash()` | Google | gemini-3.6-flash | [\$1.50 / \$7.50][3] |
|
|
165
|
+
| `gemini35flash()` | Google | gemini-3.5-flash | [\$0.75 / \$4.50][3] |
|
|
165
166
|
| `gemini31flashLite()`| Google | gemini-3.1-flash-lite-preview | [\$0.25 / \$1.50][3] |
|
|
166
167
|
| `grok43()` | Grok | grok-4.3 | [\$1.25 / \$2.50][6] |
|
|
167
168
|
| `grok420multiAgent()`| Grok | grok-4.20-multi-agent-0309 | [\$1.25 / \$2.50][6] |
|
|
@@ -250,7 +251,7 @@ Analyze the following and provide 3 key insights:
|
|
|
250
251
|
|
|
251
252
|
**`app.js`**
|
|
252
253
|
```javascript
|
|
253
|
-
const gpt = ModelMix.new().
|
|
254
|
+
const gpt = ModelMix.new().gpt56luna();
|
|
254
255
|
|
|
255
256
|
gpt.setSystemFromFile('./prompts/system.md');
|
|
256
257
|
gpt.addTextFromFile('./prompts/task.md');
|
|
@@ -330,7 +331,7 @@ await model.json(schemaExample, schemaDescription, options)
|
|
|
330
331
|
|
|
331
332
|
```javascript
|
|
332
333
|
const model = ModelMix.new()
|
|
333
|
-
.
|
|
334
|
+
.gpt56luna()
|
|
334
335
|
.addText('Name and capital of 3 South American countries.');
|
|
335
336
|
|
|
336
337
|
const result = await model.json({ countries: [{ name: "", capital: "" }] });
|
package/index.js
CHANGED
|
@@ -76,6 +76,7 @@ const MODEL_PRICING = {
|
|
|
76
76
|
'gemini-3.1-pro-preview':[2.00, 12.00],
|
|
77
77
|
'gemini-3-pro-preview': [2.00, 12.00],
|
|
78
78
|
'gemini-3-flash-preview': [0.50, 3.00],
|
|
79
|
+
'gemini-3.6-flash': [1.50, 7.50],
|
|
79
80
|
'gemini-3.5-flash': [0.75, 4.50],
|
|
80
81
|
'gemini-2.5-pro': [1.25, 10.00],
|
|
81
82
|
'gemini-2.5-flash': [0.30, 2.50],
|
|
@@ -448,6 +449,9 @@ class ModelMix {
|
|
|
448
449
|
gemini3flash({ options = {}, config = {} } = {}) {
|
|
449
450
|
return this.attach('gemini-3-flash-preview', new MixGoogle({ options, config }));
|
|
450
451
|
}
|
|
452
|
+
gemini36flash({ options = {}, config = {} } = {}) {
|
|
453
|
+
return this.attach('gemini-3.6-flash', new MixGoogle({ options, config }));
|
|
454
|
+
}
|
|
451
455
|
gemini35flash({ options = {}, config = {} } = {}) {
|
|
452
456
|
return this.attach('gemini-3.5-flash', new MixGoogle({ options, config }));
|
|
453
457
|
}
|
package/package.json
CHANGED
package/skills/modelmix/SKILL.md
CHANGED
|
@@ -101,7 +101,7 @@ If `sonnet46` fails, it automatically tries `gpt52`, then `gemini3flash`.
|
|
|
101
101
|
Thinking variants: append `think` — e.g. `fable5think()` `opus48think()` `opus47think()` `opus46think()` `sonnet5think()` `sonnet46think()` `sonnet45think()` `sonnet4think()` `opus41think()` `haiku45think()`
|
|
102
102
|
|
|
103
103
|
### Google
|
|
104
|
-
`gemini3pro()` `gemini3flash()` `gemini35flash()` `gemini25pro()` `gemini25flash()`
|
|
104
|
+
`gemini3pro()` `gemini3flash()` `gemini36flash()` `gemini35flash()` `gemini25pro()` `gemini25flash()`
|
|
105
105
|
|
|
106
106
|
### Grok
|
|
107
107
|
`grok43()` `grok420multiAgent()` `grok420()` `grok420think()` `grok41()` `grok41think()`
|
package/test/tokens.test.js
CHANGED
|
@@ -105,13 +105,17 @@ describe('Token Usage Tracking', () => {
|
|
|
105
105
|
expect(ModelMix.calculateCost('gpt-5.6-luna', { input: 1_000_000, output: 1_000_000 })).to.equal(7);
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
it('should register Gemini
|
|
108
|
+
it('should register Gemini Flash shortcuts with Google provider', function () {
|
|
109
109
|
const model = ModelMix.new()
|
|
110
|
+
.gemini36flash()
|
|
110
111
|
.gemini35flash();
|
|
111
112
|
|
|
112
|
-
expect(model.models).to.
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
expect(model.models.map(({ key }) => key)).to.deep.equal([
|
|
114
|
+
'gemini-3.6-flash',
|
|
115
|
+
'gemini-3.5-flash'
|
|
116
|
+
]);
|
|
117
|
+
expect(model.models.every(({ provider }) => provider instanceof MixGoogle)).to.equal(true);
|
|
118
|
+
expect(ModelMix.calculateCost('gemini-3.6-flash', { input: 1_000_000, output: 1_000_000 })).to.equal(9);
|
|
115
119
|
expect(ModelMix.calculateCost('gemini-3.5-flash', { input: 1_000_000, output: 1_000_000 })).to.equal(5.25);
|
|
116
120
|
});
|
|
117
121
|
|