@speakai/shared 2.1.26 → 2.1.28

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.
Files changed (41) hide show
  1. package/dist/index.d.ts +2 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +4 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/llm/registry.d.ts +53 -0
  6. package/dist/llm/registry.d.ts.map +1 -0
  7. package/dist/llm/registry.js +889 -0
  8. package/dist/llm/registry.js.map +1 -0
  9. package/dist/llm/types.d.ts +16 -0
  10. package/dist/llm/types.d.ts.map +1 -0
  11. package/dist/llm/types.js +2 -0
  12. package/dist/llm/types.js.map +1 -0
  13. package/dist/pricing/modelPricing.d.ts +2 -23
  14. package/dist/pricing/modelPricing.d.ts.map +1 -1
  15. package/dist/pricing/modelPricing.js +2 -71
  16. package/dist/pricing/modelPricing.js.map +1 -1
  17. package/dist/voice/enums/index.d.ts +1 -0
  18. package/dist/voice/enums/index.d.ts.map +1 -1
  19. package/dist/voice/enums/index.js +1 -0
  20. package/dist/voice/enums/index.js.map +1 -1
  21. package/dist/voice/enums/responsePace.d.ts +19 -0
  22. package/dist/voice/enums/responsePace.d.ts.map +1 -0
  23. package/dist/voice/enums/responsePace.js +18 -0
  24. package/dist/voice/enums/responsePace.js.map +1 -0
  25. package/dist/voice/index.d.ts +1 -0
  26. package/dist/voice/index.d.ts.map +1 -1
  27. package/dist/voice/index.js +1 -0
  28. package/dist/voice/index.js.map +1 -1
  29. package/dist/voice/interfaces/index.d.ts +1 -0
  30. package/dist/voice/interfaces/index.d.ts.map +1 -1
  31. package/dist/voice/interfaces/index.js +1 -0
  32. package/dist/voice/interfaces/index.js.map +1 -1
  33. package/dist/voice/interfaces/turnTaking.d.ts +17 -0
  34. package/dist/voice/interfaces/turnTaking.d.ts.map +1 -0
  35. package/dist/voice/interfaces/turnTaking.js +5 -0
  36. package/dist/voice/interfaces/turnTaking.js.map +1 -0
  37. package/dist/voice/responsePace.d.ts +25 -0
  38. package/dist/voice/responsePace.d.ts.map +1 -0
  39. package/dist/voice/responsePace.js +44 -0
  40. package/dist/voice/responsePace.js.map +1 -0
  41. package/package.json +1 -1
