@agi-cli/sdk 0.1.104 → 0.1.105

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agi-cli/sdk",
3
- "version": "0.1.104",
3
+ "version": "0.1.105",
4
4
  "description": "AI agent SDK for building intelligent assistants - tree-shakable and comprehensive",
5
5
  "author": "ntishxyz",
6
6
  "license": "MIT",
@@ -25,6 +25,8 @@ const DEFAULTS: {
25
25
  openrouter: { enabled: false },
26
26
  opencode: { enabled: false },
27
27
  solforge: { enabled: false },
28
+ zai: { enabled: false },
29
+ 'zai-coding': { enabled: false },
28
30
  },
29
31
  };
30
32
 
@@ -11,7 +11,9 @@ export type ProviderName =
11
11
  | 'google'
12
12
  | 'openrouter'
13
13
  | 'opencode'
14
- | 'solforge';
14
+ | 'solforge'
15
+ | 'zai'
16
+ | 'zai-coding';
15
17
 
16
18
  export type ModelConfig = {
17
19
  apiKey?: string;
@@ -133,6 +135,42 @@ export async function resolveModel(
133
135
  );
134
136
  }
135
137
 
138
+ if (provider === 'zai') {
139
+ const entry = catalog[provider];
140
+ const apiKey =
141
+ config.apiKey ||
142
+ process.env.ZAI_API_KEY ||
143
+ process.env.ZHIPU_API_KEY ||
144
+ '';
145
+ const baseURL =
146
+ config.baseURL || entry?.api || 'https://api.z.ai/api/paas/v4';
147
+ const headers = apiKey ? { Authorization: `Bearer ${apiKey}` } : undefined;
148
+ const instance = createOpenAICompatible({
149
+ name: entry?.label ?? 'Z.AI',
150
+ baseURL,
151
+ headers,
152
+ });
153
+ return instance(model);
154
+ }
155
+
156
+ if (provider === 'zai-coding') {
157
+ const entry = catalog[provider];
158
+ const apiKey =
159
+ config.apiKey ||
160
+ process.env.ZAI_API_KEY ||
161
+ process.env.ZHIPU_API_KEY ||
162
+ '';
163
+ const baseURL =
164
+ config.baseURL || entry?.api || 'https://api.z.ai/api/coding/paas/v4';
165
+ const headers = apiKey ? { Authorization: `Bearer ${apiKey}` } : undefined;
166
+ const instance = createOpenAICompatible({
167
+ name: entry?.label ?? 'Z.AI Coding',
168
+ baseURL,
169
+ headers,
170
+ });
171
+ return instance(model);
172
+ }
173
+
136
174
  throw new Error(`Unsupported provider: ${provider}`);
137
175
  }
138
176
 
@@ -509,7 +509,32 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
509
509
  label: 'GPT-5.1 Codex',
510
510
  modalities: {
511
511
  input: ['text', 'image'],
512
- output: ['text', 'image'],
512
+ output: ['text'],
513
+ },
514
+ toolCall: true,
515
+ reasoning: true,
516
+ attachment: true,
517
+ temperature: false,
518
+ knowledge: '2024-09-30',
519
+ releaseDate: '2025-11-13',
520
+ lastUpdated: '2025-11-13',
521
+ openWeights: false,
522
+ cost: {
523
+ input: 1.25,
524
+ output: 10,
525
+ cacheRead: 0.125,
526
+ },
527
+ limit: {
528
+ context: 400000,
529
+ output: 128000,
530
+ },
531
+ },
532
+ {
533
+ id: 'gpt-5.1-codex-max',
534
+ label: 'GPT-5.1 Codex Max',
535
+ modalities: {
536
+ input: ['text', 'image'],
537
+ output: ['text'],
513
538
  },
514
539
  toolCall: true,
515
540
  reasoning: true,
@@ -554,6 +579,80 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
554
579
  output: 128000,
555
580
  },
556
581
  },
