@just-every/ensemble 0.2.268 → 0.2.270

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 (118) hide show
  1. package/README.md +11 -10
  2. package/dist/cjs/core/ensemble_live.cjs +4 -2
  3. package/dist/cjs/core/ensemble_live.d.ts.map +1 -1
  4. package/dist/cjs/core/ensemble_live.js.map +1 -1
  5. package/dist/cjs/core/ensemble_video.cjs +37 -0
  6. package/dist/cjs/core/ensemble_video.d.ts +3 -0
  7. package/dist/cjs/core/ensemble_video.d.ts.map +1 -0
  8. package/dist/cjs/core/ensemble_video.js.map +1 -0
  9. package/dist/cjs/data/model_data.cjs +362 -152
  10. package/dist/cjs/data/model_data.d.ts +4 -0
  11. package/dist/cjs/data/model_data.d.ts.map +1 -1
  12. package/dist/cjs/data/model_data.js.map +1 -1
  13. package/dist/cjs/index.cjs +3 -1
  14. package/dist/cjs/index.d.ts +1 -0
  15. package/dist/cjs/index.d.ts.map +1 -1
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/cjs/model_providers/deepseek.cjs +6 -97
  18. package/dist/cjs/model_providers/deepseek.d.ts +1 -1
  19. package/dist/cjs/model_providers/deepseek.d.ts.map +1 -1
  20. package/dist/cjs/model_providers/deepseek.js.map +1 -1
  21. package/dist/cjs/model_providers/deepseek_v4_contract.cjs +19 -0
  22. package/dist/cjs/model_providers/deepseek_v4_contract.d.ts +3 -0
  23. package/dist/cjs/model_providers/deepseek_v4_contract.d.ts.map +1 -0
  24. package/dist/cjs/model_providers/deepseek_v4_contract.js.map +1 -0
  25. package/dist/cjs/model_providers/gemini.cjs +10 -4
  26. package/dist/cjs/model_providers/gemini.d.ts.map +1 -1
  27. package/dist/cjs/model_providers/gemini.js.map +1 -1
  28. package/dist/cjs/model_providers/gemini_model_contract.cjs +12 -0
  29. package/dist/cjs/model_providers/gemini_model_contract.d.ts +2 -0
  30. package/dist/cjs/model_providers/gemini_model_contract.d.ts.map +1 -0
  31. package/dist/cjs/model_providers/gemini_model_contract.js.map +1 -0
  32. package/dist/cjs/model_providers/grok.cjs +81 -11
  33. package/dist/cjs/model_providers/grok.d.ts +2 -1
  34. package/dist/cjs/model_providers/grok.d.ts.map +1 -1
  35. package/dist/cjs/model_providers/grok.js.map +1 -1
  36. package/dist/cjs/model_providers/grok_imagine_pricing.cjs +25 -0
  37. package/dist/cjs/model_providers/grok_imagine_pricing.d.ts +10 -0
  38. package/dist/cjs/model_providers/grok_imagine_pricing.d.ts.map +1 -0
  39. package/dist/cjs/model_providers/grok_imagine_pricing.js.map +1 -0
  40. package/dist/cjs/model_providers/model_provider.cjs +2 -0
  41. package/dist/cjs/model_providers/model_provider.d.ts.map +1 -1
  42. package/dist/cjs/model_providers/model_provider.js.map +1 -1
  43. package/dist/cjs/model_providers/openai.cjs +30 -0
  44. package/dist/cjs/model_providers/openai.d.ts +2 -1
  45. package/dist/cjs/model_providers/openai.d.ts.map +1 -1
  46. package/dist/cjs/model_providers/openai.js.map +1 -1
  47. package/dist/cjs/model_providers/openai_chat.cjs +9 -0
  48. package/dist/cjs/model_providers/openai_chat.d.ts.map +1 -1
  49. package/dist/cjs/model_providers/openai_chat.js.map +1 -1
  50. package/dist/cjs/model_providers/openai_realtime.cjs +261 -0
  51. package/dist/cjs/model_providers/openai_realtime.d.ts +40 -0
  52. package/dist/cjs/model_providers/openai_realtime.d.ts.map +1 -0
  53. package/dist/cjs/model_providers/openai_realtime.js.map +1 -0
  54. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  55. package/dist/cjs/types/types.d.ts +28 -3
  56. package/dist/cjs/types/types.d.ts.map +1 -1
  57. package/dist/cjs/utils/cost_tracker.cjs +12 -0
  58. package/dist/cjs/utils/cost_tracker.d.ts.map +1 -1
  59. package/dist/cjs/utils/cost_tracker.js.map +1 -1
  60. package/dist/core/ensemble_live.d.ts.map +1 -1
  61. package/dist/core/ensemble_live.js +4 -2
  62. package/dist/core/ensemble_live.js.map +1 -1
  63. package/dist/core/ensemble_video.d.ts +3 -0
  64. package/dist/core/ensemble_video.d.ts.map +1 -0
  65. package/dist/core/ensemble_video.js +34 -0
  66. package/dist/core/ensemble_video.js.map +1 -0
  67. package/dist/data/model_data.d.ts +4 -0
  68. package/dist/data/model_data.d.ts.map +1 -1
  69. package/dist/data/model_data.js +362 -152
  70. package/dist/data/model_data.js.map +1 -1
  71. package/dist/index.d.ts +1 -0
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +1 -0
  74. package/dist/index.js.map +1 -1
  75. package/dist/model_providers/deepseek.d.ts +1 -1
  76. package/dist/model_providers/deepseek.d.ts.map +1 -1
  77. package/dist/model_providers/deepseek.js +6 -97
  78. package/dist/model_providers/deepseek.js.map +1 -1
  79. package/dist/model_providers/deepseek_v4_contract.d.ts +3 -0
  80. package/dist/model_providers/deepseek_v4_contract.d.ts.map +1 -0
  81. package/dist/model_providers/deepseek_v4_contract.js +16 -0
  82. package/dist/model_providers/deepseek_v4_contract.js.map +1 -0
  83. package/dist/model_providers/gemini.d.ts.map +1 -1
  84. package/dist/model_providers/gemini.js +10 -4
  85. package/dist/model_providers/gemini.js.map +1 -1
  86. package/dist/model_providers/gemini_model_contract.d.ts +2 -0
  87. package/dist/model_providers/gemini_model_contract.d.ts.map +1 -0
  88. package/dist/model_providers/gemini_model_contract.js +9 -0
  89. package/dist/model_providers/gemini_model_contract.js.map +1 -0
  90. package/dist/model_providers/grok.d.ts +2 -1
  91. package/dist/model_providers/grok.d.ts.map +1 -1
  92. package/dist/model_providers/grok.js +81 -11
  93. package/dist/model_providers/grok.js.map +1 -1
  94. package/dist/model_providers/grok_imagine_pricing.d.ts +10 -0
  95. package/dist/model_providers/grok_imagine_pricing.d.ts.map +1 -0
  96. package/dist/model_providers/grok_imagine_pricing.js +21 -0
  97. package/dist/model_providers/grok_imagine_pricing.js.map +1 -0
  98. package/dist/model_providers/model_provider.d.ts.map +1 -1
  99. package/dist/model_providers/model_provider.js +2 -0
  100. package/dist/model_providers/model_provider.js.map +1 -1
  101. package/dist/model_providers/openai.d.ts +2 -1
  102. package/dist/model_providers/openai.d.ts.map +1 -1
  103. package/dist/model_providers/openai.js +30 -0
  104. package/dist/model_providers/openai.js.map +1 -1
  105. package/dist/model_providers/openai_chat.d.ts.map +1 -1
  106. package/dist/model_providers/openai_chat.js +9 -0
  107. package/dist/model_providers/openai_chat.js.map +1 -1
  108. package/dist/model_providers/openai_realtime.d.ts +40 -0
  109. package/dist/model_providers/openai_realtime.d.ts.map +1 -0
  110. package/dist/model_providers/openai_realtime.js +223 -0
  111. package/dist/model_providers/openai_realtime.js.map +1 -0
  112. package/dist/tsconfig.tsbuildinfo +1 -1
  113. package/dist/types/types.d.ts +28 -3
  114. package/dist/types/types.d.ts.map +1 -1
  115. package/dist/utils/cost_tracker.d.ts.map +1 -1
  116. package/dist/utils/cost_tracker.js +12 -0
  117. package/dist/utils/cost_tracker.js.map +1 -1
  118. package/package.json +1 -1