@@ -0,0 +1,889 @@
1
+ import { LLMModels, LLMProvider } from "../enums/llm.js";
2
+ export const MAX_OUTPUT_TOKENS = 14_500;
3
+ export const GEMINI_MAX_OUTPUT_TOKENS = 49_152;
4
+ export const OPENROUTER_MAX_OUTPUT_TOKENS = 16_384;
5
+ const NO_CAPS = {
6
+ thinking: false,
7
+ adaptiveThinking: false,
8
+ vision: false,
9
+ customTemperature: true,
10
+ nativeAudioVideo: false,
11
+ };
12
+ const GPT_LEGACY = { ...NO_CAPS };
13
+ const GPT_5 = { ...NO_CAPS, thinking: true, customTemperature: false };
14
+ const CLAUDE_LEGACY = { ...NO_CAPS };
15
+ const CLAUDE_4 = { ...NO_CAPS, thinking: true };
16
+ const CLAUDE_ADAPTIVE = { ...NO_CAPS, thinking: true, adaptiveThinking: true };
17
+ const GEMINI_LEGACY = { ...NO_CAPS, nativeAudioVideo: true };
18
+ const GEMINI_THINKING = { ...NO_CAPS, thinking: true, nativeAudioVideo: true };
19
+ export const MODEL_REGISTRY = [
20
+ {
21
+ id: LLMModels.GPT_3_5,
22
+ label: "GPT-3.5",
23
+ provider: LLMProvider.OPENAI,
24
+ family: "gpt",
25
+ status: "retired",
26
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
27
+ offeredInChat: false,
28
+ premium: false,
29
+ pricing: { inputPerMillion: 0.5, outputPerMillion: 1.5, provider: LLMProvider.OPENAI },
30
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
31
+ capabilities: GPT_LEGACY,
32
+ byokProvider: "openai",
33
+ },
34
+ {
35
+ id: LLMModels.GPT_3_5_TURBO_16K,
36
+ label: "GPT-3.5 Turbo 16k",
37
+ provider: LLMProvider.OPENAI,
38
+ family: "gpt",
39
+ status: "retired",
40
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
41
+ offeredInChat: false,
42
+ premium: false,
43
+ pricing: { inputPerMillion: 3, outputPerMillion: 4, provider: LLMProvider.OPENAI },
44
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
45
+ capabilities: GPT_LEGACY,
46
+ byokProvider: "openai",
47
+ },
48
+ {
49
+ id: LLMModels.GPT_3_5_TURBO_0125,
50
+ label: "GPT-3.5 Turbo",
51
+ provider: LLMProvider.OPENAI,
52
+ family: "gpt",
53
+ status: "retired",
54
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
55
+ offeredInChat: false,
56
+ premium: false,
57
+ pricing: { inputPerMillion: 0.5, outputPerMillion: 1.5, provider: LLMProvider.OPENAI },
58
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
59
+ capabilities: GPT_LEGACY,
60
+ byokProvider: "openai",
61
+ },
62
+ {
63
+ id: LLMModels.GPT_4,
64
+ label: "GPT-4",
65
+ provider: LLMProvider.OPENAI,
66
+ family: "gpt",
67
+ status: "retired",
68
+ replacedBy: LLMModels.GPT_5_5,
69
+ offeredInChat: false,
70
+ premium: false,
71
+ pricing: { inputPerMillion: 30, outputPerMillion: 60, provider: LLMProvider.OPENAI },
72
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
73
+ capabilities: GPT_LEGACY,
74
+ byokProvider: "openai",
75
+ },
76
+ {
77
+ id: LLMModels.GPT_4_1106_PREVIEW,
78
+ label: "GPT-4 Turbo Preview",
79
+ provider: LLMProvider.OPENAI,
80
+ family: "gpt",
81
+ status: "retired",
82
+ replacedBy: LLMModels.GPT_5_5,
83
+ offeredInChat: false,
84
+ premium: false,
85
+ pricing: { inputPerMillion: 10, outputPerMillion: 30, provider: LLMProvider.OPENAI },
86
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
87
+ capabilities: GPT_LEGACY,
88
+ byokProvider: "openai",
89
+ },
90
+ {
91
+ id: LLMModels.GPT_4_TURBO,
92
+ label: "GPT-4 Turbo",
93
+ provider: LLMProvider.OPENAI,
94
+ family: "gpt",
95
+ status: "retired",
96
+ replacedBy: LLMModels.GPT_5_5,
97
+ offeredInChat: false,
98
+ premium: false,
99
+ pricing: { inputPerMillion: 10, outputPerMillion: 30, provider: LLMProvider.OPENAI },
100
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
101
+ capabilities: GPT_LEGACY,
102
+ byokProvider: "openai",
103
+ },
104
+ {
105
+ id: LLMModels.GPT_4_O_2024_05_13,
106
+ label: "GPT-4o (2024-05-13)",
107
+ provider: LLMProvider.OPENAI,
108
+ family: "gpt",
109
+ status: "retired",
110
+ replacedBy: LLMModels.GPT_5_5,
111
+ offeredInChat: false,
112
+ premium: false,
113
+ pricing: { inputPerMillion: 5, outputPerMillion: 15, provider: LLMProvider.OPENAI },
114
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
115
+ capabilities: GPT_LEGACY,
116
+ byokProvider: "openai",
117
+ },
118
+ {
119
+ id: LLMModels.GPT_4O,
120
+ label: "GPT-4o",
121
+ provider: LLMProvider.OPENAI,
122
+ family: "gpt",
123
+ status: "deprecated",
124
+ replacedBy: LLMModels.GPT_5_5,
125
+ offeredInChat: false,
126
+ premium: true,
127
+ pricing: {
128
+ inputPerMillion: 2.5,
129
+ outputPerMillion: 10,
130
+ cachedInputPerMillion: 1.25,
131
+ provider: LLMProvider.OPENAI,
132
+ },
133
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
134
+ capabilities: GPT_LEGACY,
135
+ byokProvider: "openai",
136
+ },
137
+ {
138
+ id: LLMModels.GPT_4O_MINI,
139
+ label: "GPT-4o mini",
140
+ provider: LLMProvider.OPENAI,
141
+ family: "gpt",
142
+ status: "deprecated",
143
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
144
+ offeredInChat: false,
145
+ premium: false,
146
+ pricing: {
147
+ inputPerMillion: 0.15,
148
+ outputPerMillion: 0.6,
149
+ cachedInputPerMillion: 0.075,
150
+ provider: LLMProvider.OPENAI,
151
+ },
152
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
153
+ capabilities: GPT_LEGACY,
154
+ byokProvider: "openai",
155
+ },
156
+ {
157
+ id: LLMModels.GPT_4_O_2024_08_06,
158
+ label: "GPT-4o (2024-08-06)",
159
+ provider: LLMProvider.OPENAI,
160
+ family: "gpt",
161
+ status: "deprecated",
162
+ replacedBy: LLMModels.GPT_5_5,
163
+ offeredInChat: false,
164
+ premium: true,
165
+ pricing: {
166
+ inputPerMillion: 2.5,
167
+ outputPerMillion: 10,
168
+ cachedInputPerMillion: 1.25,
169
+ provider: LLMProvider.OPENAI,
170
+ },
171
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
172
+ capabilities: GPT_LEGACY,
173
+ byokProvider: "openai",
174
+ },
175
+ {
176
+ id: LLMModels.GPT_4_MINI_2024_07_18,
177
+ label: "GPT-4o mini (2024-07-18)",
178
+ provider: LLMProvider.OPENAI,
179
+ family: "gpt",
180
+ status: "deprecated",
181
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
182
+ offeredInChat: false,
183
+ premium: false,
184
+ pricing: {
185
+ inputPerMillion: 0.15,
186
+ outputPerMillion: 0.6,
187
+ cachedInputPerMillion: 0.075,
188
+ provider: LLMProvider.OPENAI,
189
+ },
190
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
191
+ capabilities: GPT_LEGACY,
192
+ byokProvider: "openai",
193
+ },
194
+ {
195
+ id: LLMModels.GPT_4_1_2025_04_14,
196
+ label: "GPT-4.1",
197
+ provider: LLMProvider.OPENAI,
198
+ family: "gpt",
199
+ status: "deprecated",
200
+ replacedBy: LLMModels.GPT_5_5,
201
+ offeredInChat: false,
202
+ premium: true,
203
+ pricing: {
204
+ inputPerMillion: 2,
205
+ outputPerMillion: 8,
206
+ cachedInputPerMillion: 0.5,
207
+ provider: LLMProvider.OPENAI,
208
+ },
209
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
210
+ capabilities: GPT_LEGACY,
211
+ byokProvider: "openai",
212
+ },
213
+ {
214
+ id: LLMModels.GPT_5_1_2025_11_13,
215
+ label: "GPT-5.1",
216
+ provider: LLMProvider.OPENAI,
217
+ family: "gpt",
218
+ status: "deprecated",
219
+ replacedBy: LLMModels.GPT_5_5,
220
+ offeredInChat: false,
221
+ premium: true,
222
+ pricing: {
223
+ inputPerMillion: 1.25,
224
+ outputPerMillion: 10,
225
+ cachedInputPerMillion: 0.125,
226
+ provider: LLMProvider.OPENAI,
227
+ },
228
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
229
+ capabilities: GPT_5,
230
+ byokProvider: "openai",
231
+ },
232
+ {
233
+ id: LLMModels.GPT_5_2,
234
+ label: "GPT-5.2",
235
+ provider: LLMProvider.OPENAI,
236
+ family: "gpt",
237
+ status: "deprecated",
238
+ replacedBy: LLMModels.GPT_5_5,
239
+ offeredInChat: false,
240
+ premium: true,
241
+ pricing: {
242
+ inputPerMillion: 1.75,
243
+ outputPerMillion: 14,
244
+ cachedInputPerMillion: 0.175,
245
+ provider: LLMProvider.OPENAI,
246
+ },
247
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
248
+ capabilities: GPT_5,
249
+ byokProvider: "openai",
250
+ },
251
+ {
252
+ id: LLMModels.GPT_5_4,
253
+ label: "GPT-5.4",
254
+ provider: LLMProvider.OPENAI,
255
+ family: "gpt",
256
+ status: "deprecated",
257
+ replacedBy: LLMModels.GPT_5_5,
258
+ offeredInChat: false,
259
+ premium: true,
260
+ pricing: {
261
+ inputPerMillion: 2.5,
262
+ outputPerMillion: 15,
263
+ cachedInputPerMillion: 0.25,
264
+ longContextThresholdTokens: 272000,
265
+ inputPerMillionLong: 5,
266
+ outputPerMillionLong: 22.5,
267
+ cachedInputPerMillionLong: 0.5,
268
+ provider: LLMProvider.OPENAI,
269
+ },
270
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
271
+ capabilities: GPT_5,
272
+ byokProvider: "openai",
273
+ },
274
+ {
275
+ id: LLMModels.GPT_5_4_MINI,
276
+ label: "GPT-5.4 mini",
277
+ provider: LLMProvider.OPENAI,
278
+ family: "gpt",
279
+ status: "deprecated",
280
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
281
+ offeredInChat: false,
282
+ premium: true,
283
+ pricing: {
284
+ inputPerMillion: 0.75,
285
+ outputPerMillion: 4.5,
286
+ cachedInputPerMillion: 0.075,
287
+ provider: LLMProvider.OPENAI,
288
+ },
289
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
290
+ capabilities: GPT_5,
291
+ byokProvider: "openai",
292
+ },
293
+ {
294
+ id: LLMModels.GPT_5_4_NANO,
295
+ label: "GPT-5.4 nano",
296
+ provider: LLMProvider.OPENAI,
297
+ family: "gpt",
298
+ status: "deprecated",
299
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
300
+ offeredInChat: false,
301
+ premium: false,
302
+ pricing: {
303
+ inputPerMillion: 0.2,
304
+ outputPerMillion: 1.25,
305
+ cachedInputPerMillion: 0.02,
306
+ provider: LLMProvider.OPENAI,
307
+ },
308
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
309
+ capabilities: GPT_5,
310
+ byokProvider: "openai",
311
+ },
312
+ {
313
+ id: LLMModels.GPT_5_5_THINKING,
314
+ label: "GPT-5.5 Thinking",
315
+ provider: LLMProvider.OPENAI,
316
+ family: "gpt",
317
+ status: "deprecated",
318
+ replacedBy: LLMModels.GPT_5_5,
319
+ offeredInChat: false,
320
+ premium: true,
321
+ pricing: {
322
+ inputPerMillion: 5,
323
+ outputPerMillion: 30,
324
+ cachedInputPerMillion: 0.5,
325
+ longContextThresholdTokens: 272000,
326
+ inputPerMillionLong: 10,
327
+ outputPerMillionLong: 45,
328
+ cachedInputPerMillionLong: 1,
329
+ provider: LLMProvider.OPENAI,
330
+ },
331
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
332
+ capabilities: GPT_5,
333
+ byokProvider: "openai",
334
+ },
335
+ {
336
+ id: LLMModels.GPT_5_6_LUNA,
337
+ label: "GPT-5.6 Luna",
338
+ provider: LLMProvider.OPENAI,
339
+ family: "gpt",
340
+ status: "deprecated",
341
+ replacedBy: LLMModels.GPT_5_4_MINI_2026_03_17,
342
+ offeredInChat: false,
343
+ premium: true,
344
+ pricing: {
345
+ inputPerMillion: 1,
346
+ outputPerMillion: 6,
347
+ cachedInputPerMillion: 0.1,
348
+ provider: LLMProvider.OPENAI,
349
+ },
350
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
351
+ capabilities: GPT_5,
352
+ byokProvider: "openai",
353
+ },
354
+ {
355
+ id: LLMModels.GPT_5_4_MINI_2026_03_17,
356
+ label: "GPT-5.4 mini",
357
+ provider: LLMProvider.OPENAI,
358
+ family: "gpt",
359
+ status: "live",
360
+ offeredInChat: true,
361
+ chatOrder: 7,
362
+ premium: true,
363
+ pricing: {
364
+ inputPerMillion: 0.75,
365
+ outputPerMillion: 4.5,
366
+ cachedInputPerMillion: 0.075,
367
+ provider: LLMProvider.OPENAI,
368
+ },
369
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
370
+ capabilities: GPT_5,
371
+ byokProvider: "openai",
372
+ openRouterSlug: "openai/gpt-5.4-mini",
373
+ },
374
+ {
375
+ id: LLMModels.GPT_5_5,
376
+ label: "GPT-5.5",
377
+ provider: LLMProvider.OPENAI,
378
+ family: "gpt",
379
+ status: "live",
380
+ offeredInChat: true,
381
+ chatOrder: 6,
382
+ premium: true,
383
+ pricing: {
384
+ inputPerMillion: 5,
385
+ outputPerMillion: 30,
386
+ cachedInputPerMillion: 0.5,
387
+ longContextThresholdTokens: 272000,
388
+ inputPerMillionLong: 10,
389
+ outputPerMillionLong: 45,
390
+ cachedInputPerMillionLong: 1,
391
+ provider: LLMProvider.OPENAI,
392
+ },
393
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
394
+ capabilities: GPT_5,
395
+ byokProvider: "openai",
396
+ openRouterSlug: "openai/gpt-5.5",
397
+ },
398
+ {
399
+ id: LLMModels.GPT_5_6_SOL,
400
+ label: "GPT-5.6 Sol",
401
+ provider: LLMProvider.OPENAI,
402
+ family: "gpt",
403
+ status: "live",
404
+ offeredInChat: true,
405
+ chatOrder: 5,
406
+ premium: true,
407
+ pricing: {
408
+ inputPerMillion: 5,
409
+ outputPerMillion: 30,
410
+ cachedInputPerMillion: 0.5,
411
+ provider: LLMProvider.OPENAI,
412
+ },
413
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
414
+ capabilities: GPT_5,
415
+ byokProvider: "openai",
416
+ openRouterSlug: "openai/gpt-5.6-sol",
417
+ },
418
+ {
419
+ id: LLMModels.GPT_5_6_TERRA,
420
+ label: "GPT-5.6 Terra",
421
+ provider: LLMProvider.OPENAI,
422
+ family: "gpt",
423
+ status: "live",
424
+ offeredInChat: true,
425
+ chatOrder: 4,
426
+ premium: true,
427
+ pricing: {
428
+ inputPerMillion: 2.5,
429
+ outputPerMillion: 15,
430
+ cachedInputPerMillion: 0.25,
431
+ provider: LLMProvider.OPENAI,
432
+ },
433
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
434
+ capabilities: GPT_5,
435
+ byokProvider: "openai",
436
+ openRouterSlug: "openai/gpt-5.6-terra",
437
+ },
438
+ {
439
+ id: LLMModels.CLAUDE_2,
440
+ label: "Claude 2",
441
+ provider: LLMProvider.ANTHROPIC,
442
+ family: "claude",
443
+ status: "retired",
444
+ replacedBy: LLMModels.CLAUDE_SONNET_5,
445
+ offeredInChat: false,
446
+ premium: false,
447
+ pricing: { inputPerMillion: 8, outputPerMillion: 24, provider: LLMProvider.ANTHROPIC },
448
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
449
+ capabilities: CLAUDE_LEGACY,
450
+ byokProvider: "anthropic",
451
+ },
452
+ {
453
+ id: LLMModels.CLAUDE_3_5_SONNET,
454
+ label: "Claude 3.5 Sonnet",
455
+ provider: LLMProvider.ANTHROPIC,
456
+ family: "claude",
457
+ status: "retired",
458
+ replacedBy: LLMModels.CLAUDE_SONNET_5,
459
+ offeredInChat: false,
460
+ premium: false,
461
+ pricing: {
462
+ inputPerMillion: 3,
463
+ outputPerMillion: 15,
464
+ cachedInputPerMillion: 0.3,
465
+ provider: LLMProvider.ANTHROPIC,
466
+ },
467
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
468
+ capabilities: CLAUDE_LEGACY,
469
+ byokProvider: "anthropic",
470
+ },
471
+ {
472
+ id: LLMModels.CLAUDE_3_5_SONNET_20241022,
473
+ label: "Claude 3.5 Sonnet (2024-10-22)",
474
+ provider: LLMProvider.ANTHROPIC,
475
+ family: "claude",
476
+ status: "retired",
477
+ replacedBy: LLMModels.CLAUDE_SONNET_5,
478
+ offeredInChat: false,
479
+ premium: false,
480
+ pricing: {
481
+ inputPerMillion: 3,
482
+ outputPerMillion: 15,
483
+ cachedInputPerMillion: 0.3,
484
+ provider: LLMProvider.ANTHROPIC,
485
+ },
486
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
487
+ capabilities: CLAUDE_LEGACY,
488
+ byokProvider: "anthropic",
489
+ },
490
+ {
491
+ id: LLMModels.CLAUDE_3_7_SONNET_LATEST,
492
+ label: "Claude 3.7 Sonnet",
493
+ provider: LLMProvider.ANTHROPIC,
494
+ family: "claude",
495
+ status: "retired",
496
+ replacedBy: LLMModels.CLAUDE_SONNET_5,
497
+ offeredInChat: false,
498
+ premium: false,
499
+ pricing: {
500
+ inputPerMillion: 3,
501
+ outputPerMillion: 15,
502
+ cachedInputPerMillion: 0.3,
503
+ provider: LLMProvider.ANTHROPIC,
504
+ },
505
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
506
+ capabilities: CLAUDE_LEGACY,
507
+ byokProvider: "anthropic",
508
+ },
509
+ {
510
+ id: LLMModels.CLAUDE_HAIKU_4_5,
511
+ label: "Claude Haiku 4.5",
512
+ provider: LLMProvider.ANTHROPIC,
513
+ family: "claude",
514
+ status: "deprecated",
515
+ replacedBy: LLMModels.CLAUDE_SONNET_5,
516
+ offeredInChat: false,
517
+ premium: true,
518
+ pricing: {
519
+ inputPerMillion: 1,
520
+ outputPerMillion: 5,
521
+ cachedInputPerMillion: 0.1,
522
+ provider: LLMProvider.ANTHROPIC,
523
+ },
524
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
525
+ capabilities: { ...CLAUDE_4, thinking: false },
526
+ byokProvider: "anthropic",
527
+ },
528
+ {
529
+ id: LLMModels.CLAUDE_SONNET_4_6,
530
+ label: "Claude Sonnet 4.6",
531
+ provider: LLMProvider.ANTHROPIC,
532
+ family: "claude",
533
+ status: "live",
534
+ offeredInChat: true,
535
+ chatOrder: 10,
536
+ premium: true,
537
+ pricing: {
538
+ inputPerMillion: 3,
539
+ outputPerMillion: 15,
540
+ cachedInputPerMillion: 0.3,
541
+ provider: LLMProvider.ANTHROPIC,
542
+ },
543
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
544
+ capabilities: CLAUDE_4,
545
+ byokProvider: "anthropic",
546
+ openRouterSlug: "anthropic/claude-sonnet-4.6",
547
+ },
548
+ {
549
+ id: LLMModels.CLAUDE_SONNET_5,
550
+ label: "Claude Sonnet 5",
551
+ provider: LLMProvider.ANTHROPIC,
552
+ family: "claude",
553
+ status: "live",
554
+ offeredInChat: true,
555
+ chatOrder: 8,
556
+ premium: true,
557
+ pricing: {
558
+ inputPerMillion: 3,
559
+ outputPerMillion: 15,
560
+ cachedInputPerMillion: 0.3,
561
+ provider: LLMProvider.ANTHROPIC,
562
+ },
563
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
564
+ capabilities: CLAUDE_ADAPTIVE,
565
+ byokProvider: "anthropic",
566
+ openRouterSlug: "anthropic/claude-sonnet-5",
567
+ },
568
+ {
569
+ id: LLMModels.CLAUDE_OPUS_4_8,
570
+ label: "Claude Opus 4.8",
571
+ provider: LLMProvider.ANTHROPIC,
572
+ family: "claude",
573
+ status: "live",
574
+ offeredInChat: true,
575
+ chatOrder: 9,
576
+ premium: true,
577
+ pricing: {
578
+ inputPerMillion: 5,
579
+ outputPerMillion: 25,
580
+ cachedInputPerMillion: 0.5,
581
+ provider: LLMProvider.ANTHROPIC,
582
+ },
583
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
584
+ capabilities: CLAUDE_ADAPTIVE,
585
+ byokProvider: "anthropic",
586
+ openRouterSlug: "anthropic/claude-opus-4.8",
587
+ },
588
+ {
589
+ id: LLMModels.GEMINI_1_5_PRO,
590
+ label: "Gemini 1.5 Pro",
591
+ provider: LLMProvider.GOOGLE,
592
+ family: "gemini",
593
+ status: "retired",
594
+ replacedBy: LLMModels.GEMINI_3_8_FLASH,
595
+ offeredInChat: false,
596
+ premium: false,
597
+ pricing: { inputPerMillion: 1.25, outputPerMillion: 5, provider: LLMProvider.GOOGLE },
598
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
599
+ capabilities: GEMINI_LEGACY,
600
+ },
601
+ {
602
+ id: LLMModels.GEMINI_1_5_FLASH,
603
+ label: "Gemini 1.5 Flash",
604
+ provider: LLMProvider.GOOGLE,
605
+ family: "gemini",
606
+ status: "retired",
607
+ replacedBy: LLMModels.GEMINI_3_7_FLASH,
608
+ offeredInChat: false,
609
+ premium: false,
610
+ pricing: {
611
+ inputPerMillion: 0.075,
612
+ outputPerMillion: 0.3,
613
+ cachedInputPerMillion: 0.01875,
614
+ provider: LLMProvider.GOOGLE,
615
+ },
616
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
617
+ capabilities: GEMINI_LEGACY,
618
+ },
619
+ {
620
+ id: LLMModels.GEMINI_2_0_FLASH,
621
+ label: "Gemini 2.0 Flash",
622
+ provider: LLMProvider.GOOGLE,
623
+ family: "gemini",
624
+ status: "retired",
625
+ replacedBy: LLMModels.GEMINI_3_7_FLASH,
626
+ offeredInChat: false,
627
+ premium: false,
628
+ pricing: {
629
+ inputPerMillion: 0.1,
630
+ outputPerMillion: 0.4,
631
+ cachedInputPerMillion: 0.025,
632
+ provider: LLMProvider.GOOGLE,
633
+ },
634
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
635
+ capabilities: GEMINI_LEGACY,
636
+ },
637
+ {
638
+ id: LLMModels.GEMINI_2_5_FLASH,
639
+ label: "Gemini 2.5 Flash",
640
+ provider: LLMProvider.GOOGLE,
641
+ family: "gemini",
642
+ status: "deprecated",
643
+ replacedBy: LLMModels.GEMINI_3_7_FLASH,
644
+ offeredInChat: false,
645
+ premium: false,
646
+ pricing: {
647
+ inputPerMillion: 0.3,
648
+ outputPerMillion: 2.5,
649
+ cachedInputPerMillion: 0.03,
650
+ provider: LLMProvider.GOOGLE,
651
+ },
652
+ modality: { audioPerMillion: 1.0, videoPerMillion: 0.3 },
653
+ maxOutputTokens: GEMINI_MAX_OUTPUT_TOKENS,
654
+ capabilities: GEMINI_THINKING,
655
+ },
656
+ {
657
+ id: LLMModels.GEMINI_2_5_PRO,
658
+ label: "Gemini 2.5 Pro",
659
+ provider: LLMProvider.GOOGLE,
660
+ family: "gemini",
661
+ status: "deprecated",
662
+ replacedBy: LLMModels.GEMINI_3_8_FLASH,
663
+ offeredInChat: false,
664
+ premium: true,
665
+ pricing: {
666
+ inputPerMillion: 1.25,
667
+ outputPerMillion: 10,
668
+ longContextThresholdTokens: 200000,
669
+ inputPerMillionLong: 2.5,
670
+ outputPerMillionLong: 15,
671
+ provider: LLMProvider.GOOGLE,
672
+ },
673
+ modality: { audioPerMillion: 1.25, videoPerMillion: 1.25 },
674
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
675
+ capabilities: GEMINI_THINKING,
676
+ },
677
+ {
678
+ id: LLMModels.GEMINI_2_5_FLASH_LITE,
679
+ label: "Gemini 2.5 Flash Lite",
680
+ provider: LLMProvider.GOOGLE,
681
+ family: "gemini",
682
+ status: "deprecated",
683
+ replacedBy: LLMModels.GEMINI_3_7_FLASH,
684
+ offeredInChat: false,
685
+ premium: false,
686
+ pricing: {
687
+ inputPerMillion: 0.1,
688
+ outputPerMillion: 0.4,
689
+ cachedInputPerMillion: 0.01,
690
+ provider: LLMProvider.GOOGLE,
691
+ },
692
+ modality: { audioPerMillion: 0.3, videoPerMillion: 0.1 },
693
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
694
+ capabilities: GEMINI_THINKING,
695
+ },
696
+ {
697
+ id: LLMModels.GEMINI_3_1_FLASH_LITE,
698
+ label: "Gemini 3.1 Flash Lite",
699
+ provider: LLMProvider.GOOGLE,
700
+ family: "gemini",
701
+ status: "deprecated",
702
+ replacedBy: LLMModels.GEMINI_3_7_FLASH,
703
+ offeredInChat: false,
704
+ premium: false,
705
+ pricing: { inputPerMillion: 0.25, outputPerMillion: 1.5, provider: LLMProvider.GOOGLE },
706
+ modality: { audioPerMillion: 0.5, videoPerMillion: 0.25 },
707
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
708
+ capabilities: GEMINI_THINKING,
709
+ },
710
+ {
711
+ id: LLMModels.GEMINI_3_1_PRO_PREVIEW,
712
+ label: "Gemini 3.1 Pro",
713
+ provider: LLMProvider.GOOGLE,
714
+ family: "gemini",
715
+ status: "deprecated",
716
+ replacedBy: LLMModels.GEMINI_3_8_FLASH,
717
+ offeredInChat: false,
718
+ premium: true,
719
+ pricing: {
720
+ inputPerMillion: 2,
721
+ outputPerMillion: 12,
722
+ longContextThresholdTokens: 200000,
723
+ inputPerMillionLong: 4,
724
+ outputPerMillionLong: 18,
725
+ provider: LLMProvider.GOOGLE,
726
+ },
727
+ maxOutputTokens: MAX_OUTPUT_TOKENS,
728
+ capabilities: GEMINI_THINKING,
729
+ },
730
+ {
731
+ id: LLMModels.GEMINI_3_FLASH_PREVIEW,
732
+ label: "Gemini 3 Flash",
733
+ provider: LLMProvider.GOOGLE,
734
+ family: "gemini",
735
+ status: "live",
736
+ offeredInChat: true,
737
+ chatOrder: 1,
738
+ premium: true,
739
+ pricing: {
740
+ inputPerMillion: 0.5,
741
+ outputPerMillion: 3,
742
+ cachedInputPerMillion: 0.05,
743
+ provider: LLMProvider.GOOGLE,
744
+ },
745
+ modality: { audioPerMillion: 1.0, videoPerMillion: 0.5 },
746
+ maxOutputTokens: GEMINI_MAX_OUTPUT_TOKENS,
747
+ capabilities: GEMINI_THINKING,
748
+ openRouterSlug: "google/gemini-3-flash-preview",
749
+ },
750
+ {
751
+ id: LLMModels.GEMINI_3_5_FLASH,
752
+ label: "Gemini 3.5 Flash",
753
+ provider: LLMProvider.GOOGLE,
754
+ family: "gemini",
755
+ status: "live",
756
+ offeredInChat: true,
757
+ chatOrder: 2,
758
+ premium: true,
759
+ pricing: {
760
+ inputPerMillion: 1.5,
761
+ outputPerMillion: 9,
762
+ cachedInputPerMillion: 0.15,
763
+ provider: LLMProvider.GOOGLE,
764
+ },
765
+ modality: { audioPerMillion: 3.0, videoPerMillion: 1.5 },
766
+ maxOutputTokens: GEMINI_MAX_OUTPUT_TOKENS,
767
+ capabilities: GEMINI_THINKING,
768
+ openRouterSlug: "google/gemini-3.5-flash",
769
+ },
770
+ {
771
+ id: LLMModels.GEMINI_3_7_FLASH,
772
+ label: "Gemini 3.7 Flash",
773
+ provider: LLMProvider.GOOGLE,
774
+ family: "gemini",
775
+ status: "live",
776
+ offeredInChat: true,
777
+ chatOrder: 0,
778
+ premium: false,
779
+ pricing: {
780
+ inputPerMillion: 0.75,
781
+ outputPerMillion: 3.75,
782
+ cachedInputPerMillion: 0.075,
783
+ provider: LLMProvider.GOOGLE,
784
+ },
785
+ modality: { audioPerMillion: 1.5, videoPerMillion: 0.75 },
786
+ maxOutputTokens: GEMINI_MAX_OUTPUT_TOKENS,
787
+ capabilities: GEMINI_THINKING,
788
+ openRouterSlug: "google/gemini-3.7-flash",
789
+ },
790
+ {
791
+ id: LLMModels.GEMINI_3_8_FLASH,
792
+ label: "Gemini 3.8 Flash",
793
+ provider: LLMProvider.GOOGLE,
794
+ family: "gemini",
795
+ status: "live",
796
+ offeredInChat: true,
797
+ chatOrder: 3,
798
+ premium: true,
799
+ pricing: {
800
+ inputPerMillion: 0.75,
801
+ outputPerMillion: 3.75,
802
+ cachedInputPerMillion: 0.075,
803
+ provider: LLMProvider.GOOGLE,
804
+ },
805
+ modality: { audioPerMillion: 1.5, videoPerMillion: 0.75 },
806
+ maxOutputTokens: GEMINI_MAX_OUTPUT_TOKENS,
807
+ capabilities: GEMINI_THINKING,
808
+ openRouterSlug: "google/gemini-3.8-flash",
809
+ },
810
+ {
811
+ id: LLMModels.GROK_4_5,
812
+ label: "Grok 4.5",
813
+ provider: LLMProvider.OPENROUTER,
814
+ family: "grok",
815
+ status: "live",
816
+ offeredInChat: true,
817
+ chatOrder: 11,
818
+ premium: true,
819
+ pricing: {
820
+ inputPerMillion: 2.2,
821
+ outputPerMillion: 6.6,
822
+ cachedInputPerMillion: 0.22,
823
+ provider: LLMProvider.OPENROUTER,
824
+ },
825
+ maxOutputTokens: OPENROUTER_MAX_OUTPUT_TOKENS,
826
+ capabilities: { ...NO_CAPS, thinking: true, vision: true },
827
+ byokProvider: "openrouter",
828
+ },
829
+ {
830
+ id: LLMModels.GLM_5_2,
831
+ label: "GLM 5.2",
832
+ provider: LLMProvider.OPENROUTER,
833
+ family: "glm",
834
+ status: "live",
835
+ offeredInChat: true,
836
+ chatOrder: 12,
837
+ premium: true,
838
+ pricing: {
839
+ inputPerMillion: 1.023,
840
+ outputPerMillion: 3.3,
841
+ cachedInputPerMillion: 0.1023,
842
+ provider: LLMProvider.OPENROUTER,
843
+ },
844
+ maxOutputTokens: OPENROUTER_MAX_OUTPUT_TOKENS,
845
+ capabilities: { ...NO_CAPS, thinking: true },
846
+ byokProvider: "openrouter",
847
+ },
848
+ ];
849
+ export const OPENAI_DEFAULT_MODEL = LLMModels.GPT_5_5;
850
+ export const CLAUDE_DEFAULT_MODEL = LLMModels.CLAUDE_SONNET_5;
851
+ export const GEMINI_DEFAULT_MODEL = LLMModels.GEMINI_3_7_FLASH;
852
+ export const OPENROUTER_DEFAULT_MODEL = LLMModels.GROK_4_5;
853
+ export const MEDIA_ROUTED_MODEL = GEMINI_DEFAULT_MODEL;
854
+ export const FREE_TIER_MODEL = LLMModels.GEMINI_3_7_FLASH;
855
+ export const DEFAULT_MODELS = {
856
+ OPENAI_DEFAULT_MODEL,
857
+ CLAUDE_DEFAULT_MODEL,
858
+ GEMINI_DEFAULT_MODEL,
859
+ OPENROUTER_DEFAULT_MODEL,
860
+ MEDIA_ROUTED_MODEL,
861
+ FREE_TIER_MODEL,
862
+ };
863
+ const BY_ID = new Map(MODEL_REGISTRY.map((m) => [m.id.toLowerCase(), m]));
864
+ export function getModel(modelId) {
865
+ return BY_ID.get(modelId.toLowerCase());
866
+ }
867
+ export function modelsByStatus(status) {
868
+ return MODEL_REGISTRY.filter((m) => m.status === status);
869
+ }
870
+ export function offeredChatModels() {
871
+ return MODEL_REGISTRY.filter((m) => m.status === "live" && m.offeredInChat).sort((a, b) => (a.chatOrder ?? Infinity) - (b.chatOrder ?? Infinity));
872
+ }
873
+ export function resolveModelId(modelId) {
874
+ let current = getModel(modelId);
875
+ const seen = new Set();
876
+ while (current && current.status === "retired" && current.replacedBy) {
877
+ if (seen.has(current.id))
878
+ return undefined;
879
+ seen.add(current.id);
880
+ current = getModel(current.replacedBy);
881
+ }
882
+ return current?.id;
883
+ }
884
+ export function requiresMediaCapableModel(modelId, modalities) {
885
+ if (!modalities.has("audio") && !modalities.has("video"))
886
+ return false;
887
+ return !(modelId && getModel(modelId)?.capabilities.nativeAudioVideo);
888
+ }
889
+ //# sourceMappingURL=registry.js.map