582
+ {
583
+ id: 'gpt-5.2',
584
+ label: 'GPT-5.2',
585
+ modalities: {
586
+ input: ['text', 'image'],
587
+ output: ['text'],
588
+ },
589
+ toolCall: true,
590
+ reasoning: true,
591
+ attachment: true,
592
+ temperature: false,
593
+ knowledge: '2025-08-31',
594
+ releaseDate: '2025-12-11',
595
+ lastUpdated: '2025-12-11',
596
+ openWeights: false,
597
+ cost: {
598
+ input: 1.75,
599
+ output: 14,
600
+ cacheRead: 0.175,
601
+ },
602
+ limit: {
603
+ context: 400000,
604
+ output: 128000,
605
+ },
606
+ },
607
+ {
608
+ id: 'gpt-5.2-chat-latest',
609
+ label: 'GPT-5.2 Chat',
610
+ modalities: {
611
+ input: ['text', 'image'],
612
+ output: ['text'],
613
+ },
614
+ toolCall: true,
615
+ reasoning: true,
616
+ attachment: true,
617
+ temperature: false,
618
+ knowledge: '2025-08-31',
619
+ releaseDate: '2025-12-11',
620
+ lastUpdated: '2025-12-11',
621
+ openWeights: false,
622
+ cost: {
623
+ input: 1.75,
624
+ output: 14,
625
+ cacheRead: 0.175,
626
+ },
627
+ limit: {
628
+ context: 128000,
629
+ output: 16384,
630
+ },
631
+ },
632
+ {
633
+ id: 'gpt-5.2-pro',
634
+ label: 'GPT-5.2 Pro',
635
+ modalities: {
636
+ input: ['text', 'image'],
637
+ output: ['text'],
638
+ },
639
+ toolCall: true,
640
+ reasoning: true,
641
+ attachment: true,
642
+ temperature: false,
643
+ knowledge: '2025-08-31',
644
+ releaseDate: '2025-12-11',
645
+ lastUpdated: '2025-12-11',
646
+ openWeights: false,
647
+ cost: {
648
+ input: 21,
649
+ output: 168,
650
+ },
651
+ limit: {
652
+ context: 400000,
653
+ output: 128000,
654
+ },
655
+ },
557
656
  {
558
657
  id: 'o1',
559
658
  label: 'o1',
@@ -887,7 +986,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
887
986
  id: 'claude-3-5-haiku-20241022',
888
987
  label: 'Claude Haiku 3.5',
889
988
  modalities: {
890
- input: ['text', 'image'],
989
+ input: ['text', 'image', 'pdf'],
891
990
  output: ['text'],
892
991
  },
893
992
  toolCall: true,
@@ -912,7 +1011,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
912
1011
  id: 'claude-3-5-haiku-latest',
913
1012
  label: 'Claude Haiku 3.5 (latest)',
914
1013
  modalities: {
915
- input: ['text', 'image'],
1014
+ input: ['text', 'image', 'pdf'],
916
1015
  output: ['text'],
917
1016
  },
918
1017
  toolCall: true,
@@ -937,7 +1036,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
937
1036
  id: 'claude-3-5-sonnet-20240620',
938
1037
  label: 'Claude Sonnet 3.5',
939
1038
  modalities: {
940
- input: ['text', 'image'],
1039
+ input: ['text', 'image', 'pdf'],
941
1040
  output: ['text'],
942
1041
  },
943
1042
  toolCall: true,
@@ -962,7 +1061,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
962
1061
  id: 'claude-3-5-sonnet-20241022',
963
1062
  label: 'Claude Sonnet 3.5 v2',
964
1063
  modalities: {
965
- input: ['text', 'image'],
1064
+ input: ['text', 'image', 'pdf'],
966
1065
  output: ['text'],
967
1066
  },
968
1067
  toolCall: true,
@@ -987,7 +1086,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
987
1086
  id: 'claude-3-7-sonnet-20250219',
988
1087
  label: 'Claude Sonnet 3.7',
989
1088
  modalities: {
990
- input: ['text', 'image'],
1089
+ input: ['text', 'image', 'pdf'],
991
1090
  output: ['text'],
992
1091
  },
993
1092
  toolCall: true,
@@ -1012,7 +1111,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1012
1111
  id: 'claude-3-7-sonnet-latest',
1013
1112
  label: 'Claude Sonnet 3.7 (latest)',
1014
1113
  modalities: {
1015
- input: ['text', 'image'],
1114
+ input: ['text', 'image', 'pdf'],
1016
1115
  output: ['text'],
1017
1116
  },
1018
1117
  toolCall: true,
@@ -1037,7 +1136,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1037
1136
  id: 'claude-3-haiku-20240307',
1038
1137
  label: 'Claude Haiku 3',
1039
1138
  modalities: {
1040
- input: ['text', 'image'],
1139
+ input: ['text', 'image', 'pdf'],
1041
1140
  output: ['text'],
1042
1141
  },
1043
1142
  toolCall: true,
@@ -1062,7 +1161,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1062
1161
  id: 'claude-3-opus-20240229',
1063
1162
  label: 'Claude Opus 3',
1064
1163
  modalities: {
1065
- input: ['text', 'image'],
1164
+ input: ['text', 'image', 'pdf'],
1066
1165
  output: ['text'],
1067
1166
  },
1068
1167
  toolCall: true,
@@ -1087,7 +1186,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1087
1186
  id: 'claude-3-sonnet-20240229',
1088
1187
  label: 'Claude Sonnet 3',
1089
1188
  modalities: {
1090
- input: ['text', 'image'],
1189
+ input: ['text', 'image', 'pdf'],
1091
1190
  output: ['text'],
1092
1191
  },
1093
1192
  toolCall: true,
@@ -1112,7 +1211,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1112
1211
  id: 'claude-haiku-4-5',
1113
1212
  label: 'Claude Haiku 4.5 (latest)',
1114
1213
  modalities: {
1115
- input: ['text', 'image'],
1214
+ input: ['text', 'image', 'pdf'],
1116
1215
  output: ['text'],
1117
1216
  },
1118
1217
  toolCall: true,
@@ -1137,7 +1236,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1137
1236
  id: 'claude-haiku-4-5-20251001',
1138
1237
  label: 'Claude Haiku 4.5',
1139
1238
  modalities: {
1140
- input: ['text', 'image'],
1239
+ input: ['text', 'image', 'pdf'],
1141
1240
  output: ['text'],
1142
1241
  },
1143
1242
  toolCall: true,
@@ -1162,7 +1261,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1162
1261
  id: 'claude-opus-4-0',
1163
1262
  label: 'Claude Opus 4 (latest)',
1164
1263
  modalities: {
1165
- input: ['text', 'image'],
1264
+ input: ['text', 'image', 'pdf'],
1166
1265
  output: ['text'],
1167
1266
  },
1168
1267
  toolCall: true,
@@ -1187,7 +1286,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1187
1286
  id: 'claude-opus-4-1',
1188
1287
  label: 'Claude Opus 4.1 (latest)',
1189
1288
  modalities: {
1190
- input: ['text', 'image'],
1289
+ input: ['text', 'image', 'pdf'],
1191
1290
  output: ['text'],
1192
1291
  },
1193
1292
  toolCall: true,
@@ -1212,7 +1311,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1212
1311
  id: 'claude-opus-4-1-20250805',
1213
1312
  label: 'Claude Opus 4.1',
1214
1313
  modalities: {
1215
- input: ['text', 'image'],
1314
+ input: ['text', 'image', 'pdf'],
1216
1315
  output: ['text'],
1217
1316
  },
1218
1317
  toolCall: true,
@@ -1237,7 +1336,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1237
1336
  id: 'claude-opus-4-20250514',
1238
1337
  label: 'Claude Opus 4',
1239
1338
  modalities: {
1240
- input: ['text', 'image'],
1339
+ input: ['text', 'image', 'pdf'],
1241
1340
  output: ['text'],
1242
1341
  },
1243
1342
  toolCall: true,
@@ -1262,7 +1361,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1262
1361
  id: 'claude-opus-4-5',
1263
1362
  label: 'Claude Opus 4.5 (latest)',
1264
1363
  modalities: {
1265
- input: ['text', 'image'],
1364
+ input: ['text', 'image', 'pdf'],
1266
1365
  output: ['text'],
1267
1366
  },
1268
1367
  toolCall: true,
@@ -1287,7 +1386,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1287
1386
  id: 'claude-opus-4-5-20251101',
1288
1387
  label: 'Claude Opus 4.5',
1289
1388
  modalities: {
1290
- input: ['text', 'image'],
1389
+ input: ['text', 'image', 'pdf'],
1291
1390
  output: ['text'],
1292
1391
  },
1293
1392
  toolCall: true,
@@ -1312,7 +1411,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1312
1411
  id: 'claude-sonnet-4-0',
1313
1412
  label: 'Claude Sonnet 4 (latest)',
1314
1413
  modalities: {
1315
- input: ['text', 'image'],
1414
+ input: ['text', 'image', 'pdf'],
1316
1415
  output: ['text'],
1317
1416
  },
1318
1417
  toolCall: true,
@@ -1337,7 +1436,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1337
1436
  id: 'claude-sonnet-4-20250514',
1338
1437
  label: 'Claude Sonnet 4',
1339
1438
  modalities: {
1340
- input: ['text', 'image'],
1439
+ input: ['text', 'image', 'pdf'],
1341
1440
  output: ['text'],
1342
1441
  },
1343
1442
  toolCall: true,
@@ -1362,7 +1461,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1362
1461
  id: 'claude-sonnet-4-5',
1363
1462
  label: 'Claude Sonnet 4.5 (latest)',
1364
1463
  modalities: {
1365
- input: ['text', 'image'],
1464
+ input: ['text', 'image', 'pdf'],
1366
1465
  output: ['text'],
1367
1466
  },
1368
1467
  toolCall: true,
@@ -1387,7 +1486,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1387
1486
  id: 'claude-sonnet-4-5-20250929',
1388
1487
  label: 'Claude Sonnet 4.5',
1389
1488
  modalities: {
1390
- input: ['text', 'image'],
1489
+ input: ['text', 'image', 'pdf'],
1391
1490
  output: ['text'],
1392
1491
  },
1393
1492
  toolCall: true,
@@ -1889,6 +1988,31 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
1889
1988
  output: 16000,
1890
1989
  },
