modelmix 3.8.8 → 3.9.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 +1 -0
- package/index.js +7 -0
- package/package.json +2 -2
- package/test/live.mcp.js +4 -5
- package/test/live.test.js +17 -0
package/README.md
CHANGED
|
@@ -129,6 +129,7 @@ Here's a comprehensive list of available methods:
|
|
|
129
129
|
| `sonnet45[think]()`| Anthropic | claude-sonnet-4-5-20250929 | [\$3.00 / \$15.00][2] |
|
|
130
130
|
| `sonnet4[think]()` | Anthropic | claude-sonnet-4-20250514 | [\$3.00 / \$15.00][2] |
|
|
131
131
|
| `haiku35()` | Anthropic | claude-3-5-haiku-20241022 | [\$0.80 / \$4.00][2] |
|
|
132
|
+
| `haiku45[think]()` | Anthropic | claude-haiku-4-5-20251001 | [\$1.00 / \$5.00][2] |
|
|
132
133
|
| `gemini25flash()` | Google | gemini-2.5-flash-preview-04-17 | [\$0.00 / \$0.00][3] |
|
|
133
134
|
| `gemini25proExp()` | Google | gemini-2.5-pro-exp-03-25 | [\$0.00 / \$0.00][3] |
|
|
134
135
|
| `gemini25pro()` | Google | gemini-2.5-pro-preview-05-06 | [\$2.50 / \$15.00][3] |
|
package/index.js
CHANGED
|
@@ -138,6 +138,13 @@ class ModelMix {
|
|
|
138
138
|
haiku35({ options = {}, config = {} } = {}) {
|
|
139
139
|
return this.attach('claude-3-5-haiku-20241022', new MixAnthropic({ options, config }));
|
|
140
140
|
}
|
|
141
|
+
haiku45({ options = {}, config = {} } = {}) {
|
|
142
|
+
return this.attach('claude-haiku-4-5-20251001', new MixAnthropic({ options, config }));
|
|
143
|
+
}
|
|
144
|
+
haiku45think({ options = {}, config = {} } = {}) {
|
|
145
|
+
options = { ...MixAnthropic.thinkingOptions, ...options };
|
|
146
|
+
return this.attach('claude-haiku-4-5-20251001', new MixAnthropic({ options, config }));
|
|
147
|
+
}
|
|
141
148
|
gemini25flash({ options = {}, config = {} } = {}) {
|
|
142
149
|
return this.attach('gemini-2.5-flash', new MixGoogle({ options, config }));
|
|
143
150
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modelmix",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"description": "🧬 ModelMix - Unified API for Diverse AI LLM.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"homepage": "https://github.com/clasen/ModelMix#readme",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@modelcontextprotocol/sdk": "^1.11.2",
|
|
51
|
-
"axios": "^1.
|
|
51
|
+
"axios": "^1.12.2",
|
|
52
52
|
"bottleneck": "^2.19.5",
|
|
53
53
|
"file-type": "^16.5.4",
|
|
54
54
|
"form-data": "^4.0.4",
|
package/test/live.mcp.js
CHANGED
|
@@ -2,9 +2,7 @@ const { expect } = require('chai');
|
|
|
2
2
|
const { ModelMix } = require('../index.js');
|
|
3
3
|
const nock = require('nock');
|
|
4
4
|
|
|
5
|
-
//
|
|
6
|
-
nock.restore();
|
|
7
|
-
nock.cleanAll();
|
|
5
|
+
// Note: This test file makes real API calls and disables nock locally
|
|
8
6
|
|
|
9
7
|
const setup = {
|
|
10
8
|
options: { temperature: 0 },
|
|
@@ -27,7 +25,8 @@ describe('Live MCP Integration Tests', function () {
|
|
|
27
25
|
});
|
|
28
26
|
|
|
29
27
|
after(() => {
|
|
30
|
-
nock
|
|
28
|
+
// Re-activate nock for subsequent tests
|
|
29
|
+
nock.activate();
|
|
31
30
|
});
|
|
32
31
|
|
|
33
32
|
describe('Basic MCP Tool Integration', function () {
|
|
@@ -529,7 +528,7 @@ describe('Live MCP Integration Tests', function () {
|
|
|
529
528
|
const models = [
|
|
530
529
|
{ name: 'Sonnet 4', model: ModelMix.new(setup).sonnet4() },
|
|
531
530
|
{ name: 'Sonnet 4.5', model: ModelMix.new(setup).sonnet45() },
|
|
532
|
-
{ name: 'Haiku
|
|
531
|
+
{ name: 'Haiku 4.5', model: ModelMix.new(setup).haiku45() }
|
|
533
532
|
];
|
|
534
533
|
|
|
535
534
|
const results = [];
|
package/test/live.test.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const { expect } = require('chai');
|
|
2
2
|
const { ModelMix, MixOpenAI, MixAnthropic, MixGoogle } = require('../index.js');
|
|
3
|
+
const nock = require('nock');
|
|
3
4
|
const path = require('path');
|
|
4
5
|
const fixturesPath = path.join(__dirname, 'fixtures');
|
|
5
6
|
|
|
@@ -13,6 +14,22 @@ const setup = {
|
|
|
13
14
|
describe('Live Integration Tests', function () {
|
|
14
15
|
// Increase timeout for real API calls
|
|
15
16
|
this.timeout(30000);
|
|
17
|
+
|
|
18
|
+
// Ensure nock doesn't interfere with live tests but restore it after
|
|
19
|
+
before(() => {
|
|
20
|
+
nock.restore();
|
|
21
|
+
nock.cleanAll();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
nock.restore();
|
|
26
|
+
nock.cleanAll();
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
after(() => {
|
|
30
|
+
// Re-activate nock for subsequent tests
|
|
31
|
+
nock.activate();
|
|
32
|
+
});
|
|
16
33
|
|
|
17
34
|
describe('Image Processing', function () {
|
|
18
35
|
|