@@ -3,7 +3,7 @@ export const MODEL_CLASSES = {
3
3
  standard: {
4
4
  models: [
5
5
  'gpt-5.5',
6
- 'gemini-3-flash-preview',
6
+ 'gemini-3.6-flash',
7
7
  'claude-sonnet-5',
8
8
  'grok-4.5',
9
9
  ],
@@ -12,7 +12,7 @@ export const MODEL_CLASSES = {
12
12
  mini: {
13
13
  models: [
14
14
  'gpt-5.4-nano',
15
- 'gemini-2.5-flash-lite',
15
+ 'gemini-3.5-flash-lite',
16
16
  'claude-haiku-4-5-20251001',
17
17
  'grok-3-mini',
18
18
  ],
@@ -39,7 +39,7 @@ export const MODEL_CLASSES = {
39
39
  reasoning_mini: {
40
40
  models: [
41
41
  'gpt-5.4-mini',
42
- 'gemini-3-flash-preview',
42
+ 'gemini-3.5-flash-lite',
43
43
  'claude-sonnet-5',
44
44
  'grok-3-mini',
45
45
  ],
@@ -76,7 +76,7 @@ export const MODEL_CLASSES = {
76
76
  writing: {
77
77
  models: [
78
78
  'gpt-5.5',
79
- 'gemini-3-flash-preview',
79
+ 'gemini-3.6-flash',
80
80
  'claude-sonnet-5',
81
81
  'grok-4.5',
82
82
  ],
@@ -85,7 +85,7 @@ export const MODEL_CLASSES = {
85
85
  summary: {
86
86
  models: [
87
87
  'gpt-5-nano',
88
- 'gemini-2.5-flash-lite',
88
+ 'gemini-3.5-flash-lite',
89
89
  'claude-haiku-4-5-20251001',
90
90
  'grok-3-mini',
91
91
  ],
@@ -103,7 +103,7 @@ export const MODEL_CLASSES = {
103
103
  vision_mini: {
104
104
  models: [
105
105
  'gpt-5.4-mini',
106
- 'gemini-3-flash-preview',
106
+ 'gemini-3.5-flash-lite',
107
107
  'claude-haiku-4-5-20251001',
108
108
  'grok-3-mini',
109
109
  ],
@@ -135,13 +135,17 @@ export const MODEL_CLASSES = {
135
135
  'luma-photon-1',
136
136
  'ideogram-3.0',
137
137
  'midjourney-v7',
138
- 'grok-imagine-image-pro',
138
+ 'grok-imagine-image-quality',
139
139
  'flux-kontext-pro',
140
140
  'stability-ultra',
141
141
  'runway-gen4-image',
142
142
  'recraft-v3',
143
143
  ],
144
144
  },
145
+ video_generation: {
146
+ models: ['grok-imagine-video', 'grok-imagine-video-1.5'],
147
+ description: 'Video generation and image-to-video models',
148
+ },
145
149
  embedding: {
146
150
  models: [
147
151
  'text-embedding-3-large',
@@ -152,7 +156,7 @@ export const MODEL_CLASSES = {
152
156
  voice: {
153
157
  models: [
154
158
  'tts-1-hd',
155
- 'eleven_multilingual_v2',
159
+ 'eleven_v3',
156
160
  'gemini-3.1-flash-tts-preview',
157
161
  ],
158
162
  description: 'Text-to-Speech models for voice generation',
@@ -445,8 +449,8 @@ export const MODEL_REGISTRY = [
445
449
  id: 'meta-llama/llama-4-maverick',
446
450
  provider: 'openrouter',
447
451
  cost: {
448
- input_per_million: 0.15,
449
- output_per_million: 0.6,
452
+ input_per_million: 0.2,
453
+ output_per_million: 0.8,
450
454
  },
451
455
  features: {
452
456
  context_length: 1048576,
@@ -470,11 +474,11 @@ export const MODEL_REGISTRY = [
470
474
  id: 'meta-llama/llama-4-scout',
471
475
  provider: 'openrouter',
472
476
  cost: {
473
- input_per_million: 0.08,
477
+ input_per_million: 0.1,
474
478
  output_per_million: 0.3,
475
479
  },
476
480
  features: {
477
- context_length: 10000000,
481
+ context_length: 1310720,
478
482
  input_modality: ['text', 'image'],
479
483
  output_modality: ['text'],
480
484
  tool_use: true,
@@ -540,12 +544,27 @@ export const MODEL_REGISTRY = [
540
544
  },
541
545
  {
542
546
  id: 'grok-4.5',
543
- aliases: ['grok-4.5-latest', 'grok-build-latest'],
547
+ aliases: ['grok-4.5-latest'],
544
548
  provider: 'xai',
545
549
  cost: {
546
- input_per_million: 2.0,
547
- output_per_million: 6.0,
548
- cached_input_per_million: 0.5,
550
+ input_per_million: {
551
+ threshold_tokens: 200_000,
552
+ price_below_threshold_per_million: 2,
553
+ price_above_threshold_per_million: 4,
554
+ tier_basis: 'input_tokens',
555
+ },
556
+ cached_input_per_million: {
557
+ threshold_tokens: 200_000,
558
+ price_below_threshold_per_million: 0.3,
559
+ price_above_threshold_per_million: 0.6,
560
+ tier_basis: 'input_tokens',
561
+ },
562
+ output_per_million: {
563
+ threshold_tokens: 200_000,
564
+ price_below_threshold_per_million: 6,
565
+ price_above_threshold_per_million: 12,
566
+ tier_basis: 'input_tokens',
567
+ },
549
568
  },
550
569
  features: {
551
570
  context_length: 500_000,
@@ -561,10 +580,27 @@ export const MODEL_REGISTRY = [
561
580
  },
562
581
  {
563
582
  id: 'grok-4.3',
583
+ aliases: ['grok-4.3-latest', 'grok-latest'],
564
584
  provider: 'xai',
565
585
  cost: {
566
- input_per_million: 1.25,
567
- output_per_million: 2.5,
586
+ input_per_million: {
587
+ threshold_tokens: 200_000,
588
+ price_below_threshold_per_million: 1.25,
589
+ price_above_threshold_per_million: 2.5,
590
+ tier_basis: 'input_tokens',
591
+ },
592
+ cached_input_per_million: {
593
+ threshold_tokens: 200_000,
594
+ price_below_threshold_per_million: 0.2,
595
+ price_above_threshold_per_million: 0.4,
596
+ tier_basis: 'input_tokens',
597
+ },
598
+ output_per_million: {
599
+ threshold_tokens: 200_000,
600
+ price_below_threshold_per_million: 2.5,
601
+ price_above_threshold_per_million: 5,
602
+ tier_basis: 'input_tokens',
603
+ },
568
604
  },
569
605
  features: {
570
606
  context_length: 1_000_000,
@@ -579,11 +615,27 @@ export const MODEL_REGISTRY = [
579
615
  },
580
616
  {
581
617
  id: 'grok-build-0.1',
582
- aliases: ['grok-build'],
618
+ aliases: ['grok-build', 'grok-build-latest', 'grok-code-fast-1', 'grok-code-fast'],
583
619
  provider: 'xai',
584
620
  cost: {
585
- input_per_million: 1.0,
586
- output_per_million: 2.0,
621
+ input_per_million: {
622
+ threshold_tokens: 200_000,
623
+ price_below_threshold_per_million: 1,
624
+ price_above_threshold_per_million: 2,
625
+ tier_basis: 'input_tokens',
626
+ },
627
+ cached_input_per_million: {
628
+ threshold_tokens: 200_000,
629
+ price_below_threshold_per_million: 0.2,
630
+ price_above_threshold_per_million: 0.4,
631
+ tier_basis: 'input_tokens',
632
+ },
633
+ output_per_million: {
634
+ threshold_tokens: 200_000,
635
+ price_below_threshold_per_million: 2,
636
+ price_above_threshold_per_million: 4,
637
+ tier_basis: 'input_tokens',
638
+ },
587
639
  },
588
640
  features: {
589
641
  context_length: 256000,
@@ -649,16 +701,31 @@ export const MODEL_REGISTRY = [
649
701
  description: 'Grok 4.1 Fast without reasoning. 2M context, flat pricing, text/image input.',
650
702
  },
651
703
  {
652
- id: 'grok-4',
653
- aliases: ['grok-4-2025-09-01', 'grok-4.20-0309-reasoning'],
704
+ id: 'grok-4.20-0309-reasoning',
705
+ aliases: ['grok-4', 'grok-4.20', 'grok-4.20-reasoning', 'grok-4.20-reasoning-latest'],
654
706
  provider: 'xai',
655
707
  cost: {
656
- input_per_million: 2.0,
657
- output_per_million: 6.0,
658
- cached_input_per_million: 0.2,
708
+ input_per_million: {
709
+ threshold_tokens: 200_000,
710
+ price_below_threshold_per_million: 1.25,
711
+ price_above_threshold_per_million: 2.5,
712
+ tier_basis: 'input_tokens',
713
+ },
714
+ cached_input_per_million: {
715
+ threshold_tokens: 200_000,
716
+ price_below_threshold_per_million: 0.2,
717
+ price_above_threshold_per_million: 0.4,
718
+ tier_basis: 'input_tokens',
719
+ },
720
+ output_per_million: {
721
+ threshold_tokens: 200_000,
722
+ price_below_threshold_per_million: 2.5,
723
+ price_above_threshold_per_million: 5,
724
+ tier_basis: 'input_tokens',
725
+ },
659
726
  },
660
727
  features: {
661
- context_length: 2_000_000,
728
+ context_length: 1_000_000,
662
729
  input_modality: ['text', 'image'],
663
730
  output_modality: ['text'],
664
731
  tool_use: true,
@@ -672,18 +739,34 @@ export const MODEL_REGISTRY = [
672
739
  code: 88,
673
740
  reasoning: 85,
674
741
  },
675
- description: 'Grok-4 stable alias, currently resolving to the Grok 4.20 reasoning model with 2M context.',
742
+ description: 'Grok 4.20 reasoning model with 1M context and long-context pricing above 200k input tokens.',
676
743
  },
677
744
  {
678
745
  id: 'grok-4.20-0309-non-reasoning',
746
+ aliases: ['grok-4.20-non-reasoning', 'grok-4.20-non-reasoning-latest'],
679
747
  provider: 'xai',
680
748
  cost: {
681
- input_per_million: 2.0,
682
- output_per_million: 6.0,
683
- cached_input_per_million: 0.2,
749
+ input_per_million: {
750
+ threshold_tokens: 200_000,
751
+ price_below_threshold_per_million: 1.25,
752
+ price_above_threshold_per_million: 2.5,
753
+ tier_basis: 'input_tokens',
754
+ },
755
+ cached_input_per_million: {
756
+ threshold_tokens: 200_000,
757
+ price_below_threshold_per_million: 0.2,
758
+ price_above_threshold_per_million: 0.4,
759
+ tier_basis: 'input_tokens',
760
+ },
761
+ output_per_million: {
762
+ threshold_tokens: 200_000,
763
+ price_below_threshold_per_million: 2.5,
764
+ price_above_threshold_per_million: 5,
765
+ tier_basis: 'input_tokens',
766
+ },
684
767
  },
685
768
  features: {
686
- context_length: 2_000_000,
769
+ context_length: 1_000_000,
687
770
  input_modality: ['text', 'image'],
688
771
  output_modality: ['text'],
689
772
  tool_use: true,
@@ -701,14 +784,30 @@ export const MODEL_REGISTRY = [
701
784
  },
702
785
  {
703
786
  id: 'grok-4.20-multi-agent-0309',
787
+ aliases: ['grok-4.20-multi-agent', 'grok-4.20-multi-agent-latest'],
704
788
  provider: 'xai',
705
789
  cost: {
706
- input_per_million: 2.0,
707
- output_per_million: 6.0,
708
- cached_input_per_million: 0.2,
790
+ input_per_million: {
791
+ threshold_tokens: 200_000,
792
+ price_below_threshold_per_million: 1.25,
793
+ price_above_threshold_per_million: 2.5,
794
+ tier_basis: 'input_tokens',
795
+ },
796
+ cached_input_per_million: {
797
+ threshold_tokens: 200_000,
798
+ price_below_threshold_per_million: 0.2,
799
+ price_above_threshold_per_million: 0.4,
800
+ tier_basis: 'input_tokens',
801
+ },
802
+ output_per_million: {
803
+ threshold_tokens: 200_000,
804
+ price_below_threshold_per_million: 2.5,
805
+ price_above_threshold_per_million: 5,
806
+ tier_basis: 'input_tokens',
807
+ },
709
808
  },
710
809
  features: {
711
- context_length: 2_000_000,
810
+ context_length: 1_000_000,
712
811
  input_modality: ['text', 'image'],
713
812
  output_modality: ['text'],
714
813
  tool_use: true,
@@ -2365,6 +2464,27 @@ export const MODEL_REGISTRY = [
2365
2464
  class: 'standard',
2366
2465
  description: 'Gemini 3 Flash Preview - fast multimodal model with 1M context window.',
2367
2466
  },
2467
+ {
2468
+ id: 'gemini-3.6-flash',
2469
+ aliases: ['gemini-flash-latest', 'models/gemini-3.6-flash', 'models/gemini-flash-latest'],
2470
+ provider: 'google',
2471
+ cost: {
2472
+ input_per_million: 1.5,
2473
+ output_per_million: 7.5,
2474
+ cached_input_per_million: 0.15,
2475
+ },
2476
+ features: {
2477
+ context_length: 1048576,
2478
+ input_modality: ['text', 'image', 'video', 'audio'],
2479
+ output_modality: ['text'],
2480
+ tool_use: true,
2481
+ streaming: true,
2482
+ json_output: true,
2483
+ max_output_tokens: 65536,
2484
+ },
2485
+ class: 'standard',
2486
+ description: 'Gemini 3.6 Flash - stable frontier multimodal model optimized for agentic execution, coding, spatial reasoning, and efficient tool use.',
2487
+ },
2368
2488
  {
2369
2489
  id: 'gemini-3.5-flash',
2370
2490
  provider: 'google',
@@ -2386,6 +2506,27 @@ export const MODEL_REGISTRY = [
2386
2506
  score: 88,
2387
2507
  description: 'Gemini 3.5 Flash - fast multimodal reasoning model with 1M context and native thinking levels.',
2388
2508
  },
2509
+ {
2510
+ id: 'gemini-3.5-flash-lite',
2511
+ aliases: ['gemini-flash-lite-latest', 'models/gemini-3.5-flash-lite', 'models/gemini-flash-lite-latest'],
2512
+ provider: 'google',
2513
+ cost: {
2514
+ input_per_million: 0.3,
2515
+ output_per_million: 2.5,
2516
+ cached_input_per_million: 0.03,
2517
+ },
2518
+ features: {
2519
+ context_length: 1048576,
2520
+ input_modality: ['text', 'image', 'video', 'audio'],
2521
+ output_modality: ['text'],
2522
+ tool_use: true,
2523
+ streaming: true,
2524
+ json_output: true,
2525
+ max_output_tokens: 65536,
2526
+ },
2527
+ class: 'reasoning_mini',
2528
+ description: 'Gemini 3.5 Flash-Lite - stable low-latency multimodal model for high-throughput subagents, document parsing, extraction, and structured data tasks.',
2529
+ },
2389
2530
  {
2390
2531
  id: 'gemini-3.1-flash-lite',
2391
2532
  aliases: ['gemini-3.1-flash-lite-preview'],
@@ -2729,6 +2870,63 @@ export const MODEL_REGISTRY = [
2729
2870
  class: 'voice',
2730
2871
  description: "OpenAI's advanced text-to-speech model with natural-sounding output. Supports customizable tone, style, and emotion through instructions. 85% cheaper than ElevenLabs with estimated $0.015/minute of audio.",
2731
2872
  },
2873
+ {
2874
+ id: 'gpt-realtime-2.1',
2875
+ provider: 'openai',
2876
+ cost: {
2877
+ input_per_million: { text: 4, audio: 32, image: 5 },
2878
+ cached_input_per_million: { text: 0.4 },
2879
+ output_per_million: { text: 24, audio: 64 },
2880
+ },
2881
+ features: {
2882
+ context_length: 128000,
2883
+ max_output_tokens: 32000,
2884
+ input_modality: ['text', 'audio', 'image'],
2885
+ output_modality: ['text', 'audio'],
2886
+ tool_use: true,
2887
+ streaming: true,
2888
+ reasoning_output: true,
2889
+ },
2890
+ class: 'voice',
2891
+ description: 'OpenAI flagship GA Realtime model for low-latency text and audio conversations with tools.',
2892
+ },
2893
+ {
2894
+ id: 'gpt-realtime-2.1-mini',
2895
+ provider: 'openai',
2896
+ cost: {
2897
+ input_per_million: { text: 0.6, audio: 10, image: 0.8 },
2898
+ cached_input_per_million: { text: 0.06 },
2899
+ output_per_million: { text: 2.4, audio: 20 },
2900
+ },
2901
+ features: {
2902
+ context_length: 128000,
2903
+ max_output_tokens: 32000,
2904
+ input_modality: ['text', 'audio', 'image'],
2905
+ output_modality: ['text', 'audio'],
2906
+ tool_use: true,
2907
+ streaming: true,
2908
+ },
2909
+ class: 'voice',
2910
+ description: 'OpenAI cost-efficient GA Realtime model for low-latency text and audio conversations.',
2911
+ },
2912
+ {
2913
+ id: 'gpt-audio-1.5',
2914
+ provider: 'openai',
2915
+ cost: {
2916
+ input_per_million: { text: 2.5, audio: 32 },
2917
+ output_per_million: { text: 10, audio: 64 },
2918
+ },
2919
+ features: {
2920
+ context_length: 128000,
2921
+ max_output_tokens: 16384,
2922
+ input_modality: ['text', 'audio'],
2923
+ output_modality: ['text', 'audio'],
2924
+ tool_use: true,
2925
+ streaming: true,
2926
+ },
2927
+ class: 'voice',
2928
+ description: 'OpenAI Chat Completions audio model supporting audio input/output, streaming, and tools.',
2929
+ },
2732
2930
  {
2733
2931
  id: 'tts-1',
2734
2932
  provider: 'openai',
@@ -2770,27 +2968,30 @@ export const MODEL_REGISTRY = [
2770
2968
  input_modality: ['text'],
2771
2969
  output_modality: ['audio'],
2772
2970
  streaming: true,
2971
+ max_input_characters: 10000,
2773
2972
  },
2774
2973
  class: 'voice',
2775
2974
  description: "ElevenLabs' multilingual high quality text-to-speech model supporting 29 languages with natural voice capabilities.",
2776
2975
  },
2777
2976
  {
2778
- id: 'eleven_turbo_v2_5',
2977
+ id: 'eleven_v3',
2779
2978
  provider: 'elevenlabs',
2780
2979
  cost: {
2781
- input_per_million: 27.5,
2980
+ input_per_million: 55,
2782
2981
  output_per_million: 0,
2783
2982
  },
2784
2983
  features: {
2785
2984
  input_modality: ['text'],
2786
2985
  output_modality: ['audio'],
2787
2986
  streaming: true,
2987
+ max_input_characters: 5000,
2788
2988
  },
2789
2989
  class: 'voice',
2790
- description: "ElevenLabs' turbo model optimized for low-latency text-to-speech with high quality output.",
2990
+ description: "ElevenLabs' most expressive multilingual text-to-speech model with audio tags and dialogue support.",
2791
2991
  },
2792
2992
  {
2793
2993
  id: 'eleven_flash_v2_5',
2994
+ aliases: ['eleven_turbo_v2_5'],
2794
2995
  provider: 'elevenlabs',
2795
2996
  cost: {
2796
2997
  input_per_million: 27.5,
@@ -2800,6 +3001,7 @@ export const MODEL_REGISTRY = [
2800
3001
  input_modality: ['text'],
2801
3002
  output_modality: ['audio'],
2802
3003
  streaming: true,
3004
+ max_input_characters: 40000,
2803
3005
  },
2804
3006
  class: 'voice',
2805
3007
  description: "ElevenLabs' fastest model optimized for ultra low-latency text-to-speech.",
@@ -3141,23 +3343,26 @@ export const MODEL_REGISTRY = [
3141
3343
  description: 'Midjourney v7 text-to-image (via KIE API; requires third-party API key).',
3142
3344
  },
3143
3345
  {
3144
- id: 'grok-imagine-image-pro',
3346
+ id: 'grok-imagine-image-quality',
3347
+ aliases: ['grok-imagine-image-pro'],
3145
3348
  provider: 'xai',
3146
3349
  cost: {
3147
- per_image: 0.07,
3350
+ per_input_image: 0.01,
3351
+ per_image_by_resolution: { '1k': 0.05, '2k': 0.07 },
3148
3352
  },
3149
3353
  features: {
3150
3354
  input_modality: ['text', 'image'],
3151
3355
  output_modality: ['image'],
3152
3356
  },
3153
3357
  class: 'image_generation',
3154
- description: 'xAI Grok Imagine Image Pro for premium text-to-image and image-guided image generation.',
3358
+ description: 'xAI Grok Imagine Image Quality for premium 1K/2K image generation and editing.',
3155
3359
  },
3156
3360
  {
3157
3361
  id: 'grok-imagine-image',
3158
3362
  provider: 'xai',
3159
3363
  cost: {
3160
3364
  per_image: 0.02,
3365
+ per_input_image: 0.002,
3161
3366
  },
3162
3367
  features: {
3163
3368
  input_modality: ['text', 'image'],
@@ -3166,6 +3371,36 @@ export const MODEL_REGISTRY = [
3166
3371
  class: 'image_generation',
3167
3372
  description: 'xAI Grok Imagine Image for lower-cost text-to-image and image-guided image generation.',
3168
3373
  },
3374
+ {
3375
+ id: 'grok-imagine-video',
3376
+ provider: 'xai',
3377
+ cost: {
3378
+ per_input_image: 0.002,
3379
+ per_input_second: 0.01,
3380
+ per_second_by_resolution: { '480p': 0.05, '720p': 0.07 },
3381
+ },
3382
+ features: {
3383
+ input_modality: ['text', 'image', 'video'],
3384
+ output_modality: ['video'],
3385
+ },
3386
+ class: 'video_generation',
3387
+ description: 'xAI Grok Imagine Video for text-to-video, image-to-video, and video editing up to 15 seconds.',
3388
+ },
3389
+ {
3390
+ id: 'grok-imagine-video-1.5',
3391
+ aliases: ['grok-imagine-video-1.5-preview'],
3392
+ provider: 'xai',
3393
+ cost: {
3394
+ per_input_image: 0.01,
3395
+ per_second_by_resolution: { '480p': 0.08, '720p': 0.14, '1080p': 0.25 },
3396
+ },
3397
+ features: {
3398
+ input_modality: ['image'],
3399
+ output_modality: ['video'],
3400
+ },
3401
+ class: 'video_generation',
3402
+ description: 'xAI Grok Imagine Video 1.5 for premium image-to-video generation up to 1080p.',
3403
+ },
3169
3404
  {
3170
3405
  id: 'imagen-2',
3171
3406
  provider: 'google',
@@ -3333,92 +3568,48 @@ export const MODEL_REGISTRY = [
3333
3568
  description: 'OpenAI Whisper transcription with full-turn output',
3334
3569
  },
3335
3570
  {
3336
- id: 'deepseek-chat',
3337
- aliases: ['deepseek-v3-0324'],
3571
+ id: 'deepseek-v4-pro',
3572
+ aliases: ['DeepSeek-V4', 'DeepSeek-V4-Pro', 'deepseek-v4'],
3338
3573
  provider: 'deepseek',
3339
3574
  cost: {
3340
- input_per_million: {
3341
- peak_utc_start_hour: 0,
3342
- peak_utc_start_minute: 30,
3343
- peak_utc_end_hour: 16,
3344
- peak_utc_end_minute: 30,
3345
- peak_price_per_million: 0.27,
3346
- off_peak_price_per_million: 0.135,
3347
- },
3348
- cached_input_per_million: {
3349
- peak_utc_start_hour: 0,
3350
- peak_utc_start_minute: 30,
3351
- peak_utc_end_hour: 16,
3352
- peak_utc_end_minute: 30,
3353
- peak_price_per_million: 0.07,
3354
- off_peak_price_per_million: 0.035,
3355
- },
3356
- output_per_million: {
3357
- peak_utc_start_hour: 0,
3358
- peak_utc_start_minute: 30,
3359
- peak_utc_end_hour: 16,
3360
- peak_utc_end_minute: 30,
3361
- peak_price_per_million: 1.1,
3362
- off_peak_price_per_million: 0.55,
3363
- },
3575
+ input_per_million: 0.435,
3576
+ cached_input_per_million: 0.003625,
3577
+ output_per_million: 0.87,
3364
3578
  },
3365
3579
  features: {
3366
- context_length: 64000,
3367
- max_output_tokens: 8192,
3580
+ context_length: 1_000_000,
3581
+ max_output_tokens: 384_000,
3368
3582
  input_modality: ['text'],
3369
3583
  output_modality: ['text'],
3370
3584
  tool_use: true,
3371
3585
  streaming: true,
3372
3586
  json_output: true,
3587
+ reasoning_output: true,
3373
3588
  },
3374
- class: 'standard',
3375
- score: 75,
3376
- description: 'DeepSeek-V3 chat model with FIM completion support and time-based pricing',
3589
+ class: 'reasoning',
3590
+ description: 'DeepSeek V4 Pro direct API model with native tools, JSON output, and high/max reasoning.',
3377
3591
  },
3378
3592
  {
3379
- id: 'deepseek-reasoner',
3380
- aliases: ['deepseek-r1-0528'],
3593
+ id: 'deepseek-v4-flash',
3594
+ aliases: ['DeepSeek-V4-Flash'],
3381
3595
  provider: 'deepseek',
3382
3596
  cost: {
3383
- input_per_million: {
3384
- peak_utc_start_hour: 0,
3385
- peak_utc_start_minute: 30,
3386
- peak_utc_end_hour: 16,
3387
- peak_utc_end_minute: 30,
3388
- peak_price_per_million: 0.55,
3389
- off_peak_price_per_million: 0.1375,
3390
- },
3391
- cached_input_per_million: {
3392
- peak_utc_start_hour: 0,
3393
- peak_utc_start_minute: 30,
3394
- peak_utc_end_hour: 16,
3395
- peak_utc_end_minute: 30,
3396
- peak_price_per_million: 0.14,
3397
- off_peak_price_per_million: 0.035,
3398
- },
3399
- output_per_million: {
3400
- peak_utc_start_hour: 0,
3401
- peak_utc_start_minute: 30,
3402
- peak_utc_end_hour: 16,
3403
- peak_utc_end_minute: 30,
3404
- peak_price_per_million: 2.19,
3405
- off_peak_price_per_million: 0.5475,
3406
- },
3597
+ input_per_million: 0.14,
3598
+ cached_input_per_million: 0.0028,
3599
+ output_per_million: 0.28,
3407
3600
  },
3408
3601
  features: {
3409
- context_length: 64000,
3410
- max_output_tokens: 64000,
3602
+ context_length: 1_000_000,
3603
+ max_output_tokens: 384_000,
3411
3604
  input_modality: ['text'],
3412
3605
  output_modality: ['text'],
3413
3606
  tool_use: true,
3414
- simulate_tools: true,
3415
3607
  streaming: true,
3416
3608
  json_output: true,
3417
3609
  reasoning_output: true,
3418
3610
  },
3419
3611
  class: 'reasoning',
3420
- score: 85,
3421
- description: 'DeepSeek-R1 advanced reasoning model with extended output and time-based pricing',
3612
+ description: 'DeepSeek V4 Flash direct API model with native tools and switchable thinking.',
3422
3613
  },
3423
3614
  {
3424
3615
  id: 'gpt-oss-120b',
@@ -3426,8 +3617,8 @@ export const MODEL_REGISTRY = [
3426
3617
  provider: 'openrouter',
3427
3618
  openrouter_id: 'openai/gpt-oss-120b',
3428
3619
  cost: {
3429
- input_per_million: 0.03,
3430
- output_per_million: 0.15,
3620
+ input_per_million: 0.037,
3621
+ output_per_million: 0.17,
3431
3622
  },
3432
3623
  features: {
3433
3624
  context_length: 131072,
@@ -3448,8 +3639,8 @@ export const MODEL_REGISTRY = [
3448
3639
  provider: 'openrouter',
3449
3640
  openrouter_id: 'openai/gpt-oss-20b',
3450
3641
  cost: {
3451
- input_per_million: 0.029,
3452
- output_per_million: 0.14,
3642
+ input_per_million: 0.03,
3643
+ output_per_million: 0.13,
3453
3644
  },
3454
3645
  features: {
3455
3646
  context_length: 131072,
@@ -3469,9 +3660,9 @@ export const MODEL_REGISTRY = [
3469
3660
  provider: 'openrouter',
3470
3661
  openrouter_id: 'qwen/qwen3.7-max',
3471
3662
  cost: {
3472
- input_per_million: 1.25,
3473
- cached_input_per_million: 0.25,
3474
- output_per_million: 3.75,
3663
+ input_per_million: 1.475,
3664
+ cached_input_per_million: 0.295,
3665
+ output_per_million: 4.425,
3475
3666
  },
3476
3667
  features: {
3477
3668
  context_length: 1000000,
@@ -3604,9 +3795,9 @@ export const MODEL_REGISTRY = [
3604
3795
  provider: 'openrouter',
3605
3796
  openrouter_id: 'qwen/qwen3.6-27b',
3606
3797
  cost: {
3607
- input_per_million: 0.285,
3798
+ input_per_million: 0.45,
3608
3799
  cached_input_per_million: 0.15,
3609
- output_per_million: 2.4,
3800
+ output_per_million: 2.7,
3610
3801
  },
3611
3802
  features: {
3612
3803
  context_length: 262144,
@@ -3615,7 +3806,7 @@ export const MODEL_REGISTRY = [
3615
3806
  tool_use: true,
3616
3807
  streaming: true,
3617
3808
  json_output: true,
3618
- max_output_tokens: 262140,
3809
+ max_output_tokens: 65536,
3619
3810
  reasoning_output: true,
3620
3811
  },
3621
3812
  class: 'reasoning',
@@ -3627,9 +3818,8 @@ export const MODEL_REGISTRY = [
3627
3818
  provider: 'openrouter',
3628
3819
  openrouter_id: 'qwen/qwen3-235b-a22b-thinking-2507',
3629
3820
  cost: {
3630
- input_per_million: 0.1,
3631
- cached_input_per_million: 0.1,
3632
- output_per_million: 0.1,
3821
+ input_per_million: 0.3,
3822
+ output_per_million: 3,
3633
3823
  },
3634
3824
  features: {
3635
3825
  context_length: 262144,
@@ -3638,7 +3828,7 @@ export const MODEL_REGISTRY = [
3638
3828
  tool_use: true,
3639
3829
  streaming: true,
3640
3830
  json_output: true,
3641
- max_output_tokens: 262144,
3831
+ max_output_tokens: 32768,
3642
3832
  reasoning_output: true,
3643
3833
  },
3644
3834
  class: 'reasoning',
@@ -3651,11 +3841,11 @@ export const MODEL_REGISTRY = [
3651
3841
  provider: 'openrouter',
3652
3842
  openrouter_id: 'qwen/qwen3-coder',
3653
3843
  cost: {
3654
- input_per_million: 0.22,
3655
- output_per_million: 1.8,
3844
+ input_per_million: 0.3,
3845
+ output_per_million: 1,
3656
3846
  },
3657
3847
  features: {
3658
- context_length: 1048576,
3848
+ context_length: 262144,
3659
3849
  input_modality: ['text'],
3660
3850
  output_modality: ['text'],
3661
3851
  tool_use: true,
@@ -3678,7 +3868,7 @@ export const MODEL_REGISTRY = [
3678
3868
  cached_input_per_million: 0.1794,
3679
3869
  },
3680
3870
  features: {
3681
- context_length: 202752,
3871
+ context_length: 204800,
3682
3872
  input_modality: ['text'],
3683
3873
  output_modality: ['text'],
3684
3874
  tool_use: true,
@@ -3695,9 +3885,9 @@ export const MODEL_REGISTRY = [
3695
3885
  provider: 'openrouter',
3696
3886
  openrouter_id: 'z-ai/glm-5.2',
3697
3887
  cost: {
3698
- input_per_million: 0.93,
3699
- output_per_million: 3.0,
3700
- cached_input_per_million: 0.18,
3888
+ input_per_million: 0.7756,
3889
+ output_per_million: 2.4376,
3890
+ cached_input_per_million: 0.14404,
3701
3891
  },
3702
3892
  features: {
3703
3893
  context_length: 1048576,
@@ -3706,7 +3896,7 @@ export const MODEL_REGISTRY = [
3706
3896
  tool_use: true,
3707
3897
  streaming: true,
3708
3898
  json_output: true,
3709
- max_output_tokens: 32768,
3899
+ max_output_tokens: 131072,
3710
3900
  reasoning_output: true,
3711
3901
  },
3712
3902
  class: 'reasoning',
@@ -3714,7 +3904,6 @@ export const MODEL_REGISTRY = [
3714
3904
  },
3715
3905
  {
3716
3906
  id: 'deepseek/deepseek-v4-pro',
3717
- aliases: ['DeepSeek-V4', 'DeepSeek-V4-Pro', 'deepseek-v4', 'deepseek-v4-pro'],
3718
3907
  provider: 'openrouter',
3719
3908
  openrouter_id: 'deepseek/deepseek-v4-pro',
3720
3909
  cost: {
@@ -3737,13 +3926,12 @@ export const MODEL_REGISTRY = [
3737
3926
  },
3738
3927
  {
3739
3928
  id: 'deepseek/deepseek-v4-flash',
3740
- aliases: ['DeepSeek-V4-Flash', 'deepseek-v4-flash'],
3741
3929
  provider: 'openrouter',
3742
3930
  openrouter_id: 'deepseek/deepseek-v4-flash',
3743
3931
  cost: {
3744
- input_per_million: 0.09,
3745
- cached_input_per_million: 0.018,
3746
- output_per_million: 0.18,
3932
+ input_per_million: 0.0938,
3933
+ cached_input_per_million: 0.01876,
3934
+ output_per_million: 0.1876,
3747
3935
  },
3748
3936
  features: {
3749
3937
  context_length: 1048576,
@@ -3752,7 +3940,7 @@ export const MODEL_REGISTRY = [
3752
3940
  tool_use: true,
3753
3941
  streaming: true,
3754
3942
  json_output: true,
3755
- max_output_tokens: 131072,
3943
+ max_output_tokens: 384000,
3756
3944
  reasoning_output: true,
3757
3945
  },
3758
3946
  class: 'reasoning',
@@ -3764,12 +3952,12 @@ export const MODEL_REGISTRY = [
3764
3952
  provider: 'openrouter',
3765
3953
  openrouter_id: 'xiaomi/mimo-v2.5',
3766
3954
  cost: {
3767
- input_per_million: 0.105,
3768
- cached_input_per_million: 0.028,
3955
+ input_per_million: 0.14,
3956
+ cached_input_per_million: 0.0028,
3769
3957
  output_per_million: 0.28,
3770
3958
  },
3771
3959
  features: {
3772
- context_length: 1048576,
3960
+ context_length: 1050000,
3773
3961
  input_modality: ['text', 'audio', 'image', 'video'],
3774
3962
  output_modality: ['text'],
3775
3963
  tool_use: true,
@@ -3792,7 +3980,7 @@ export const MODEL_REGISTRY = [
3792
3980
  output_per_million: 0.87,
3793
3981
  },
3794
3982
  features: {
3795
- context_length: 1048576,
3983
+ context_length: 1050000,
3796
3984
  input_modality: ['text'],
3797
3985
  output_modality: ['text'],
3798
3986
  tool_use: true,
@@ -3834,9 +4022,9 @@ export const MODEL_REGISTRY = [
3834
4022
  provider: 'openrouter',
3835
4023
  openrouter_id: 'tencent/hy3',
3836
4024
  cost: {
3837
- input_per_million: 0.2,
3838
- cached_input_per_million: 0.5,
3839
- output_per_million: 0.8,
4025
+ input_per_million: 0.14,
4026
+ cached_input_per_million: 0.035,
4027
+ output_per_million: 0.58,
3840
4028
  },
3841
4029
  features: {
3842
4030
  context_length: 262144,
@@ -3845,7 +4033,7 @@ export const MODEL_REGISTRY = [
3845
4033
  tool_use: true,
3846
4034
  streaming: true,
3847
4035
  json_output: false,
3848
- max_output_tokens: 131072,
4036
+ max_output_tokens: 262144,
3849
4037
  reasoning_output: true,
3850
4038
  },
3851
4039
  class: 'reasoning',
@@ -3856,9 +4044,9 @@ export const MODEL_REGISTRY = [
3856
4044
  aliases: ['kimi-k2.5', 'kimi-k2-5'],
3857
4045
  provider: 'openrouter',
3858
4046
  cost: {
3859
- input_per_million: 0.375,
3860
- output_per_million: 2.025,
3861
- cached_input_per_million: 0.203,
4047
+ input_per_million: 0.57,
4048
+ output_per_million: 2.85,
4049
+ cached_input_per_million: 0.095,
3862
4050
  },
3863
4051
  features: {
3864
4052
  context_length: 262144,
@@ -3879,9 +4067,9 @@ export const MODEL_REGISTRY = [
3879
4067
  provider: 'openrouter',
3880
4068
  openrouter_id: 'moonshotai/kimi-k2.6',
3881
4069
  cost: {
3882
- input_per_million: 0.66,
3883
- output_per_million: 3.41,
3884
- cached_input_per_million: 0.14,
4070
+ input_per_million: 0.684,
4071
+ output_per_million: 3.42,
4072
+ cached_input_per_million: 0.144,
3885
4073
  },
3886
4074
  features: {
3887
4075
  context_length: 262144,
@@ -3902,9 +4090,9 @@ export const MODEL_REGISTRY = [
3902
4090
  provider: 'openrouter',
3903
4091
  openrouter_id: 'moonshotai/kimi-k2.7-code',
3904
4092
  cost: {
3905
- input_per_million: 0.74,
3906
- output_per_million: 3.5,
3907
- cached_input_per_million: 0.15,
4093
+ input_per_million: 0.82,
4094
+ output_per_million: 3.75,
4095
+ cached_input_per_million: 0.16,
3908
4096
  },
3909
4097
  features: {
3910
4098
  context_length: 262144,
@@ -3913,7 +4101,7 @@ export const MODEL_REGISTRY = [
3913
4101
  tool_use: true,
3914
4102
  streaming: true,
3915
4103
  json_output: true,
3916
- max_output_tokens: 16384,
4104
+ max_output_tokens: 262144,
3917
4105
  reasoning_output: true,
3918
4106
  },
3919
4107
  class: 'code',
@@ -3953,7 +4141,7 @@ export const MODEL_REGISTRY = [
3953
4141
  output_per_million: 1.2,
3954
4142
  },
3955
4143
  features: {
3956
- context_length: 1_048_576,
4144
+ context_length: 1_048_756,
3957
4145
  input_modality: ['text'],
3958
4146
  output_modality: ['text'],
3959
4147
  tool_use: true,
@@ -3976,7 +4164,7 @@ export const MODEL_REGISTRY = [
3976
4164
  output_per_million: 4.05,
3977
4165
  },
3978
4166
  features: {
3979
- context_length: 1_048_576,
4167
+ context_length: 524_288,
3980
4168
  input_modality: ['text', 'image', 'audio'],
3981
4169
  output_modality: ['text'],
3982
4170
  tool_use: true,
@@ -4056,6 +4244,28 @@ export const MODEL_REGISTRY = [
4056
4244
  class: 'code',
4057
4245
  description: 'Kwaipilot KAT-Coder Air V2.5 via OpenRouter. Cost-efficient agentic coding model for autonomous repository changes and tool-driven workflows.',
4058
4246
  },
4247
+ {
4248
+ id: 'poolside/laguna-s-2.1',
4249
+ aliases: ['Laguna S 2.1', 'laguna-s-2.1', 'laguna-2.1'],
4250
+ provider: 'openrouter',
4251
+ openrouter_id: 'poolside/laguna-s-2.1',
4252
+ cost: {
4253
+ input_per_million: 0.1,
4254
+ cached_input_per_million: 0.01,
4255
+ output_per_million: 0.2,
4256
+ },
4257
+ features: {
4258
+ context_length: 1_048_576,
4259
+ input_modality: ['text'],
4260
+ output_modality: ['text'],
4261
+ tool_use: true,
4262
+ streaming: true,
4263
+ json_output: true,
4264
+ max_output_tokens: 131_072,
4265
+ },
4266
+ class: 'code',
4267
+ description: 'Poolside Laguna S 2.1 via OpenRouter, optimized for long-context agentic coding workflows.',
4268
+ },
4059
4269
  ];
4060
4270
  export function findModel(modelId) {
4061
4271
  const externalModel = getExternalModel(modelId);