1891
1990
  },
1991
+ {
1992
+ id: 'gemini-3-flash-preview',
1993
+ label: 'Gemini 3 Flash Preview',
1994
+ modalities: {
1995
+ input: ['text', 'image', 'video', 'audio', 'pdf'],
1996
+ output: ['text'],
1997
+ },
1998
+ toolCall: true,
1999
+ reasoning: true,
2000
+ attachment: true,
2001
+ temperature: true,
2002
+ knowledge: '2025-01',
2003
+ releaseDate: '2025-12-17',
2004
+ lastUpdated: '2025-12-17',
2005
+ openWeights: false,
2006
+ cost: {
2007
+ input: 0.5,
2008
+ output: 3,
2009
+ cacheRead: 0.05,
2010
+ },
2011
+ limit: {
2012
+ context: 1048576,
2013
+ output: 65536,
2014
+ },
2015
+ },
1892
2016
  {
1893
2017
  id: 'gemini-3-pro-preview',
1894
2018
  label: 'Gemini 3 Pro Preview',
@@ -2049,7 +2173,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2049
2173
  id: 'anthropic/claude-3.5-haiku',
2050
2174
  label: 'Claude Haiku 3.5',
2051
2175
  modalities: {
2052
- input: ['text', 'image'],
2176
+ input: ['text', 'image', 'pdf'],
2053
2177
  output: ['text'],
2054
2178
  },
2055
2179
  toolCall: true,
@@ -2074,7 +2198,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2074
2198
  id: 'anthropic/claude-3.7-sonnet',
2075
2199
  label: 'Claude Sonnet 3.7',
2076
2200
  modalities: {
2077
- input: ['text', 'image'],
2201
+ input: ['text', 'image', 'pdf'],
2078
2202
  output: ['text'],
2079
2203
  },
2080
2204
  toolCall: true,
@@ -2099,7 +2223,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2099
2223
  id: 'anthropic/claude-haiku-4.5',
2100
2224
  label: 'Claude Haiku 4.5',
2101
2225
  modalities: {
2102
- input: ['text', 'image'],
2226
+ input: ['text', 'image', 'pdf'],
2103
2227
  output: ['text'],
2104
2228
  },
2105
2229
  toolCall: true,
@@ -2124,7 +2248,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2124
2248
  id: 'anthropic/claude-opus-4',
2125
2249
  label: 'Claude Opus 4',
2126
2250
  modalities: {
2127
- input: ['text', 'image'],
2251
+ input: ['text', 'image', 'pdf'],
2128
2252
  output: ['text'],
2129
2253
  },
2130
2254
  toolCall: true,
@@ -2149,7 +2273,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2149
2273
  id: 'anthropic/claude-opus-4.1',
2150
2274
  label: 'Claude Opus 4.1',
2151
2275
  modalities: {
2152
- input: ['text', 'image'],
2276
+ input: ['text', 'image', 'pdf'],
2153
2277
  output: ['text'],
2154
2278
  },
2155
2279
  toolCall: true,
@@ -2174,7 +2298,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2174
2298
  id: 'anthropic/claude-opus-4.5',
2175
2299
  label: 'Claude Opus 4.5',
2176
2300
  modalities: {
2177
- input: ['text', 'image'],
2301
+ input: ['text', 'image', 'pdf'],
2178
2302
  output: ['text'],
2179
2303
  },
2180
2304
  toolCall: true,
@@ -2199,7 +2323,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2199
2323
  id: 'anthropic/claude-sonnet-4',
2200
2324
  label: 'Claude Sonnet 4',
2201
2325
  modalities: {
2202
- input: ['text', 'image'],
2326
+ input: ['text', 'image', 'pdf'],
2203
2327
  output: ['text'],
2204
2328
  },
2205
2329
  toolCall: true,
@@ -2224,7 +2348,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2224
2348
  id: 'anthropic/claude-sonnet-4.5',
2225
2349
  label: 'Claude Sonnet 4.5',
2226
2350
  modalities: {
2227
- input: ['text', 'image'],
2351
+ input: ['text', 'image', 'pdf'],
2228
2352
  output: ['text'],
2229
2353
  },
2230
2354
  toolCall: true,
@@ -2533,6 +2657,60 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2533
2657
  output: 65536,
2534
2658
  },
