@providerkit/core 0.8.1 → 0.10.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/dist/capability.d.ts +41 -0
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js +94 -0
- package/dist/capability.js.map +1 -1
- package/dist/errors.d.ts +30 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +171 -13
- package/dist/errors.js.map +1 -1
- package/dist/presets.d.ts +173 -28
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +172 -26
- package/dist/presets.js.map +1 -1
- package/dist/providers/anthropic.js +2 -2
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/factory.d.ts.map +1 -1
- package/dist/providers/factory.js +1 -0
- package/dist/providers/factory.js.map +1 -1
- package/dist/providers/gemini.d.ts.map +1 -1
- package/dist/providers/gemini.js +28 -10
- package/dist/providers/gemini.js.map +1 -1
- package/dist/providers/openai.d.ts +6 -0
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +58 -4
- package/dist/providers/openai.js.map +1 -1
- package/dist/rate-limit.d.ts +2 -0
- package/dist/rate-limit.d.ts.map +1 -1
- package/dist/rate-limit.js +91 -34
- package/dist/rate-limit.js.map +1 -1
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +2 -2
- package/dist/retry.js.map +1 -1
- package/dist/schema.d.ts +20 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +112 -0
- package/dist/schema.js.map +1 -1
- package/dist/tool-args.d.ts +13 -1
- package/dist/tool-args.d.ts.map +1 -1
- package/dist/tool-args.js +50 -1
- package/dist/tool-args.js.map +1 -1
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +3 -0
- package/dist/transport.js.map +1 -1
- package/dist/usage.d.ts +6 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +20 -0
- package/dist/usage.js.map +1 -1
- package/package.json +3 -1
- package/src/capability.ts +157 -0
- package/src/errors.ts +181 -13
- package/src/presets.ts +177 -28
- package/src/providers/anthropic.ts +2 -2
- package/src/providers/factory.ts +1 -0
- package/src/providers/gemini.ts +30 -10
- package/src/providers/openai.ts +64 -4
- package/src/rate-limit.ts +98 -36
- package/src/retry.ts +8 -2
- package/src/schema.ts +127 -0
- package/src/tool-args.ts +48 -1
- package/src/transport.ts +4 -0
- package/src/usage.ts +21 -0
package/dist/presets.d.ts
CHANGED
|
@@ -35,9 +35,11 @@ export type PresetAuth = "key" | "bearer" | "oauth";
|
|
|
35
35
|
export interface ProviderPreset {
|
|
36
36
|
/** Adapter wire format. */
|
|
37
37
|
shape: PresetShape;
|
|
38
|
-
/** API root —
|
|
39
|
-
*
|
|
38
|
+
/** API root — if it ends with /v1, /v4 or another version segment, the
|
|
39
|
+
* adapter automatically routes to /chat/completions instead of /v1/chat/completions. */
|
|
40
40
|
baseUrl: string;
|
|
41
|
+
/** Explicit path override when a gateway has custom routing. */
|
|
42
|
+
path?: string;
|
|
41
43
|
auth: PresetAuth;
|
|
42
44
|
/** Fallback when the caller passes no model. */
|
|
43
45
|
defaultModel?: string;
|
|
@@ -61,22 +63,22 @@ export declare const PROVIDER_PRESETS: {
|
|
|
61
63
|
readonly shape: "anthropic";
|
|
62
64
|
readonly baseUrl: "https://api.anthropic.com";
|
|
63
65
|
readonly auth: "key";
|
|
64
|
-
readonly defaultModel: "claude-sonnet-
|
|
65
|
-
readonly models: ["claude-sonnet-
|
|
66
|
+
readonly defaultModel: "claude-sonnet-5";
|
|
67
|
+
readonly models: ["claude-sonnet-5", "claude-opus-5", "claude-fable-5-1", "claude-haiku-4-5"];
|
|
66
68
|
};
|
|
67
69
|
readonly openai: {
|
|
68
70
|
readonly shape: "openai";
|
|
69
71
|
readonly baseUrl: "https://api.openai.com";
|
|
70
72
|
readonly auth: "key";
|
|
71
73
|
readonly defaultModel: "gpt-5.6-sol";
|
|
72
|
-
readonly models: ["gpt-5.6-sol", "gpt-5-pro", "gpt-5-
|
|
74
|
+
readonly models: ["gpt-5.6-sol", "gpt-5.5-pro", "gpt-5.4-mini"];
|
|
73
75
|
};
|
|
74
76
|
readonly google: {
|
|
75
77
|
readonly shape: "gemini";
|
|
76
78
|
readonly baseUrl: "https://generativelanguage.googleapis.com";
|
|
77
79
|
readonly auth: "key";
|
|
78
|
-
readonly defaultModel: "gemini-3.1-pro";
|
|
79
|
-
readonly models: ["gemini-3.1-pro", "gemini-
|
|
80
|
+
readonly defaultModel: "gemini-3.1-pro-preview";
|
|
81
|
+
readonly models: ["gemini-3.1-pro-preview", "gemini-3.8-flash", "gemini-flash-latest"];
|
|
80
82
|
};
|
|
81
83
|
/** Gemini behind its OpenAI-compatible route — the drop-in for codebases
|
|
82
84
|
* that only speak the openai shape. */
|
|
@@ -84,15 +86,15 @@ export declare const PROVIDER_PRESETS: {
|
|
|
84
86
|
readonly shape: "openai";
|
|
85
87
|
readonly baseUrl: "https://generativelanguage.googleapis.com/v1beta/openai";
|
|
86
88
|
readonly auth: "key";
|
|
87
|
-
readonly defaultModel: "gemini-3.1-pro";
|
|
88
|
-
readonly models: ["gemini-3.1-pro", "gemini-
|
|
89
|
+
readonly defaultModel: "gemini-3.1-pro-preview";
|
|
90
|
+
readonly models: ["gemini-3.1-pro-preview", "gemini-3.8-flash", "gemini-flash-latest"];
|
|
89
91
|
};
|
|
90
92
|
readonly deepseek: {
|
|
91
93
|
readonly shape: "openai";
|
|
92
94
|
readonly baseUrl: "https://api.deepseek.com";
|
|
93
95
|
readonly auth: "key";
|
|
94
|
-
readonly defaultModel: "deepseek-
|
|
95
|
-
readonly models: ["deepseek-
|
|
96
|
+
readonly defaultModel: "deepseek-flash";
|
|
97
|
+
readonly models: ["deepseek-flash", "deepseek-v4-pro"];
|
|
96
98
|
readonly textOnly: true;
|
|
97
99
|
};
|
|
98
100
|
readonly openrouter: {
|
|
@@ -100,7 +102,7 @@ export declare const PROVIDER_PRESETS: {
|
|
|
100
102
|
readonly baseUrl: "https://openrouter.ai/api";
|
|
101
103
|
readonly auth: "key";
|
|
102
104
|
readonly defaultModel: "deepseek/deepseek-v4.1-flash";
|
|
103
|
-
readonly models: ["deepseek/deepseek-v4.1-flash", "z-ai/glm-5.3-flash", "
|
|
105
|
+
readonly models: ["deepseek/deepseek-v4.1-flash", "z-ai/glm-5.3-flash", "x-ai/grok-4.6", "openai/gpt-5.6-luna-pro"];
|
|
104
106
|
};
|
|
105
107
|
readonly groq: {
|
|
106
108
|
readonly shape: "openai";
|
|
@@ -114,25 +116,28 @@ export declare const PROVIDER_PRESETS: {
|
|
|
114
116
|
readonly baseUrl: "https://api.mistral.ai/v1";
|
|
115
117
|
readonly auth: "key";
|
|
116
118
|
readonly defaultModel: "devstral-2512";
|
|
117
|
-
readonly models: ["devstral-2512", "
|
|
119
|
+
readonly models: ["devstral-2512", "mistral-large-latest", "magistral-small"];
|
|
118
120
|
};
|
|
119
121
|
readonly xai: {
|
|
120
122
|
readonly shape: "openai";
|
|
121
123
|
readonly baseUrl: "https://api.x.ai/v1";
|
|
122
124
|
readonly auth: "key";
|
|
123
|
-
readonly defaultModel: "grok-4.
|
|
124
|
-
readonly models: ["grok-4.
|
|
125
|
+
readonly defaultModel: "grok-4.6";
|
|
126
|
+
readonly models: ["grok-4.6", "grok-4.5", "grok-4.3"];
|
|
125
127
|
};
|
|
126
128
|
readonly together: {
|
|
127
129
|
readonly shape: "openai";
|
|
128
130
|
readonly baseUrl: "https://api.together.xyz/v1";
|
|
129
131
|
readonly auth: "key";
|
|
130
|
-
readonly defaultModel: "
|
|
132
|
+
readonly defaultModel: "MiniMaxAI/MiniMax-M3";
|
|
133
|
+
readonly models: ["MiniMaxAI/MiniMax-M3", "Qwen/Qwen3-Coder-Next-FP8"];
|
|
131
134
|
};
|
|
132
135
|
readonly fireworks: {
|
|
133
136
|
readonly shape: "openai";
|
|
134
137
|
readonly baseUrl: "https://api.fireworks.ai/inference/v1";
|
|
135
138
|
readonly auth: "key";
|
|
139
|
+
readonly defaultModel: "accounts/fireworks/models/deepseek-v4p1-flash";
|
|
140
|
+
readonly models: ["accounts/fireworks/models/deepseek-v4p1-flash", "accounts/fireworks/models/glm-5p3-flash"];
|
|
136
141
|
};
|
|
137
142
|
readonly cerebras: {
|
|
138
143
|
readonly shape: "openai";
|
|
@@ -151,39 +156,155 @@ export declare const PROVIDER_PRESETS: {
|
|
|
151
156
|
readonly zhipu: {
|
|
152
157
|
readonly shape: "openai";
|
|
153
158
|
readonly baseUrl: "https://api.z.ai/api/paas/v4";
|
|
159
|
+
readonly path: "/chat/completions";
|
|
154
160
|
readonly auth: "key";
|
|
155
161
|
readonly defaultModel: "glm-5.3-flash";
|
|
156
|
-
readonly models: ["glm-5.3-flash", "glm-5.
|
|
162
|
+
readonly models: ["glm-5.3-flash", "glm-5.3", "glm-5.2"];
|
|
157
163
|
};
|
|
158
164
|
readonly minimax: {
|
|
159
165
|
readonly shape: "anthropic";
|
|
160
166
|
readonly baseUrl: "https://api.minimax.io/anthropic";
|
|
161
167
|
readonly auth: "key";
|
|
162
|
-
readonly defaultModel: "MiniMax-
|
|
163
|
-
readonly models: ["MiniMax-M3", "MiniMax-M2.
|
|
168
|
+
readonly defaultModel: "MiniMax-M3";
|
|
169
|
+
readonly models: ["MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.5"];
|
|
170
|
+
};
|
|
171
|
+
readonly "minimax-openai": {
|
|
172
|
+
readonly shape: "openai";
|
|
173
|
+
readonly baseUrl: "https://api.minimax.io/v1";
|
|
174
|
+
readonly auth: "key";
|
|
175
|
+
readonly defaultModel: "MiniMax-M3";
|
|
176
|
+
readonly models: ["MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.5"];
|
|
177
|
+
};
|
|
178
|
+
readonly nvidia: {
|
|
179
|
+
readonly shape: "openai";
|
|
180
|
+
readonly baseUrl: "https://integrate.api.nvidia.com/v1";
|
|
181
|
+
readonly auth: "key";
|
|
182
|
+
readonly defaultModel: "deepseek-ai/deepseek-v4-flash";
|
|
183
|
+
readonly models: ["deepseek-ai/deepseek-v4-flash", "deepseek-ai/deepseek-v4-pro"];
|
|
184
|
+
};
|
|
185
|
+
readonly perplexity: {
|
|
186
|
+
readonly shape: "openai";
|
|
187
|
+
readonly baseUrl: "https://api.perplexity.ai";
|
|
188
|
+
readonly auth: "key";
|
|
189
|
+
readonly defaultModel: "sonar";
|
|
190
|
+
readonly models: ["sonar", "sonar-pro", "sonar-reasoning-pro", "sonar-deep-research"];
|
|
191
|
+
};
|
|
192
|
+
readonly deepinfra: {
|
|
193
|
+
readonly shape: "openai";
|
|
194
|
+
readonly baseUrl: "https://api.deepinfra.com/v1/openai";
|
|
195
|
+
readonly path: "/chat/completions";
|
|
196
|
+
readonly auth: "key";
|
|
197
|
+
readonly defaultModel: "MiniMaxAI/MiniMax-M3";
|
|
198
|
+
readonly models: ["MiniMaxAI/MiniMax-M3", "ByteDance/Seed-2.0-pro"];
|
|
199
|
+
};
|
|
200
|
+
readonly nebius: {
|
|
201
|
+
readonly shape: "openai";
|
|
202
|
+
readonly baseUrl: "https://api.tokenfactory.nebius.com/v1";
|
|
203
|
+
readonly auth: "key";
|
|
204
|
+
readonly defaultModel: "Qwen/Qwen3.5-397B-A17B";
|
|
205
|
+
readonly models: ["Qwen/Qwen3.5-397B-A17B", "deepseek-ai/DeepSeek-V4-Flash-0731"];
|
|
206
|
+
};
|
|
207
|
+
readonly novita: {
|
|
208
|
+
readonly shape: "openai";
|
|
209
|
+
readonly baseUrl: "https://api.novita.ai/openai";
|
|
210
|
+
readonly path: "/v1/chat/completions";
|
|
211
|
+
readonly auth: "key";
|
|
212
|
+
readonly defaultModel: "baichuan/baichuan-m2-32b";
|
|
213
|
+
readonly models: ["baichuan/baichuan-m2-32b", "baidu/ernie-4.5-300b-a47b-paddle"];
|
|
214
|
+
};
|
|
215
|
+
readonly chutes: {
|
|
216
|
+
readonly shape: "openai";
|
|
217
|
+
readonly baseUrl: "https://llm.chutes.ai/v1";
|
|
218
|
+
readonly auth: "key";
|
|
219
|
+
readonly defaultModel: "Qwen/Qwen3.8-27B-TEE";
|
|
220
|
+
readonly models: ["Qwen/Qwen3.8-27B-TEE", "Qwen/Qwen3.5-397B-A17B-TEE"];
|
|
221
|
+
};
|
|
222
|
+
readonly siliconflow: {
|
|
223
|
+
readonly shape: "openai";
|
|
224
|
+
readonly baseUrl: "https://api.siliconflow.com/v1";
|
|
225
|
+
readonly auth: "key";
|
|
226
|
+
readonly defaultModel: "Qwen/Qwen3-235B-A22B-Thinking-2507";
|
|
227
|
+
readonly models: ["Qwen/Qwen3-235B-A22B-Thinking-2507", "MiniMaxAI/MiniMax-M2.5"];
|
|
228
|
+
};
|
|
229
|
+
readonly volcengine: {
|
|
230
|
+
readonly shape: "openai";
|
|
231
|
+
readonly baseUrl: "https://ark.cn-beijing.volces.com/api/v3";
|
|
232
|
+
readonly auth: "key";
|
|
233
|
+
readonly defaultModel: "doubao-seed-1-8-251228";
|
|
234
|
+
readonly models: ["doubao-seed-1-8-251228", "deepseek-v4-flash-ga-260731"];
|
|
235
|
+
};
|
|
236
|
+
readonly stepfun: {
|
|
237
|
+
readonly shape: "openai";
|
|
238
|
+
readonly baseUrl: "https://api.stepfun.com/v1";
|
|
239
|
+
readonly auth: "key";
|
|
240
|
+
readonly defaultModel: "step-3.7-flash";
|
|
241
|
+
readonly models: ["step-3.7-flash", "step-3.5-flash"];
|
|
242
|
+
};
|
|
243
|
+
readonly digitalocean: {
|
|
244
|
+
readonly shape: "openai";
|
|
245
|
+
readonly baseUrl: "https://inference.do-ai.run/v1";
|
|
246
|
+
readonly auth: "key";
|
|
247
|
+
readonly defaultModel: "anthropic-claude-3.7-sonnet";
|
|
248
|
+
readonly models: ["anthropic-claude-3.7-sonnet", "alibaba-qwen3-32b"];
|
|
249
|
+
};
|
|
250
|
+
readonly crusoe: {
|
|
251
|
+
readonly shape: "openai";
|
|
252
|
+
readonly baseUrl: "https://api.inference.crusoecloud.com/v1";
|
|
253
|
+
readonly auth: "key";
|
|
254
|
+
readonly defaultModel: "Qwen/Qwen3-235B-A22B-Instruct-2507";
|
|
255
|
+
readonly models: ["Qwen/Qwen3-235B-A22B-Instruct-2507", "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B"];
|
|
256
|
+
};
|
|
257
|
+
readonly baseten: {
|
|
258
|
+
readonly shape: "openai";
|
|
259
|
+
readonly baseUrl: "https://inference.baseten.co/v1";
|
|
260
|
+
readonly auth: "key";
|
|
261
|
+
readonly defaultModel: "deepseek-ai/DeepSeek-V4.1-Flash";
|
|
262
|
+
readonly models: ["deepseek-ai/DeepSeek-V4.1-Flash", "MiniMaxAI/MiniMax-M2.5"];
|
|
263
|
+
};
|
|
264
|
+
readonly huggingface: {
|
|
265
|
+
readonly shape: "openai";
|
|
266
|
+
readonly baseUrl: "https://router.huggingface.co/v1";
|
|
267
|
+
readonly auth: "key";
|
|
268
|
+
readonly defaultModel: "MiniMaxAI/MiniMax-M3";
|
|
269
|
+
readonly models: ["MiniMaxAI/MiniMax-M3", "Qwen/Qwen2.5-Coder-32B-Instruct"];
|
|
164
270
|
};
|
|
165
271
|
readonly zai: {
|
|
166
272
|
readonly shape: "anthropic";
|
|
167
273
|
readonly baseUrl: "https://api.z.ai/api/anthropic";
|
|
168
274
|
readonly auth: "bearer";
|
|
169
275
|
readonly defaultModel: "glm-5.3-flash";
|
|
170
|
-
readonly models: ["glm-5.3-flash", "glm-5.3-highspeed", "glm-5.
|
|
276
|
+
readonly models: ["glm-5.3-flash", "glm-5.3-highspeed", "glm-5.3", "glm-5.2"];
|
|
171
277
|
readonly explicitNone: true;
|
|
172
278
|
};
|
|
279
|
+
readonly "zai-openai": {
|
|
280
|
+
readonly shape: "openai";
|
|
281
|
+
readonly baseUrl: "https://api.z.ai/api/paas/v4";
|
|
282
|
+
readonly path: "/chat/completions";
|
|
283
|
+
readonly auth: "key";
|
|
284
|
+
readonly defaultModel: "glm-5.3-flash";
|
|
285
|
+
readonly models: ["glm-5.3-flash", "glm-5.3", "glm-5.2"];
|
|
286
|
+
};
|
|
173
287
|
readonly kimi: {
|
|
174
288
|
readonly shape: "anthropic";
|
|
175
289
|
readonly baseUrl: "https://api.kimi.ai/coding";
|
|
176
290
|
readonly auth: "bearer";
|
|
177
291
|
readonly defaultModel: "kimi-for-coding";
|
|
178
|
-
readonly models: ["kimi-for-coding", "kimi-for-coding-highspeed", "k3"];
|
|
292
|
+
readonly models: ["kimi-for-coding", "kimi-for-coding-highspeed", "k3", "k3-256k"];
|
|
293
|
+
};
|
|
294
|
+
readonly "kimi-openai": {
|
|
295
|
+
readonly shape: "openai";
|
|
296
|
+
readonly baseUrl: "https://api.moonshot.ai/v1";
|
|
297
|
+
readonly auth: "key";
|
|
298
|
+
readonly defaultModel: "kimi-k2.7-code";
|
|
299
|
+
readonly models: ["kimi-k2.7-code", "kimi-k2.7-code-highspeed", "kimi-k3"];
|
|
179
300
|
};
|
|
180
301
|
/** Alibaba's dashscope coding plan — OpenAI-compatible per its registry. */
|
|
181
302
|
readonly "alibaba-coding-plan": {
|
|
182
303
|
readonly shape: "openai";
|
|
183
304
|
readonly baseUrl: "https://coding-intl.dashscope.aliyuncs.com/v1";
|
|
184
305
|
readonly auth: "bearer";
|
|
185
|
-
readonly defaultModel: "qwen3.
|
|
186
|
-
readonly models: ["qwen3.
|
|
306
|
+
readonly defaultModel: "qwen3.5-plus";
|
|
307
|
+
readonly models: ["qwen3.5-plus", "qwen3-coder-next", "glm-5"];
|
|
187
308
|
};
|
|
188
309
|
/** QwenCloud's token plan — Anthropic wire (measured by tabrunner). */
|
|
189
310
|
readonly qwen: {
|
|
@@ -191,7 +312,31 @@ export declare const PROVIDER_PRESETS: {
|
|
|
191
312
|
readonly baseUrl: "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic";
|
|
192
313
|
readonly auth: "bearer";
|
|
193
314
|
readonly defaultModel: "qwen3.8-max";
|
|
194
|
-
readonly models: ["qwen3.8-max", "qwen3.6-flash"];
|
|
315
|
+
readonly models: ["qwen3.8-max", "qwen3.8-flash", "qwen3.6-flash"];
|
|
316
|
+
};
|
|
317
|
+
/** QwenCloud's token plan — OpenAI-compatible endpoint. */
|
|
318
|
+
readonly "qwen-token-plan-openai": {
|
|
319
|
+
readonly shape: "openai";
|
|
320
|
+
readonly baseUrl: "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1";
|
|
321
|
+
readonly auth: "bearer";
|
|
322
|
+
readonly defaultModel: "qwen3.8-max";
|
|
323
|
+
readonly models: ["qwen3.8-max", "qwen3.8-flash", "qwen3.6-flash"];
|
|
324
|
+
};
|
|
325
|
+
/** Alibaba DashScope Platform API — standard pay-as-you-go API key. */
|
|
326
|
+
readonly alibaba: {
|
|
327
|
+
readonly shape: "openai";
|
|
328
|
+
readonly baseUrl: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1";
|
|
329
|
+
readonly auth: "bearer";
|
|
330
|
+
readonly defaultModel: "qwen-max";
|
|
331
|
+
readonly models: ["qwen-max", "qwen-plus", "qwen-turbo", "qwen-flash"];
|
|
332
|
+
};
|
|
333
|
+
/** Alias for alibaba (DashScope platform API). */
|
|
334
|
+
readonly "qwen-api": {
|
|
335
|
+
readonly shape: "openai";
|
|
336
|
+
readonly baseUrl: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1";
|
|
337
|
+
readonly auth: "bearer";
|
|
338
|
+
readonly defaultModel: "qwen-max";
|
|
339
|
+
readonly models: ["qwen-max", "qwen-plus", "qwen-turbo", "qwen-flash"];
|
|
195
340
|
};
|
|
196
341
|
readonly ollama: {
|
|
197
342
|
readonly shape: "openai";
|
|
@@ -212,8 +357,8 @@ export declare const PROVIDER_PRESETS: {
|
|
|
212
357
|
readonly shape: "anthropic";
|
|
213
358
|
readonly baseUrl: "https://api.anthropic.com";
|
|
214
359
|
readonly auth: "oauth";
|
|
215
|
-
readonly defaultModel: "claude-sonnet-
|
|
216
|
-
readonly models: ["claude-sonnet-
|
|
360
|
+
readonly defaultModel: "claude-sonnet-5";
|
|
361
|
+
readonly models: ["claude-sonnet-5", "claude-opus-5", "claude-fable-5"];
|
|
217
362
|
readonly headers: {
|
|
218
363
|
readonly "anthropic-beta": "claude-code-20250219,oauth-2025-04-20";
|
|
219
364
|
};
|
|
@@ -225,7 +370,7 @@ export declare const PROVIDER_PRESETS: {
|
|
|
225
370
|
readonly baseUrl: "https://chatgpt.com/backend-api/codex";
|
|
226
371
|
readonly auth: "oauth";
|
|
227
372
|
readonly defaultModel: "gpt-5.3-codex";
|
|
228
|
-
readonly models: ["gpt-5.3-codex", "gpt-5.5", "gpt-5.4-mini"];
|
|
373
|
+
readonly models: ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.5", "gpt-5.4-mini"];
|
|
229
374
|
};
|
|
230
375
|
/** Kimi's coding endpoint reached with a subscription token instead of a
|
|
231
376
|
* key — Kimi bills the two separately. */
|
|
@@ -240,7 +385,7 @@ export declare const PROVIDER_PRESETS: {
|
|
|
240
385
|
readonly baseUrl: "https://api.githubcopilot.com";
|
|
241
386
|
readonly auth: "oauth";
|
|
242
387
|
readonly defaultModel: "gpt-5.6-sol";
|
|
243
|
-
readonly models: ["gpt-5.6-sol", "claude-opus-5", "claude-
|
|
388
|
+
readonly models: ["gpt-5.6-sol", "claude-opus-5", "claude-sonnet-5", "gpt-6-astra"];
|
|
244
389
|
};
|
|
245
390
|
};
|
|
246
391
|
export type ProviderPresetId = keyof typeof PROVIDER_PRESETS;
|
package/dist/presets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB;
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,2BAA2B;IAC3B,KAAK,EAAE,WAAW,CAAC;IACnB;6FACyF;IACzF,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC;IAChC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;2EACuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;4DAKwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;IAyB3B;4CACwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkOxC,4EAA4E;;;;;;;;IAQ5E,uEAAuE;;;;;;;;IAQvE,2DAA2D;;;;;;;;IAQ3D,uEAAuE;;;;;;;;IAQvE,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqClD;iDAC6C;;;;;;;;IAQ7C;+CAC2C;;;;;;;;;;;;;;CAcM,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAE7D,0EAA0E;AAC1E,eAAO,MAAM,UAAU,EAAoC,gBAAgB,EAAE,CAAC"}
|
package/dist/presets.js
CHANGED
|
@@ -4,15 +4,15 @@ export const PROVIDER_PRESETS = {
|
|
|
4
4
|
shape: "anthropic",
|
|
5
5
|
baseUrl: "https://api.anthropic.com",
|
|
6
6
|
auth: "key",
|
|
7
|
-
defaultModel: "claude-sonnet-
|
|
8
|
-
models: ["claude-sonnet-
|
|
7
|
+
defaultModel: "claude-sonnet-5",
|
|
8
|
+
models: ["claude-sonnet-5", "claude-opus-5", "claude-fable-5-1", "claude-haiku-4-5"],
|
|
9
9
|
},
|
|
10
10
|
openai: {
|
|
11
11
|
shape: "openai",
|
|
12
12
|
baseUrl: "https://api.openai.com",
|
|
13
13
|
auth: "key",
|
|
14
14
|
defaultModel: "gpt-5.6-sol",
|
|
15
|
-
models: ["gpt-5.6-sol", "gpt-5-pro", "gpt-5-
|
|
15
|
+
models: ["gpt-5.6-sol", "gpt-5.5-pro", "gpt-5.4-mini"],
|
|
16
16
|
},
|
|
17
17
|
google: {
|
|
18
18
|
// Native Generative Language REST — the adapter authenticates with
|
|
@@ -20,8 +20,8 @@ export const PROVIDER_PRESETS = {
|
|
|
20
20
|
shape: "gemini",
|
|
21
21
|
baseUrl: "https://generativelanguage.googleapis.com",
|
|
22
22
|
auth: "key",
|
|
23
|
-
defaultModel: "gemini-3.1-pro",
|
|
24
|
-
models: ["gemini-3.1-pro", "gemini-
|
|
23
|
+
defaultModel: "gemini-3.1-pro-preview",
|
|
24
|
+
models: ["gemini-3.1-pro-preview", "gemini-3.8-flash", "gemini-flash-latest"],
|
|
25
25
|
},
|
|
26
26
|
/** Gemini behind its OpenAI-compatible route — the drop-in for codebases
|
|
27
27
|
* that only speak the openai shape. */
|
|
@@ -29,15 +29,17 @@ export const PROVIDER_PRESETS = {
|
|
|
29
29
|
shape: "openai",
|
|
30
30
|
baseUrl: "https://generativelanguage.googleapis.com/v1beta/openai",
|
|
31
31
|
auth: "key",
|
|
32
|
-
defaultModel: "gemini-3.1-pro",
|
|
33
|
-
models: ["gemini-3.1-pro", "gemini-
|
|
32
|
+
defaultModel: "gemini-3.1-pro-preview",
|
|
33
|
+
models: ["gemini-3.1-pro-preview", "gemini-3.8-flash", "gemini-flash-latest"],
|
|
34
34
|
},
|
|
35
35
|
deepseek: {
|
|
36
36
|
shape: "openai",
|
|
37
37
|
baseUrl: "https://api.deepseek.com",
|
|
38
38
|
auth: "key",
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
// Measured 2026-09-13 via /models on live key: first-party serves only
|
|
40
|
+
// deepseek-flash and deepseek-v4-pro. v4.1-flash is OpenRouter/Baseten.
|
|
41
|
+
defaultModel: "deepseek-flash",
|
|
42
|
+
models: ["deepseek-flash", "deepseek-v4-pro"],
|
|
41
43
|
// Text-only API — an image part in the body is a hard 400 (measured).
|
|
42
44
|
textOnly: true,
|
|
43
45
|
},
|
|
@@ -46,7 +48,7 @@ export const PROVIDER_PRESETS = {
|
|
|
46
48
|
baseUrl: "https://openrouter.ai/api",
|
|
47
49
|
auth: "key",
|
|
48
50
|
defaultModel: "deepseek/deepseek-v4.1-flash",
|
|
49
|
-
models: ["deepseek/deepseek-v4.1-flash", "z-ai/glm-5.3-flash", "
|
|
51
|
+
models: ["deepseek/deepseek-v4.1-flash", "z-ai/glm-5.3-flash", "x-ai/grok-4.6", "openai/gpt-5.6-luna-pro"],
|
|
50
52
|
},
|
|
51
53
|
groq: {
|
|
52
54
|
shape: "openai",
|
|
@@ -60,25 +62,28 @@ export const PROVIDER_PRESETS = {
|
|
|
60
62
|
baseUrl: "https://api.mistral.ai/v1",
|
|
61
63
|
auth: "key",
|
|
62
64
|
defaultModel: "devstral-2512",
|
|
63
|
-
models: ["devstral-2512", "
|
|
65
|
+
models: ["devstral-2512", "mistral-large-latest", "magistral-small"],
|
|
64
66
|
},
|
|
65
67
|
xai: {
|
|
66
68
|
shape: "openai",
|
|
67
69
|
baseUrl: "https://api.x.ai/v1",
|
|
68
70
|
auth: "key",
|
|
69
|
-
defaultModel: "grok-4.
|
|
70
|
-
models: ["grok-4.
|
|
71
|
+
defaultModel: "grok-4.6",
|
|
72
|
+
models: ["grok-4.6", "grok-4.5", "grok-4.3"],
|
|
71
73
|
},
|
|
72
74
|
together: {
|
|
73
75
|
shape: "openai",
|
|
74
76
|
baseUrl: "https://api.together.xyz/v1",
|
|
75
77
|
auth: "key",
|
|
76
|
-
defaultModel: "
|
|
78
|
+
defaultModel: "MiniMaxAI/MiniMax-M3",
|
|
79
|
+
models: ["MiniMaxAI/MiniMax-M3", "Qwen/Qwen3-Coder-Next-FP8"],
|
|
77
80
|
},
|
|
78
81
|
fireworks: {
|
|
79
82
|
shape: "openai",
|
|
80
83
|
baseUrl: "https://api.fireworks.ai/inference/v1",
|
|
81
84
|
auth: "key",
|
|
85
|
+
defaultModel: "accounts/fireworks/models/deepseek-v4p1-flash",
|
|
86
|
+
models: ["accounts/fireworks/models/deepseek-v4p1-flash", "accounts/fireworks/models/glm-5p3-flash"],
|
|
82
87
|
},
|
|
83
88
|
cerebras: {
|
|
84
89
|
shape: "openai",
|
|
@@ -97,16 +102,118 @@ export const PROVIDER_PRESETS = {
|
|
|
97
102
|
zhipu: {
|
|
98
103
|
shape: "openai",
|
|
99
104
|
baseUrl: "https://api.z.ai/api/paas/v4",
|
|
105
|
+
path: "/chat/completions",
|
|
100
106
|
auth: "key",
|
|
101
107
|
defaultModel: "glm-5.3-flash",
|
|
102
|
-
models: ["glm-5.3-flash", "glm-5.
|
|
108
|
+
models: ["glm-5.3-flash", "glm-5.3", "glm-5.2"],
|
|
103
109
|
},
|
|
104
110
|
minimax: {
|
|
105
111
|
shape: "anthropic",
|
|
106
112
|
baseUrl: "https://api.minimax.io/anthropic",
|
|
107
113
|
auth: "key",
|
|
108
|
-
defaultModel: "MiniMax-
|
|
109
|
-
models: ["MiniMax-M3", "MiniMax-M2.
|
|
114
|
+
defaultModel: "MiniMax-M3",
|
|
115
|
+
models: ["MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.5"],
|
|
116
|
+
},
|
|
117
|
+
"minimax-openai": {
|
|
118
|
+
shape: "openai",
|
|
119
|
+
baseUrl: "https://api.minimax.io/v1",
|
|
120
|
+
auth: "key",
|
|
121
|
+
defaultModel: "MiniMax-M3",
|
|
122
|
+
models: ["MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.5"],
|
|
123
|
+
},
|
|
124
|
+
// ── Popular gateways & cloud providers ──────────────────────────────────
|
|
125
|
+
nvidia: {
|
|
126
|
+
shape: "openai",
|
|
127
|
+
baseUrl: "https://integrate.api.nvidia.com/v1",
|
|
128
|
+
auth: "key",
|
|
129
|
+
defaultModel: "deepseek-ai/deepseek-v4-flash",
|
|
130
|
+
models: ["deepseek-ai/deepseek-v4-flash", "deepseek-ai/deepseek-v4-pro"],
|
|
131
|
+
},
|
|
132
|
+
perplexity: {
|
|
133
|
+
shape: "openai",
|
|
134
|
+
baseUrl: "https://api.perplexity.ai",
|
|
135
|
+
auth: "key",
|
|
136
|
+
defaultModel: "sonar",
|
|
137
|
+
models: ["sonar", "sonar-pro", "sonar-reasoning-pro", "sonar-deep-research"],
|
|
138
|
+
},
|
|
139
|
+
deepinfra: {
|
|
140
|
+
shape: "openai",
|
|
141
|
+
baseUrl: "https://api.deepinfra.com/v1/openai",
|
|
142
|
+
path: "/chat/completions",
|
|
143
|
+
auth: "key",
|
|
144
|
+
defaultModel: "MiniMaxAI/MiniMax-M3",
|
|
145
|
+
models: ["MiniMaxAI/MiniMax-M3", "ByteDance/Seed-2.0-pro"],
|
|
146
|
+
},
|
|
147
|
+
nebius: {
|
|
148
|
+
shape: "openai",
|
|
149
|
+
baseUrl: "https://api.tokenfactory.nebius.com/v1",
|
|
150
|
+
auth: "key",
|
|
151
|
+
defaultModel: "Qwen/Qwen3.5-397B-A17B",
|
|
152
|
+
models: ["Qwen/Qwen3.5-397B-A17B", "deepseek-ai/DeepSeek-V4-Flash-0731"],
|
|
153
|
+
},
|
|
154
|
+
novita: {
|
|
155
|
+
shape: "openai",
|
|
156
|
+
baseUrl: "https://api.novita.ai/openai",
|
|
157
|
+
path: "/v1/chat/completions",
|
|
158
|
+
auth: "key",
|
|
159
|
+
defaultModel: "baichuan/baichuan-m2-32b",
|
|
160
|
+
models: ["baichuan/baichuan-m2-32b", "baidu/ernie-4.5-300b-a47b-paddle"],
|
|
161
|
+
},
|
|
162
|
+
chutes: {
|
|
163
|
+
shape: "openai",
|
|
164
|
+
baseUrl: "https://llm.chutes.ai/v1",
|
|
165
|
+
auth: "key",
|
|
166
|
+
defaultModel: "Qwen/Qwen3.8-27B-TEE",
|
|
167
|
+
models: ["Qwen/Qwen3.8-27B-TEE", "Qwen/Qwen3.5-397B-A17B-TEE"],
|
|
168
|
+
},
|
|
169
|
+
siliconflow: {
|
|
170
|
+
shape: "openai",
|
|
171
|
+
baseUrl: "https://api.siliconflow.com/v1",
|
|
172
|
+
auth: "key",
|
|
173
|
+
defaultModel: "Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
174
|
+
models: ["Qwen/Qwen3-235B-A22B-Thinking-2507", "MiniMaxAI/MiniMax-M2.5"],
|
|
175
|
+
},
|
|
176
|
+
volcengine: {
|
|
177
|
+
shape: "openai",
|
|
178
|
+
baseUrl: "https://ark.cn-beijing.volces.com/api/v3",
|
|
179
|
+
auth: "key",
|
|
180
|
+
defaultModel: "doubao-seed-1-8-251228",
|
|
181
|
+
models: ["doubao-seed-1-8-251228", "deepseek-v4-flash-ga-260731"],
|
|
182
|
+
},
|
|
183
|
+
stepfun: {
|
|
184
|
+
shape: "openai",
|
|
185
|
+
baseUrl: "https://api.stepfun.com/v1",
|
|
186
|
+
auth: "key",
|
|
187
|
+
defaultModel: "step-3.7-flash",
|
|
188
|
+
models: ["step-3.7-flash", "step-3.5-flash"],
|
|
189
|
+
},
|
|
190
|
+
digitalocean: {
|
|
191
|
+
shape: "openai",
|
|
192
|
+
baseUrl: "https://inference.do-ai.run/v1",
|
|
193
|
+
auth: "key",
|
|
194
|
+
defaultModel: "anthropic-claude-3.7-sonnet",
|
|
195
|
+
models: ["anthropic-claude-3.7-sonnet", "alibaba-qwen3-32b"],
|
|
196
|
+
},
|
|
197
|
+
crusoe: {
|
|
198
|
+
shape: "openai",
|
|
199
|
+
baseUrl: "https://api.inference.crusoecloud.com/v1",
|
|
200
|
+
auth: "key",
|
|
201
|
+
defaultModel: "Qwen/Qwen3-235B-A22B-Instruct-2507",
|
|
202
|
+
models: ["Qwen/Qwen3-235B-A22B-Instruct-2507", "nvidia/NVIDIA-Nemotron-3-Super-120B-A12B"],
|
|
203
|
+
},
|
|
204
|
+
baseten: {
|
|
205
|
+
shape: "openai",
|
|
206
|
+
baseUrl: "https://inference.baseten.co/v1",
|
|
207
|
+
auth: "key",
|
|
208
|
+
defaultModel: "deepseek-ai/DeepSeek-V4.1-Flash",
|
|
209
|
+
models: ["deepseek-ai/DeepSeek-V4.1-Flash", "MiniMaxAI/MiniMax-M2.5"],
|
|
210
|
+
},
|
|
211
|
+
huggingface: {
|
|
212
|
+
shape: "openai",
|
|
213
|
+
baseUrl: "https://router.huggingface.co/v1",
|
|
214
|
+
auth: "key",
|
|
215
|
+
defaultModel: "MiniMaxAI/MiniMax-M3",
|
|
216
|
+
models: ["MiniMaxAI/MiniMax-M3", "Qwen/Qwen2.5-Coder-32B-Instruct"],
|
|
110
217
|
},
|
|
111
218
|
// ── Coding plans — Anthropic wire + Bearer (measured family trait) ─────
|
|
112
219
|
zai: {
|
|
@@ -114,25 +221,40 @@ export const PROVIDER_PRESETS = {
|
|
|
114
221
|
baseUrl: "https://api.z.ai/api/anthropic",
|
|
115
222
|
auth: "bearer",
|
|
116
223
|
defaultModel: "glm-5.3-flash",
|
|
117
|
-
models: ["glm-5.3-flash", "glm-5.3-highspeed", "glm-5.
|
|
224
|
+
models: ["glm-5.3-flash", "glm-5.3-highspeed", "glm-5.3", "glm-5.2"],
|
|
118
225
|
// Model ids are BARE here — the gateway-prefixed spelling
|
|
119
226
|
// (`z-ai/glm-5.3-flash`) answers 400 [1211] Unknown Model.
|
|
120
227
|
explicitNone: true,
|
|
121
228
|
},
|
|
229
|
+
"zai-openai": {
|
|
230
|
+
shape: "openai",
|
|
231
|
+
baseUrl: "https://api.z.ai/api/paas/v4",
|
|
232
|
+
path: "/chat/completions",
|
|
233
|
+
auth: "key",
|
|
234
|
+
defaultModel: "glm-5.3-flash",
|
|
235
|
+
models: ["glm-5.3-flash", "glm-5.3", "glm-5.2"],
|
|
236
|
+
},
|
|
122
237
|
kimi: {
|
|
123
238
|
shape: "anthropic",
|
|
124
239
|
baseUrl: "https://api.kimi.ai/coding",
|
|
125
240
|
auth: "bearer",
|
|
126
241
|
defaultModel: "kimi-for-coding",
|
|
127
|
-
models: ["kimi-for-coding", "kimi-for-coding-highspeed", "k3"],
|
|
242
|
+
models: ["kimi-for-coding", "kimi-for-coding-highspeed", "k3", "k3-256k"],
|
|
243
|
+
},
|
|
244
|
+
"kimi-openai": {
|
|
245
|
+
shape: "openai",
|
|
246
|
+
baseUrl: "https://api.moonshot.ai/v1",
|
|
247
|
+
auth: "key",
|
|
248
|
+
defaultModel: "kimi-k2.7-code",
|
|
249
|
+
models: ["kimi-k2.7-code", "kimi-k2.7-code-highspeed", "kimi-k3"],
|
|
128
250
|
},
|
|
129
251
|
/** Alibaba's dashscope coding plan — OpenAI-compatible per its registry. */
|
|
130
252
|
"alibaba-coding-plan": {
|
|
131
253
|
shape: "openai",
|
|
132
254
|
baseUrl: "https://coding-intl.dashscope.aliyuncs.com/v1",
|
|
133
255
|
auth: "bearer",
|
|
134
|
-
defaultModel: "qwen3.
|
|
135
|
-
models: ["qwen3.
|
|
256
|
+
defaultModel: "qwen3.5-plus",
|
|
257
|
+
models: ["qwen3.5-plus", "qwen3-coder-next", "glm-5"],
|
|
136
258
|
},
|
|
137
259
|
/** QwenCloud's token plan — Anthropic wire (measured by tabrunner). */
|
|
138
260
|
qwen: {
|
|
@@ -140,7 +262,31 @@ export const PROVIDER_PRESETS = {
|
|
|
140
262
|
baseUrl: "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic",
|
|
141
263
|
auth: "bearer",
|
|
142
264
|
defaultModel: "qwen3.8-max",
|
|
143
|
-
models: ["qwen3.8-max", "qwen3.6-flash"],
|
|
265
|
+
models: ["qwen3.8-max", "qwen3.8-flash", "qwen3.6-flash"],
|
|
266
|
+
},
|
|
267
|
+
/** QwenCloud's token plan — OpenAI-compatible endpoint. */
|
|
268
|
+
"qwen-token-plan-openai": {
|
|
269
|
+
shape: "openai",
|
|
270
|
+
baseUrl: "https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1",
|
|
271
|
+
auth: "bearer",
|
|
272
|
+
defaultModel: "qwen3.8-max",
|
|
273
|
+
models: ["qwen3.8-max", "qwen3.8-flash", "qwen3.6-flash"],
|
|
274
|
+
},
|
|
275
|
+
/** Alibaba DashScope Platform API — standard pay-as-you-go API key. */
|
|
276
|
+
alibaba: {
|
|
277
|
+
shape: "openai",
|
|
278
|
+
baseUrl: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
|
|
279
|
+
auth: "bearer",
|
|
280
|
+
defaultModel: "qwen-max",
|
|
281
|
+
models: ["qwen-max", "qwen-plus", "qwen-turbo", "qwen-flash"],
|
|
282
|
+
},
|
|
283
|
+
/** Alias for alibaba (DashScope platform API). */
|
|
284
|
+
"qwen-api": {
|
|
285
|
+
shape: "openai",
|
|
286
|
+
baseUrl: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
|
|
287
|
+
auth: "bearer",
|
|
288
|
+
defaultModel: "qwen-max",
|
|
289
|
+
models: ["qwen-max", "qwen-plus", "qwen-turbo", "qwen-flash"],
|
|
144
290
|
},
|
|
145
291
|
// ── Local runtimes ──────────────────────────────────────────────────────
|
|
146
292
|
ollama: {
|
|
@@ -163,8 +309,8 @@ export const PROVIDER_PRESETS = {
|
|
|
163
309
|
shape: "anthropic",
|
|
164
310
|
baseUrl: "https://api.anthropic.com",
|
|
165
311
|
auth: "oauth",
|
|
166
|
-
defaultModel: "claude-sonnet-
|
|
167
|
-
models: ["claude-sonnet-
|
|
312
|
+
defaultModel: "claude-sonnet-5",
|
|
313
|
+
models: ["claude-sonnet-5", "claude-opus-5", "claude-fable-5"],
|
|
168
314
|
// The beta flag is what switches the API into OAuth-token mode (measured
|
|
169
315
|
// by tabrunner's Claude plan sign-in).
|
|
170
316
|
headers: { "anthropic-beta": "claude-code-20250219,oauth-2025-04-20" },
|
|
@@ -176,7 +322,7 @@ export const PROVIDER_PRESETS = {
|
|
|
176
322
|
baseUrl: "https://chatgpt.com/backend-api/codex",
|
|
177
323
|
auth: "oauth",
|
|
178
324
|
defaultModel: "gpt-5.3-codex",
|
|
179
|
-
models: ["gpt-5.3-codex", "gpt-5.5", "gpt-5.4-mini"],
|
|
325
|
+
models: ["gpt-5.3-codex", "gpt-5.3-codex-spark", "gpt-5.5", "gpt-5.4-mini"],
|
|
180
326
|
},
|
|
181
327
|
/** Kimi's coding endpoint reached with a subscription token instead of a
|
|
182
328
|
* key — Kimi bills the two separately. */
|
|
@@ -191,7 +337,7 @@ export const PROVIDER_PRESETS = {
|
|
|
191
337
|
baseUrl: "https://api.githubcopilot.com",
|
|
192
338
|
auth: "oauth",
|
|
193
339
|
defaultModel: "gpt-5.6-sol",
|
|
194
|
-
models: ["gpt-5.6-sol", "claude-opus-5", "claude-
|
|
340
|
+
models: ["gpt-5.6-sol", "claude-opus-5", "claude-sonnet-5", "gpt-6-astra"],
|
|
195
341
|
},
|
|
196
342
|
};
|
|
197
343
|
/** Every valid preset id — the factory's unknown-id error lists these. */
|