@oh-my-pi/pi-ai 11.14.4 → 12.0.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 +2 -2
- package/package.json +2 -2
- package/src/models.json +337 -212
- package/src/providers/amazon-bedrock.ts +5 -5
- package/src/providers/anthropic.ts +1 -1
- package/src/utils/oauth/zai.ts +1 -1
package/README.md
CHANGED
|
@@ -856,7 +856,7 @@ const restored: Context = JSON.parse(localStorage.getItem("conversation")!);
|
|
|
856
856
|
restored.messages.push({ role: "user", content: "Tell me more about its type system" });
|
|
857
857
|
|
|
858
858
|
// Continue with any model
|
|
859
|
-
const newModel = getModel("anthropic", "claude-
|
|
859
|
+
const newModel = getModel("anthropic", "claude-haiku-4-5-20251001");
|
|
860
860
|
const continuation = await complete(newModel, restored);
|
|
861
861
|
```
|
|
862
862
|
|
|
@@ -870,7 +870,7 @@ The library supports browser environments. You must pass the API key explicitly
|
|
|
870
870
|
import { getModel, complete } from "@oh-my-pi/pi-ai";
|
|
871
871
|
|
|
872
872
|
// API key must be passed explicitly in browser
|
|
873
|
-
const model = getModel("anthropic", "claude-
|
|
873
|
+
const model = getModel("anthropic", "claude-haiku-4-5-20251001");
|
|
874
874
|
|
|
875
875
|
const response = await complete(
|
|
876
876
|
model,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-ai",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@connectrpc/connect-node": "^2.1.1",
|
|
64
64
|
"@google/genai": "^1.39.0",
|
|
65
65
|
"@mistralai/mistralai": "^1.13.0",
|
|
66
|
-
"@oh-my-pi/pi-utils": "
|
|
66
|
+
"@oh-my-pi/pi-utils": "12.0.0",
|
|
67
67
|
"@sinclair/typebox": "^0.34.48",
|
|
68
68
|
"@smithy/node-http-handler": "^4.4.9",
|
|
69
69
|
"ajv": "^8.17.1",
|
package/src/models.json
CHANGED
|
@@ -1452,26 +1452,6 @@
|
|
|
1452
1452
|
"contextWindow": 200000,
|
|
1453
1453
|
"maxTokens": 128000
|
|
1454
1454
|
},
|
|
1455
|
-
"claude-3-5-haiku-latest": {
|
|
1456
|
-
"id": "claude-3-5-haiku-latest",
|
|
1457
|
-
"name": "Claude Haiku 3.5 (latest)",
|
|
1458
|
-
"api": "anthropic-messages",
|
|
1459
|
-
"provider": "anthropic",
|
|
1460
|
-
"baseUrl": "https://api.anthropic.com",
|
|
1461
|
-
"reasoning": false,
|
|
1462
|
-
"input": [
|
|
1463
|
-
"text",
|
|
1464
|
-
"image"
|
|
1465
|
-
],
|
|
1466
|
-
"cost": {
|
|
1467
|
-
"input": 0.8,
|
|
1468
|
-
"output": 4,
|
|
1469
|
-
"cacheRead": 0.08,
|
|
1470
|
-
"cacheWrite": 1
|
|
1471
|
-
},
|
|
1472
|
-
"contextWindow": 200000,
|
|
1473
|
-
"maxTokens": 8192
|
|
1474
|
-
},
|
|
1475
1455
|
"claude-opus-4-5": {
|
|
1476
1456
|
"id": "claude-opus-4-5",
|
|
1477
1457
|
"name": "Claude Opus 4.5 (latest)",
|
|
@@ -1492,26 +1472,6 @@
|
|
|
1492
1472
|
"contextWindow": 200000,
|
|
1493
1473
|
"maxTokens": 64000
|
|
1494
1474
|
},
|
|
1495
|
-
"claude-3-opus-20240229": {
|
|
1496
|
-
"id": "claude-3-opus-20240229",
|
|
1497
|
-
"name": "Claude Opus 3",
|
|
1498
|
-
"api": "anthropic-messages",
|
|
1499
|
-
"provider": "anthropic",
|
|
1500
|
-
"baseUrl": "https://api.anthropic.com",
|
|
1501
|
-
"reasoning": false,
|
|
1502
|
-
"input": [
|
|
1503
|
-
"text",
|
|
1504
|
-
"image"
|
|
1505
|
-
],
|
|
1506
|
-
"cost": {
|
|
1507
|
-
"input": 15,
|
|
1508
|
-
"output": 75,
|
|
1509
|
-
"cacheRead": 1.5,
|
|
1510
|
-
"cacheWrite": 18.75
|
|
1511
|
-
},
|
|
1512
|
-
"contextWindow": 200000,
|
|
1513
|
-
"maxTokens": 4096
|
|
1514
|
-
},
|
|
1515
1475
|
"claude-opus-4-5-20251101": {
|
|
1516
1476
|
"id": "claude-opus-4-5-20251101",
|
|
1517
1477
|
"name": "Claude Opus 4.5",
|
|
@@ -1612,26 +1572,6 @@
|
|
|
1612
1572
|
"contextWindow": 200000,
|
|
1613
1573
|
"maxTokens": 32000
|
|
1614
1574
|
},
|
|
1615
|
-
"claude-3-5-haiku-20241022": {
|
|
1616
|
-
"id": "claude-3-5-haiku-20241022",
|
|
1617
|
-
"name": "Claude Haiku 3.5",
|
|
1618
|
-
"api": "anthropic-messages",
|
|
1619
|
-
"provider": "anthropic",
|
|
1620
|
-
"baseUrl": "https://api.anthropic.com",
|
|
1621
|
-
"reasoning": false,
|
|
1622
|
-
"input": [
|
|
1623
|
-
"text",
|
|
1624
|
-
"image"
|
|
1625
|
-
],
|
|
1626
|
-
"cost": {
|
|
1627
|
-
"input": 0.8,
|
|
1628
|
-
"output": 4,
|
|
1629
|
-
"cacheRead": 0.08,
|
|
1630
|
-
"cacheWrite": 1
|
|
1631
|
-
},
|
|
1632
|
-
"contextWindow": 200000,
|
|
1633
|
-
"maxTokens": 8192
|
|
1634
|
-
},
|
|
1635
1575
|
"claude-3-haiku-20240307": {
|
|
1636
1576
|
"id": "claude-3-haiku-20240307",
|
|
1637
1577
|
"name": "Claude Haiku 3",
|
|
@@ -1652,46 +1592,6 @@
|
|
|
1652
1592
|
"contextWindow": 200000,
|
|
1653
1593
|
"maxTokens": 4096
|
|
1654
1594
|
},
|
|
1655
|
-
"claude-3-7-sonnet-20250219": {
|
|
1656
|
-
"id": "claude-3-7-sonnet-20250219",
|
|
1657
|
-
"name": "Claude Sonnet 3.7",
|
|
1658
|
-
"api": "anthropic-messages",
|
|
1659
|
-
"provider": "anthropic",
|
|
1660
|
-
"baseUrl": "https://api.anthropic.com",
|
|
1661
|
-
"reasoning": true,
|
|
1662
|
-
"input": [
|
|
1663
|
-
"text",
|
|
1664
|
-
"image"
|
|
1665
|
-
],
|
|
1666
|
-
"cost": {
|
|
1667
|
-
"input": 3,
|
|
1668
|
-
"output": 15,
|
|
1669
|
-
"cacheRead": 0.3,
|
|
1670
|
-
"cacheWrite": 3.75
|
|
1671
|
-
},
|
|
1672
|
-
"contextWindow": 200000,
|
|
1673
|
-
"maxTokens": 64000
|
|
1674
|
-
},
|
|
1675
|
-
"claude-3-7-sonnet-latest": {
|
|
1676
|
-
"id": "claude-3-7-sonnet-latest",
|
|
1677
|
-
"name": "Claude Sonnet 3.7 (latest)",
|
|
1678
|
-
"api": "anthropic-messages",
|
|
1679
|
-
"provider": "anthropic",
|
|
1680
|
-
"baseUrl": "https://api.anthropic.com",
|
|
1681
|
-
"reasoning": true,
|
|
1682
|
-
"input": [
|
|
1683
|
-
"text",
|
|
1684
|
-
"image"
|
|
1685
|
-
],
|
|
1686
|
-
"cost": {
|
|
1687
|
-
"input": 3,
|
|
1688
|
-
"output": 15,
|
|
1689
|
-
"cacheRead": 0.3,
|
|
1690
|
-
"cacheWrite": 3.75
|
|
1691
|
-
},
|
|
1692
|
-
"contextWindow": 200000,
|
|
1693
|
-
"maxTokens": 64000
|
|
1694
|
-
},
|
|
1695
1595
|
"claude-sonnet-4-0": {
|
|
1696
1596
|
"id": "claude-sonnet-4-0",
|
|
1697
1597
|
"name": "Claude Sonnet 4 (latest)",
|
|
@@ -1732,26 +1632,6 @@
|
|
|
1732
1632
|
"contextWindow": 200000,
|
|
1733
1633
|
"maxTokens": 32000
|
|
1734
1634
|
},
|
|
1735
|
-
"claude-3-sonnet-20240229": {
|
|
1736
|
-
"id": "claude-3-sonnet-20240229",
|
|
1737
|
-
"name": "Claude Sonnet 3",
|
|
1738
|
-
"api": "anthropic-messages",
|
|
1739
|
-
"provider": "anthropic",
|
|
1740
|
-
"baseUrl": "https://api.anthropic.com",
|
|
1741
|
-
"reasoning": false,
|
|
1742
|
-
"input": [
|
|
1743
|
-
"text",
|
|
1744
|
-
"image"
|
|
1745
|
-
],
|
|
1746
|
-
"cost": {
|
|
1747
|
-
"input": 3,
|
|
1748
|
-
"output": 15,
|
|
1749
|
-
"cacheRead": 0.3,
|
|
1750
|
-
"cacheWrite": 0.3
|
|
1751
|
-
},
|
|
1752
|
-
"contextWindow": 200000,
|
|
1753
|
-
"maxTokens": 4096
|
|
1754
|
-
},
|
|
1755
1635
|
"claude-haiku-4-5-20251001": {
|
|
1756
1636
|
"id": "claude-haiku-4-5-20251001",
|
|
1757
1637
|
"name": "Claude Haiku 4.5",
|
|
@@ -2215,6 +2095,26 @@
|
|
|
2215
2095
|
"contextWindow": 1047576,
|
|
2216
2096
|
"maxTokens": 32768
|
|
2217
2097
|
},
|
|
2098
|
+
"gpt-5.3-codex-spark": {
|
|
2099
|
+
"id": "gpt-5.3-codex-spark",
|
|
2100
|
+
"name": "GPT-5.3 Codex Spark",
|
|
2101
|
+
"api": "openai-responses",
|
|
2102
|
+
"provider": "openai",
|
|
2103
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
2104
|
+
"reasoning": true,
|
|
2105
|
+
"input": [
|
|
2106
|
+
"text",
|
|
2107
|
+
"image"
|
|
2108
|
+
],
|
|
2109
|
+
"cost": {
|
|
2110
|
+
"input": 1.75,
|
|
2111
|
+
"output": 14,
|
|
2112
|
+
"cacheRead": 0.175,
|
|
2113
|
+
"cacheWrite": 0
|
|
2114
|
+
},
|
|
2115
|
+
"contextWindow": 128000,
|
|
2116
|
+
"maxTokens": 32000
|
|
2117
|
+
},
|
|
2218
2118
|
"gpt-4": {
|
|
2219
2119
|
"id": "gpt-4",
|
|
2220
2120
|
"name": "GPT-4",
|
|
@@ -3221,6 +3121,25 @@
|
|
|
3221
3121
|
"contextWindow": 131000,
|
|
3222
3122
|
"maxTokens": 32000
|
|
3223
3123
|
},
|
|
3124
|
+
"llama3.1-8b": {
|
|
3125
|
+
"id": "llama3.1-8b",
|
|
3126
|
+
"name": "Llama 3.1 8B",
|
|
3127
|
+
"api": "openai-completions",
|
|
3128
|
+
"provider": "cerebras",
|
|
3129
|
+
"baseUrl": "https://api.cerebras.ai/v1",
|
|
3130
|
+
"reasoning": false,
|
|
3131
|
+
"input": [
|
|
3132
|
+
"text"
|
|
3133
|
+
],
|
|
3134
|
+
"cost": {
|
|
3135
|
+
"input": 0.1,
|
|
3136
|
+
"output": 0.1,
|
|
3137
|
+
"cacheRead": 0,
|
|
3138
|
+
"cacheWrite": 0
|
|
3139
|
+
},
|
|
3140
|
+
"contextWindow": 32000,
|
|
3141
|
+
"maxTokens": 8000
|
|
3142
|
+
},
|
|
3224
3143
|
"gpt-oss-120b": {
|
|
3225
3144
|
"id": "gpt-oss-120b",
|
|
3226
3145
|
"name": "GPT OSS 120B",
|
|
@@ -3878,30 +3797,6 @@
|
|
|
3878
3797
|
},
|
|
3879
3798
|
"contextWindow": 128000,
|
|
3880
3799
|
"maxTokens": 32768
|
|
3881
|
-
},
|
|
3882
|
-
"glm-5": {
|
|
3883
|
-
"id": "glm-5",
|
|
3884
|
-
"name": "GLM-5",
|
|
3885
|
-
"api": "openai-completions",
|
|
3886
|
-
"provider": "zai",
|
|
3887
|
-
"baseUrl": "https://api.z.ai/api/coding/paas/v4",
|
|
3888
|
-
"reasoning": true,
|
|
3889
|
-
"input": [
|
|
3890
|
-
"text",
|
|
3891
|
-
"image"
|
|
3892
|
-
],
|
|
3893
|
-
"cost": {
|
|
3894
|
-
"input": 0,
|
|
3895
|
-
"output": 0,
|
|
3896
|
-
"cacheRead": 0,
|
|
3897
|
-
"cacheWrite": 0
|
|
3898
|
-
},
|
|
3899
|
-
"compat": {
|
|
3900
|
-
"supportsDeveloperRole": false,
|
|
3901
|
-
"thinkingFormat": "zai"
|
|
3902
|
-
},
|
|
3903
|
-
"contextWindow": 204800,
|
|
3904
|
-
"maxTokens": 131072
|
|
3905
3800
|
}
|
|
3906
3801
|
},
|
|
3907
3802
|
"minimax-code": {
|
|
@@ -3976,6 +3871,54 @@
|
|
|
3976
3871
|
},
|
|
3977
3872
|
"contextWindow": 1000000,
|
|
3978
3873
|
"maxTokens": 32000
|
|
3874
|
+
},
|
|
3875
|
+
"MiniMax-M2.5": {
|
|
3876
|
+
"id": "MiniMax-M2.5",
|
|
3877
|
+
"name": "MiniMax M2.5 (Coding Plan)",
|
|
3878
|
+
"api": "openai-completions",
|
|
3879
|
+
"provider": "minimax-code",
|
|
3880
|
+
"baseUrl": "https://api.minimax.io/v1",
|
|
3881
|
+
"reasoning": true,
|
|
3882
|
+
"input": [
|
|
3883
|
+
"text"
|
|
3884
|
+
],
|
|
3885
|
+
"cost": {
|
|
3886
|
+
"input": 0,
|
|
3887
|
+
"output": 0,
|
|
3888
|
+
"cacheRead": 0,
|
|
3889
|
+
"cacheWrite": 0
|
|
3890
|
+
},
|
|
3891
|
+
"compat": {
|
|
3892
|
+
"supportsDeveloperRole": false,
|
|
3893
|
+
"thinkingFormat": "zai",
|
|
3894
|
+
"reasoningContentField": "reasoning_content"
|
|
3895
|
+
},
|
|
3896
|
+
"contextWindow": 204800,
|
|
3897
|
+
"maxTokens": 32000
|
|
3898
|
+
},
|
|
3899
|
+
"MiniMax-M2.5-lightning": {
|
|
3900
|
+
"id": "MiniMax-M2.5-lightning",
|
|
3901
|
+
"name": "MiniMax M2.5 Lightning (Coding Plan)",
|
|
3902
|
+
"api": "openai-completions",
|
|
3903
|
+
"provider": "minimax-code",
|
|
3904
|
+
"baseUrl": "https://api.minimax.io/v1",
|
|
3905
|
+
"reasoning": true,
|
|
3906
|
+
"input": [
|
|
3907
|
+
"text"
|
|
3908
|
+
],
|
|
3909
|
+
"cost": {
|
|
3910
|
+
"input": 0,
|
|
3911
|
+
"output": 0,
|
|
3912
|
+
"cacheRead": 0,
|
|
3913
|
+
"cacheWrite": 0
|
|
3914
|
+
},
|
|
3915
|
+
"compat": {
|
|
3916
|
+
"supportsDeveloperRole": false,
|
|
3917
|
+
"thinkingFormat": "zai",
|
|
3918
|
+
"reasoningContentField": "reasoning_content"
|
|
3919
|
+
},
|
|
3920
|
+
"contextWindow": 204800,
|
|
3921
|
+
"maxTokens": 32000
|
|
3979
3922
|
}
|
|
3980
3923
|
},
|
|
3981
3924
|
"minimax-code-cn": {
|
|
@@ -4050,6 +3993,54 @@
|
|
|
4050
3993
|
},
|
|
4051
3994
|
"contextWindow": 1000000,
|
|
4052
3995
|
"maxTokens": 32000
|
|
3996
|
+
},
|
|
3997
|
+
"MiniMax-M2.5": {
|
|
3998
|
+
"id": "MiniMax-M2.5",
|
|
3999
|
+
"name": "MiniMax M2.5 (Coding Plan CN)",
|
|
4000
|
+
"api": "openai-completions",
|
|
4001
|
+
"provider": "minimax-code-cn",
|
|
4002
|
+
"baseUrl": "https://api.minimaxi.com/v1",
|
|
4003
|
+
"reasoning": true,
|
|
4004
|
+
"input": [
|
|
4005
|
+
"text"
|
|
4006
|
+
],
|
|
4007
|
+
"cost": {
|
|
4008
|
+
"input": 0,
|
|
4009
|
+
"output": 0,
|
|
4010
|
+
"cacheRead": 0,
|
|
4011
|
+
"cacheWrite": 0
|
|
4012
|
+
},
|
|
4013
|
+
"compat": {
|
|
4014
|
+
"supportsDeveloperRole": false,
|
|
4015
|
+
"thinkingFormat": "zai",
|
|
4016
|
+
"reasoningContentField": "reasoning_content"
|
|
4017
|
+
},
|
|
4018
|
+
"contextWindow": 204800,
|
|
4019
|
+
"maxTokens": 32000
|
|
4020
|
+
},
|
|
4021
|
+
"MiniMax-M2.5-lightning": {
|
|
4022
|
+
"id": "MiniMax-M2.5-lightning",
|
|
4023
|
+
"name": "MiniMax M2.5 Lightning (Coding Plan CN)",
|
|
4024
|
+
"api": "openai-completions",
|
|
4025
|
+
"provider": "minimax-code-cn",
|
|
4026
|
+
"baseUrl": "https://api.minimaxi.com/v1",
|
|
4027
|
+
"reasoning": true,
|
|
4028
|
+
"input": [
|
|
4029
|
+
"text"
|
|
4030
|
+
],
|
|
4031
|
+
"cost": {
|
|
4032
|
+
"input": 0,
|
|
4033
|
+
"output": 0,
|
|
4034
|
+
"cacheRead": 0,
|
|
4035
|
+
"cacheWrite": 0
|
|
4036
|
+
},
|
|
4037
|
+
"compat": {
|
|
4038
|
+
"supportsDeveloperRole": false,
|
|
4039
|
+
"thinkingFormat": "zai",
|
|
4040
|
+
"reasoningContentField": "reasoning_content"
|
|
4041
|
+
},
|
|
4042
|
+
"contextWindow": 204800,
|
|
4043
|
+
"maxTokens": 32000
|
|
4053
4044
|
}
|
|
4054
4045
|
},
|
|
4055
4046
|
"mistral": {
|
|
@@ -4678,25 +4669,6 @@
|
|
|
4678
4669
|
"contextWindow": 200000,
|
|
4679
4670
|
"maxTokens": 128000
|
|
4680
4671
|
},
|
|
4681
|
-
"trinity-large-preview-free": {
|
|
4682
|
-
"id": "trinity-large-preview-free",
|
|
4683
|
-
"name": "Trinity Large Preview",
|
|
4684
|
-
"api": "openai-completions",
|
|
4685
|
-
"provider": "opencode",
|
|
4686
|
-
"baseUrl": "https://opencode.ai/zen/v1",
|
|
4687
|
-
"reasoning": false,
|
|
4688
|
-
"input": [
|
|
4689
|
-
"text"
|
|
4690
|
-
],
|
|
4691
|
-
"cost": {
|
|
4692
|
-
"input": 0,
|
|
4693
|
-
"output": 0,
|
|
4694
|
-
"cacheRead": 0,
|
|
4695
|
-
"cacheWrite": 0
|
|
4696
|
-
},
|
|
4697
|
-
"contextWindow": 131072,
|
|
4698
|
-
"maxTokens": 131072
|
|
4699
|
-
},
|
|
4700
4672
|
"claude-opus-4-5": {
|
|
4701
4673
|
"id": "claude-opus-4-5",
|
|
4702
4674
|
"name": "Claude Opus 4.5",
|
|
@@ -4974,25 +4946,6 @@
|
|
|
4974
4946
|
"contextWindow": 400000,
|
|
4975
4947
|
"maxTokens": 128000
|
|
4976
4948
|
},
|
|
4977
|
-
"minimax-m2.1-free": {
|
|
4978
|
-
"id": "minimax-m2.1-free",
|
|
4979
|
-
"name": "MiniMax M2.1 Free",
|
|
4980
|
-
"api": "anthropic-messages",
|
|
4981
|
-
"provider": "opencode",
|
|
4982
|
-
"baseUrl": "https://opencode.ai/zen",
|
|
4983
|
-
"reasoning": true,
|
|
4984
|
-
"input": [
|
|
4985
|
-
"text"
|
|
4986
|
-
],
|
|
4987
|
-
"cost": {
|
|
4988
|
-
"input": 0,
|
|
4989
|
-
"output": 0,
|
|
4990
|
-
"cacheRead": 0,
|
|
4991
|
-
"cacheWrite": 0
|
|
4992
|
-
},
|
|
4993
|
-
"contextWindow": 204800,
|
|
4994
|
-
"maxTokens": 131072
|
|
4995
|
-
},
|
|
4996
4949
|
"kimi-k2.5-free": {
|
|
4997
4950
|
"id": "kimi-k2.5-free",
|
|
4998
4951
|
"name": "Kimi K2.5 Free",
|
|
@@ -5072,6 +5025,25 @@
|
|
|
5072
5025
|
"contextWindow": 204800,
|
|
5073
5026
|
"maxTokens": 131072
|
|
5074
5027
|
},
|
|
5028
|
+
"minimax-m2.5-free": {
|
|
5029
|
+
"id": "minimax-m2.5-free",
|
|
5030
|
+
"name": "MiniMax M2.5 Free",
|
|
5031
|
+
"api": "openai-completions",
|
|
5032
|
+
"provider": "opencode",
|
|
5033
|
+
"baseUrl": "https://opencode.ai/zen/v1",
|
|
5034
|
+
"reasoning": true,
|
|
5035
|
+
"input": [
|
|
5036
|
+
"text"
|
|
5037
|
+
],
|
|
5038
|
+
"cost": {
|
|
5039
|
+
"input": 0,
|
|
5040
|
+
"output": 0,
|
|
5041
|
+
"cacheRead": 0,
|
|
5042
|
+
"cacheWrite": 0
|
|
5043
|
+
},
|
|
5044
|
+
"contextWindow": 204800,
|
|
5045
|
+
"maxTokens": 131072
|
|
5046
|
+
},
|
|
5075
5047
|
"gpt-5.2": {
|
|
5076
5048
|
"id": "gpt-5.2",
|
|
5077
5049
|
"name": "GPT-5.2",
|
|
@@ -5681,6 +5653,44 @@
|
|
|
5681
5653
|
},
|
|
5682
5654
|
"contextWindow": 204800,
|
|
5683
5655
|
"maxTokens": 131072
|
|
5656
|
+
},
|
|
5657
|
+
"MiniMax-M2.5": {
|
|
5658
|
+
"id": "MiniMax-M2.5",
|
|
5659
|
+
"name": "MiniMax M2.5",
|
|
5660
|
+
"api": "anthropic-messages",
|
|
5661
|
+
"provider": "minimax",
|
|
5662
|
+
"baseUrl": "https://api.minimax.io/anthropic",
|
|
5663
|
+
"reasoning": true,
|
|
5664
|
+
"input": [
|
|
5665
|
+
"text"
|
|
5666
|
+
],
|
|
5667
|
+
"cost": {
|
|
5668
|
+
"input": 0.15,
|
|
5669
|
+
"output": 1.2,
|
|
5670
|
+
"cacheRead": 0,
|
|
5671
|
+
"cacheWrite": 0
|
|
5672
|
+
},
|
|
5673
|
+
"contextWindow": 204800,
|
|
5674
|
+
"maxTokens": 32000
|
|
5675
|
+
},
|
|
5676
|
+
"MiniMax-M2.5-lightning": {
|
|
5677
|
+
"id": "MiniMax-M2.5-lightning",
|
|
5678
|
+
"name": "MiniMax M2.5 Lightning",
|
|
5679
|
+
"api": "anthropic-messages",
|
|
5680
|
+
"provider": "minimax",
|
|
5681
|
+
"baseUrl": "https://api.minimax.io/anthropic",
|
|
5682
|
+
"reasoning": true,
|
|
5683
|
+
"input": [
|
|
5684
|
+
"text"
|
|
5685
|
+
],
|
|
5686
|
+
"cost": {
|
|
5687
|
+
"input": 0.3,
|
|
5688
|
+
"output": 2.4,
|
|
5689
|
+
"cacheRead": 0,
|
|
5690
|
+
"cacheWrite": 0
|
|
5691
|
+
},
|
|
5692
|
+
"contextWindow": 204800,
|
|
5693
|
+
"maxTokens": 32000
|
|
5684
5694
|
}
|
|
5685
5695
|
},
|
|
5686
5696
|
"minimax-cn": {
|
|
@@ -5721,9 +5731,66 @@
|
|
|
5721
5731
|
},
|
|
5722
5732
|
"contextWindow": 196608,
|
|
5723
5733
|
"maxTokens": 128000
|
|
5734
|
+
},
|
|
5735
|
+
"MiniMax-M2.5": {
|
|
5736
|
+
"id": "MiniMax-M2.5",
|
|
5737
|
+
"name": "MiniMax M2.5 (CN)",
|
|
5738
|
+
"api": "anthropic-messages",
|
|
5739
|
+
"provider": "minimax-cn",
|
|
5740
|
+
"baseUrl": "https://api.minimaxi.com/anthropic",
|
|
5741
|
+
"reasoning": true,
|
|
5742
|
+
"input": [
|
|
5743
|
+
"text"
|
|
5744
|
+
],
|
|
5745
|
+
"cost": {
|
|
5746
|
+
"input": 0.15,
|
|
5747
|
+
"output": 1.2,
|
|
5748
|
+
"cacheRead": 0,
|
|
5749
|
+
"cacheWrite": 0
|
|
5750
|
+
},
|
|
5751
|
+
"contextWindow": 204800,
|
|
5752
|
+
"maxTokens": 32000
|
|
5753
|
+
},
|
|
5754
|
+
"MiniMax-M2.5-lightning": {
|
|
5755
|
+
"id": "MiniMax-M2.5-lightning",
|
|
5756
|
+
"name": "MiniMax M2.5 Lightning (CN)",
|
|
5757
|
+
"api": "anthropic-messages",
|
|
5758
|
+
"provider": "minimax-cn",
|
|
5759
|
+
"baseUrl": "https://api.minimaxi.com/anthropic",
|
|
5760
|
+
"reasoning": true,
|
|
5761
|
+
"input": [
|
|
5762
|
+
"text"
|
|
5763
|
+
],
|
|
5764
|
+
"cost": {
|
|
5765
|
+
"input": 0.3,
|
|
5766
|
+
"output": 2.4,
|
|
5767
|
+
"cacheRead": 0,
|
|
5768
|
+
"cacheWrite": 0
|
|
5769
|
+
},
|
|
5770
|
+
"contextWindow": 204800,
|
|
5771
|
+
"maxTokens": 32000
|
|
5724
5772
|
}
|
|
5725
5773
|
},
|
|
5726
5774
|
"openrouter": {
|
|
5775
|
+
"minimax/minimax-m2.5": {
|
|
5776
|
+
"id": "minimax/minimax-m2.5",
|
|
5777
|
+
"name": "MiniMax: MiniMax M2.5",
|
|
5778
|
+
"api": "openai-completions",
|
|
5779
|
+
"baseUrl": "https://openrouter.ai/api/v1",
|
|
5780
|
+
"provider": "openrouter",
|
|
5781
|
+
"reasoning": true,
|
|
5782
|
+
"input": [
|
|
5783
|
+
"text"
|
|
5784
|
+
],
|
|
5785
|
+
"cost": {
|
|
5786
|
+
"input": 0.3,
|
|
5787
|
+
"output": 1.2,
|
|
5788
|
+
"cacheRead": 0.03,
|
|
5789
|
+
"cacheWrite": 0
|
|
5790
|
+
},
|
|
5791
|
+
"contextWindow": 204800,
|
|
5792
|
+
"maxTokens": 131072
|
|
5793
|
+
},
|
|
5727
5794
|
"z-ai/glm-5": {
|
|
5728
5795
|
"id": "z-ai/glm-5",
|
|
5729
5796
|
"name": "Z.ai: GLM 5",
|
|
@@ -5735,13 +5802,13 @@
|
|
|
5735
5802
|
"text"
|
|
5736
5803
|
],
|
|
5737
5804
|
"cost": {
|
|
5738
|
-
"input":
|
|
5739
|
-
"output":
|
|
5740
|
-
"cacheRead": 0,
|
|
5805
|
+
"input": 0.7999999999999999,
|
|
5806
|
+
"output": 2.56,
|
|
5807
|
+
"cacheRead": 0.16,
|
|
5741
5808
|
"cacheWrite": 0
|
|
5742
5809
|
},
|
|
5743
5810
|
"contextWindow": 202752,
|
|
5744
|
-
"maxTokens":
|
|
5811
|
+
"maxTokens": 131072
|
|
5745
5812
|
},
|
|
5746
5813
|
"qwen/qwen3-max-thinking": {
|
|
5747
5814
|
"id": "qwen/qwen3-max-thinking",
|
|
@@ -5760,7 +5827,7 @@
|
|
|
5760
5827
|
"cacheWrite": 0
|
|
5761
5828
|
},
|
|
5762
5829
|
"contextWindow": 262144,
|
|
5763
|
-
"maxTokens":
|
|
5830
|
+
"maxTokens": 65536
|
|
5764
5831
|
},
|
|
5765
5832
|
"openrouter/aurora-alpha": {
|
|
5766
5833
|
"id": "openrouter/aurora-alpha",
|
|
@@ -6826,6 +6893,26 @@
|
|
|
6826
6893
|
"contextWindow": 196608,
|
|
6827
6894
|
"maxTokens": 65536
|
|
6828
6895
|
},
|
|
6896
|
+
"qwen/qwen3-vl-32b-instruct": {
|
|
6897
|
+
"id": "qwen/qwen3-vl-32b-instruct",
|
|
6898
|
+
"name": "Qwen: Qwen3 VL 32B Instruct",
|
|
6899
|
+
"api": "openai-completions",
|
|
6900
|
+
"baseUrl": "https://openrouter.ai/api/v1",
|
|
6901
|
+
"provider": "openrouter",
|
|
6902
|
+
"reasoning": false,
|
|
6903
|
+
"input": [
|
|
6904
|
+
"text",
|
|
6905
|
+
"image"
|
|
6906
|
+
],
|
|
6907
|
+
"cost": {
|
|
6908
|
+
"input": 0.10400000000000001,
|
|
6909
|
+
"output": 0.41600000000000004,
|
|
6910
|
+
"cacheRead": 0,
|
|
6911
|
+
"cacheWrite": 0
|
|
6912
|
+
},
|
|
6913
|
+
"contextWindow": 131072,
|
|
6914
|
+
"maxTokens": 32768
|
|
6915
|
+
},
|
|
6829
6916
|
"openai/gpt-5-image-mini": {
|
|
6830
6917
|
"id": "openai/gpt-5-image-mini",
|
|
6831
6918
|
"name": "OpenAI: GPT-5 Image Mini",
|
|
@@ -6878,8 +6965,8 @@
|
|
|
6878
6965
|
"image"
|
|
6879
6966
|
],
|
|
6880
6967
|
"cost": {
|
|
6881
|
-
"input": 0.
|
|
6882
|
-
"output":
|
|
6968
|
+
"input": 0.117,
|
|
6969
|
+
"output": 1.365,
|
|
6883
6970
|
"cacheRead": 0,
|
|
6884
6971
|
"cacheWrite": 0
|
|
6885
6972
|
},
|
|
@@ -6997,8 +7084,8 @@
|
|
|
6997
7084
|
"image"
|
|
6998
7085
|
],
|
|
6999
7086
|
"cost": {
|
|
7000
|
-
"input": 0
|
|
7001
|
-
"output":
|
|
7087
|
+
"input": 0,
|
|
7088
|
+
"output": 0,
|
|
7002
7089
|
"cacheRead": 0,
|
|
7003
7090
|
"cacheWrite": 0
|
|
7004
7091
|
},
|
|
@@ -7017,13 +7104,13 @@
|
|
|
7017
7104
|
"image"
|
|
7018
7105
|
],
|
|
7019
7106
|
"cost": {
|
|
7020
|
-
"input": 0.
|
|
7021
|
-
"output": 0.
|
|
7107
|
+
"input": 0.13,
|
|
7108
|
+
"output": 0.52,
|
|
7022
7109
|
"cacheRead": 0,
|
|
7023
7110
|
"cacheWrite": 0
|
|
7024
7111
|
},
|
|
7025
|
-
"contextWindow":
|
|
7026
|
-
"maxTokens":
|
|
7112
|
+
"contextWindow": 131072,
|
|
7113
|
+
"maxTokens": 32768
|
|
7027
7114
|
},
|
|
7028
7115
|
"openai/gpt-5-pro": {
|
|
7029
7116
|
"id": "openai/gpt-5-pro",
|
|
@@ -7174,13 +7261,13 @@
|
|
|
7174
7261
|
"image"
|
|
7175
7262
|
],
|
|
7176
7263
|
"cost": {
|
|
7177
|
-
"input": 0
|
|
7178
|
-
"output":
|
|
7264
|
+
"input": 0,
|
|
7265
|
+
"output": 0,
|
|
7179
7266
|
"cacheRead": 0,
|
|
7180
7267
|
"cacheWrite": 0
|
|
7181
7268
|
},
|
|
7182
|
-
"contextWindow":
|
|
7183
|
-
"maxTokens":
|
|
7269
|
+
"contextWindow": 131072,
|
|
7270
|
+
"maxTokens": 32768
|
|
7184
7271
|
},
|
|
7185
7272
|
"qwen/qwen3-vl-235b-a22b-instruct": {
|
|
7186
7273
|
"id": "qwen/qwen3-vl-235b-a22b-instruct",
|
|
@@ -8677,13 +8764,13 @@
|
|
|
8677
8764
|
"text"
|
|
8678
8765
|
],
|
|
8679
8766
|
"cost": {
|
|
8680
|
-
"input": 0.
|
|
8681
|
-
"output":
|
|
8682
|
-
"cacheRead": 0.
|
|
8767
|
+
"input": 0.3,
|
|
8768
|
+
"output": 1.2,
|
|
8769
|
+
"cacheRead": 0.15,
|
|
8683
8770
|
"cacheWrite": 0
|
|
8684
8771
|
},
|
|
8685
|
-
"contextWindow":
|
|
8686
|
-
"maxTokens":
|
|
8772
|
+
"contextWindow": 40960,
|
|
8773
|
+
"maxTokens": 40960
|
|
8687
8774
|
},
|
|
8688
8775
|
"openai/o4-mini-high": {
|
|
8689
8776
|
"id": "openai/o4-mini-high",
|
|
@@ -11166,6 +11253,25 @@
|
|
|
11166
11253
|
"contextWindow": 204800,
|
|
11167
11254
|
"maxTokens": 131072
|
|
11168
11255
|
},
|
|
11256
|
+
"minimax/minimax-m2.5": {
|
|
11257
|
+
"id": "minimax/minimax-m2.5",
|
|
11258
|
+
"name": "MiniMax M2.5",
|
|
11259
|
+
"api": "anthropic-messages",
|
|
11260
|
+
"baseUrl": "https://ai-gateway.vercel.sh",
|
|
11261
|
+
"provider": "vercel-ai-gateway",
|
|
11262
|
+
"reasoning": true,
|
|
11263
|
+
"input": [
|
|
11264
|
+
"text"
|
|
11265
|
+
],
|
|
11266
|
+
"cost": {
|
|
11267
|
+
"input": 0.3,
|
|
11268
|
+
"output": 1.2,
|
|
11269
|
+
"cacheRead": 0.03,
|
|
11270
|
+
"cacheWrite": 0.375
|
|
11271
|
+
},
|
|
11272
|
+
"contextWindow": 204800,
|
|
11273
|
+
"maxTokens": 131000
|
|
11274
|
+
},
|
|
11169
11275
|
"mistral/codestral": {
|
|
11170
11276
|
"id": "mistral/codestral",
|
|
11171
11277
|
"name": "Mistral Codestral",
|
|
@@ -12851,6 +12957,25 @@
|
|
|
12851
12957
|
},
|
|
12852
12958
|
"contextWindow": 400000,
|
|
12853
12959
|
"maxTokens": 128000
|
|
12960
|
+
},
|
|
12961
|
+
"gpt-5.3-codex-spark": {
|
|
12962
|
+
"id": "gpt-5.3-codex-spark",
|
|
12963
|
+
"name": "GPT-5.3 Codex Spark",
|
|
12964
|
+
"api": "openai-codex-responses",
|
|
12965
|
+
"provider": "openai-codex",
|
|
12966
|
+
"baseUrl": "https://chatgpt.com/backend-api",
|
|
12967
|
+
"reasoning": true,
|
|
12968
|
+
"input": [
|
|
12969
|
+
"text"
|
|
12970
|
+
],
|
|
12971
|
+
"cost": {
|
|
12972
|
+
"input": 1.75,
|
|
12973
|
+
"output": 14,
|
|
12974
|
+
"cacheRead": 0.175,
|
|
12975
|
+
"cacheWrite": 0
|
|
12976
|
+
},
|
|
12977
|
+
"contextWindow": 128000,
|
|
12978
|
+
"maxTokens": 128000
|
|
12854
12979
|
}
|
|
12855
12980
|
},
|
|
12856
12981
|
"google-gemini-cli": {
|
|
@@ -12958,7 +13083,7 @@
|
|
|
12958
13083
|
"google-antigravity": {
|
|
12959
13084
|
"claude-opus-4-5-thinking": {
|
|
12960
13085
|
"id": "claude-opus-4-5-thinking",
|
|
12961
|
-
"name": "Claude Opus 4.5
|
|
13086
|
+
"name": "Claude Opus 4.5 Thinking (Antigravity)",
|
|
12962
13087
|
"api": "google-gemini-cli",
|
|
12963
13088
|
"provider": "google-antigravity",
|
|
12964
13089
|
"baseUrl": "https://daily-cloudcode-pa.sandbox.googleapis.com",
|
|
@@ -12978,7 +13103,7 @@
|
|
|
12978
13103
|
},
|
|
12979
13104
|
"claude-opus-4-6-thinking": {
|
|
12980
13105
|
"id": "claude-opus-4-6-thinking",
|
|
12981
|
-
"name": "Claude Opus 4.6
|
|
13106
|
+
"name": "Claude Opus 4.6 Thinking (Antigravity)",
|
|
12982
13107
|
"api": "google-gemini-cli",
|
|
12983
13108
|
"provider": "google-antigravity",
|
|
12984
13109
|
"baseUrl": "https://daily-cloudcode-pa.sandbox.googleapis.com",
|
|
@@ -13018,7 +13143,7 @@
|
|
|
13018
13143
|
},
|
|
13019
13144
|
"claude-sonnet-4-5-thinking": {
|
|
13020
13145
|
"id": "claude-sonnet-4-5-thinking",
|
|
13021
|
-
"name": "Claude Sonnet 4.5
|
|
13146
|
+
"name": "Claude Sonnet 4.5 Thinking (Antigravity)",
|
|
13022
13147
|
"api": "google-gemini-cli",
|
|
13023
13148
|
"provider": "google-antigravity",
|
|
13024
13149
|
"baseUrl": "https://daily-cloudcode-pa.sandbox.googleapis.com",
|
|
@@ -13058,7 +13183,7 @@
|
|
|
13058
13183
|
},
|
|
13059
13184
|
"gemini-2.5-flash-thinking": {
|
|
13060
13185
|
"id": "gemini-2.5-flash-thinking",
|
|
13061
|
-
"name": "Gemini 2.5 Flash
|
|
13186
|
+
"name": "Gemini 2.5 Flash Thinking (Antigravity)",
|
|
13062
13187
|
"api": "google-gemini-cli",
|
|
13063
13188
|
"provider": "google-antigravity",
|
|
13064
13189
|
"baseUrl": "https://daily-cloudcode-pa.sandbox.googleapis.com",
|
|
@@ -13118,7 +13243,7 @@
|
|
|
13118
13243
|
},
|
|
13119
13244
|
"gemini-3-pro-high": {
|
|
13120
13245
|
"id": "gemini-3-pro-high",
|
|
13121
|
-
"name": "Gemini 3 Pro
|
|
13246
|
+
"name": "Gemini 3 Pro High (Antigravity)",
|
|
13122
13247
|
"api": "google-gemini-cli",
|
|
13123
13248
|
"provider": "google-antigravity",
|
|
13124
13249
|
"baseUrl": "https://daily-cloudcode-pa.sandbox.googleapis.com",
|
|
@@ -13138,7 +13263,7 @@
|
|
|
13138
13263
|
},
|
|
13139
13264
|
"gemini-3-pro-low": {
|
|
13140
13265
|
"id": "gemini-3-pro-low",
|
|
13141
|
-
"name": "Gemini 3 Pro
|
|
13266
|
+
"name": "Gemini 3 Pro Low (Antigravity)",
|
|
13142
13267
|
"api": "google-gemini-cli",
|
|
13143
13268
|
"provider": "google-antigravity",
|
|
13144
13269
|
"baseUrl": "https://daily-cloudcode-pa.sandbox.googleapis.com",
|
|
@@ -13158,7 +13283,7 @@
|
|
|
13158
13283
|
},
|
|
13159
13284
|
"gpt-oss-120b-medium": {
|
|
13160
13285
|
"id": "gpt-oss-120b-medium",
|
|
13161
|
-
"name": "GPT-OSS 120B
|
|
13286
|
+
"name": "GPT-OSS 120B Medium (Antigravity)",
|
|
13162
13287
|
"api": "google-gemini-cli",
|
|
13163
13288
|
"provider": "google-antigravity",
|
|
13164
13289
|
"baseUrl": "https://daily-cloudcode-pa.sandbox.googleapis.com",
|
|
@@ -13172,7 +13297,7 @@
|
|
|
13172
13297
|
"cacheRead": 0,
|
|
13173
13298
|
"cacheWrite": 0
|
|
13174
13299
|
},
|
|
13175
|
-
"contextWindow":
|
|
13300
|
+
"contextWindow": 131072,
|
|
13176
13301
|
"maxTokens": 32768
|
|
13177
13302
|
}
|
|
13178
13303
|
},
|
|
@@ -331,17 +331,17 @@ function resolveCacheRetention(cacheRetention?: CacheRetention): CacheRetention
|
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
333
|
* Check if the model supports prompt caching.
|
|
334
|
-
* Supported: Claude 3.5 Haiku, Claude 3.7 Sonnet, Claude 4.x models
|
|
334
|
+
* Supported: Claude 3.5 Haiku, Claude 3.7 Sonnet, Claude 4.x+ models, Haiku 4.5+
|
|
335
335
|
*/
|
|
336
336
|
function supportsPromptCaching(model: Model<"bedrock-converse-stream">): boolean {
|
|
337
337
|
if (model.cost.cacheRead || model.cost.cacheWrite) return true;
|
|
338
338
|
const id = model.id.toLowerCase();
|
|
339
339
|
// Claude 4.x models (opus-4, sonnet-4, haiku-4)
|
|
340
340
|
if (id.includes("claude") && (id.includes("-4-") || id.includes("-4."))) return true;
|
|
341
|
-
// Claude 3.7 Sonnet
|
|
342
|
-
if (id.includes("claude-3-7-sonnet")) return true;
|
|
343
|
-
// Claude
|
|
344
|
-
if (id.includes("claude-
|
|
341
|
+
// Claude 3.5 Haiku, Claude 3.7 Sonnet (legacy naming)
|
|
342
|
+
if (id.includes("claude-3-7-sonnet") || id.includes("claude-3-5-haiku")) return true;
|
|
343
|
+
// Claude Haiku 4.5+ (new naming)
|
|
344
|
+
if (id.includes("claude-haiku")) return true;
|
|
345
345
|
return false;
|
|
346
346
|
}
|
|
347
347
|
|
|
@@ -642,7 +642,7 @@ function buildParams(
|
|
|
642
642
|
stream: true,
|
|
643
643
|
};
|
|
644
644
|
|
|
645
|
-
const includeClaudeCodeSystem = !model.id.
|
|
645
|
+
const includeClaudeCodeSystem = !model.id.includes("haiku");
|
|
646
646
|
const systemBlocks = buildAnthropicSystemBlocks(context.systemPrompt, {
|
|
647
647
|
includeClaudeCodeInstruction: includeClaudeCodeSystem,
|
|
648
648
|
});
|
package/src/utils/oauth/zai.ts
CHANGED
|
@@ -14,7 +14,7 @@ import type { OAuthController } from "./types";
|
|
|
14
14
|
|
|
15
15
|
const AUTH_URL = "https://z.ai/manage-apikey/apikey-list";
|
|
16
16
|
const API_BASE_URL = "https://api.z.ai/api/coding/paas/v4";
|
|
17
|
-
const VALIDATION_MODEL = "glm-
|
|
17
|
+
const VALIDATION_MODEL = "glm-4.7";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Login to Z.AI.
|