2535
2659
  },
2660
+ {
2661
+ id: 'deepseek/deepseek-v3.2',
2662
+ label: 'DeepSeek V3.2',
2663
+ modalities: {
2664
+ input: ['text'],
2665
+ output: ['text'],
2666
+ },
2667
+ toolCall: true,
2668
+ reasoning: true,
2669
+ attachment: false,
2670
+ temperature: true,
2671
+ knowledge: '2024-07',
2672
+ releaseDate: '2025-12-01',
2673
+ lastUpdated: '2025-12-01',
2674
+ openWeights: true,
2675
+ cost: {
2676
+ input: 0.28,
2677
+ output: 0.4,
2678
+ },
2679
+ limit: {
2680
+ context: 163840,
2681
+ output: 65536,
2682
+ },
2683
+ provider: {
2684
+ npm: '@openrouter/ai-sdk-provider',
2685
+ },
2686
+ },
2687
+ {
2688
+ id: 'deepseek/deepseek-v3.2-speciale',
2689
+ label: 'DeepSeek V3.2 Speciale',
2690
+ modalities: {
2691
+ input: ['text'],
2692
+ output: ['text'],
2693
+ },
2694
+ toolCall: true,
2695
+ reasoning: true,
2696
+ attachment: false,
2697
+ temperature: true,
2698
+ knowledge: '2024-07',
2699
+ releaseDate: '2025-12-01',
2700
+ lastUpdated: '2025-12-01',
2701
+ openWeights: true,
2702
+ cost: {
2703
+ input: 0.27,
2704
+ output: 0.41,
2705
+ },
2706
+ limit: {
2707
+ context: 163840,
2708
+ output: 65536,
2709
+ },
2710
+ provider: {
2711
+ npm: '@openrouter/ai-sdk-provider',
2712
+ },
2713
+ },
2536
2714
  {
2537
2715
  id: 'featherless/qwerky-72b',
2538
2716
  label: 'Qwerky 72B',
@@ -2781,6 +2959,34 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
2781
2959
  output: 65536,
2782
2960
  },
2783
2961
  },
2962
+ {
2963
+ id: 'google/gemini-3-flash-preview',
2964
+ label: 'Gemini 3 Flash Preview',
2965
+ modalities: {
2966
+ input: ['text', 'image', 'audio', 'video', 'pdf'],
2967
+ output: ['text'],
2968
+ },
2969
+ toolCall: true,
2970
+ reasoning: true,
2971
+ attachment: true,
2972
+ temperature: true,
2973
+ knowledge: '2025-01',
2974
+ releaseDate: '2025-12-17',
2975
+ lastUpdated: '2025-12-17',
2976
+ openWeights: false,
2977
+ cost: {
2978
+ input: 0.5,
2979
+ output: 3,
2980
+ cacheRead: 0.05,
2981
+ },
2982
+ limit: {
2983
+ context: 1048576,
2984
+ output: 65536,
2985
+ },
2986
+ provider: {
2987
+ npm: '@openrouter/ai-sdk-provider',
2988
+ },
2989
+ },
2784
2990
  {
2785
2991
  id: 'google/gemini-3-pro-preview',
2786
2992
  label: 'Gemini 3 Pro Preview',
@@ -3121,6 +3327,32 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
3121
3327
  npm: '@openrouter/ai-sdk-provider',
3122
3328
  },
3123
3329
  },
3330
+ {
3331
+ id: 'minimax/minimax-m2.1',
3332
+ label: 'MiniMax M2.1',
3333
+ modalities: {
3334
+ input: ['text'],
3335
+ output: ['text'],
3336
+ },
3337
+ toolCall: true,
3338
+ reasoning: true,
3339
+ attachment: false,
3340
+ temperature: true,
3341
+ releaseDate: '2025-12-23',
3342
+ lastUpdated: '2025-12-23',
3343
+ openWeights: true,
3344
+ cost: {
3345
+ input: 0.3,
3346
+ output: 1.2,
3347
+ },
3348
+ limit: {
3349
+ context: 204800,
3350
+ output: 131072,
3351
+ },
3352
+ provider: {
3353
+ npm: '@openrouter/ai-sdk-provider',
3354
+ },
3355
+ },
3124
3356
  {
3125
3357
  id: 'mistralai/codestral-2508',
3126
3358
  label: 'Codestral 2508',
@@ -3146,8 +3378,8 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
3146
3378
  },
3147
3379
  },
3148
3380
  {
3149
- id: 'mistralai/devstral-medium-2507',
3150
- label: 'Devstral Medium',
3381
+ id: 'mistralai/devstral-2512',
3382
+ label: 'Devstral 2 2512',
3151
3383
  modalities: {
3152
3384
  input: ['text'],
3153
3385
  output: ['text'],
@@ -3156,16 +3388,64 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
3156
3388
  reasoning: false,
3157
3389
  attachment: false,
3158
3390
  temperature: true,
3159
- knowledge: '2025-05',
3160
- releaseDate: '2025-07-10',
3161
- lastUpdated: '2025-07-10',
3391
+ knowledge: '2025-12',
3392
+ releaseDate: '2025-09-12',
3393
+ lastUpdated: '2025-09-12',
3162
3394
  openWeights: true,
3163
3395
  cost: {
3164
- input: 0.4,
3165
- output: 2,
3396
+ input: 0.15,
3397
+ output: 0.6,
3166
3398
  },
3167
3399
  limit: {
3168
- context: 131072,
3400
+ context: 262144,
3401
+ output: 262144,
3402
+ },
3403
+ },
3404
+ {
3405
+ id: 'mistralai/devstral-2512:free',
3406
+ label: 'Devstral 2 2512 (free)',
3407
+ modalities: {
3408
+ input: ['text'],
3409
+ output: ['text'],
3410
+ },
3411
+ toolCall: true,
3412
+ reasoning: false,
3413
+ attachment: false,
3414
+ temperature: true,
3415
+ knowledge: '2025-12',
3416
+ releaseDate: '2025-09-12',
3417
+ lastUpdated: '2025-09-12',
3418
+ openWeights: true,
3419
+ cost: {
3420
+ input: 0,
3421
+ output: 0,
3422
+ },
3423
+ limit: {
3424
+ context: 262144,
3425
+ output: 262144,
3426
+ },
3427
+ },
3428
+ {
3429
+ id: 'mistralai/devstral-medium-2507',
3430
+ label: 'Devstral Medium',
3431
+ modalities: {
3432
+ input: ['text'],
3433
+ output: ['text'],
3434
+ },
3435
+ toolCall: true,
3436
+ reasoning: false,
3437
+ attachment: false,
3438
+ temperature: true,
3439
+ knowledge: '2025-05',
3440
+ releaseDate: '2025-07-10',
3441
+ lastUpdated: '2025-07-10',
3442
+ openWeights: true,
3443
+ cost: {
3444
+ input: 0.4,
3445
+ output: 2,
3446
+ },
3447
+ limit: {
3448
+ context: 131072,
3169
3449
  output: 131072,
3170
3450
  },
3171
3451
  },
@@ -3998,6 +4278,80 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
3998
4278
  output: 100000,
3999
4279
  },
