codeep 2.16.0 → 2.18.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.
@@ -18,14 +18,19 @@ export const PROVIDERS = {
18
18
  },
19
19
  },
20
20
  models: [
21
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model, available to all users' },
21
+ // GLM-5.3 is Coding-Plan only — the standalone pay-per-use API does not
22
+ // accept it yet, so it must NOT be copied into `z.ai-api`.
23
+ { id: 'glm-5.3', name: 'GLM-5.3', description: 'Latest flagship for project-scale engineering (1M context)' },
24
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Previous flagship for project-scale engineering (1M context)' },
22
25
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant, available to all users' },
23
26
  ],
24
- defaultModel: 'glm-5.2',
27
+ defaultModel: 'glm-5.3',
25
28
  defaultProtocol: 'openai',
29
+ maxOutputTokens: 131_072,
26
30
  envKey: 'ZAI_API_KEY',
27
31
  subscribeUrl: 'https://z.ai/subscribe?ic=NXYNXZOV14',
28
32
  groupLabel: 'Z.AI — Subscription (GLM Coding Plan)',
33
+ flatFee: true,
29
34
  hint: 'Uses your Z.AI subscription — no per-token charges.',
30
35
  mcpEndpoints: {
31
36
  webSearch: 'https://api.z.ai/api/mcp/web_search_prime/mcp',
@@ -44,11 +49,12 @@ export const PROVIDERS = {
44
49
  },
45
50
  },
46
51
  models: [
47
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model' },
52
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest flagship for project-scale engineering (1M context)' },
48
53
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant' },
49
54
  ],
50
55
  defaultModel: 'glm-5.2',
51
56
  defaultProtocol: 'openai',
57
+ maxOutputTokens: 131_072,
52
58
  envKey: 'ZAI_API_KEY',
53
59
  subscribeUrl: 'https://api.z.ai',
54
60
  groupLabel: 'Z.AI — API (pay-per-use)',
@@ -70,14 +76,16 @@ export const PROVIDERS = {
70
76
  },
71
77
  },
72
78
  models: [
73
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model, available to all users' },
79
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest flagship for project-scale engineering (1M context)' },
74
80
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant, available to all users' },
75
81
  ],
76
82
  defaultModel: 'glm-5.2',
77
83
  defaultProtocol: 'openai',
84
+ maxOutputTokens: 131_072,
78
85
  envKey: 'ZAI_CN_API_KEY',
79
86
  subscribeUrl: 'https://open.bigmodel.cn/glm-coding',
80
87
  groupLabel: 'Z.AI China — Subscription (GLM Coding Plan)',
88
+ flatFee: true,
81
89
  hint: 'Uses your ZhipuAI China subscription.',
82
90
  mcpEndpoints: {
83
91
  webSearch: 'https://open.bigmodel.cn/api/mcp/web_search_prime/mcp',
@@ -96,11 +104,12 @@ export const PROVIDERS = {
96
104
  },
97
105
  },
98
106
  models: [
99
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model' },
107
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest flagship for project-scale engineering (1M context)' },
100
108
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant' },
101
109
  ],
102
110
  defaultModel: 'glm-5.2',
103
111
  defaultProtocol: 'openai',
112
+ maxOutputTokens: 131_072,
104
113
  envKey: 'ZAI_CN_API_KEY',
105
114
  subscribeUrl: 'https://open.bigmodel.cn',
106
115
  groupLabel: 'Z.AI China — API (pay-per-use)',
@@ -129,6 +138,7 @@ export const PROVIDERS = {
129
138
  envKey: 'MINIMAX_API_KEY',
130
139
  subscribeUrl: 'https://platform.minimax.io/subscribe/coding-plan?code=2lWvoWUhrp&source=link',
131
140
  groupLabel: 'MiniMax — Subscription',
141
+ flatFee: true,
132
142
  hint: 'Uses your MiniMax subscription — no per-token charges.',
133
143
  },
