@mariozechner/pi-ai 0.5.40 → 0.5.41
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 +35 -4
- package/dist/models.generated.d.ts +58 -7
- package/dist/models.generated.d.ts.map +1 -1
- package/dist/models.generated.js +129 -78
- package/dist/models.generated.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,8 +71,19 @@ for await (const event of s) {
|
|
|
71
71
|
case 'thinking_end':
|
|
72
72
|
console.log('[Thinking complete]');
|
|
73
73
|
break;
|
|
74
|
-
case '
|
|
74
|
+
case 'toolcall_start':
|
|
75
|
+
console.log(`\n[Tool call started: index ${event.contentIndex}]`);
|
|
76
|
+
break;
|
|
77
|
+
case 'toolcall_delta':
|
|
78
|
+
// Partial tool arguments are being streamed
|
|
79
|
+
const partialCall = event.partial.content[event.contentIndex];
|
|
80
|
+
if (partialCall.type === 'toolCall') {
|
|
81
|
+
console.log(`[Streaming args for ${partialCall.name}]`);
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case 'toolcall_end':
|
|
75
85
|
console.log(`\nTool called: ${event.toolCall.name}`);
|
|
86
|
+
console.log(`Arguments: ${JSON.stringify(event.toolCall.arguments)}`);
|
|
76
87
|
break;
|
|
77
88
|
case 'done':
|
|
78
89
|
console.log(`\nFinished: ${event.reason}`);
|
|
@@ -84,9 +95,10 @@ for await (const event of s) {
|
|
|
84
95
|
}
|
|
85
96
|
|
|
86
97
|
// Get the final message after streaming, add it to the context
|
|
87
|
-
const finalMessage = await s.
|
|
98
|
+
const finalMessage = await s.result();
|
|
88
99
|
context.messages.push(finalMessage);
|
|
89
100
|
|
|
101
|
+
// Handle tool calls if any
|
|
90
102
|
// Handle tool calls if any
|
|
91
103
|
const toolCalls = finalMessage.content.filter(b => b.type === 'toolCall');
|
|
92
104
|
for (const call of toolCalls) {
|
|
@@ -237,7 +249,26 @@ for await (const event of s) {
|
|
|
237
249
|
- Nested objects may be partially populated
|
|
238
250
|
- At minimum, `arguments` will be an empty object `{}`, never `undefined`
|
|
239
251
|
- Full validation only occurs at `toolcall_end` when arguments are complete
|
|
240
|
-
- The Google provider does not support function call streaming. Instead, you will receive a single `toolcall_delta`
|
|
252
|
+
- The Google provider does not support function call streaming. Instead, you will receive a single `toolcall_delta` event with the full arguments.
|
|
253
|
+
|
|
254
|
+
### Complete Event Reference
|
|
255
|
+
|
|
256
|
+
All streaming events emitted during assistant message generation:
|
|
257
|
+
|
|
258
|
+
| Event Type | Description | Key Properties |
|
|
259
|
+
|------------|-------------|----------------|
|
|
260
|
+
| `start` | Stream begins | `partial`: Initial assistant message structure |
|
|
261
|
+
| `text_start` | Text block starts | `contentIndex`: Position in content array |
|
|
262
|
+
| `text_delta` | Text chunk received | `delta`: New text, `contentIndex`: Position |
|
|
263
|
+
| `text_end` | Text block complete | `content`: Full text, `contentIndex`: Position |
|
|
264
|
+
| `thinking_start` | Thinking block starts | `contentIndex`: Position in content array |
|
|
265
|
+
| `thinking_delta` | Thinking chunk received | `delta`: New text, `contentIndex`: Position |
|
|
266
|
+
| `thinking_end` | Thinking block complete | `content`: Full thinking, `contentIndex`: Position |
|
|
267
|
+
| `toolcall_start` | Tool call begins | `contentIndex`: Position in content array |
|
|
268
|
+
| `toolcall_delta` | Tool arguments streaming | `delta`: JSON chunk, `partial.content[contentIndex].arguments`: Partial parsed args |
|
|
269
|
+
| `toolcall_end` | Tool call complete | `toolCall`: Complete validated tool call with `id`, `name`, `arguments` |
|
|
270
|
+
| `done` | Stream complete | `reason`: Stop reason, `message`: Final assistant message |
|
|
271
|
+
| `error` | Error occurred | `error`: Error message, `partial`: Partial message before error |
|
|
241
272
|
|
|
242
273
|
## Image Input
|
|
243
274
|
|
|
@@ -403,7 +434,7 @@ for await (const event of s) {
|
|
|
403
434
|
}
|
|
404
435
|
|
|
405
436
|
// Get results (may be partial if aborted)
|
|
406
|
-
const response = await s.
|
|
437
|
+
const response = await s.result();
|
|
407
438
|
if (response.stopReason === 'error') {
|
|
408
439
|
console.log('Error:', response.error);
|
|
409
440
|
console.log('Partial content received:', response.content);
|
|
@@ -1408,6 +1408,40 @@ export declare const MODELS: {
|
|
|
1408
1408
|
};
|
|
1409
1409
|
};
|
|
1410
1410
|
readonly openrouter: {
|
|
1411
|
+
readonly "qwen/qwen3-coder-flash": {
|
|
1412
|
+
id: string;
|
|
1413
|
+
name: string;
|
|
1414
|
+
api: "openai-completions";
|
|
1415
|
+
provider: string;
|
|
1416
|
+
baseUrl: string;
|
|
1417
|
+
reasoning: false;
|
|
1418
|
+
input: "text"[];
|
|
1419
|
+
cost: {
|
|
1420
|
+
input: number;
|
|
1421
|
+
output: number;
|
|
1422
|
+
cacheRead: number;
|
|
1423
|
+
cacheWrite: number;
|
|
1424
|
+
};
|
|
1425
|
+
contextWindow: number;
|
|
1426
|
+
maxTokens: number;
|
|
1427
|
+
};
|
|
1428
|
+
readonly "qwen/qwen3-coder-plus": {
|
|
1429
|
+
id: string;
|
|
1430
|
+
name: string;
|
|
1431
|
+
api: "openai-completions";
|
|
1432
|
+
provider: string;
|
|
1433
|
+
baseUrl: string;
|
|
1434
|
+
reasoning: false;
|
|
1435
|
+
input: "text"[];
|
|
1436
|
+
cost: {
|
|
1437
|
+
input: number;
|
|
1438
|
+
output: number;
|
|
1439
|
+
cacheRead: number;
|
|
1440
|
+
cacheWrite: number;
|
|
1441
|
+
};
|
|
1442
|
+
contextWindow: number;
|
|
1443
|
+
maxTokens: number;
|
|
1444
|
+
};
|
|
1411
1445
|
readonly "qwen/qwen3-next-80b-a3b-thinking": {
|
|
1412
1446
|
id: string;
|
|
1413
1447
|
name: string;
|
|
@@ -2513,6 +2547,23 @@ export declare const MODELS: {
|
|
|
2513
2547
|
contextWindow: number;
|
|
2514
2548
|
maxTokens: number;
|
|
2515
2549
|
};
|
|
2550
|
+
readonly "microsoft/phi-4-multimodal-instruct": {
|
|
2551
|
+
id: string;
|
|
2552
|
+
name: string;
|
|
2553
|
+
api: "openai-completions";
|
|
2554
|
+
provider: string;
|
|
2555
|
+
baseUrl: string;
|
|
2556
|
+
reasoning: false;
|
|
2557
|
+
input: ("text" | "image")[];
|
|
2558
|
+
cost: {
|
|
2559
|
+
input: number;
|
|
2560
|
+
output: number;
|
|
2561
|
+
cacheRead: number;
|
|
2562
|
+
cacheWrite: number;
|
|
2563
|
+
};
|
|
2564
|
+
contextWindow: number;
|
|
2565
|
+
maxTokens: number;
|
|
2566
|
+
};
|
|
2516
2567
|
readonly "qwen/qwq-32b": {
|
|
2517
2568
|
id: string;
|
|
2518
2569
|
name: string;
|
|
@@ -2938,7 +2989,7 @@ export declare const MODELS: {
|
|
|
2938
2989
|
contextWindow: number;
|
|
2939
2990
|
maxTokens: number;
|
|
2940
2991
|
};
|
|
2941
|
-
readonly "cohere/command-r-
|
|
2992
|
+
readonly "cohere/command-r-08-2024": {
|
|
2942
2993
|
id: string;
|
|
2943
2994
|
name: string;
|
|
2944
2995
|
api: "openai-completions";
|
|
@@ -2955,7 +3006,7 @@ export declare const MODELS: {
|
|
|
2955
3006
|
contextWindow: number;
|
|
2956
3007
|
maxTokens: number;
|
|
2957
3008
|
};
|
|
2958
|
-
readonly "cohere/command-r-08-2024": {
|
|
3009
|
+
readonly "cohere/command-r-plus-08-2024": {
|
|
2959
3010
|
id: string;
|
|
2960
3011
|
name: string;
|
|
2961
3012
|
api: "openai-completions";
|
|
@@ -3074,7 +3125,7 @@ export declare const MODELS: {
|
|
|
3074
3125
|
contextWindow: number;
|
|
3075
3126
|
maxTokens: number;
|
|
3076
3127
|
};
|
|
3077
|
-
readonly "mistralai/mistral-7b-instruct
|
|
3128
|
+
readonly "mistralai/mistral-7b-instruct-v0.3": {
|
|
3078
3129
|
id: string;
|
|
3079
3130
|
name: string;
|
|
3080
3131
|
api: "openai-completions";
|
|
@@ -3091,7 +3142,7 @@ export declare const MODELS: {
|
|
|
3091
3142
|
contextWindow: number;
|
|
3092
3143
|
maxTokens: number;
|
|
3093
3144
|
};
|
|
3094
|
-
readonly "mistralai/mistral-7b-instruct": {
|
|
3145
|
+
readonly "mistralai/mistral-7b-instruct:free": {
|
|
3095
3146
|
id: string;
|
|
3096
3147
|
name: string;
|
|
3097
3148
|
api: "openai-completions";
|
|
@@ -3108,7 +3159,7 @@ export declare const MODELS: {
|
|
|
3108
3159
|
contextWindow: number;
|
|
3109
3160
|
maxTokens: number;
|
|
3110
3161
|
};
|
|
3111
|
-
readonly "mistralai/mistral-7b-instruct
|
|
3162
|
+
readonly "mistralai/mistral-7b-instruct": {
|
|
3112
3163
|
id: string;
|
|
3113
3164
|
name: string;
|
|
3114
3165
|
api: "openai-completions";
|
|
@@ -3295,7 +3346,7 @@ export declare const MODELS: {
|
|
|
3295
3346
|
contextWindow: number;
|
|
3296
3347
|
maxTokens: number;
|
|
3297
3348
|
};
|
|
3298
|
-
readonly "mistralai/mistral-
|
|
3349
|
+
readonly "mistralai/mistral-tiny": {
|
|
3299
3350
|
id: string;
|
|
3300
3351
|
name: string;
|
|
3301
3352
|
api: "openai-completions";
|
|
@@ -3312,7 +3363,7 @@ export declare const MODELS: {
|
|
|
3312
3363
|
contextWindow: number;
|
|
3313
3364
|
maxTokens: number;
|
|
3314
3365
|
};
|
|
3315
|
-
readonly "mistralai/mistral-
|
|
3366
|
+
readonly "mistralai/mistral-small": {
|
|
3316
3367
|
id: string;
|
|
3317
3368
|
name: string;
|
|
3318
3369
|
api: "openai-completions";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.generated.d.ts","sourceRoot":"","sources":["../src/models.generated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"models.generated.d.ts","sourceRoot":"","sources":["../src/models.generated.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAy1GT,CAAC"}
|
package/dist/models.generated.js
CHANGED
|
@@ -1410,6 +1410,40 @@ export const MODELS = {
|
|
|
1410
1410
|
},
|
|
1411
1411
|
},
|
|
1412
1412
|
openrouter: {
|
|
1413
|
+
"qwen/qwen3-coder-flash": {
|
|
1414
|
+
id: "qwen/qwen3-coder-flash",
|
|
1415
|
+
name: "Qwen: Qwen3 Coder Flash",
|
|
1416
|
+
api: "openai-completions",
|
|
1417
|
+
provider: "openrouter",
|
|
1418
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
1419
|
+
reasoning: false,
|
|
1420
|
+
input: ["text"],
|
|
1421
|
+
cost: {
|
|
1422
|
+
input: 0.3,
|
|
1423
|
+
output: 1.5,
|
|
1424
|
+
cacheRead: 0.08,
|
|
1425
|
+
cacheWrite: 0,
|
|
1426
|
+
},
|
|
1427
|
+
contextWindow: 128000,
|
|
1428
|
+
maxTokens: 65536,
|
|
1429
|
+
},
|
|
1430
|
+
"qwen/qwen3-coder-plus": {
|
|
1431
|
+
id: "qwen/qwen3-coder-plus",
|
|
1432
|
+
name: "Qwen: Qwen3 Coder Plus",
|
|
1433
|
+
api: "openai-completions",
|
|
1434
|
+
provider: "openrouter",
|
|
1435
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
1436
|
+
reasoning: false,
|
|
1437
|
+
input: ["text"],
|
|
1438
|
+
cost: {
|
|
1439
|
+
input: 1,
|
|
1440
|
+
output: 5,
|
|
1441
|
+
cacheRead: 0.09999999999999999,
|
|
1442
|
+
cacheWrite: 0,
|
|
1443
|
+
},
|
|
1444
|
+
contextWindow: 128000,
|
|
1445
|
+
maxTokens: 65536,
|
|
1446
|
+
},
|
|
1413
1447
|
"qwen/qwen3-next-80b-a3b-thinking": {
|
|
1414
1448
|
id: "qwen/qwen3-next-80b-a3b-thinking",
|
|
1415
1449
|
name: "Qwen: Qwen3 Next 80B A3B Thinking",
|
|
@@ -1419,8 +1453,8 @@ export const MODELS = {
|
|
|
1419
1453
|
reasoning: true,
|
|
1420
1454
|
input: ["text"],
|
|
1421
1455
|
cost: {
|
|
1422
|
-
input: 0.
|
|
1423
|
-
output: 0.
|
|
1456
|
+
input: 0.09999999999999999,
|
|
1457
|
+
output: 0.7999999999999999,
|
|
1424
1458
|
cacheRead: 0,
|
|
1425
1459
|
cacheWrite: 0,
|
|
1426
1460
|
},
|
|
@@ -1436,8 +1470,8 @@ export const MODELS = {
|
|
|
1436
1470
|
reasoning: false,
|
|
1437
1471
|
input: ["text"],
|
|
1438
1472
|
cost: {
|
|
1439
|
-
input: 0.
|
|
1440
|
-
output: 0.
|
|
1473
|
+
input: 0.09999999999999999,
|
|
1474
|
+
output: 0.7999999999999999,
|
|
1441
1475
|
cacheRead: 0,
|
|
1442
1476
|
cacheWrite: 0,
|
|
1443
1477
|
},
|
|
@@ -1453,13 +1487,13 @@ export const MODELS = {
|
|
|
1453
1487
|
reasoning: false,
|
|
1454
1488
|
input: ["text"],
|
|
1455
1489
|
cost: {
|
|
1456
|
-
input: 0.
|
|
1457
|
-
output: 0.
|
|
1490
|
+
input: 0.12,
|
|
1491
|
+
output: 0.6,
|
|
1458
1492
|
cacheRead: 0,
|
|
1459
1493
|
cacheWrite: 0,
|
|
1460
1494
|
},
|
|
1461
1495
|
contextWindow: 131072,
|
|
1462
|
-
maxTokens:
|
|
1496
|
+
maxTokens: 4096,
|
|
1463
1497
|
},
|
|
1464
1498
|
"qwen/qwen-plus-2025-07-28": {
|
|
1465
1499
|
id: "qwen/qwen-plus-2025-07-28",
|
|
@@ -1589,8 +1623,8 @@ export const MODELS = {
|
|
|
1589
1623
|
reasoning: false,
|
|
1590
1624
|
input: ["text"],
|
|
1591
1625
|
cost: {
|
|
1592
|
-
input: 0.
|
|
1593
|
-
output: 1.
|
|
1626
|
+
input: 0.38,
|
|
1627
|
+
output: 1.52,
|
|
1594
1628
|
cacheRead: 0,
|
|
1595
1629
|
cacheWrite: 0,
|
|
1596
1630
|
},
|
|
@@ -1640,8 +1674,8 @@ export const MODELS = {
|
|
|
1640
1674
|
reasoning: true,
|
|
1641
1675
|
input: ["text"],
|
|
1642
1676
|
cost: {
|
|
1643
|
-
input: 0.
|
|
1644
|
-
output: 0.
|
|
1677
|
+
input: 0.08,
|
|
1678
|
+
output: 0.29,
|
|
1645
1679
|
cacheRead: 0,
|
|
1646
1680
|
cacheWrite: 0,
|
|
1647
1681
|
},
|
|
@@ -1657,8 +1691,8 @@ export const MODELS = {
|
|
|
1657
1691
|
reasoning: true,
|
|
1658
1692
|
input: ["text"],
|
|
1659
1693
|
cost: {
|
|
1660
|
-
input: 0.
|
|
1661
|
-
output: 0.
|
|
1694
|
+
input: 0.11,
|
|
1695
|
+
output: 0.38,
|
|
1662
1696
|
cacheRead: 0,
|
|
1663
1697
|
cacheWrite: 0,
|
|
1664
1698
|
},
|
|
@@ -1696,7 +1730,7 @@ export const MODELS = {
|
|
|
1696
1730
|
cacheRead: 0,
|
|
1697
1731
|
cacheWrite: 0,
|
|
1698
1732
|
},
|
|
1699
|
-
contextWindow:
|
|
1733
|
+
contextWindow: 163840,
|
|
1700
1734
|
maxTokens: 4096,
|
|
1701
1735
|
},
|
|
1702
1736
|
"deepseek/deepseek-chat-v3.1": {
|
|
@@ -1816,7 +1850,7 @@ export const MODELS = {
|
|
|
1816
1850
|
cacheWrite: 0,
|
|
1817
1851
|
},
|
|
1818
1852
|
contextWindow: 262144,
|
|
1819
|
-
maxTokens:
|
|
1853
|
+
maxTokens: 4096,
|
|
1820
1854
|
},
|
|
1821
1855
|
"qwen/qwen3-30b-a3b-instruct-2507": {
|
|
1822
1856
|
id: "qwen/qwen3-30b-a3b-instruct-2507",
|
|
@@ -1827,8 +1861,8 @@ export const MODELS = {
|
|
|
1827
1861
|
reasoning: false,
|
|
1828
1862
|
input: ["text"],
|
|
1829
1863
|
cost: {
|
|
1830
|
-
input: 0.
|
|
1831
|
-
output: 0.
|
|
1864
|
+
input: 0.07,
|
|
1865
|
+
output: 0.28,
|
|
1832
1866
|
cacheRead: 0,
|
|
1833
1867
|
cacheWrite: 0,
|
|
1834
1868
|
},
|
|
@@ -1844,8 +1878,8 @@ export const MODELS = {
|
|
|
1844
1878
|
reasoning: true,
|
|
1845
1879
|
input: ["text"],
|
|
1846
1880
|
cost: {
|
|
1847
|
-
input: 0.
|
|
1848
|
-
output: 1.
|
|
1881
|
+
input: 0.41,
|
|
1882
|
+
output: 1.6500000000000001,
|
|
1849
1883
|
cacheRead: 0,
|
|
1850
1884
|
cacheWrite: 0,
|
|
1851
1885
|
},
|
|
@@ -1895,8 +1929,8 @@ export const MODELS = {
|
|
|
1895
1929
|
reasoning: true,
|
|
1896
1930
|
input: ["text"],
|
|
1897
1931
|
cost: {
|
|
1898
|
-
input: 0.
|
|
1899
|
-
output: 0.
|
|
1932
|
+
input: 0.09999999999999999,
|
|
1933
|
+
output: 0.39,
|
|
1900
1934
|
cacheRead: 0,
|
|
1901
1935
|
cacheWrite: 0,
|
|
1902
1936
|
},
|
|
@@ -1946,8 +1980,8 @@ export const MODELS = {
|
|
|
1946
1980
|
reasoning: false,
|
|
1947
1981
|
input: ["text"],
|
|
1948
1982
|
cost: {
|
|
1949
|
-
input: 0.
|
|
1950
|
-
output: 0.
|
|
1983
|
+
input: 0.22,
|
|
1984
|
+
output: 0.95,
|
|
1951
1985
|
cacheRead: 0,
|
|
1952
1986
|
cacheWrite: 0,
|
|
1953
1987
|
},
|
|
@@ -1963,13 +1997,13 @@ export const MODELS = {
|
|
|
1963
1997
|
reasoning: false,
|
|
1964
1998
|
input: ["text"],
|
|
1965
1999
|
cost: {
|
|
1966
|
-
input: 0.
|
|
1967
|
-
output: 0.
|
|
2000
|
+
input: 0.09999999999999999,
|
|
2001
|
+
output: 0.09999999999999999,
|
|
1968
2002
|
cacheRead: 0,
|
|
1969
2003
|
cacheWrite: 0,
|
|
1970
2004
|
},
|
|
1971
2005
|
contextWindow: 262144,
|
|
1972
|
-
maxTokens:
|
|
2006
|
+
maxTokens: 262144,
|
|
1973
2007
|
},
|
|
1974
2008
|
"moonshotai/kimi-k2:free": {
|
|
1975
2009
|
id: "moonshotai/kimi-k2:free",
|
|
@@ -2167,8 +2201,8 @@ export const MODELS = {
|
|
|
2167
2201
|
reasoning: true,
|
|
2168
2202
|
input: ["text"],
|
|
2169
2203
|
cost: {
|
|
2170
|
-
input: 0.
|
|
2171
|
-
output:
|
|
2204
|
+
input: 0.39999999999999997,
|
|
2205
|
+
output: 1.75,
|
|
2172
2206
|
cacheRead: 0,
|
|
2173
2207
|
cacheWrite: 0,
|
|
2174
2208
|
},
|
|
@@ -2201,8 +2235,8 @@ export const MODELS = {
|
|
|
2201
2235
|
reasoning: false,
|
|
2202
2236
|
input: ["text"],
|
|
2203
2237
|
cost: {
|
|
2204
|
-
input: 0.
|
|
2205
|
-
output: 0.
|
|
2238
|
+
input: 0.04,
|
|
2239
|
+
output: 0.14,
|
|
2206
2240
|
cacheRead: 0,
|
|
2207
2241
|
cacheWrite: 0,
|
|
2208
2242
|
},
|
|
@@ -2303,8 +2337,8 @@ export const MODELS = {
|
|
|
2303
2337
|
reasoning: true,
|
|
2304
2338
|
input: ["text"],
|
|
2305
2339
|
cost: {
|
|
2306
|
-
input: 0.
|
|
2307
|
-
output: 0.
|
|
2340
|
+
input: 0.06,
|
|
2341
|
+
output: 0.22,
|
|
2308
2342
|
cacheRead: 0,
|
|
2309
2343
|
cacheWrite: 0,
|
|
2310
2344
|
},
|
|
@@ -2337,8 +2371,8 @@ export const MODELS = {
|
|
|
2337
2371
|
reasoning: true,
|
|
2338
2372
|
input: ["text"],
|
|
2339
2373
|
cost: {
|
|
2340
|
-
input: 0.
|
|
2341
|
-
output: 0.
|
|
2374
|
+
input: 0.03,
|
|
2375
|
+
output: 0.13,
|
|
2342
2376
|
cacheRead: 0,
|
|
2343
2377
|
cacheWrite: 0,
|
|
2344
2378
|
},
|
|
@@ -2507,14 +2541,31 @@ export const MODELS = {
|
|
|
2507
2541
|
reasoning: false,
|
|
2508
2542
|
input: ["text", "image"],
|
|
2509
2543
|
cost: {
|
|
2510
|
-
input: 0.
|
|
2511
|
-
output: 0.
|
|
2544
|
+
input: 0.04,
|
|
2545
|
+
output: 0.15,
|
|
2512
2546
|
cacheRead: 0,
|
|
2513
2547
|
cacheWrite: 0,
|
|
2514
2548
|
},
|
|
2515
2549
|
contextWindow: 131072,
|
|
2516
2550
|
maxTokens: 96000,
|
|
2517
2551
|
},
|
|
2552
|
+
"microsoft/phi-4-multimodal-instruct": {
|
|
2553
|
+
id: "microsoft/phi-4-multimodal-instruct",
|
|
2554
|
+
name: "Microsoft: Phi 4 Multimodal Instruct",
|
|
2555
|
+
api: "openai-completions",
|
|
2556
|
+
provider: "openrouter",
|
|
2557
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
2558
|
+
reasoning: false,
|
|
2559
|
+
input: ["text", "image"],
|
|
2560
|
+
cost: {
|
|
2561
|
+
input: 0.049999999999999996,
|
|
2562
|
+
output: 0.09999999999999999,
|
|
2563
|
+
cacheRead: 0,
|
|
2564
|
+
cacheWrite: 0,
|
|
2565
|
+
},
|
|
2566
|
+
contextWindow: 131072,
|
|
2567
|
+
maxTokens: 4096,
|
|
2568
|
+
},
|
|
2518
2569
|
"qwen/qwq-32b": {
|
|
2519
2570
|
id: "qwen/qwq-32b",
|
|
2520
2571
|
name: "Qwen: QwQ 32B",
|
|
@@ -2609,8 +2660,8 @@ export const MODELS = {
|
|
|
2609
2660
|
reasoning: false,
|
|
2610
2661
|
input: ["text"],
|
|
2611
2662
|
cost: {
|
|
2612
|
-
input: 0.
|
|
2613
|
-
output: 0.
|
|
2663
|
+
input: 0.04,
|
|
2664
|
+
output: 0.15,
|
|
2614
2665
|
cacheRead: 0,
|
|
2615
2666
|
cacheWrite: 0,
|
|
2616
2667
|
},
|
|
@@ -2626,8 +2677,8 @@ export const MODELS = {
|
|
|
2626
2677
|
reasoning: true,
|
|
2627
2678
|
input: ["text"],
|
|
2628
2679
|
cost: {
|
|
2629
|
-
input: 0.
|
|
2630
|
-
output: 0.
|
|
2680
|
+
input: 0.03,
|
|
2681
|
+
output: 0.13,
|
|
2631
2682
|
cacheRead: 0,
|
|
2632
2683
|
cacheWrite: 0,
|
|
2633
2684
|
},
|
|
@@ -2915,8 +2966,8 @@ export const MODELS = {
|
|
|
2915
2966
|
reasoning: false,
|
|
2916
2967
|
input: ["text"],
|
|
2917
2968
|
cost: {
|
|
2918
|
-
input: 0.
|
|
2919
|
-
output: 0.
|
|
2969
|
+
input: 0.07,
|
|
2970
|
+
output: 0.26,
|
|
2920
2971
|
cacheRead: 0,
|
|
2921
2972
|
cacheWrite: 0,
|
|
2922
2973
|
},
|
|
@@ -2940,34 +2991,34 @@ export const MODELS = {
|
|
|
2940
2991
|
contextWindow: 32768,
|
|
2941
2992
|
maxTokens: 4096,
|
|
2942
2993
|
},
|
|
2943
|
-
"cohere/command-r-
|
|
2944
|
-
id: "cohere/command-r-
|
|
2945
|
-
name: "Cohere: Command R
|
|
2994
|
+
"cohere/command-r-08-2024": {
|
|
2995
|
+
id: "cohere/command-r-08-2024",
|
|
2996
|
+
name: "Cohere: Command R (08-2024)",
|
|
2946
2997
|
api: "openai-completions",
|
|
2947
2998
|
provider: "openrouter",
|
|
2948
2999
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
2949
3000
|
reasoning: false,
|
|
2950
3001
|
input: ["text"],
|
|
2951
3002
|
cost: {
|
|
2952
|
-
input:
|
|
2953
|
-
output:
|
|
3003
|
+
input: 0.15,
|
|
3004
|
+
output: 0.6,
|
|
2954
3005
|
cacheRead: 0,
|
|
2955
3006
|
cacheWrite: 0,
|
|
2956
3007
|
},
|
|
2957
3008
|
contextWindow: 128000,
|
|
2958
3009
|
maxTokens: 4000,
|
|
2959
3010
|
},
|
|
2960
|
-
"cohere/command-r-08-2024": {
|
|
2961
|
-
id: "cohere/command-r-08-2024",
|
|
2962
|
-
name: "Cohere: Command R (08-2024)",
|
|
3011
|
+
"cohere/command-r-plus-08-2024": {
|
|
3012
|
+
id: "cohere/command-r-plus-08-2024",
|
|
3013
|
+
name: "Cohere: Command R+ (08-2024)",
|
|
2963
3014
|
api: "openai-completions",
|
|
2964
3015
|
provider: "openrouter",
|
|
2965
3016
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
2966
3017
|
reasoning: false,
|
|
2967
3018
|
input: ["text"],
|
|
2968
3019
|
cost: {
|
|
2969
|
-
input:
|
|
2970
|
-
output:
|
|
3020
|
+
input: 2.5,
|
|
3021
|
+
output: 10,
|
|
2971
3022
|
cacheRead: 0,
|
|
2972
3023
|
cacheWrite: 0,
|
|
2973
3024
|
},
|
|
@@ -3068,51 +3119,51 @@ export const MODELS = {
|
|
|
3068
3119
|
reasoning: false,
|
|
3069
3120
|
input: ["text"],
|
|
3070
3121
|
cost: {
|
|
3071
|
-
input: 0.
|
|
3072
|
-
output: 0.
|
|
3122
|
+
input: 0.02,
|
|
3123
|
+
output: 0.04,
|
|
3073
3124
|
cacheRead: 0,
|
|
3074
3125
|
cacheWrite: 0,
|
|
3075
3126
|
},
|
|
3076
3127
|
contextWindow: 131072,
|
|
3077
|
-
maxTokens:
|
|
3128
|
+
maxTokens: 16384,
|
|
3078
3129
|
},
|
|
3079
|
-
"mistralai/mistral-7b-instruct
|
|
3080
|
-
id: "mistralai/mistral-7b-instruct
|
|
3081
|
-
name: "Mistral: Mistral 7B Instruct
|
|
3130
|
+
"mistralai/mistral-7b-instruct-v0.3": {
|
|
3131
|
+
id: "mistralai/mistral-7b-instruct-v0.3",
|
|
3132
|
+
name: "Mistral: Mistral 7B Instruct v0.3",
|
|
3082
3133
|
api: "openai-completions",
|
|
3083
3134
|
provider: "openrouter",
|
|
3084
3135
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
3085
3136
|
reasoning: false,
|
|
3086
3137
|
input: ["text"],
|
|
3087
3138
|
cost: {
|
|
3088
|
-
input: 0,
|
|
3089
|
-
output: 0,
|
|
3139
|
+
input: 0.028,
|
|
3140
|
+
output: 0.054,
|
|
3090
3141
|
cacheRead: 0,
|
|
3091
3142
|
cacheWrite: 0,
|
|
3092
3143
|
},
|
|
3093
3144
|
contextWindow: 32768,
|
|
3094
3145
|
maxTokens: 16384,
|
|
3095
3146
|
},
|
|
3096
|
-
"mistralai/mistral-7b-instruct": {
|
|
3097
|
-
id: "mistralai/mistral-7b-instruct",
|
|
3098
|
-
name: "Mistral: Mistral 7B Instruct",
|
|
3147
|
+
"mistralai/mistral-7b-instruct:free": {
|
|
3148
|
+
id: "mistralai/mistral-7b-instruct:free",
|
|
3149
|
+
name: "Mistral: Mistral 7B Instruct (free)",
|
|
3099
3150
|
api: "openai-completions",
|
|
3100
3151
|
provider: "openrouter",
|
|
3101
3152
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
3102
3153
|
reasoning: false,
|
|
3103
3154
|
input: ["text"],
|
|
3104
3155
|
cost: {
|
|
3105
|
-
input: 0
|
|
3106
|
-
output: 0
|
|
3156
|
+
input: 0,
|
|
3157
|
+
output: 0,
|
|
3107
3158
|
cacheRead: 0,
|
|
3108
3159
|
cacheWrite: 0,
|
|
3109
3160
|
},
|
|
3110
3161
|
contextWindow: 32768,
|
|
3111
3162
|
maxTokens: 16384,
|
|
3112
3163
|
},
|
|
3113
|
-
"mistralai/mistral-7b-instruct
|
|
3114
|
-
id: "mistralai/mistral-7b-instruct
|
|
3115
|
-
name: "Mistral: Mistral 7B Instruct
|
|
3164
|
+
"mistralai/mistral-7b-instruct": {
|
|
3165
|
+
id: "mistralai/mistral-7b-instruct",
|
|
3166
|
+
name: "Mistral: Mistral 7B Instruct",
|
|
3116
3167
|
api: "openai-completions",
|
|
3117
3168
|
provider: "openrouter",
|
|
3118
3169
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
@@ -3297,34 +3348,34 @@ export const MODELS = {
|
|
|
3297
3348
|
contextWindow: 128000,
|
|
3298
3349
|
maxTokens: 4096,
|
|
3299
3350
|
},
|
|
3300
|
-
"mistralai/mistral-
|
|
3301
|
-
id: "mistralai/mistral-
|
|
3302
|
-
name: "Mistral
|
|
3351
|
+
"mistralai/mistral-tiny": {
|
|
3352
|
+
id: "mistralai/mistral-tiny",
|
|
3353
|
+
name: "Mistral Tiny",
|
|
3303
3354
|
api: "openai-completions",
|
|
3304
3355
|
provider: "openrouter",
|
|
3305
3356
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
3306
3357
|
reasoning: false,
|
|
3307
3358
|
input: ["text"],
|
|
3308
3359
|
cost: {
|
|
3309
|
-
input: 0.
|
|
3310
|
-
output: 0.
|
|
3360
|
+
input: 0.25,
|
|
3361
|
+
output: 0.25,
|
|
3311
3362
|
cacheRead: 0,
|
|
3312
3363
|
cacheWrite: 0,
|
|
3313
3364
|
},
|
|
3314
3365
|
contextWindow: 32768,
|
|
3315
3366
|
maxTokens: 4096,
|
|
3316
3367
|
},
|
|
3317
|
-
"mistralai/mistral-
|
|
3318
|
-
id: "mistralai/mistral-
|
|
3319
|
-
name: "Mistral
|
|
3368
|
+
"mistralai/mistral-small": {
|
|
3369
|
+
id: "mistralai/mistral-small",
|
|
3370
|
+
name: "Mistral Small",
|
|
3320
3371
|
api: "openai-completions",
|
|
3321
3372
|
provider: "openrouter",
|
|
3322
3373
|
baseUrl: "https://openrouter.ai/api/v1",
|
|
3323
3374
|
reasoning: false,
|
|
3324
3375
|
input: ["text"],
|
|
3325
3376
|
cost: {
|
|
3326
|
-
input: 0.
|
|
3327
|
-
output: 0.
|
|
3377
|
+
input: 0.19999999999999998,
|
|
3378
|
+
output: 0.6,
|
|
3328
3379
|
cacheRead: 0,
|
|
3329
3380
|
cacheWrite: 0,
|
|
3330
3381
|
},
|