4000
4280
  },
4281
+ {
4282
+ id: 'openai/gpt-5.2',
4283
+ label: 'GPT-5.2',
4284
+ modalities: {
4285
+ input: ['text', 'image'],
4286
+ output: ['text'],
4287
+ },
4288
+ toolCall: true,
4289
+ reasoning: true,
4290
+ attachment: true,
4291
+ temperature: false,
4292
+ knowledge: '2025-08-31',
4293
+ releaseDate: '2025-12-11',
4294
+ lastUpdated: '2025-12-11',
4295
+ openWeights: false,
4296
+ cost: {
4297
+ input: 1.75,
4298
+ output: 14,
4299
+ cacheRead: 0.175,
4300
+ },
4301
+ limit: {
4302
+ context: 400000,
4303
+ output: 128000,
4304
+ },
4305
+ },
4306
+ {
4307
+ id: 'openai/gpt-5.2-chat-latest',
4308
+ label: 'GPT-5.2 Chat',
4309
+ modalities: {
4310
+ input: ['text', 'image'],
4311
+ output: ['text'],
4312
+ },
4313
+ toolCall: true,
4314
+ reasoning: true,
4315
+ attachment: true,
4316
+ temperature: false,
4317
+ knowledge: '2025-08-31',
4318
+ releaseDate: '2025-12-11',
4319
+ lastUpdated: '2025-12-11',
4320
+ openWeights: false,
4321
+ cost: {
4322
+ input: 1.75,
4323
+ output: 14,
4324
+ cacheRead: 0.175,
4325
+ },
4326
+ limit: {
4327
+ context: 128000,
4328
+ output: 16384,
4329
+ },
4330
+ },
4331
+ {
4332
+ id: 'openai/gpt-5.2-pro',
4333
+ label: 'GPT-5.2 Pro',
4334
+ modalities: {
4335
+ input: ['text', 'image'],
4336
+ output: ['text'],
4337
+ },
4338
+ toolCall: true,
4339
+ reasoning: true,
4340
+ attachment: true,
4341
+ temperature: false,
4342
+ knowledge: '2025-08-31',
4343
+ releaseDate: '2025-12-11',
4344
+ lastUpdated: '2025-12-11',
4345
+ openWeights: false,
4346
+ cost: {
4347
+ input: 21,
4348
+ output: 168,
4349
+ },
4350
+ limit: {
4351
+ context: 400000,
4352
+ output: 128000,
4353
+ },
4354
+ },
4001
4355
  {
4002
4356
  id: 'openai/gpt-oss-120b',
4003
4357
  label: 'GPT OSS 120B',
@@ -4115,6 +4469,54 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
4115
4469
  output: 100000,
4116
4470
  },
4117
4471
  },
4472
+ {
4473
+ id: 'openrouter/sherlock-dash-alpha',
4474
+ label: 'Sherlock Dash Alpha',
4475
+ modalities: {
4476
+ input: ['text', 'image'],
4477
+ output: ['text'],
4478
+ },
4479
+ toolCall: true,
4480
+ reasoning: false,
4481
+ attachment: true,
4482
+ temperature: true,
4483
+ knowledge: '2025-11',
4484
+ releaseDate: '2025-11-15',
4485
+ lastUpdated: '2025-12-14',
4486
+ openWeights: false,
4487
+ cost: {
4488
+ input: 0,
4489
+ output: 0,
4490
+ },
4491
+ limit: {
4492
+ context: 1840000,
4493
+ output: 0,
4494
+ },
4495
+ },
4496
+ {
4497
+ id: 'openrouter/sherlock-think-alpha',
4498
+ label: 'Sherlock Think Alpha',
4499
+ modalities: {
4500
+ input: ['text', 'image'],
4501
+ output: ['text'],
4502
+ },
4503
+ toolCall: true,
4504
+ reasoning: true,
4505
+ attachment: true,
4506
+ temperature: true,
4507
+ knowledge: '2025-11',
4508
+ releaseDate: '2025-11-15',
4509
+ lastUpdated: '2025-12-14',
4510
+ openWeights: false,
4511
+ cost: {
4512
+ input: 0,
4513
+ output: 0,
4514
+ },
4515
+ limit: {
4516
+ context: 1840000,
4517
+ output: 0,
4518
+ },
4519
+ },
4118
4520
  {
4119
4521
  id: 'qwen/qwen-2.5-coder-32b-instruct',
4120
4522
  label: 'Qwen2.5 Coder 32B Instruct',
@@ -5084,44 +5486,44 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5084
5486
  output: 128000,
5085
5487
  },
5086
5488
  },