134
144
  'minimax-api': {
@@ -174,6 +184,7 @@ export const PROVIDERS = {
174
184
  envKey: 'MINIMAX_CN_API_KEY',
175
185
  subscribeUrl: 'https://platform.minimaxi.com',
176
186
  groupLabel: 'MiniMax China — Subscription',
187
+ flatFee: true,
177
188
  hint: 'Uses your MiniMax China subscription.',
178
189
  },
179
190
  'deepseek': {
@@ -205,9 +216,9 @@ export const PROVIDERS = {
205
216
  },
206
217
  // ── Kimi (Moonshot AI) ────────────────────────────────────────────
207
218
  // Subscription (Kimi Code) mirrors the Z.AI GLM-Coding-Plan shape: a
208
- // dedicated coding base URL + a separate key, model id ALWAYS
209
- // `kimi-for-coding` (a backend alias). OpenAI-compatible is the
210
- // battle-tested path so we don't expose the Anthropic surface here.
219
+ // dedicated coding base URL + a separate key. Model availability depends
220
+ // on the user's plan, so the picker labels the restricted K3/high-speed ids
221
+ // instead of pretending every subscription includes them.
211
222
  'kimi': {
212
223
  name: 'Kimi (Moonshot) — Coding Plan',
213
224
  description: 'Kimi Code subscription',
@@ -215,7 +226,10 @@ export const PROVIDERS = {
215
226
  openai: { baseUrl: 'https://api.kimi.com/coding/v1', authHeader: 'Bearer', supportsNativeTools: true },
216
227
  },
217
228
  models: [
218
- { id: 'kimi-for-coding', name: 'Kimi Code', description: 'Subscription alias — auto-maps to the latest Kimi coding model (K2.7 Code)' },
229
+ { id: 'kimi-for-coding', name: 'Kimi Code', description: 'Available on every Kimi Code plan — maps to K2.7 Code' },
230
+ { id: 'k3', name: 'Kimi K3', description: '1M-context flagship — Moderato plan or higher' },
231
+ { id: 'k3-256k', name: 'Kimi K3 (256K)', description: 'K3 with a smaller context window — Moderato plan or higher' },
232
+ { id: 'kimi-for-coding-highspeed', name: 'Kimi Code (High-Speed)', description: 'Low-latency K2.7 Code — Allegretto plan or higher' },
219
233
  ],
220
234
  defaultModel: 'kimi-for-coding',
221
235
  defaultProtocol: 'openai',
@@ -223,6 +237,7 @@ export const PROVIDERS = {
223
237
  envKey: 'KIMI_CODE_API_KEY',
224
238
  subscribeUrl: 'https://www.kimi.com/code',
225
239
  groupLabel: 'Kimi — Subscription (Kimi Code)',
240
+ flatFee: true,
226
241
  hint: 'Uses your Kimi Code subscription — no per-token charges. Key from kimi.com/code/console.',
227
242
  },
228
243
  'kimi-api': {
@@ -232,21 +247,18 @@ export const PROVIDERS = {
232
247
  openai: { baseUrl: 'https://api.moonshot.ai/v1', authHeader: 'Bearer', supportsNativeTools: true },
233
248
  },
234
249
  models: [
235
- { id: 'kimi-k3-code', name: 'Kimi K3 Code', description: 'Newest flagship agentic coding model (1M context, deep reasoning)' },
236
- { id: 'kimi-k3-code-highspeed', name: 'Kimi K3 Code (High-Speed)', description: 'Throughput-tuned K3 Code for latency-sensitive loops' },
237
- { id: 'kimi-k3-thinking', name: 'Kimi K3 Thinking', description: 'K3 with explicit reasoning traces (highest quality, slower)' },
238
- { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Previous-gen flagship agentic coding model (256K context)' },
250
+ { id: 'kimi-k3', name: 'Kimi K3', description: 'Latest flagship for software engineering and deep reasoning (1M context)' },
251
+ { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Coding-specialized model (256K context)' },
239
252
  { id: 'kimi-k2.7-code-highspeed', name: 'Kimi K2.7 Code (High-Speed)', description: 'Throughput-tuned K2.7 Code for latency-sensitive loops' },
240
- { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'Previous-gen multimodal reasoning model' },
241
- { id: 'kimi-k2.5', name: 'Kimi K2.5', description: 'Older general-purpose model (cheaper)' },
253
+ { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'General-purpose multimodal reasoning model' },
242
254
  ],
243
- defaultModel: 'kimi-k3-code',
255
+ defaultModel: 'kimi-k3',
244
256
  defaultProtocol: 'openai',
245
- maxOutputTokens: 65_536,
257
+ maxOutputTokens: 131_072,
246
258
  envKey: 'MOONSHOT_API_KEY',
247
259
  subscribeUrl: 'https://platform.kimi.ai/console/api-keys',
248
260
  groupLabel: 'Kimi — API (pay-per-use)',
249
- hint: 'Pay-per-use via Moonshot API key (platform.kimi.ai). K3 models support 1M context and explicit reasoning.',
261
+ hint: 'Pay-per-use via Moonshot API key (platform.kimi.ai). Kimi K3 supports 1M context and graded reasoning.',
250
262
  },
251
263
  'kimi-cn': {
252
264
  name: 'Kimi China (Moonshot)',
@@ -255,21 +267,18 @@ export const PROVIDERS = {
255
267
  openai: { baseUrl: 'https://api.moonshot.cn/v1', authHeader: 'Bearer', supportsNativeTools: true },
256
268
  },
257
269
  models: [
258
- { id: 'kimi-k3-code', name: 'Kimi K3 Code', description: 'Newest flagship agentic coding model (1M context, deep reasoning)' },
259
- { id: 'kimi-k3-code-highspeed', name: 'Kimi K3 Code (High-Speed)', description: 'Throughput-tuned K3 Code' },
260
- { id: 'kimi-k3-thinking', name: 'Kimi K3 Thinking', description: 'K3 with explicit reasoning traces' },
261
- { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Previous-gen flagship agentic coding model (256K context)' },
270
+ { id: 'kimi-k3', name: 'Kimi K3', description: 'Latest flagship for software engineering and deep reasoning (1M context)' },
271
+ { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Coding-specialized model (256K context)' },
262
272
  { id: 'kimi-k2.7-code-highspeed', name: 'Kimi K2.7 Code (High-Speed)', description: 'Throughput-tuned K2.7 Code' },
263
- { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'Previous-gen multimodal reasoning model' },
264
- { id: 'kimi-k2.5', name: 'Kimi K2.5', description: 'Older general-purpose model' },
273
+ { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'General-purpose multimodal reasoning model' },
265
274
  ],
266
- defaultModel: 'kimi-k3-code',
275
+ defaultModel: 'kimi-k3',
267
276
  defaultProtocol: 'openai',
268
- maxOutputTokens: 65_536,
277
+ maxOutputTokens: 131_072,
269
278
  envKey: 'MOONSHOT_CN_API_KEY',
270
279
  subscribeUrl: 'https://platform.moonshot.cn/console/api-keys',
271
280
  groupLabel: 'Kimi China — API (pay-per-use)',
272
- hint: 'Pay-per-use via Moonshot China API key (platform.moonshot.cn). K3 models support 1M context.',
281
+ hint: 'Pay-per-use via Moonshot China API key (platform.moonshot.cn). Kimi K3 supports 1M context.',
273
282
  },
274
283
  // ── Grok (xAI) ────────────────────────────────────────────────────
275
284
  // Pay-per-use today (console.x.ai key). The SuperGrok / X Premium+
@@ -282,12 +291,15 @@ export const PROVIDERS = {
282
291
  openai: { baseUrl: 'https://api.x.ai/v1', authHeader: 'Bearer', supportsNativeTools: true },
283
292
  },
284
293
  models: [
285
- { id: 'grok-4.5', name: 'Grok 4.5', description: 'Flagship reasoning model — highest quality, 500K context' },
294
+ { id: 'grok-4.6', name: 'Grok 4.6', description: 'Flagship reasoning model — xAI recommends it for code, 500K context' },
295
+ { id: 'grok-4.5', name: 'Grok 4.5', description: 'Previous flagship reasoning model, 500K context' },
286
296
  { id: 'grok-build-0.1', name: 'Grok Build 0.1', description: 'Agentic coding model — fast, 256K context' },
287
- { id: 'grok-4.3', name: 'Grok 4.3', description: 'Previous flagship, 1M context' },
288
- { id: 'grok-code-fast-1', name: 'Grok Code Fast 1', description: 'Low-cost speed-first coder (alias of Build 0.1)' },
289
- { id: 'grok-4-fast-reasoning', name: 'Grok 4 Fast (reasoning)', description: 'Cheap reasoning model, very large context' },
297
+ { id: 'grok-4.3', name: 'Grok 4.3', description: 'Older flagship, 1M context' },
290
298
  ],
299
+ // Stays on the agentic coder, not the new flagship. grok-4.6 is the better
300
+ // model and xAI recommends it for code, but it bills 2x input and 3x output
301
+ // against grok-build-0.1 — moving every unpinned user onto it silently is
302
+ // not ours to decide. It is one `/model` away for anyone who wants it.
291
303
  defaultModel: 'grok-build-0.1',
292
304
  defaultProtocol: 'openai',
293
305
  useMaxCompletionTokens: true, // reasoning models reject max_tokens
@@ -307,17 +319,18 @@ export const PROVIDERS = {
307
319
  openai: { baseUrl: 'https://coding-intl.dashscope.aliyuncs.com/v1', authHeader: 'Bearer', supportsNativeTools: true },
308
320
  },
309
321
  models: [
310
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model — best quality' },
311
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
312
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model (code + reasoning)' },
322
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Recommended current model for coding, reasoning, and vision' },
323
+ { id: 'qwen3.6-plus', name: 'Qwen3.6-Plus', description: 'Fast multimodal model with a 1M context window' },
324
+ { id: 'qwen3.5-plus', name: 'Qwen3.5-Plus', description: 'Efficient general-purpose Coding Plan model' },
313
325
  ],
314
- defaultModel: 'qwen3-coder-plus',
326
+ defaultModel: 'qwen3.7-plus',
315
327
  defaultProtocol: 'openai',
316
328
  maxOutputTokens: 65_536,
317
329
  noStreamWithTools: true,
318
330
  envKey: 'BAILIAN_CODING_PLAN_API_KEY',
319
331
  subscribeUrl: 'https://www.alibabacloud.com/help/en/model-studio/qwen-code-coding-plan',
320
332
  groupLabel: 'Qwen — Subscription (Coding Plan)',
333
+ flatFee: true,
321
334
  hint: 'Uses your Qwen Coding Plan — no per-token charges. sk-sp-… key from Model Studio. Interactive coding use only.',
322
335
  },
323
336
  'qwen-api': {
@@ -327,12 +340,11 @@ export const PROVIDERS = {
327
340
  openai: { baseUrl: 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1', authHeader: 'Bearer', supportsNativeTools: true },
328
341
  },
329
342
  models: [
330
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model (256K, up to 1M)' },
331
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
332
- { id: 'qwen3-coder-flash', name: 'Qwen3-Coder Flash', description: 'Fast/cheap coder' },
333
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
343
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Latest flagship for complex coding and reasoning' },
344
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Balanced quality, speed, and price (1M context)' },
345
+ { id: 'qwen3.6-flash', name: 'Qwen3.6-Flash', description: 'Low-latency, low-cost multimodal model' },
334
346
  ],
335
- defaultModel: 'qwen3-coder-plus',
347
+ defaultModel: 'qwen3.7-max',
336
348
  defaultProtocol: 'openai',
337
349
  maxOutputTokens: 65_536,
338
350
  noStreamWithTools: true,
@@ -341,6 +353,29 @@ export const PROVIDERS = {
341
353
  groupLabel: 'Qwen — API (pay-per-use)',
342
354
  hint: 'Pay-per-use via Alibaba Model Studio key (DASHSCOPE_API_KEY).',
343
355
  },
356
+ 'qwen-token-plan': {
357
+ name: 'Qwen (Alibaba) — Token Plan',
358
+ description: 'Qwen Token Plan subscription (international)',
359
+ protocols: {
360
+ openai: { baseUrl: 'https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1', authHeader: 'Bearer', supportsNativeTools: true },
361
+ },
362
+ models: [
363
+ { id: 'qwen3.8-max-preview', name: 'Qwen3.8-Max Preview', description: 'Newest Token Plan flagship for complex agentic work' },
364
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Production flagship for complex coding and reasoning' },
365
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Balanced quality and throughput' },
366
+ { id: 'qwen3.6-plus', name: 'Qwen3.6-Plus', description: 'Fast multimodal model with a 1M context window' },
367
+ { id: 'qwen3.6-flash', name: 'Qwen3.6-Flash', description: 'Low-latency, credit-efficient model' },
368
+ ],
369
+ defaultModel: 'qwen3.8-max-preview',
370
+ defaultProtocol: 'openai',
371
+ maxOutputTokens: 131_072,
372
+ noStreamWithTools: true,
373
+ envKey: 'BAILIAN_TOKEN_PLAN_API_KEY',
374
+ subscribeUrl: 'https://modelstudio.console.alibabacloud.com/',
375
+ groupLabel: 'Qwen — Subscription (Token Plan)',
376
+ flatFee: true,
377
+ hint: 'Uses monthly Token Plan credits. Requires a separate sk-sp-… Token Plan key.',
378
+ },
344
379
  'qwen-cn': {
345
380
  name: 'Qwen China — Coding Plan',
346
381
  description: 'Qwen Coding Plan subscription (China)',
@@ -348,17 +383,18 @@ export const PROVIDERS = {
348
383
  openai: { baseUrl: 'https://coding.dashscope.aliyuncs.com/v1', authHeader: 'Bearer', supportsNativeTools: true },
349
384
  },
350
385
  models: [
351
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model — best quality' },
352
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
353
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
386
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Recommended current model for coding, reasoning, and vision' },
387
+ { id: 'qwen3.6-plus', name: 'Qwen3.6-Plus', description: 'Fast multimodal model with a 1M context window' },
388
+ { id: 'qwen3.5-plus', name: 'Qwen3.5-Plus', description: 'Efficient general-purpose Coding Plan model' },
354
389
  ],
355
- defaultModel: 'qwen3-coder-plus',
390
+ defaultModel: 'qwen3.7-plus',
356
391
  defaultProtocol: 'openai',
357
392
  maxOutputTokens: 65_536,
358
393
  noStreamWithTools: true,
359
394
  envKey: 'BAILIAN_CODING_PLAN_CN_API_KEY',
360
395
  subscribeUrl: 'https://bailian.console.aliyun.com/',
361
396
  groupLabel: 'Qwen China — Subscription (Coding Plan)',
397
+ flatFee: true,
362
398
  hint: 'Uses your Qwen Coding Plan (China). sk-sp-… key from Bailian.',
363
399
  },
364
400
  'qwen-cn-api': {
@@ -368,12 +404,11 @@ export const PROVIDERS = {
368
404
  openai: { baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1', authHeader: 'Bearer', supportsNativeTools: true },
369
405
  },
370
406
  models: [
371
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model' },
372
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
373
- { id: 'qwen3-coder-flash', name: 'Qwen3-Coder Flash', description: 'Fast/cheap coder' },
374
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
407
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Latest flagship for complex coding and reasoning' },
408
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Balanced quality, speed, and price (1M context)' },
409
+ { id: 'qwen3.6-flash', name: 'Qwen3.6-Flash', description: 'Low-latency, low-cost multimodal model' },
375
410
  ],
376
- defaultModel: 'qwen3-coder-plus',
411
+ defaultModel: 'qwen3.7-max',
377
412
  defaultProtocol: 'openai',
378
413
  maxOutputTokens: 65_536,
379
414
  noStreamWithTools: true,
@@ -384,21 +419,23 @@ export const PROVIDERS = {
384
419
  },
385
420
  'modelscope': {
386
421
  name: 'ModelScope (free Qwen)',
387
- description: 'Free Qwen3-Coder inference via ModelScope',
422
+ description: 'Live free-model catalog via ModelScope',
388
423
  protocols: {
389
424
  openai: { baseUrl: 'https://api-inference.modelscope.cn/v1', authHeader: 'Bearer', supportsNativeTools: true },
390
425
  },
391
426
  models: [
392
- { id: 'Qwen/Qwen3-Coder-480B-A35B-Instruct', name: 'Qwen3-Coder 480B', description: 'Open MoE coder — free tier (~2000 req/day)' },
427
+ { id: 'Qwen/Qwen3-Coder-480B-A35B-Instruct', name: 'Qwen3-Coder 480B', description: 'Fallback model shown until the live catalog loads' },
393
428
  ],
394
429
  defaultModel: 'Qwen/Qwen3-Coder-480B-A35B-Instruct',
395
430
  defaultProtocol: 'openai',
396
431
  maxOutputTokens: 65_536,
397
432
  noStreamWithTools: true,
433
+ dynamicModels: true,
398
434
  envKey: 'MODELSCOPE_API_KEY',
399
435
  subscribeUrl: 'https://modelscope.cn/my/myaccesstoken',
400
436
  groupLabel: 'ModelScope — Free (Qwen)',
401
- hint: 'Free tier (~2000 req/day) via ModelScope token (modelscope.cn). Needs a bound Aliyun account.',
437
+ flatFee: true,
438
+ hint: 'Fetches the live free catalog for your ModelScope token; availability and limits vary by account.',
402
439
  },
403
440
  'openai': {
404
441
  name: 'OpenAI',
@@ -414,9 +451,6 @@ export const PROVIDERS = {
414
451
  { id: 'gpt-5.6-sol', name: 'GPT-5.6 Sol', description: 'Most capable GPT — best for coding & agentic work' },
415
452
  { id: 'gpt-5.6-terra', name: 'GPT-5.6 Terra', description: 'Balanced — GPT-5.5 quality at about half the price' },
416
453
  { id: 'gpt-5.6-luna', name: 'GPT-5.6 Luna', description: 'Fast and cheap — high-volume workloads' },
417
- { id: 'gpt-5.5', name: 'GPT-5.5', description: 'Previous flagship GPT' },
418
- { id: 'gpt-5.4', name: 'GPT-5.4', description: 'Older generation GPT' },
419
- { id: 'gpt-5.4-mini', name: 'GPT-5.4 Mini', description: 'Faster and cheaper GPT-5.4' },
420
454
  ],
421
455
  defaultModel: 'gpt-5.6-sol',
422
456
  defaultProtocol: 'openai',
@@ -461,8 +495,10 @@ export const PROVIDERS = {
461
495
  },
462
496
  models: [
463
497
  { id: 'gemini-3.1-pro-preview', name: 'Gemini 3.1 Pro', description: 'Most capable Gemini model' },
464
- { id: 'gemini-3.5-flash', name: 'Gemini 3.5 Flash', description: 'Pro-level intelligence at Flash speed' },
465
- { id: 'gemini-3.1-flash-lite', name: 'Gemini 3.1 Flash-Lite', description: 'Low-latency, low-cost workhorse (1M context)' },
498
+ { id: 'gemini-3.7-flash', name: 'Gemini 3.7 Flash', description: 'Latest production Flash model — adjustable thinking, 64K output' },
499
+ { id: 'gemini-3.6-flash', name: 'Gemini 3.6 Flash', description: 'Previous production Flash model' },
500
+ { id: 'gemini-3.5-flash', name: 'Gemini 3.5 Flash', description: 'Stable frontier Flash model for coding and long agentic tasks' },
501
+ { id: 'gemini-3.5-flash-lite', name: 'Gemini 3.5 Flash-Lite', description: 'Latest low-latency, low-cost workhorse' },
466
502
  ],
467
503
  defaultModel: 'gemini-3.1-pro-preview',
468
504
  defaultProtocol: 'openai',
@@ -488,19 +524,17 @@ export const PROVIDERS = {
488
524
  models: [
489
525
  { id: 'openrouter/auto', name: 'Auto-route', description: 'OpenRouter picks the best model for the task' },
490
526
  { id: 'anthropic/claude-fable-5', name: 'Claude Fable 5', description: 'Anthropic — most capable' },
491
- { id: 'anthropic/claude-opus-4', name: 'Claude Opus 4', description: 'Anthropic — Opus tier' },
527
+ { id: 'anthropic/claude-opus-5', name: 'Claude Opus 5', description: 'Anthropic — flagship Opus tier' },
492
528
  { id: 'anthropic/claude-sonnet-5', name: 'Claude Sonnet 5', description: 'Anthropic — balanced' },
493
529
  { id: 'openai/gpt-5.6-sol', name: 'GPT-5.6 Sol', description: 'OpenAI — flagship' },
494
- { id: 'openai/gpt-5.4-mini', name: 'GPT-5.4 Mini', description: 'OpenAI — fast/cheap' },
495
- { id: 'google/gemini-3.1-pro', name: 'Gemini 3.1 Pro', description: 'Google — multimodal' },
496
- { id: 'meta-llama/llama-3.1-405b-instruct', name: 'Llama 3.1 405B', description: 'Meta — open weights, largest' },
497
- { id: 'meta-llama/llama-3.1-70b-instruct', name: 'Llama 3.1 70B', description: 'Meta — open weights, fast' },
498
- { id: 'deepseek/deepseek-v4', name: 'DeepSeek V4', description: 'DeepSeek via OpenRouter' },
499
- { id: 'mistralai/mistral-large', name: 'Mistral Large', description: 'Mistral — flagship' },
500
- { id: 'qwen/qwen-2.5-coder-32b-instruct', name: 'Qwen 2.5 Coder 32B', description: 'Alibaba — coding-tuned' },
501
- { id: 'x-ai/grok-4.5', name: 'Grok 4.5', description: 'xAI — flagship reasoning' },
530
+ { id: 'openai/gpt-5.6-luna', name: 'GPT-5.6 Luna', description: 'OpenAI — fast/efficient' },
531
+ { id: 'google/gemini-3.7-flash', name: 'Gemini 3.7 Flash', description: 'Google — latest production Flash' },
532
+ { id: 'deepseek/deepseek-v4-pro', name: 'DeepSeek V4 Pro', description: 'DeepSeek — flagship agentic model' },
533
+ { id: 'moonshotai/kimi-k3', name: 'Kimi K3', description: 'Moonshot — long-horizon coding' },
534
+ { id: 'qwen/qwen3.8-max', name: 'Qwen 3.8 Max', description: 'Alibaba — latest flagship' },
535
+ { id: 'x-ai/grok-4.6', name: 'Grok 4.6', description: 'xAI — flagship reasoning' },
502
536
  ],
503
- defaultModel: 'anthropic/claude-opus-4',
537
+ defaultModel: 'openrouter/auto',
504
538
  defaultProtocol: 'openai',
505
539
  envKey: 'OPENROUTER_API_KEY',
506
540
  subscribeUrl: 'https://openrouter.ai/keys',
@@ -550,6 +584,65 @@ export const PROVIDERS = {
550
584
  export function getProvider(id) {
551
585
  return PROVIDERS[id] || null;
552
586
  }
587
+ /**
588
+ * Exact migrations for curated model ids that vendors replaced.
589
+ *
590
+ * Keep this deliberately narrower than the provider catalogue. Dynamic
591
+ * OpenRouter/Ollama/custom ids are user-controlled and must never be rewritten.
592
+ */
593
+ const RETIRED_MODEL_REPLACEMENTS = {
594
+ 'z.ai': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
595
+ 'z.ai-api': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
596
+ 'z.ai-cn': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
597
+ 'z.ai-cn-api': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
598
+ google: {
599
+ 'gemini-3.1-flash-lite': 'gemini-3.5-flash-lite',
600
+ },
601
+ grok: {
602
+ 'grok-code-fast-1': 'grok-build-0.1',
603
+ 'grok-4-fast-reasoning': 'grok-4.3',
604
+ },
605
+ openai: {
606
+ 'gpt-5.5': 'gpt-5.6-sol',
607
+ 'gpt-5.4': 'gpt-5.6-terra',
608
+ 'gpt-5.4-mini': 'gpt-5.6-luna',
609
+ },
610
+ 'kimi-api': {
611
+ 'kimi-k3-code': 'kimi-k3',
612
+ 'kimi-k3-code-highspeed': 'kimi-k3',
613
+ 'kimi-k3-thinking': 'kimi-k3',
614
+ 'kimi-k2.5': 'kimi-k2.6',
615
+ },
616
+ 'kimi-cn': {
617
+ 'kimi-k3-code': 'kimi-k3',
618
+ 'kimi-k3-code-highspeed': 'kimi-k3',
619
+ 'kimi-k3-thinking': 'kimi-k3',
620
+ 'kimi-k2.5': 'kimi-k2.6',
621
+ },
622
+ qwen: {
623
+ 'qwen3-coder-plus': 'qwen3.7-plus',
624
+ 'qwen3-coder-next': 'qwen3.7-plus',
625
+ 'qwen3.7-max': 'qwen3.7-plus',
626
+ },
627
+ 'qwen-api': {
628
+ 'qwen3-coder-plus': 'qwen3.7-max',
629
+ 'qwen3-coder-next': 'qwen3.7-max',
630
+ 'qwen3-coder-flash': 'qwen3.6-flash',
631
+ },
632
+ 'qwen-cn': {
633
+ 'qwen3-coder-plus': 'qwen3.7-plus',
634
+ 'qwen3-coder-next': 'qwen3.7-plus',
635
+ 'qwen3.7-max': 'qwen3.7-plus',
636
+ },
637
+ 'qwen-cn-api': {
638
+ 'qwen3-coder-plus': 'qwen3.7-max',
639
+ 'qwen3-coder-next': 'qwen3.7-max',
640
+ 'qwen3-coder-flash': 'qwen3.6-flash',
641
+ },
642
+ };
643
+ export function replacementModelFor(providerId, modelId) {
644
+ return RETIRED_MODEL_REPLACEMENTS[providerId]?.[modelId];
645
+ }
553
646
  /**
554
647
  * Curated display order for the first-run login flow + `/provider` /
555
648
  * `/login` pickers. Headline / popular providers float to the top so
@@ -567,6 +660,7 @@ const DISPLAY_ORDER = [
567
660
  'kimi',
568
661
  'kimi-api',
569
662
  'qwen',
663
+ 'qwen-token-plan',
570
664
  'qwen-api',
571
665
  'grok',
572
666
  'deepseek',
@@ -619,6 +713,13 @@ export function isNoApiKeyProvider(providerId) {
619
713
  export function isDynamicModelsProvider(providerId) {
620
714
  return PROVIDERS[providerId]?.dynamicModels === true;
621
715
  }
716
+ /**
717
+ * Returns true if the provider bills a flat subscription (or is free), so any
718
+ * per-token dollar figure we compute for it is invented — see `flatFee`.
719
+ */
720
+ export function isFlatFeeProvider(providerId) {
721
+ return PROVIDERS[providerId]?.flatFee === true;
722
+ }
622
723
  export function getProviderBaseUrl(providerId, protocol) {
623
724
  const provider = PROVIDERS[providerId];
624
725
  if (!provider)
@@ -669,14 +770,23 @@ export function providerNoStreamWithTools(providerId) {
669
770
  * MODEL-level check, not a provider-level one (requiresDefaultTemperature
670
771
  * can't express it). Omitting the field is always safe — the API treats
671
772
  * omission as default. Kimi K2.x code/thinking models fix temperature
672
- * internally and 400 on any custom value, so they're here too.
773
+ * internally and 400 on any custom value, so they're here too. Google removed
774
+ * the deprecated sampling parameters outright in the Gemini 3.7 generation.
673
775
  */
674
776
  const SAMPLING_PARAMS_REJECTED = [
675
777
  'claude-fable-5', 'claude-opus-5', 'claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-5',
676
- 'kimi-k3-code', 'kimi-k3-thinking', 'kimi-k2.7-code', 'kimi-for-coding',
778
+ 'kimi-k3', 'kimi-k2.7-code', 'kimi-for-coding', 'k3',
779
+ 'gemini-3.7-flash',
677
780
  ];
678
781
  export function modelRejectsSamplingParams(model) {
679
- return SAMPLING_PARAMS_REJECTED.some(id => model === id || model.startsWith(`${id}-`));
782
+ // Canonicalize both sides. OpenRouter routes these as `google/gemini-3.7-flash`
783
+ // and `anthropic/claude-opus-4.8`, which a raw comparison misses — so the model
784
+ // gets a temperature it rejects, on the one path where the id is namespaced.
785
+ const id = canonicalModelId(model);
786
+ return SAMPLING_PARAMS_REJECTED.some(entry => {
787
+ const canonical = canonicalModelId(entry);
788
+ return id === canonical || id.startsWith(`${canonical}-`);
789
+ });
680
790
  }
681
791
  /**
682
792
  * Returns the effective max output tokens for a provider, capped by the provider's limit.
@@ -731,9 +841,14 @@ export function modelSupportsReasoningEffort(providerId, model) {
731
841
  case 'z.ai-api':
732
842
  case 'z.ai-cn':
733
843
  case 'z.ai-cn-api':
734
- // GLM-5.2 added graded High/Max effort. glm-5-turbo is a plain thinking
735
- // toggle (no graded levels) so it stays out.
736
- return idMatches(id, 'glm-5-2');
844
+ // GLM-5.2 exposes graded High/Max effort; GLM-5.3 adds a distinct Low.
845
+ // Turbo is a plain toggle.
846
+ return idMatches(id, 'glm-5-2') || idMatches(id, 'glm-5-3');
847
+ case 'kimi':
848
+ return idMatches(id, 'k3');
849
+ case 'kimi-api':
850
+ case 'kimi-cn':
851
+ return idMatches(id, 'kimi-k3');
737
852
  case 'grok':
738
853
  // Grok reasoning models accept reasoning_effort (none/low/medium/high).
739
854
  // The coders (grok-code-fast, grok-build — the default) are NON-reasoning
@@ -743,8 +858,7 @@ export function modelSupportsReasoningEffort(providerId, model) {
743
858
  if (id.startsWith('grok-build') || id.startsWith('grok-code'))
744
859
  return false;
745
860
  return id.startsWith('grok') && !id.includes('non-reasoning');
746
- // Kimi (thinking on/off, not graded) and Qwen coders (non-thinking) have
747
- // no graded knob → fall through to default false.
861
+ // GLM Turbo and Qwen coders expose thinking on/off, not a graded knob.
748
862
  case 'openrouter':
749
863
  // OpenRouter normalizes a unified `reasoning` field and silently ignores
750
864
  // it for non-reasoning models, so the control is always safe to expose.
@@ -775,15 +889,31 @@ export function reasoningParamsFor(providerId, model, tier) {
775
889
  // none/low/medium/high/xhigh — no "max"; map our Max → xhigh (the ceiling).
776
890
  return { reasoning_effort: tier === 'max' ? 'xhigh' : tier };
777
891
  case 'google':
778
- // Gemini 3 (OpenAI-compat) accepts ONLY low/high — "medium" 400s.
779
- return { reasoning_effort: tier === 'low' ? 'low' : 'high' };
892
+ // Gemini's OpenAI-compat layer maps reasoning_effort onto thinking_level
893
+ // and documents low | medium | high. (Medium 400'd on Gemini 3 Preview,
894
+ // which is why this used to collapse it — that was a preview-era bug and
895
+ // is fixed.) 'max' has no Gemini equivalent, so it tops out at high.
896
+ // 'minimal' is deliberately not emitted: 3.7 Flash rejects it outright.
897
+ return { reasoning_effort: tier === 'max' ? 'high' : tier };
780
898
  case 'deepseek':
899
+ // Graded thinking depth: high (default) or max. Lower tiers collapse to high.
900
+ return { reasoning_effort: tier === 'max' ? 'max' : 'high' };
781
901
  case 'z.ai':
782
902
  case 'z.ai-api':
783
903
  case 'z.ai-cn':
784
904
  case 'z.ai-cn-api':
785
- // Graded thinking depth: high (default) or max. Lower tiers collapse to high.
905
+ // GLM-5.3 accepts low/high/max; GLM-5.2 grades only high|max, so lower
906
+ // tiers collapse to high there. Either way we always send an effort and
907
+ // never a disabled thinking block — GLM-5.3 rejects "disabled" outright.
908
+ if (idMatches(canonicalModelId(model), 'glm-5-3')) {
909
+ return { reasoning_effort: tier === 'low' ? 'low' : tier === 'max' ? 'max' : 'high' };
910
+ }
786
911
  return { reasoning_effort: tier === 'max' ? 'max' : 'high' };
912
+ case 'kimi':
913
+ case 'kimi-api':
914
+ case 'kimi-cn':
915
+ // Kimi K3 accepts low/high/max; collapse our medium tier to high.
916
+ return { reasoning_effort: tier === 'low' ? 'low' : tier === 'max' ? 'max' : 'high' };
787
917
  case 'grok':
788
918
  // none/low/medium/high — no "max"; map our Max → high (the ceiling).
789
919
  return { reasoning_effort: tier === 'max' ? 'high' : tier };
@@ -812,14 +942,24 @@ export function availableReasoningTiers(providerId, model) {
812
942
  case 'openai':
813
943
  return ['auto', 'low', 'medium', 'high', 'max'];
814
944
  case 'google':
815
- // OpenAI-compat layer accepts only low/high — "medium" 400s.
816
- return ['auto', 'low', 'high'];
945
+ // low | medium | high, per Gemini's OpenAI-compat mapping table. Medium
946
+ // is 3.7 Flash's own default and the tier Google recommends for agentic
947
+ // coding, so collapsing it hid the setting most users want.
948
+ return ['auto', 'low', 'medium', 'high'];
817
949
  case 'deepseek':
950
+ return ['auto', 'high', 'max'];
818
951
  case 'z.ai':
819
952
  case 'z.ai-api':
820
953
  case 'z.ai-cn':
821
954
  case 'z.ai-cn-api':
822
- return ['auto', 'high', 'max'];
955
+ // GLM-5.3 distinguishes a Low tier; GLM-5.2 grades only high|max.
956
+ return idMatches(canonicalModelId(model), 'glm-5-3')
957
+ ? ['auto', 'low', 'high', 'max']
958
+ : ['auto', 'high', 'max'];
959
+ case 'kimi':
960
+ case 'kimi-api':
961
+ case 'kimi-cn':
962
+ return ['auto', 'low', 'high', 'max'];
823
963
  case 'grok':
824
964
  return ['auto', 'low', 'medium', 'high'];
825
965
  case 'openrouter':
@@ -831,8 +971,8 @@ export function availableReasoningTiers(providerId, model) {
831
971
  /**
832
972
  * Map a (possibly out-of-range) tier to the tier this model actually distinguishes,
833
973
  * for display — the chip + the checked menu row. The effort setting is global, so
834
- * a tier picked on Opus ('low') may not exist on GLM-5.2; we show the level GLM
835
- * will really run (its 'low' clamps to 'high'). Picks the available tier whose
974
+ * a tier picked on Opus ('medium') may not exist on Kimi K3; we show the level
975
+ * Kimi will really run (its 'medium' clamps to 'high'). Picks the tier whose
836
976
  * effective param equals the requested one. 'auto' (or unsupported) → 'auto'.
837
977
  */
838
978
  export function resolveReasoningTier(providerId, model, tier) {
@@ -89,6 +89,10 @@ export declare class App {
89
89
  private agentThinking;
90
90
  private agentWaitingForAI;
91
91
  private agentLog;
92
+ /** Process uptime shown in the persistent footer. */
93
+ private appStartedAt;
94
+ /** Start of the current agent run; unlike app uptime, resets per task. */
95
+ private agentStartedAt;
92
96
  private pasteInfo;
93
97
  private pasteInfoOpen;
94
98
  private codeBlockCounter;
@@ -433,6 +437,14 @@ export declare class App {
433
437
  * Render chat screen
434
438
  */
435
439
  private renderChat;
440
+ private shouldRenderAgentTimeline;
441
+ private renderPersistentHeader;
442
+ private renderAgentTimelineScreen;
443
+ private renderAgentContextRail;
444
+ private renderAgentKeyHints;
445
+ private timelineStatusStyle;
446
+ private currentActionType;
447
+ private currentAgentTask;
436
448
  /**
437
449
  * Render inline confirmation dialog below status bar
438
450
  */