@namzu/zen 1.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/src/models.ts ADDED
@@ -0,0 +1,1199 @@
1
+ import type { ModelInputModality, ReasoningEffort } from '@namzu/sdk'
2
+
3
+ /** Zen's independently routed, billed services. */
4
+ export type ZenService = 'zen' | 'go'
5
+
6
+ /** Native wire format documented for this exact model and service. */
7
+ export type ZenProtocol = 'chat' | 'responses' | 'messages' | 'google'
8
+
9
+ /** A supported model in the pinned Zen catalogue. */
10
+ export interface ZenModel {
11
+ readonly id: string
12
+ readonly name: string
13
+ readonly protocol: ZenProtocol
14
+ readonly contextWindow?: number
15
+ readonly maxOutputTokens?: number
16
+ readonly inputModalities?: readonly ModelInputModality[]
17
+ /** USD per million uncached input tokens at the documented base tier. */
18
+ readonly inputPrice: number
19
+ /** USD per million output tokens at the documented base tier. */
20
+ readonly outputPrice: number
21
+ readonly supportsToolUse: boolean
22
+ readonly supportsStreaming: boolean
23
+ /** True only for documented anonymous Zen models; omission grants no anonymous access. */
24
+ readonly supportsAnonymousAccess?: boolean
25
+ /** Exact advertised selectable effort levels; empty means no effort selector. */
26
+ readonly effortLevels?: readonly ReasoningEffort[]
27
+ }
28
+
29
+ /*
30
+ * Snapshot: 2026-09-07. Routes and prices come from Zen's own docs:
31
+ * https://github.com/anomalyco/opencode/blob/ecbc6ccac85b3e8087b6445e584318419b9e2b34/packages/web/src/content/docs/zen.mdx
32
+ * https://github.com/anomalyco/opencode/blob/ecbc6ccac85b3e8087b6445e584318419b9e2b34/packages/web/src/content/docs/go.mdx
33
+ * Limits, tool support, modalities and effort options come from the matching
34
+ * provider entries (including their base_model inheritance) in models.dev:
35
+ * https://github.com/anomalyco/models.dev/tree/1a84fdd72ad6c7f507af96aafbcc59a2f818f9fd/providers/opencode
36
+ * https://github.com/anomalyco/models.dev/tree/1a84fdd72ad6c7f507af96aafbcc59a2f818f9fd/providers/opencode-go
37
+ *
38
+ * Prices are estimates, not invoices: context tiers, cache, Go peak/off-peak
39
+ * rates, subscription allowances and promotions can change the effective cost.
40
+ * Go DeepSeek entries use off-peak prices. GPT 5.6 Sol includes the documented
41
+ * 50% promotion through 2026-09-18. PDF input is the SDK's document modality;
42
+ * audio/video are omitted because the SDK does not expose those input kinds.
43
+ *
44
+ * Promotional free models with documented routes and complete metadata are
45
+ * included at their advertised zero price; the service enforces access limits.
46
+ * Anonymous admission is explicit rather than inferred from price. OpenCode's
47
+ * own loader uses the public sentinel when credentials are absent:
48
+ * https://github.com/anomalyco/opencode/blob/16747470f976aca3d362ad730bcd3fe82ecc2c9a/packages/opencode/src/provider/provider.ts#L185
49
+ * Deprecated models are omitted. Unknown IDs have no inferred protocol or limits.
50
+ * MiniMax and Qwen demonstrate why routes must be recorded per service/model.
51
+ */
52
+ function freezeModels(models: ZenModel[]): readonly ZenModel[] {
53
+ for (const model of models) {
54
+ if (model.inputModalities) Object.freeze(model.inputModalities)
55
+ if (model.effortLevels) Object.freeze(model.effortLevels)
56
+ Object.freeze(model)
57
+ }
58
+ return Object.freeze(models)
59
+ }
60
+
61
+ const ZEN_MODELS = freezeModels([
62
+ {
63
+ id: 'gpt-6-astra',
64
+ name: 'GPT 6 Astra',
65
+ protocol: 'responses',
66
+ contextWindow: 1050000,
67
+ maxOutputTokens: 128000,
68
+ inputModalities: ['text', 'image', 'document'],
69
+ inputPrice: 10.0,
70
+ outputPrice: 50.0,
71
+ supportsToolUse: true,
72
+ supportsStreaming: true,
73
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
74
+ },
75
+ {
76
+ id: 'gpt-5.6-sol',
77
+ name: 'GPT 5.6 Sol',
78
+ protocol: 'responses',
79
+ contextWindow: 1050000,
80
+ maxOutputTokens: 128000,
81
+ inputModalities: ['text', 'image', 'document'],
82
+ inputPrice: 2.0,
83
+ outputPrice: 10.0,
84
+ supportsToolUse: true,
85
+ supportsStreaming: true,
86
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh', 'max'],
87
+ },
88
+ {
89
+ id: 'gpt-5.6-terra',
90
+ name: 'GPT 5.6 Terra',
91
+ protocol: 'responses',
92
+ contextWindow: 1050000,
93
+ maxOutputTokens: 128000,
94
+ inputModalities: ['text', 'image', 'document'],
95
+ inputPrice: 2.0,
96
+ outputPrice: 12.0,
97
+ supportsToolUse: true,
98
+ supportsStreaming: true,
99
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh', 'max'],
100
+ },
101
+ {
102
+ id: 'gpt-5.6-luna',
103
+ name: 'GPT 5.6 Luna',
104
+ protocol: 'responses',
105
+ contextWindow: 1050000,
106
+ maxOutputTokens: 128000,
107
+ inputModalities: ['text', 'image', 'document'],
108
+ inputPrice: 0.2,
109
+ outputPrice: 1.2,
110
+ supportsToolUse: true,
111
+ supportsStreaming: true,
112
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh', 'max'],
113
+ },
114
+ {
115
+ id: 'gpt-5.5',
116
+ name: 'GPT 5.5',
117
+ protocol: 'responses',
118
+ contextWindow: 1050000,
119
+ maxOutputTokens: 128000,
120
+ inputModalities: ['text', 'image', 'document'],
121
+ inputPrice: 5.0,
122
+ outputPrice: 30.0,
123
+ supportsToolUse: true,
124
+ supportsStreaming: true,
125
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh'],
126
+ },
127
+ {
128
+ id: 'gpt-5.5-pro',
129
+ name: 'GPT 5.5 Pro',
130
+ protocol: 'responses',
131
+ contextWindow: 1050000,
132
+ maxOutputTokens: 128000,
133
+ inputModalities: ['text', 'image', 'document'],
134
+ inputPrice: 30.0,
135
+ outputPrice: 180.0,
136
+ supportsToolUse: true,
137
+ supportsStreaming: true,
138
+ effortLevels: ['medium', 'high', 'xhigh'],
139
+ },
140
+ {
141
+ id: 'gpt-5.4',
142
+ name: 'GPT 5.4',
143
+ protocol: 'responses',
144
+ contextWindow: 1050000,
145
+ maxOutputTokens: 128000,
146
+ inputModalities: ['text', 'image', 'document'],
147
+ inputPrice: 2.5,
148
+ outputPrice: 15.0,
149
+ supportsToolUse: true,
150
+ supportsStreaming: true,
151
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh'],
152
+ },
153
+ {
154
+ id: 'gpt-5.4-pro',
155
+ name: 'GPT 5.4 Pro',
156
+ protocol: 'responses',
157
+ contextWindow: 1050000,
158
+ maxOutputTokens: 128000,
159
+ inputModalities: ['text', 'image', 'document'],
160
+ inputPrice: 30.0,
161
+ outputPrice: 180.0,
162
+ supportsToolUse: true,
163
+ supportsStreaming: true,
164
+ effortLevels: ['medium', 'high', 'xhigh'],
165
+ },
166
+ {
167
+ id: 'gpt-5.4-mini',
168
+ name: 'GPT 5.4 Mini',
169
+ protocol: 'responses',
170
+ contextWindow: 400000,
171
+ maxOutputTokens: 128000,
172
+ inputModalities: ['text', 'image', 'document'],
173
+ inputPrice: 0.75,
174
+ outputPrice: 4.5,
175
+ supportsToolUse: true,
176
+ supportsStreaming: true,
177
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh'],
178
+ },
179
+ {
180
+ id: 'gpt-5.4-nano',
181
+ name: 'GPT 5.4 Nano',
182
+ protocol: 'responses',
183
+ contextWindow: 400000,
184
+ maxOutputTokens: 128000,
185
+ inputModalities: ['text', 'image', 'document'],
186
+ inputPrice: 0.2,
187
+ outputPrice: 1.25,
188
+ supportsToolUse: true,
189
+ supportsStreaming: true,
190
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh'],
191
+ },
192
+ {
193
+ id: 'gpt-5.3-codex',
194
+ name: 'GPT 5.3 Codex',
195
+ protocol: 'responses',
196
+ contextWindow: 400000,
197
+ maxOutputTokens: 128000,
198
+ inputModalities: ['text', 'image', 'document'],
199
+ inputPrice: 1.75,
200
+ outputPrice: 14.0,
201
+ supportsToolUse: true,
202
+ supportsStreaming: true,
203
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh'],
204
+ },
205
+ {
206
+ id: 'gpt-5.3-codex-spark',
207
+ name: 'GPT 5.3 Codex Spark',
208
+ protocol: 'responses',
209
+ contextWindow: 128000,
210
+ maxOutputTokens: 128000,
211
+ inputModalities: ['text'],
212
+ inputPrice: 1.75,
213
+ outputPrice: 14.0,
214
+ supportsToolUse: true,
215
+ supportsStreaming: true,
216
+ effortLevels: ['low', 'medium', 'high', 'xhigh'],
217
+ },
218
+ {
219
+ id: 'gpt-5.2',
220
+ name: 'GPT 5.2',
221
+ protocol: 'responses',
222
+ contextWindow: 400000,
223
+ maxOutputTokens: 128000,
224
+ inputModalities: ['text', 'image'],
225
+ inputPrice: 1.75,
226
+ outputPrice: 14.0,
227
+ supportsToolUse: true,
228
+ supportsStreaming: true,
229
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh'],
230
+ },
231
+ {
232
+ id: 'gpt-5.1',
233
+ name: 'GPT 5.1',
234
+ protocol: 'responses',
235
+ contextWindow: 400000,
236
+ maxOutputTokens: 128000,
237
+ inputModalities: ['text', 'image'],
238
+ inputPrice: 1.07,
239
+ outputPrice: 8.5,
240
+ supportsToolUse: true,
241
+ supportsStreaming: true,
242
+ effortLevels: ['none', 'low', 'medium', 'high'],
243
+ },
244
+ {
245
+ id: 'gpt-5',
246
+ name: 'GPT 5',
247
+ protocol: 'responses',
248
+ contextWindow: 400000,
249
+ maxOutputTokens: 128000,
250
+ inputModalities: ['text', 'image'],
251
+ inputPrice: 1.07,
252
+ outputPrice: 8.5,
253
+ supportsToolUse: true,
254
+ supportsStreaming: true,
255
+ effortLevels: ['minimal', 'low', 'medium', 'high'],
256
+ },
257
+ {
258
+ id: 'gpt-5-nano',
259
+ name: 'GPT 5 Nano',
260
+ protocol: 'responses',
261
+ contextWindow: 400000,
262
+ maxOutputTokens: 128000,
263
+ inputModalities: ['text', 'image'],
264
+ inputPrice: 0.05,
265
+ outputPrice: 0.4,
266
+ supportsToolUse: true,
267
+ supportsStreaming: true,
268
+ effortLevels: ['minimal', 'low', 'medium', 'high'],
269
+ },
270
+ {
271
+ id: 'claude-fable-5-1',
272
+ name: 'Claude Fable 5.1',
273
+ protocol: 'messages',
274
+ contextWindow: 1000000,
275
+ maxOutputTokens: 128000,
276
+ inputModalities: ['text', 'image', 'document'],
277
+ inputPrice: 10.0,
278
+ outputPrice: 50.0,
279
+ supportsToolUse: true,
280
+ supportsStreaming: true,
281
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
282
+ },
283
+ {
284
+ id: 'claude-fable-5',
285
+ name: 'Claude Fable 5',
286
+ protocol: 'messages',
287
+ contextWindow: 1000000,
288
+ maxOutputTokens: 128000,
289
+ inputModalities: ['text', 'image', 'document'],
290
+ inputPrice: 10.0,
291
+ outputPrice: 50.0,
292
+ supportsToolUse: true,
293
+ supportsStreaming: true,
294
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
295
+ },
296
+ {
297
+ id: 'claude-opus-5',
298
+ name: 'Claude Opus 5',
299
+ protocol: 'messages',
300
+ contextWindow: 1000000,
301
+ maxOutputTokens: 128000,
302
+ inputModalities: ['text', 'image', 'document'],
303
+ inputPrice: 5.0,
304
+ outputPrice: 25.0,
305
+ supportsToolUse: true,
306
+ supportsStreaming: true,
307
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
308
+ },
309
+ {
310
+ id: 'claude-opus-4-8',
311
+ name: 'Claude Opus 4.8',
312
+ protocol: 'messages',
313
+ contextWindow: 1000000,
314
+ maxOutputTokens: 128000,
315
+ inputModalities: ['text', 'image', 'document'],
316
+ inputPrice: 5.0,
317
+ outputPrice: 25.0,
318
+ supportsToolUse: true,
319
+ supportsStreaming: true,
320
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
321
+ },
322
+ {
323
+ id: 'claude-opus-4-7',
324
+ name: 'Claude Opus 4.7',
325
+ protocol: 'messages',
326
+ contextWindow: 1000000,
327
+ maxOutputTokens: 128000,
328
+ inputModalities: ['text', 'image', 'document'],
329
+ inputPrice: 5.0,
330
+ outputPrice: 25.0,
331
+ supportsToolUse: true,
332
+ supportsStreaming: true,
333
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
334
+ },
335
+ {
336
+ id: 'claude-opus-4-6',
337
+ name: 'Claude Opus 4.6',
338
+ protocol: 'messages',
339
+ contextWindow: 1000000,
340
+ maxOutputTokens: 128000,
341
+ inputModalities: ['text', 'image', 'document'],
342
+ inputPrice: 5.0,
343
+ outputPrice: 25.0,
344
+ supportsToolUse: true,
345
+ supportsStreaming: true,
346
+ effortLevels: ['low', 'medium', 'high', 'max'],
347
+ },
348
+ {
349
+ id: 'claude-opus-4-5',
350
+ name: 'Claude Opus 4.5',
351
+ protocol: 'messages',
352
+ contextWindow: 200000,
353
+ maxOutputTokens: 64000,
354
+ inputModalities: ['text', 'image', 'document'],
355
+ inputPrice: 5.0,
356
+ outputPrice: 25.0,
357
+ supportsToolUse: true,
358
+ supportsStreaming: true,
359
+ effortLevels: ['low', 'medium', 'high'],
360
+ },
361
+ {
362
+ id: 'claude-sonnet-5',
363
+ name: 'Claude Sonnet 5',
364
+ protocol: 'messages',
365
+ contextWindow: 1000000,
366
+ maxOutputTokens: 128000,
367
+ inputModalities: ['text', 'image', 'document'],
368
+ inputPrice: 2.0,
369
+ outputPrice: 10.0,
370
+ supportsToolUse: true,
371
+ supportsStreaming: true,
372
+ effortLevels: ['low', 'medium', 'high', 'xhigh', 'max'],
373
+ },
374
+ {
375
+ id: 'claude-sonnet-4-6',
376
+ name: 'Claude Sonnet 4.6',
377
+ protocol: 'messages',
378
+ contextWindow: 1000000,
379
+ maxOutputTokens: 64000,
380
+ inputModalities: ['text', 'image', 'document'],
381
+ inputPrice: 3.0,
382
+ outputPrice: 15.0,
383
+ supportsToolUse: true,
384
+ supportsStreaming: true,
385
+ effortLevels: ['low', 'medium', 'high', 'max'],
386
+ },
387
+ {
388
+ id: 'claude-sonnet-4-5',
389
+ name: 'Claude Sonnet 4.5',
390
+ protocol: 'messages',
391
+ contextWindow: 1000000,
392
+ maxOutputTokens: 64000,
393
+ inputModalities: ['text', 'image', 'document'],
394
+ inputPrice: 3.0,
395
+ outputPrice: 15.0,
396
+ supportsToolUse: true,
397
+ supportsStreaming: true,
398
+ effortLevels: [],
399
+ },
400
+ {
401
+ id: 'claude-haiku-4-5',
402
+ name: 'Claude Haiku 4.5',
403
+ protocol: 'messages',
404
+ contextWindow: 200000,
405
+ maxOutputTokens: 64000,
406
+ inputModalities: ['text', 'image', 'document'],
407
+ inputPrice: 1.0,
408
+ outputPrice: 5.0,
409
+ supportsToolUse: true,
410
+ supportsStreaming: true,
411
+ effortLevels: [],
412
+ },
413
+ {
414
+ id: 'gemini-3.8-flash',
415
+ name: 'Gemini 3.8 Flash',
416
+ protocol: 'google',
417
+ contextWindow: 1048576,
418
+ maxOutputTokens: 65536,
419
+ inputModalities: ['text', 'image', 'document'],
420
+ inputPrice: 1.5,
421
+ outputPrice: 7.5,
422
+ supportsToolUse: true,
423
+ supportsStreaming: true,
424
+ effortLevels: ['low', 'medium', 'high'],
425
+ },
426
+ {
427
+ id: 'gemini-3.7-flash',
428
+ name: 'Gemini 3.7 Flash',
429
+ protocol: 'google',
430
+ contextWindow: 1048576,
431
+ maxOutputTokens: 65536,
432
+ inputModalities: ['text', 'image', 'document'],
433
+ inputPrice: 1.5,
434
+ outputPrice: 7.5,
435
+ supportsToolUse: true,
436
+ supportsStreaming: true,
437
+ effortLevels: ['low', 'medium', 'high'],
438
+ },
439
+ {
440
+ id: 'gemini-3.6-flash',
441
+ name: 'Gemini 3.6 Flash',
442
+ protocol: 'google',
443
+ contextWindow: 1048576,
444
+ maxOutputTokens: 65536,
445
+ inputModalities: ['text', 'image', 'document'],
446
+ inputPrice: 1.5,
447
+ outputPrice: 7.5,
448
+ supportsToolUse: true,
449
+ supportsStreaming: true,
450
+ effortLevels: ['minimal', 'low', 'medium', 'high'],
451
+ },
452
+ {
453
+ id: 'gemini-3.5-flash',
454
+ name: 'Gemini 3.5 Flash',
455
+ protocol: 'google',
456
+ contextWindow: 1048576,
457
+ maxOutputTokens: 65536,
458
+ inputModalities: ['text', 'image', 'document'],
459
+ inputPrice: 1.5,
460
+ outputPrice: 9.0,
461
+ supportsToolUse: true,
462
+ supportsStreaming: true,
463
+ effortLevels: ['minimal', 'low', 'medium', 'high'],
464
+ },
465
+ {
466
+ id: 'gemini-3.5-flash-lite',
467
+ name: 'Gemini 3.5 Flash Lite',
468
+ protocol: 'google',
469
+ contextWindow: 1048576,
470
+ maxOutputTokens: 65536,
471
+ inputModalities: ['text', 'image', 'document'],
472
+ inputPrice: 0.3,
473
+ outputPrice: 2.5,
474
+ supportsToolUse: true,
475
+ supportsStreaming: true,
476
+ effortLevels: ['minimal', 'low', 'medium', 'high'],
477
+ },
478
+ {
479
+ id: 'gemini-3.1-pro',
480
+ name: 'Gemini 3.1 Pro',
481
+ protocol: 'google',
482
+ contextWindow: 1048576,
483
+ maxOutputTokens: 65536,
484
+ inputModalities: ['text', 'image', 'document'],
485
+ inputPrice: 2.0,
486
+ outputPrice: 12.0,
487
+ supportsToolUse: true,
488
+ supportsStreaming: true,
489
+ effortLevels: ['low', 'medium', 'high'],
490
+ },
491
+ {
492
+ id: 'gemini-3-flash',
493
+ name: 'Gemini 3 Flash',
494
+ protocol: 'google',
495
+ contextWindow: 1048576,
496
+ maxOutputTokens: 65536,
497
+ inputModalities: ['text', 'image', 'document'],
498
+ inputPrice: 0.5,
499
+ outputPrice: 3.0,
500
+ supportsToolUse: true,
501
+ supportsStreaming: true,
502
+ effortLevels: ['minimal', 'low', 'medium', 'high'],
503
+ },
504
+ {
505
+ id: 'grok-4.6',
506
+ name: 'Grok 4.6',
507
+ protocol: 'responses',
508
+ contextWindow: 500000,
509
+ maxOutputTokens: 500000,
510
+ inputModalities: ['text', 'image'],
511
+ inputPrice: 2.0,
512
+ outputPrice: 6.0,
513
+ supportsToolUse: true,
514
+ supportsStreaming: true,
515
+ effortLevels: ['low', 'medium', 'high', 'xhigh'],
516
+ },
517
+ {
518
+ id: 'grok-4.5',
519
+ name: 'Grok 4.5',
520
+ protocol: 'responses',
521
+ contextWindow: 500000,
522
+ maxOutputTokens: 500000,
523
+ inputModalities: ['text', 'image'],
524
+ inputPrice: 2.0,
525
+ outputPrice: 6.0,
526
+ supportsToolUse: true,
527
+ supportsStreaming: true,
528
+ effortLevels: ['low', 'medium', 'high'],
529
+ },
530
+ {
531
+ id: 'grok-build-0.1',
532
+ name: 'Grok Build 0.1',
533
+ protocol: 'responses',
534
+ contextWindow: 256000,
535
+ maxOutputTokens: 256000,
536
+ inputModalities: ['text', 'image', 'document'],
537
+ inputPrice: 1.0,
538
+ outputPrice: 2.0,
539
+ supportsToolUse: true,
540
+ supportsStreaming: true,
541
+ effortLevels: [],
542
+ },
543
+ {
544
+ id: 'muse-spark-1.3',
545
+ name: 'Muse Spark 1.3',
546
+ protocol: 'responses',
547
+ contextWindow: 1048576,
548
+ maxOutputTokens: 131072,
549
+ inputModalities: ['text', 'image', 'document'],
550
+ inputPrice: 1.25,
551
+ outputPrice: 4.25,
552
+ supportsToolUse: true,
553
+ supportsStreaming: true,
554
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh', 'max'],
555
+ },
556
+ {
557
+ id: 'muse-spark-1.2',
558
+ name: 'Muse Spark 1.2',
559
+ protocol: 'responses',
560
+ contextWindow: 1048576,
561
+ maxOutputTokens: 131072,
562
+ inputModalities: ['text', 'image', 'document'],
563
+ inputPrice: 1.25,
564
+ outputPrice: 4.25,
565
+ supportsToolUse: true,
566
+ supportsStreaming: true,
567
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
568
+ },
569
+ {
570
+ id: 'qwen3.6-plus',
571
+ name: 'Qwen3.6 Plus',
572
+ protocol: 'messages',
573
+ contextWindow: 262144,
574
+ maxOutputTokens: 65536,
575
+ inputModalities: ['text', 'image'],
576
+ inputPrice: 0.5,
577
+ outputPrice: 3.0,
578
+ supportsToolUse: true,
579
+ supportsStreaming: true,
580
+ effortLevels: [],
581
+ },
582
+ {
583
+ id: 'qwen3.5-plus',
584
+ name: 'Qwen3.5 Plus',
585
+ protocol: 'messages',
586
+ contextWindow: 262144,
587
+ maxOutputTokens: 65536,
588
+ inputModalities: ['text', 'image'],
589
+ inputPrice: 0.2,
590
+ outputPrice: 1.2,
591
+ supportsToolUse: true,
592
+ supportsStreaming: true,
593
+ effortLevels: [],
594
+ },
595
+ {
596
+ id: 'deepseek-v4-pro',
597
+ name: 'DeepSeek V4 Pro',
598
+ protocol: 'chat',
599
+ contextWindow: 1000000,
600
+ maxOutputTokens: 384000,
601
+ inputModalities: ['text'],
602
+ inputPrice: 1.74,
603
+ outputPrice: 3.48,
604
+ supportsToolUse: true,
605
+ supportsStreaming: true,
606
+ effortLevels: ['high', 'max'],
607
+ },
608
+ {
609
+ id: 'deepseek-v4-flash',
610
+ name: 'DeepSeek V4 Flash',
611
+ protocol: 'chat',
612
+ contextWindow: 1000000,
613
+ maxOutputTokens: 384000,
614
+ inputModalities: ['text'],
615
+ inputPrice: 0.14,
616
+ outputPrice: 0.28,
617
+ supportsToolUse: true,
618
+ supportsStreaming: true,
619
+ effortLevels: ['low', 'high', 'max'],
620
+ },
621
+ {
622
+ id: 'deepseek-v4-flash-vision-exp',
623
+ name: 'DeepSeek V4 Flash Vision Exp',
624
+ protocol: 'chat',
625
+ contextWindow: 1000000,
626
+ maxOutputTokens: 384000,
627
+ inputModalities: ['text', 'image'],
628
+ inputPrice: 0.14,
629
+ outputPrice: 0.28,
630
+ supportsToolUse: true,
631
+ supportsStreaming: true,
632
+ effortLevels: ['low', 'high', 'max'],
633
+ },
634
+ {
635
+ id: 'minimax-m3',
636
+ name: 'MiniMax M3',
637
+ protocol: 'chat',
638
+ contextWindow: 512000,
639
+ maxOutputTokens: 128000,
640
+ inputModalities: ['text', 'image'],
641
+ inputPrice: 0.3,
642
+ outputPrice: 1.2,
643
+ supportsToolUse: true,
644
+ supportsStreaming: true,
645
+ effortLevels: [],
646
+ },
647
+ {
648
+ id: 'minimax-m2.7',
649
+ name: 'MiniMax M2.7',
650
+ protocol: 'chat',
651
+ contextWindow: 204800,
652
+ maxOutputTokens: 131072,
653
+ inputModalities: ['text'],
654
+ inputPrice: 0.3,
655
+ outputPrice: 1.2,
656
+ supportsToolUse: true,
657
+ supportsStreaming: true,
658
+ effortLevels: [],
659
+ },
660
+ {
661
+ id: 'glm-5.3-flash',
662
+ name: 'GLM 5.3 Flash',
663
+ protocol: 'chat',
664
+ contextWindow: 1000000,
665
+ maxOutputTokens: 131072,
666
+ inputModalities: ['text', 'image', 'document'],
667
+ inputPrice: 0.15,
668
+ outputPrice: 0.5,
669
+ supportsToolUse: true,
670
+ supportsStreaming: true,
671
+ effortLevels: ['low', 'high', 'max'],
672
+ },
673
+ {
674
+ id: 'glm-5.3',
675
+ name: 'GLM 5.3',
676
+ protocol: 'chat',
677
+ contextWindow: 1000000,
678
+ maxOutputTokens: 131072,
679
+ inputModalities: ['text'],
680
+ inputPrice: 1.4,
681
+ outputPrice: 4.4,
682
+ supportsToolUse: true,
683
+ supportsStreaming: true,
684
+ effortLevels: ['low', 'high', 'max'],
685
+ },
686
+ {
687
+ id: 'glm-5.2',
688
+ name: 'GLM 5.2',
689
+ protocol: 'chat',
690
+ contextWindow: 1000000,
691
+ maxOutputTokens: 131072,
692
+ inputModalities: ['text'],
693
+ inputPrice: 1.4,
694
+ outputPrice: 4.4,
695
+ supportsToolUse: true,
696
+ supportsStreaming: true,
697
+ effortLevels: ['high', 'max'],
698
+ },
699
+ {
700
+ id: 'glm-5.1',
701
+ name: 'GLM 5.1',
702
+ protocol: 'chat',
703
+ contextWindow: 204800,
704
+ maxOutputTokens: 131072,
705
+ inputModalities: ['text'],
706
+ inputPrice: 1.4,
707
+ outputPrice: 4.4,
708
+ supportsToolUse: true,
709
+ supportsStreaming: true,
710
+ effortLevels: [],
711
+ },
712
+ {
713
+ id: 'kimi-k2.6',
714
+ name: 'Kimi K2.6',
715
+ protocol: 'chat',
716
+ contextWindow: 262144,
717
+ maxOutputTokens: 65536,
718
+ inputModalities: ['text', 'image'],
719
+ inputPrice: 0.95,
720
+ outputPrice: 4.0,
721
+ supportsToolUse: true,
722
+ supportsStreaming: true,
723
+ effortLevels: [],
724
+ },
725
+ {
726
+ id: 'kimi-k2.7-code',
727
+ name: 'Kimi K2.7 Code',
728
+ protocol: 'chat',
729
+ contextWindow: 262144,
730
+ maxOutputTokens: 262144,
731
+ inputModalities: ['text', 'image'],
732
+ inputPrice: 0.95,
733
+ outputPrice: 4.0,
734
+ supportsToolUse: true,
735
+ supportsStreaming: true,
736
+ effortLevels: [],
737
+ },
738
+ {
739
+ id: 'kimi-k3',
740
+ name: 'Kimi K3',
741
+ protocol: 'chat',
742
+ contextWindow: 1048576,
743
+ maxOutputTokens: 131072,
744
+ inputModalities: ['text', 'image'],
745
+ inputPrice: 3.0,
746
+ outputPrice: 15.0,
747
+ supportsToolUse: true,
748
+ supportsStreaming: true,
749
+ effortLevels: ['max'],
750
+ },
751
+ {
752
+ id: 'big-pickle',
753
+ supportsAnonymousAccess: true,
754
+ name: 'Big Pickle',
755
+ protocol: 'chat',
756
+ contextWindow: 200000,
757
+ maxOutputTokens: 32000,
758
+ inputModalities: ['text'],
759
+ inputPrice: 0,
760
+ outputPrice: 0,
761
+ supportsToolUse: true,
762
+ supportsStreaming: true,
763
+ effortLevels: [],
764
+ },
765
+ {
766
+ id: 'mimo-v2.5-free',
767
+ supportsAnonymousAccess: true,
768
+ name: 'MiMo-V2.5 Free',
769
+ protocol: 'chat',
770
+ contextWindow: 200000,
771
+ maxOutputTokens: 32000,
772
+ inputModalities: ['text', 'image'],
773
+ inputPrice: 0,
774
+ outputPrice: 0,
775
+ supportsToolUse: true,
776
+ supportsStreaming: true,
777
+ effortLevels: [],
778
+ },
779
+ {
780
+ id: 'ling-3.0-flash-fin-free',
781
+ supportsAnonymousAccess: true,
782
+ name: 'Ling 3.0 Flash Fin Free',
783
+ protocol: 'chat',
784
+ contextWindow: 262144,
785
+ maxOutputTokens: 32768,
786
+ inputModalities: ['text'],
787
+ inputPrice: 0,
788
+ outputPrice: 0,
789
+ supportsToolUse: true,
790
+ supportsStreaming: true,
791
+ effortLevels: [],
792
+ },
793
+ {
794
+ id: 'nemotron-3-ultra-free',
795
+ supportsAnonymousAccess: true,
796
+ name: 'Nemotron 3 Ultra Free',
797
+ protocol: 'chat',
798
+ contextWindow: 1000000,
799
+ maxOutputTokens: 128000,
800
+ inputModalities: ['text'],
801
+ inputPrice: 0,
802
+ outputPrice: 0,
803
+ supportsToolUse: true,
804
+ supportsStreaming: true,
805
+ effortLevels: [],
806
+ },
807
+ {
808
+ id: 'nemotron-3.5-lightning-free',
809
+ supportsAnonymousAccess: true,
810
+ name: 'Nemotron 3.5 Lightning Free',
811
+ protocol: 'chat',
812
+ contextWindow: 262144,
813
+ maxOutputTokens: 262144,
814
+ inputModalities: ['text'],
815
+ inputPrice: 0,
816
+ outputPrice: 0,
817
+ supportsToolUse: true,
818
+ supportsStreaming: true,
819
+ effortLevels: [],
820
+ },
821
+ {
822
+ id: 'muse-spark-1.3-contributor-free',
823
+ supportsAnonymousAccess: true,
824
+ name: 'Muse Spark 1.3 Contributor Free',
825
+ protocol: 'responses',
826
+ contextWindow: 1048576,
827
+ maxOutputTokens: 131072,
828
+ inputModalities: ['text', 'image', 'document'],
829
+ inputPrice: 0,
830
+ outputPrice: 0,
831
+ supportsToolUse: true,
832
+ supportsStreaming: true,
833
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
834
+ },
835
+ ])
836
+
837
+ const GO_MODELS = freezeModels([
838
+ {
839
+ id: 'grok-4.6',
840
+ name: 'Grok 4.6',
841
+ protocol: 'responses',
842
+ contextWindow: 500000,
843
+ maxOutputTokens: 500000,
844
+ inputModalities: ['text', 'image'],
845
+ inputPrice: 2.0,
846
+ outputPrice: 6.0,
847
+ supportsToolUse: true,
848
+ supportsStreaming: true,
849
+ effortLevels: ['low', 'medium', 'high', 'xhigh'],
850
+ },
851
+ {
852
+ id: 'gpt-5.6-luna',
853
+ name: 'GPT 5.6 Luna',
854
+ protocol: 'responses',
855
+ contextWindow: 1050000,
856
+ maxOutputTokens: 128000,
857
+ inputModalities: ['text', 'image', 'document'],
858
+ inputPrice: 0.2,
859
+ outputPrice: 1.2,
860
+ supportsToolUse: true,
861
+ supportsStreaming: true,
862
+ effortLevels: ['none', 'low', 'medium', 'high', 'xhigh', 'max'],
863
+ },
864
+ {
865
+ id: 'glm-5.3-flash',
866
+ name: 'GLM-5.3-Flash',
867
+ protocol: 'chat',
868
+ contextWindow: 1000000,
869
+ maxOutputTokens: 131072,
870
+ inputModalities: ['text', 'image', 'document'],
871
+ inputPrice: 0.15,
872
+ outputPrice: 0.5,
873
+ supportsToolUse: true,
874
+ supportsStreaming: true,
875
+ effortLevels: ['low', 'high', 'max'],
876
+ },
877
+ {
878
+ id: 'glm-5.3',
879
+ name: 'GLM-5.3',
880
+ protocol: 'chat',
881
+ contextWindow: 1000000,
882
+ maxOutputTokens: 131072,
883
+ inputModalities: ['text'],
884
+ inputPrice: 1.4,
885
+ outputPrice: 4.4,
886
+ supportsToolUse: true,
887
+ supportsStreaming: true,
888
+ effortLevels: ['low', 'high', 'max'],
889
+ },
890
+ {
891
+ id: 'glm-5.2',
892
+ name: 'GLM-5.2',
893
+ protocol: 'chat',
894
+ contextWindow: 1000000,
895
+ maxOutputTokens: 131072,
896
+ inputModalities: ['text'],
897
+ inputPrice: 1.4,
898
+ outputPrice: 4.4,
899
+ supportsToolUse: true,
900
+ supportsStreaming: true,
901
+ effortLevels: ['high', 'max'],
902
+ },
903
+ {
904
+ id: 'glm-5.1',
905
+ name: 'GLM-5.1',
906
+ protocol: 'chat',
907
+ contextWindow: 202752,
908
+ maxOutputTokens: 32768,
909
+ inputModalities: ['text'],
910
+ inputPrice: 1.4,
911
+ outputPrice: 4.4,
912
+ supportsToolUse: true,
913
+ supportsStreaming: true,
914
+ effortLevels: [],
915
+ },
916
+ {
917
+ id: 'kimi-k3',
918
+ name: 'Kimi K3',
919
+ protocol: 'chat',
920
+ contextWindow: 1048576,
921
+ maxOutputTokens: 131072,
922
+ inputModalities: ['text', 'image'],
923
+ inputPrice: 3.0,
924
+ outputPrice: 15.0,
925
+ supportsToolUse: true,
926
+ supportsStreaming: true,
927
+ effortLevels: ['max'],
928
+ },
929
+ {
930
+ id: 'kimi-k2.7-code',
931
+ name: 'Kimi K2.7 Code',
932
+ protocol: 'chat',
933
+ contextWindow: 262144,
934
+ maxOutputTokens: 262144,
935
+ inputModalities: ['text', 'image'],
936
+ inputPrice: 0.95,
937
+ outputPrice: 4.0,
938
+ supportsToolUse: true,
939
+ supportsStreaming: true,
940
+ effortLevels: [],
941
+ },
942
+ {
943
+ id: 'kimi-k2.6',
944
+ name: 'Kimi K2.6',
945
+ protocol: 'chat',
946
+ contextWindow: 262144,
947
+ maxOutputTokens: 65536,
948
+ inputModalities: ['text', 'image'],
949
+ inputPrice: 0.95,
950
+ outputPrice: 4.0,
951
+ supportsToolUse: true,
952
+ supportsStreaming: true,
953
+ effortLevels: [],
954
+ },
955
+ {
956
+ id: 'longcat-2.0',
957
+ name: 'LongCat-2.0',
958
+ protocol: 'chat',
959
+ contextWindow: 1000000,
960
+ maxOutputTokens: 131072,
961
+ inputModalities: ['text'],
962
+ inputPrice: 0.3,
963
+ outputPrice: 1.2,
964
+ supportsToolUse: true,
965
+ supportsStreaming: true,
966
+ effortLevels: [],
967
+ },
968
+ {
969
+ id: 'deepseek-v4-pro',
970
+ name: 'DeepSeek V4 Pro',
971
+ protocol: 'chat',
972
+ contextWindow: 1000000,
973
+ maxOutputTokens: 384000,
974
+ inputModalities: ['text'],
975
+ inputPrice: 0.66,
976
+ outputPrice: 1.98,
977
+ supportsToolUse: true,
978
+ supportsStreaming: true,
979
+ effortLevels: ['high', 'max'],
980
+ },
981
+ {
982
+ id: 'deepseek-v4-flash',
983
+ name: 'DeepSeek V4 Flash',
984
+ protocol: 'chat',
985
+ contextWindow: 1000000,
986
+ maxOutputTokens: 384000,
987
+ inputModalities: ['text'],
988
+ inputPrice: 0.22,
989
+ outputPrice: 0.66,
990
+ supportsToolUse: true,
991
+ supportsStreaming: true,
992
+ effortLevels: ['low', 'high', 'max'],
993
+ },
994
+ {
995
+ id: 'deepseek-v4-flash-vision-exp',
996
+ name: 'DeepSeek V4 Flash Vision Exp',
997
+ protocol: 'chat',
998
+ contextWindow: 1000000,
999
+ maxOutputTokens: 384000,
1000
+ inputModalities: ['text', 'image'],
1001
+ inputPrice: 0.22,
1002
+ outputPrice: 0.66,
1003
+ supportsToolUse: true,
1004
+ supportsStreaming: true,
1005
+ effortLevels: ['low', 'high', 'max'],
1006
+ },
1007
+ {
1008
+ id: 'mimo-v2.5',
1009
+ name: 'MiMo-V2.5',
1010
+ protocol: 'chat',
1011
+ contextWindow: 1000000,
1012
+ maxOutputTokens: 128000,
1013
+ inputModalities: ['text', 'image'],
1014
+ inputPrice: 0.14,
1015
+ outputPrice: 0.28,
1016
+ supportsToolUse: true,
1017
+ supportsStreaming: true,
1018
+ effortLevels: [],
1019
+ },
1020
+ {
1021
+ id: 'mimo-v2.5-pro',
1022
+ name: 'MiMo-V2.5-Pro',
1023
+ protocol: 'chat',
1024
+ contextWindow: 1048576,
1025
+ maxOutputTokens: 128000,
1026
+ inputModalities: ['text'],
1027
+ inputPrice: 0.435,
1028
+ outputPrice: 0.87,
1029
+ supportsToolUse: true,
1030
+ supportsStreaming: true,
1031
+ effortLevels: [],
1032
+ },
1033
+ {
1034
+ id: 'minimax-m3',
1035
+ name: 'MiniMax M3',
1036
+ protocol: 'messages',
1037
+ contextWindow: 1000000,
1038
+ maxOutputTokens: 131072,
1039
+ inputModalities: ['text', 'image'],
1040
+ inputPrice: 0.3,
1041
+ outputPrice: 1.2,
1042
+ supportsToolUse: true,
1043
+ supportsStreaming: true,
1044
+ effortLevels: [],
1045
+ },
1046
+ {
1047
+ id: 'minimax-m2.7',
1048
+ name: 'MiniMax M2.7',
1049
+ protocol: 'messages',
1050
+ contextWindow: 204800,
1051
+ maxOutputTokens: 131072,
1052
+ inputModalities: ['text'],
1053
+ inputPrice: 0.3,
1054
+ outputPrice: 1.2,
1055
+ supportsToolUse: true,
1056
+ supportsStreaming: true,
1057
+ effortLevels: [],
1058
+ },
1059
+ {
1060
+ id: 'muse-spark-1.3-contributor',
1061
+ name: 'Muse Spark 1.3 Contributor',
1062
+ protocol: 'responses',
1063
+ contextWindow: 1048576,
1064
+ maxOutputTokens: 131072,
1065
+ inputModalities: ['text', 'image', 'document'],
1066
+ inputPrice: 0.1,
1067
+ outputPrice: 0.2,
1068
+ supportsToolUse: true,
1069
+ supportsStreaming: true,
1070
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
1071
+ },
1072
+ {
1073
+ id: 'muse-spark-1.2-contributor',
1074
+ name: 'Muse Spark 1.2 Contributor',
1075
+ protocol: 'responses',
1076
+ contextWindow: 1048576,
1077
+ maxOutputTokens: 131072,
1078
+ inputModalities: ['text', 'image', 'document'],
1079
+ inputPrice: 0.1,
1080
+ outputPrice: 0.2,
1081
+ supportsToolUse: true,
1082
+ supportsStreaming: true,
1083
+ effortLevels: ['minimal', 'low', 'medium', 'high', 'xhigh'],
1084
+ },
1085
+ {
1086
+ id: 'qwen3.8-max',
1087
+ name: 'Qwen3.8 Max',
1088
+ protocol: 'messages',
1089
+ contextWindow: 1000000,
1090
+ maxOutputTokens: 131072,
1091
+ inputModalities: ['text', 'image'],
1092
+ inputPrice: 2.0,
1093
+ outputPrice: 6.0,
1094
+ supportsToolUse: true,
1095
+ supportsStreaming: true,
1096
+ effortLevels: ['low', 'medium', 'xhigh'],
1097
+ },
1098
+ {
1099
+ id: 'qwen3.8-flash',
1100
+ name: 'Qwen3.8 Flash',
1101
+ protocol: 'messages',
1102
+ contextWindow: 1000000,
1103
+ maxOutputTokens: 131072,
1104
+ inputModalities: ['text', 'image'],
1105
+ inputPrice: 0.15,
1106
+ outputPrice: 0.47,
1107
+ supportsToolUse: true,
1108
+ supportsStreaming: true,
1109
+ effortLevels: ['low', 'medium', 'xhigh'],
1110
+ },
1111
+ {
1112
+ id: 'qwen3.7-max',
1113
+ name: 'Qwen3.7 Max',
1114
+ protocol: 'messages',
1115
+ contextWindow: 1000000,
1116
+ maxOutputTokens: 65536,
1117
+ inputModalities: ['text'],
1118
+ inputPrice: 2.5,
1119
+ outputPrice: 7.5,
1120
+ supportsToolUse: true,
1121
+ supportsStreaming: true,
1122
+ effortLevels: [],
1123
+ },
1124
+ {
1125
+ id: 'qwen3.7-plus',
1126
+ name: 'Qwen3.7 Plus',
1127
+ protocol: 'messages',
1128
+ contextWindow: 1000000,
1129
+ maxOutputTokens: 65536,
1130
+ inputModalities: ['text', 'image'],
1131
+ inputPrice: 0.4,
1132
+ outputPrice: 1.6,
1133
+ supportsToolUse: true,
1134
+ supportsStreaming: true,
1135
+ effortLevels: [],
1136
+ },
1137
+ {
1138
+ id: 'qwen3.6-plus',
1139
+ name: 'Qwen3.6 Plus',
1140
+ protocol: 'messages',
1141
+ contextWindow: 1000000,
1142
+ maxOutputTokens: 65536,
1143
+ inputModalities: ['text', 'image'],
1144
+ inputPrice: 0.5,
1145
+ outputPrice: 3.0,
1146
+ supportsToolUse: true,
1147
+ supportsStreaming: true,
1148
+ effortLevels: [],
1149
+ },
1150
+ {
1151
+ id: 'hy4-preview',
1152
+ name: 'Hy4 preview',
1153
+ protocol: 'chat',
1154
+ contextWindow: 1024000,
1155
+ maxOutputTokens: 64000,
1156
+ inputModalities: ['text'],
1157
+ inputPrice: 0.834,
1158
+ outputPrice: 2.501,
1159
+ supportsToolUse: true,
1160
+ supportsStreaming: true,
1161
+ effortLevels: ['none', 'high'],
1162
+ },
1163
+ {
1164
+ id: 'hy3',
1165
+ name: 'Hy3',
1166
+ protocol: 'chat',
1167
+ contextWindow: 256000,
1168
+ maxOutputTokens: 128000,
1169
+ inputModalities: ['text'],
1170
+ inputPrice: 0.14,
1171
+ outputPrice: 0.58,
1172
+ supportsToolUse: true,
1173
+ supportsStreaming: true,
1174
+ effortLevels: ['none', 'low', 'high'],
1175
+ },
1176
+ {
1177
+ id: 'omen-alpha',
1178
+ name: 'Omen Alpha',
1179
+ protocol: 'chat',
1180
+ contextWindow: 500000,
1181
+ maxOutputTokens: 128000,
1182
+ inputModalities: ['text', 'image'],
1183
+ inputPrice: 0.2,
1184
+ outputPrice: 0.66,
1185
+ supportsToolUse: true,
1186
+ supportsStreaming: true,
1187
+ effortLevels: ['low', 'high'],
1188
+ },
1189
+ ])
1190
+
1191
+ /** Supported metadata; actual account availability is established by live discovery. */
1192
+ export function getZenModels(service: ZenService): readonly ZenModel[] {
1193
+ return service === 'zen' ? ZEN_MODELS : GO_MODELS
1194
+ }
1195
+
1196
+ /** Exact wire ID lookup. Zen CLI prefixes and unknown IDs are not guessed. */
1197
+ export function findZenModel(service: ZenService, id: string): ZenModel | undefined {
1198
+ return getZenModels(service).find((model) => model.id === id)
1199
+ }