5087
- ],
5088
- label: 'OpenRouter',
5089
- env: ['OPENROUTER_API_KEY'],
5090
- npm: '@ai-sdk/openai-compatible',
5091
- api: 'https://openrouter.ai/api/v1',
5092
- doc: 'https://openrouter.ai/models',
5093
- },
5094
- opencode: {
5095
- id: 'opencode',
5096
- models: [
5097
5489
  {
5098
- id: 'alpha-doubao-seed-code',
5099
- label: 'Doubao Seed Code (alpha)',
5490
+ id: 'z-ai/glm-4.7',
5491
+ label: 'GLM-4.7',
5100
5492
  modalities: {
5101
- input: ['text', 'image', 'video'],
5493
+ input: ['text'],
5102
5494
  output: ['text'],
5103
5495
  },
5104
5496
  toolCall: true,
5105
5497
  reasoning: true,
5106
5498
  attachment: false,
5107
5499
  temperature: true,
5108
- knowledge: '2024-10',
5109
- releaseDate: '2025-11-11',
5110
- lastUpdated: '2025-11-11',
5500
+ knowledge: '2025-04',
5501
+ releaseDate: '2025-12-22',
5502
+ lastUpdated: '2025-12-22',
5111
5503
  openWeights: true,
5112
5504
  cost: {
5113
- input: 0,
5114
- output: 0,
5115
- cacheRead: 0,
5505
+ input: 0.6,
5506
+ output: 2.2,
5507
+ cacheRead: 0.11,
5116
5508
  },
5117
5509
  limit: {
5118
- context: 256000,
5119
- output: 32000,
5510
+ context: 204800,
5511
+ output: 131072,
5120
5512
  },
5121
5513
  provider: {
5122
- npm: '@ai-sdk/openai',
5514
+ npm: '@openrouter/ai-sdk-provider',
5123
5515
  },
5124
5516
  },
5517
+ ],
5518
+ label: 'OpenRouter',
5519
+ env: ['OPENROUTER_API_KEY'],
5520
+ npm: '@ai-sdk/openai-compatible',
5521
+ api: 'https://openrouter.ai/api/v1',
5522
+ doc: 'https://openrouter.ai/models',
5523
+ },
5524
+ opencode: {
5525
+ id: 'opencode',
5526
+ models: [
5125
5527
  {
5126
5528
  id: 'alpha-gd4',
5127
5529
  label: 'Alpha GD4',
@@ -5151,8 +5553,8 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5151
5553
  },
5152
5554
  },
5153
5555
  {
5154
- id: 'alpha-minimax-m2',
5155
- label: 'MiniMax M2 (alpha)',
5556
+ id: 'alpha-glm-4.7',
5557
+ label: 'Alpha GLM-4.7',
5156
5558
  modalities: {
5157
5559
  input: ['text'],
5158
5560
  output: ['text'],
@@ -5161,21 +5563,19 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5161
5563
  reasoning: true,
5162
5564
  attachment: false,
5163
5565
  temperature: true,
5164
- knowledge: '2024-10',
5165
- releaseDate: '2025-10-27',
5166
- lastUpdated: '2025-10-27',
5566
+ knowledge: '2025-04',
5567
+ releaseDate: '2025-12-22',
5568
+ lastUpdated: '2025-12-22',
5167
5569
  openWeights: true,
5168
5570
  cost: {
5169
- input: 0.3,
5170
- output: 1.2,
5571
+ input: 0.6,
5572
+ output: 2.2,
5573
+ cacheRead: 0.6,
5171
5574
  },
5172
5575
  limit: {
5173
5576
  context: 204800,
5174
5577
  output: 131072,
5175
5578
  },
5176
- provider: {
5177
- npm: '@ai-sdk/anthropic',
5178
- },
5179
5579
  },
5180
5580
  {
5181
5581
  id: 'big-pickle',
@@ -5206,7 +5606,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5206
5606
  id: 'claude-3-5-haiku',
5207
5607
  label: 'Claude Haiku 3.5',
5208
5608
  modalities: {
5209
- input: ['text', 'image'],
5609
+ input: ['text', 'image', 'pdf'],
5210
5610
  output: ['text'],
5211
5611
  },
5212
5612
  toolCall: true,
@@ -5234,7 +5634,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5234
5634
  id: 'claude-haiku-4-5',
5235
5635
  label: 'Claude Haiku 4.5',
5236
5636
  modalities: {
5237
- input: ['text', 'image'],
5637
+ input: ['text', 'image', 'pdf'],
5238
5638
  output: ['text'],
5239
5639
  },
5240
5640
  toolCall: true,
@@ -5262,7 +5662,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5262
5662
  id: 'claude-opus-4-1',
5263
5663
  label: 'Claude Opus 4.1',
5264
5664
  modalities: {
5265
- input: ['text', 'image'],
5665
+ input: ['text', 'image', 'pdf'],
5266
5666
  output: ['text'],
5267
5667
  },
5268
5668
  toolCall: true,
@@ -5290,7 +5690,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5290
5690
  id: 'claude-opus-4-5',
5291
5691
  label: 'Claude Opus 4.5',
5292
5692
  modalities: {
5293
- input: ['text', 'image'],
5693
+ input: ['text', 'image', 'pdf'],
5294
5694
  output: ['text'],
5295
5695
  },
5296
5696
  toolCall: true,
@@ -5318,7 +5718,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5318
5718
  id: 'claude-sonnet-4',
5319
5719
  label: 'Claude Sonnet 4',
5320
5720
  modalities: {
5321
- input: ['text', 'image'],
5721
+ input: ['text', 'image', 'pdf'],
5322
5722
  output: ['text'],
5323
5723
  },
5324
5724
  toolCall: true,
@@ -5346,7 +5746,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5346
5746
  id: 'claude-sonnet-4-5',
5347
5747
  label: 'Claude Sonnet 4.5',
5348
5748
  modalities: {
5349
- input: ['text', 'image'],
5749
+ input: ['text', 'image', 'pdf'],
5350
5750
  output: ['text'],
5351
5751
  },
5352
5752
  toolCall: true,
@@ -5370,6 +5770,34 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5370
5770
  npm: '@ai-sdk/anthropic',
5371
5771
  },
5372
5772
  },
5773
+ {
5774
+ id: 'gemini-3-flash',
5775
+ label: 'Gemini 3 Flash',
5776
+ modalities: {
5777
+ input: ['text', 'image', 'video', 'audio', 'pdf'],
5778
+ output: ['text'],
5779
+ },
5780
+ toolCall: true,
5781
+ reasoning: true,
5782
+ attachment: true,
5783
+ temperature: true,
5784
+ knowledge: '2025-01',
5785
+ releaseDate: '2025-12-17',
5786
+ lastUpdated: '2025-12-17',
5787
+ openWeights: false,
5788
+ cost: {
5789
+ input: 0.5,
5790
+ output: 3,
5791
+ cacheRead: 0.05,
5792
+ },
5793
+ limit: {
5794
+ context: 1048576,
5795
+ output: 65536,
5796
+ },
5797
+ provider: {
5798
+ npm: '@ai-sdk/google',
5799
+ },
5800
+ },
5373
5801
  {
5374
5802
  id: 'gemini-3-pro',
5375
5803
  label: 'Gemini 3 Pro',
@@ -5391,8 +5819,8 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5391
5819
  cacheRead: 0.2,
5392
5820
  },
5393
5821
  limit: {
5394
- context: 1000000,
5395
- output: 64000,
5822
+ context: 1048576,
5823
+ output: 65536,
5396
5824
  },
5397
5825
  provider: {
5398
5826
  npm: '@ai-sdk/google',
@@ -5423,6 +5851,31 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5423
5851
  output: 131072,
5424
5852
  },
5425
5853
  },
