modelmix 4.5.30 → 4.6.0
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 +3 -0
- package/index.js +13 -0
- package/package.json +1 -1
- package/test/tokens.test.js +18 -0
package/README.md
CHANGED
|
@@ -136,6 +136,9 @@ Here's a comprehensive list of available methods:
|
|
|
136
136
|
|
|
137
137
|
| Method | Provider | Model | Price (I/O) per 1 M tokens |
|
|
138
138
|
| ------------------- | ---------- | ---------------------------- | -------------------------- |
|
|
139
|
+
| `gpt56sol()` | OpenAI | gpt-5.6-sol | [\$5.00 / \$30.00][1] |
|
|
140
|
+
| `gpt56terra()` | OpenAI | gpt-5.6-terra | [\$2.50 / \$15.00][1] |
|
|
141
|
+
| `gpt56luna()` | OpenAI | gpt-5.6-luna | [\$1.00 / \$6.00][1] |
|
|
139
142
|
| `gpt55()` | OpenAI | gpt-5.5 | [\$5.00 / \$30.00][1] |
|
|
140
143
|
| `gpt54()` | OpenAI | gpt-5.4 | [\$2.50 / \$15.00][1] |
|
|
141
144
|
| `gpt54mini()` | OpenAI | gpt-5.4-mini | [\$0.75 / \$4.50][1] |
|
package/index.js
CHANGED
|
@@ -37,6 +37,9 @@ const MODEL_PRICING = {
|
|
|
37
37
|
// OpenAI
|
|
38
38
|
'gpt-realtime-mini': [0.60, 2.40],
|
|
39
39
|
'gpt-realtime': [4.00, 16.00],
|
|
40
|
+
'gpt-5.6-sol': [5.00, 30.00],
|
|
41
|
+
'gpt-5.6-terra': [2.50, 15.00],
|
|
42
|
+
'gpt-5.6-luna': [1.00, 6.00],
|
|
40
43
|
'gpt-5.5-pro': [30.00, 180.00],
|
|
41
44
|
'gpt-5.5': [5.00, 30.00],
|
|
42
45
|
'gpt-5.4': [2.50, 15.00],
|
|
@@ -73,6 +76,7 @@ const MODEL_PRICING = {
|
|
|
73
76
|
'gemini-3.1-pro-preview':[2.00, 12.00],
|
|
74
77
|
'gemini-3-pro-preview': [2.00, 12.00],
|
|
75
78
|
'gemini-3-flash-preview': [0.50, 3.00],
|
|
79
|
+
'gemini-3.5-flash': [0.75, 4.50],
|
|
76
80
|
'gemini-2.5-pro': [1.25, 10.00],
|
|
77
81
|
'gemini-2.5-flash': [0.30, 2.50],
|
|
78
82
|
'gemini-3.1-flash-lite-preview': [0.25, 1.50],
|
|
@@ -326,6 +330,15 @@ class ModelMix {
|
|
|
326
330
|
gpt55pro({ options = {}, config = {} } = {}) {
|
|
327
331
|
return this.attach('gpt-5.5-pro', new MixOpenAIResponses({ options, config }));
|
|
328
332
|
}
|
|
333
|
+
gpt56sol({ options = {}, config = {} } = {}) {
|
|
334
|
+
return this.attach('gpt-5.6-sol', new MixOpenAIResponses({ options, config }));
|
|
335
|
+
}
|
|
336
|
+
gpt56terra({ options = {}, config = {} } = {}) {
|
|
337
|
+
return this.attach('gpt-5.6-terra', new MixOpenAIResponses({ options, config }));
|
|
338
|
+
}
|
|
339
|
+
gpt56luna({ options = {}, config = {} } = {}) {
|
|
340
|
+
return this.attach('gpt-5.6-luna', new MixOpenAIResponses({ options, config }));
|
|
341
|
+
}
|
|
329
342
|
gptRealtime({ options = {}, config = {} } = {}) {
|
|
330
343
|
return this.attach('gpt-realtime', new MixOpenAIWebSocket({ options, config }));
|
|
331
344
|
}
|
package/package.json
CHANGED
package/test/tokens.test.js
CHANGED
|
@@ -88,6 +88,23 @@ describe('Token Usage Tracking', () => {
|
|
|
88
88
|
expect(model.models[1].provider).to.be.instanceOf(MixOpenAIResponses);
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
+
it('should register GPT-5.6 shortcuts with OpenAI Responses provider', function () {
|
|
92
|
+
const model = ModelMix.new()
|
|
93
|
+
.gpt56sol()
|
|
94
|
+
.gpt56terra()
|
|
95
|
+
.gpt56luna();
|
|
96
|
+
|
|
97
|
+
expect(model.models.map(({ key }) => key)).to.deep.equal([
|
|
98
|
+
'gpt-5.6-sol',
|
|
99
|
+
'gpt-5.6-terra',
|
|
100
|
+
'gpt-5.6-luna'
|
|
101
|
+
]);
|
|
102
|
+
expect(model.models.every(({ provider }) => provider instanceof MixOpenAIResponses)).to.equal(true);
|
|
103
|
+
expect(ModelMix.calculateCost('gpt-5.6-sol', { input: 1_000_000, output: 1_000_000 })).to.equal(35);
|
|
104
|
+
expect(ModelMix.calculateCost('gpt-5.6-terra', { input: 1_000_000, output: 1_000_000 })).to.equal(17.5);
|
|
105
|
+
expect(ModelMix.calculateCost('gpt-5.6-luna', { input: 1_000_000, output: 1_000_000 })).to.equal(7);
|
|
106
|
+
});
|
|
107
|
+
|
|
91
108
|
it('should register Gemini 3.5 Flash shortcut with Google provider', function () {
|
|
92
109
|
const model = ModelMix.new()
|
|
93
110
|
.gemini35flash();
|
|
@@ -95,6 +112,7 @@ describe('Token Usage Tracking', () => {
|
|
|
95
112
|
expect(model.models).to.have.length(1);
|
|
96
113
|
expect(model.models[0].key).to.equal('gemini-3.5-flash');
|
|
97
114
|
expect(model.models[0].provider).to.be.instanceOf(MixGoogle);
|
|
115
|
+
expect(ModelMix.calculateCost('gemini-3.5-flash', { input: 1_000_000, output: 1_000_000 })).to.equal(5.25);
|
|
98
116
|
});
|
|
99
117
|
|
|
100
118
|
it('should register MiMo shortcuts with native and OpenRouter providers', function () {
|