5854
+ {
5855
+ id: 'glm-4.7-free',
5856
+ label: 'GLM-4.7',
5857
+ modalities: {
5858
+ input: ['text'],
5859
+ output: ['text'],
5860
+ },
5861
+ toolCall: true,
5862
+ reasoning: true,
5863
+ attachment: false,
5864
+ temperature: true,
5865
+ knowledge: '2025-04',
5866
+ releaseDate: '2025-12-22',
5867
+ lastUpdated: '2025-12-22',
5868
+ openWeights: true,
5869
+ cost: {
5870
+ input: 0,
5871
+ output: 0,
5872
+ cacheRead: 0,
5873
+ },
5874
+ limit: {
5875
+ context: 204800,
5876
+ output: 131072,
5877
+ },
5878
+ },
5426
5879
  {
5427
5880
  id: 'gpt-5',
5428
5881
  label: 'GPT-5',
@@ -5512,7 +5965,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5512
5965
  label: 'GPT-5.1',
5513
5966
  modalities: {
5514
5967
  input: ['text', 'image'],
5515
- output: ['text', 'image'],
5968
+ output: ['text'],
5516
5969
  },
5517
5970
  toolCall: true,
5518
5971
  reasoning: true,
@@ -5540,7 +5993,7 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5540
5993
  label: 'GPT-5.1 Codex',
5541
5994
  modalities: {
5542
5995
  input: ['text', 'image'],
5543
- output: ['text', 'image'],
5996
+ output: ['text'],
5544
5997
  },
5545
5998
  toolCall: true,
5546
5999
  reasoning: true,
@@ -5563,6 +6016,62 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5563
6016
  npm: '@ai-sdk/openai',
5564
6017
  },
5565
6018
  },
6019
+ {
6020
+ id: 'gpt-5.1-codex-max',
6021
+ label: 'GPT-5.1 Codex Max',
6022
+ modalities: {
6023
+ input: ['text', 'image'],
6024
+ output: ['text'],
6025
+ },
6026
+ toolCall: true,
6027
+ reasoning: true,
6028
+ attachment: true,
6029
+ temperature: false,
6030
+ knowledge: '2024-09-30',
6031
+ releaseDate: '2025-11-12',
6032
+ lastUpdated: '2025-11-12',
6033
+ openWeights: false,
6034
+ cost: {
6035
+ input: 1.25,
6036
+ output: 10,
6037
+ cacheRead: 0.125,
6038
+ },
6039
+ limit: {
6040
+ context: 400000,
6041
+ output: 128000,
6042
+ },
6043
+ provider: {
6044
+ npm: '@ai-sdk/openai',
6045
+ },
6046
+ },
6047
+ {
6048
+ id: 'gpt-5.2',
6049
+ label: 'GPT-5.2',
6050
+ modalities: {
6051
+ input: ['text', 'image'],
6052
+ output: ['text'],
6053
+ },
6054
+ toolCall: true,
6055
+ reasoning: true,
6056
+ attachment: true,
6057
+ temperature: false,
6058
+ knowledge: '2025-08-31',
6059
+ releaseDate: '2025-11-12',
6060
+ lastUpdated: '2025-11-12',
6061
+ openWeights: false,
6062
+ cost: {
6063
+ input: 1.75,
6064
+ output: 14,
6065
+ cacheRead: 0.175,
6066
+ },
6067
+ limit: {
6068
+ context: 400000,
6069
+ output: 128000,
6070
+ },
6071
+ provider: {
6072
+ npm: '@ai-sdk/openai',
6073
+ },
6074
+ },
5566
6075
  {
5567
6076
  id: 'grok-code',
5568
6077
  label: 'Grok Code Fast 1',
@@ -5668,4 +6177,187 @@ export const catalog: Partial<Record<ProviderId, ProviderCatalogEntry>> = {
5668
6177
  api: 'https://opencode.ai/zen/v1',
5669
6178
  doc: 'https://opencode.ai/docs/zen',
5670
6179
  },
6180
+ zai: {
6181
+ id: 'zai',
6182
+ models: [
6183
+ {
6184
+ id: 'glm-4.5',
6185
+ label: 'GLM-4.5',
6186
+ modalities: {
6187
+ input: ['text'],
6188
+ output: ['text'],
6189
+ },
6190
+ toolCall: true,
6191
+ reasoning: true,
6192
+ attachment: false,
6193
+ temperature: true,
6194
+ knowledge: '2025-04',
6195
+ releaseDate: '2025-07-28',
6196
+ lastUpdated: '2025-07-28',
6197
+ openWeights: true,
6198
+ cost: {
6199
+ input: 0.6,
6200
+ output: 2.2,
6201
+ cacheRead: 0.11,
6202
+ },
6203
+ limit: {
6204
+ context: 131072,
6205
+ output: 98304,
6206
+ },
6207
+ },
6208
+ {
6209
+ id: 'glm-4.5-air',
6210
+ label: 'GLM-4.5-Air',
6211
+ modalities: {
6212
+ input: ['text'],
6213
+ output: ['text'],
6214
+ },
6215
+ toolCall: true,
6216
+ reasoning: true,
6217
+ attachment: false,
6218
+ temperature: true,
6219
+ knowledge: '2025-04',
6220
+ releaseDate: '2025-07-28',
6221
+ lastUpdated: '2025-07-28',
6222
+ openWeights: true,
6223
+ cost: {
6224
+ input: 0.2,
6225
+ output: 1.1,
6226
+ cacheRead: 0.03,
6227
+ },
6228
+ limit: {
6229
+ context: 131072,
6230
+ output: 98304,
6231
+ },
6232
+ },
6233
+ {
6234
+ id: 'glm-4.5-flash',
6235
+ label: 'GLM-4.5-Flash',
6236
+ modalities: {
6237
+ input: ['text'],
6238
+ output: ['text'],
6239
+ },
6240
+ toolCall: true,
6241
+ reasoning: true,
6242
+ attachment: false,
6243
+ temperature: true,
6244
+ knowledge: '2025-04',
6245
+ releaseDate: '2025-07-28',
6246
+ lastUpdated: '2025-07-28',
6247
+ openWeights: true,
6248
+ cost: {
6249
+ input: 0,
6250
+ output: 0,
6251
+ cacheRead: 0,
6252
+ },
6253
+ limit: {
6254
+ context: 131072,
6255
+ output: 98304,
6256
+ },
6257
+ },
6258
+ {
6259
+ id: 'glm-4.5v',
6260
+ label: 'GLM-4.5V',
6261
+ modalities: {
6262
+ input: ['text', 'image', 'video'],
6263
+ output: ['text'],
6264
+ },
6265
+ toolCall: true,
6266
+ reasoning: true,
6267
+ attachment: true,
6268
+ temperature: true,
6269
+ knowledge: '2025-04',
6270
+ releaseDate: '2025-08-11',
6271
+ lastUpdated: '2025-08-11',
6272
+ openWeights: true,
6273
+ cost: {
6274
+ input: 0.6,
6275
+ output: 1.8,
6276
+ },
6277
+ limit: {
6278
+ context: 64000,
6279
+ output: 16384,
6280
+ },
6281
+ },
6282
+ {
6283
+ id: 'glm-4.6',
6284
+ label: 'GLM-4.6',
6285
+ modalities: {
6286
+ input: ['text'],
6287
+ output: ['text'],
6288
+ },
6289
+ toolCall: true,
6290
+ reasoning: true,
6291
+ attachment: false,
6292
+ temperature: true,
6293
+ knowledge: '2025-04',
6294
+ releaseDate: '2025-09-30',
6295
+ lastUpdated: '2025-09-30',
6296
+ openWeights: true,
6297
+ cost: {
6298
+ input: 0.6,
6299
+ output: 2.2,
6300
+ cacheRead: 0.11,
6301
+ },
6302
+ limit: {
6303
+ context: 204800,
6304
+ output: 131072,
6305
+ },
6306
+ },
6307
+ {
6308
+ id: 'glm-4.6v',
6309
+ label: 'GLM-4.6V',
6310
+ modalities: {
6311
+ input: ['text', 'image', 'video'],
6312
+ output: ['text'],
6313
+ },
6314
+ toolCall: true,
6315
+ reasoning: true,
6316
+ attachment: true,
6317
+ temperature: true,
6318
+ knowledge: '2025-04',
6319
+ releaseDate: '2025-12-08',
6320
+ lastUpdated: '2025-12-08',
6321
+ openWeights: true,
6322
+ cost: {
6323
+ input: 0.3,
6324
+ output: 0.9,
6325
+ },
6326
+ limit: {
6327
+ context: 128000,
6328
+ output: 32768,
6329
+ },
6330
+ },
6331
+ {
6332
+ id: 'glm-4.7',
6333
+ label: 'GLM-4.7',
6334
+ modalities: {
6335
+ input: ['text'],
6336
+ output: ['text'],
6337
+ },
6338
+ toolCall: true,
6339
+ reasoning: true,
6340
+ attachment: false,
6341
+ temperature: true,
6342
+ knowledge: '2025-04',
6343
+ releaseDate: '2025-12-22',
6344
+ lastUpdated: '2025-12-22',
6345
+ openWeights: true,
6346
+ cost: {
6347
+ input: 0.6,
6348
+ output: 2.2,
6349
+ cacheRead: 0.11,
6350
+ },
6351
+ limit: {
6352
+ context: 204800,
6353
+ output: 131072,
6354
+ },
6355
+ },
6356
+ ],
6357
+ label: 'Z.AI',
6358
+ env: ['ZHIPU_API_KEY'],
6359
+ npm: '@ai-sdk/openai-compatible',
6360
+ api: 'https://api.z.ai/api/paas/v4',
6361
+ doc: 'https://docs.z.ai/guides/overview/pricing',
6362
+ },
5671
6363
  } as const satisfies Partial<Record<ProviderId, ProviderCatalogEntry>>;
@@ -7,6 +7,8 @@ const ENV_VARS: Record<ProviderId, string> = {
7
7
  openrouter: 'OPENROUTER_API_KEY',
8
8
  opencode: 'OPENCODE_API_KEY',
9
9
  solforge: 'SOLFORGE_PRIVATE_KEY',
10
+ zai: 'ZAI_API_KEY',
11
+ 'zai-coding': 'ZAI_API_KEY',
10
12
  };
11
13
 
12
14
  export function providerEnvVar(provider: ProviderId): string {
@@ -74,6 +74,15 @@ const pricingTable: Record<ProviderName, PricingEntry[]> = {
74
74
  opencode: [
75
75
  // Pricing from catalog entries; leave empty here
76
76
  ],
77
+ solforge: [
78
+ // Pricing from catalog entries; leave empty here
79
+ ],
80
+ zai: [
81
+ // Pricing from catalog entries; leave empty here
82
+ ],
83
+ 'zai-coding': [
84
+ // Pricing from catalog entries; leave empty here
85
+ ],
77
86
  };
78
87
 
79
88
  function findPricing(
@@ -7,7 +7,9 @@ export type ProviderId =
7
7
  | 'google'
8
8
  | 'openrouter'
9
9
  | 'opencode'
10
- | 'solforge';
10
+ | 'solforge'
11
+ | 'zai'
12
+ | 'zai-coding';
11
13
 
12
14
  export type ModelProviderBinding = {
13
15
  id?: string;