@just-every/ensemble 0.2.269 → 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 (104) hide show
  1. package/README.md +6 -5
  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 +314 -146
  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/grok.cjs +81 -11
  26. package/dist/cjs/model_providers/grok.d.ts +2 -1
  27. package/dist/cjs/model_providers/grok.d.ts.map +1 -1
  28. package/dist/cjs/model_providers/grok.js.map +1 -1
  29. package/dist/cjs/model_providers/grok_imagine_pricing.cjs +25 -0
  30. package/dist/cjs/model_providers/grok_imagine_pricing.d.ts +10 -0
  31. package/dist/cjs/model_providers/grok_imagine_pricing.d.ts.map +1 -0
  32. package/dist/cjs/model_providers/grok_imagine_pricing.js.map +1 -0
  33. package/dist/cjs/model_providers/model_provider.cjs +2 -0
  34. package/dist/cjs/model_providers/model_provider.d.ts.map +1 -1
  35. package/dist/cjs/model_providers/model_provider.js.map +1 -1
  36. package/dist/cjs/model_providers/openai.cjs +30 -0
  37. package/dist/cjs/model_providers/openai.d.ts +2 -1
  38. package/dist/cjs/model_providers/openai.d.ts.map +1 -1
  39. package/dist/cjs/model_providers/openai.js.map +1 -1
  40. package/dist/cjs/model_providers/openai_chat.cjs +9 -0
  41. package/dist/cjs/model_providers/openai_chat.d.ts.map +1 -1
  42. package/dist/cjs/model_providers/openai_chat.js.map +1 -1
  43. package/dist/cjs/model_providers/openai_realtime.cjs +261 -0
  44. package/dist/cjs/model_providers/openai_realtime.d.ts +40 -0
  45. package/dist/cjs/model_providers/openai_realtime.d.ts.map +1 -0
  46. package/dist/cjs/model_providers/openai_realtime.js.map +1 -0
  47. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  48. package/dist/cjs/types/types.d.ts +28 -3
  49. package/dist/cjs/types/types.d.ts.map +1 -1
  50. package/dist/cjs/utils/cost_tracker.cjs +12 -0
  51. package/dist/cjs/utils/cost_tracker.d.ts.map +1 -1
  52. package/dist/cjs/utils/cost_tracker.js.map +1 -1
  53. package/dist/core/ensemble_live.d.ts.map +1 -1
  54. package/dist/core/ensemble_live.js +4 -2
  55. package/dist/core/ensemble_live.js.map +1 -1
  56. package/dist/core/ensemble_video.d.ts +3 -0
  57. package/dist/core/ensemble_video.d.ts.map +1 -0
  58. package/dist/core/ensemble_video.js +34 -0
  59. package/dist/core/ensemble_video.js.map +1 -0
  60. package/dist/data/model_data.d.ts +4 -0
  61. package/dist/data/model_data.d.ts.map +1 -1
  62. package/dist/data/model_data.js +314 -146
  63. package/dist/data/model_data.js.map +1 -1
  64. package/dist/index.d.ts +1 -0
  65. package/dist/index.d.ts.map +1 -1
  66. package/dist/index.js +1 -0
  67. package/dist/index.js.map +1 -1
  68. package/dist/model_providers/deepseek.d.ts +1 -1
  69. package/dist/model_providers/deepseek.d.ts.map +1 -1
  70. package/dist/model_providers/deepseek.js +6 -97
  71. package/dist/model_providers/deepseek.js.map +1 -1
  72. package/dist/model_providers/deepseek_v4_contract.d.ts +3 -0
  73. package/dist/model_providers/deepseek_v4_contract.d.ts.map +1 -0
  74. package/dist/model_providers/deepseek_v4_contract.js +16 -0
  75. package/dist/model_providers/deepseek_v4_contract.js.map +1 -0
  76. package/dist/model_providers/grok.d.ts +2 -1
  77. package/dist/model_providers/grok.d.ts.map +1 -1
  78. package/dist/model_providers/grok.js +81 -11
  79. package/dist/model_providers/grok.js.map +1 -1
  80. package/dist/model_providers/grok_imagine_pricing.d.ts +10 -0
  81. package/dist/model_providers/grok_imagine_pricing.d.ts.map +1 -0
  82. package/dist/model_providers/grok_imagine_pricing.js +21 -0
  83. package/dist/model_providers/grok_imagine_pricing.js.map +1 -0
  84. package/dist/model_providers/model_provider.d.ts.map +1 -1
  85. package/dist/model_providers/model_provider.js +2 -0
  86. package/dist/model_providers/model_provider.js.map +1 -1
  87. package/dist/model_providers/openai.d.ts +2 -1
  88. package/dist/model_providers/openai.d.ts.map +1 -1
  89. package/dist/model_providers/openai.js +30 -0
  90. package/dist/model_providers/openai.js.map +1 -1
  91. package/dist/model_providers/openai_chat.d.ts.map +1 -1
  92. package/dist/model_providers/openai_chat.js +9 -0
  93. package/dist/model_providers/openai_chat.js.map +1 -1
  94. package/dist/model_providers/openai_realtime.d.ts +40 -0
  95. package/dist/model_providers/openai_realtime.d.ts.map +1 -0
  96. package/dist/model_providers/openai_realtime.js +223 -0
  97. package/dist/model_providers/openai_realtime.js.map +1 -0
  98. package/dist/tsconfig.tsbuildinfo +1 -1
  99. package/dist/types/types.d.ts +28 -3
  100. package/dist/types/types.d.ts.map +1 -1
  101. package/dist/utils/cost_tracker.d.ts.map +1 -1
  102. package/dist/utils/cost_tracker.js +12 -0
  103. package/dist/utils/cost_tracker.js.map +1 -1
  104. package/package.json +1 -1
@@ -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,
@@ -2771,6 +2870,63 @@ export const MODEL_REGISTRY = [
2771
2870
  class: 'voice',
2772
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.",
2773
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
+ },
2774
2930
  {
2775
2931
  id: 'tts-1',
2776
2932
  provider: 'openai',
@@ -2812,27 +2968,30 @@ export const MODEL_REGISTRY = [
2812
2968
  input_modality: ['text'],
2813
2969
  output_modality: ['audio'],
2814
2970
  streaming: true,
2971
+ max_input_characters: 10000,
2815
2972
  },
2816
2973
  class: 'voice',
2817
2974
  description: "ElevenLabs' multilingual high quality text-to-speech model supporting 29 languages with natural voice capabilities.",
2818
2975
  },
2819
2976
  {
2820
- id: 'eleven_turbo_v2_5',
2977
+ id: 'eleven_v3',
2821
2978
  provider: 'elevenlabs',
2822
2979
  cost: {
2823
- input_per_million: 27.5,
2980
+ input_per_million: 55,
2824
2981
  output_per_million: 0,
2825
2982
  },
2826
2983
  features: {
2827
2984
  input_modality: ['text'],
2828
2985
  output_modality: ['audio'],
2829
2986
  streaming: true,
2987
+ max_input_characters: 5000,
2830
2988
  },
2831
2989
  class: 'voice',
2832
- 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.",
2833
2991
  },
2834
2992
  {
2835
2993
  id: 'eleven_flash_v2_5',
2994
+ aliases: ['eleven_turbo_v2_5'],
2836
2995
  provider: 'elevenlabs',
2837
2996
  cost: {
2838
2997
  input_per_million: 27.5,
@@ -2842,6 +3001,7 @@ export const MODEL_REGISTRY = [
2842
3001
  input_modality: ['text'],
2843
3002
  output_modality: ['audio'],
2844
3003
  streaming: true,
3004
+ max_input_characters: 40000,
2845
3005
  },
2846
3006
  class: 'voice',
2847
3007
  description: "ElevenLabs' fastest model optimized for ultra low-latency text-to-speech.",
@@ -3183,23 +3343,26 @@ export const MODEL_REGISTRY = [
3183
3343
  description: 'Midjourney v7 text-to-image (via KIE API; requires third-party API key).',
3184
3344
  },
3185
3345
  {
3186
- id: 'grok-imagine-image-pro',
3346
+ id: 'grok-imagine-image-quality',
3347
+ aliases: ['grok-imagine-image-pro'],
3187
3348
  provider: 'xai',
3188
3349
  cost: {
3189
- per_image: 0.07,
3350
+ per_input_image: 0.01,
3351
+ per_image_by_resolution: { '1k': 0.05, '2k': 0.07 },
3190
3352
  },
3191
3353
  features: {
3192
3354
  input_modality: ['text', 'image'],
3193
3355
  output_modality: ['image'],
3194
3356
  },
3195
3357
  class: 'image_generation',
3196
- 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.',
3197
3359
  },
3198
3360
  {
3199
3361
  id: 'grok-imagine-image',
3200
3362
  provider: 'xai',
3201
3363
  cost: {
3202
3364
  per_image: 0.02,
3365
+ per_input_image: 0.002,
3203
3366
  },
3204
3367
  features: {
3205
3368
  input_modality: ['text', 'image'],
@@ -3208,6 +3371,36 @@ export const MODEL_REGISTRY = [
3208
3371
  class: 'image_generation',
3209
3372
  description: 'xAI Grok Imagine Image for lower-cost text-to-image and image-guided image generation.',
3210
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
+ },
3211
3404
  {
3212
3405
  id: 'imagen-2',
3213
3406
  provider: 'google',
@@ -3375,92 +3568,48 @@ export const MODEL_REGISTRY = [
3375
3568
  description: 'OpenAI Whisper transcription with full-turn output',
3376
3569
  },
3377
3570
  {
3378
- id: 'deepseek-chat',
3379
- aliases: ['deepseek-v3-0324'],
3571
+ id: 'deepseek-v4-pro',
3572
+ aliases: ['DeepSeek-V4', 'DeepSeek-V4-Pro', 'deepseek-v4'],
3380
3573
  provider: 'deepseek',
3381
3574
  cost: {
3382
- input_per_million: {
3383
- peak_utc_start_hour: 0,
3384
- peak_utc_start_minute: 30,
3385
- peak_utc_end_hour: 16,
3386
- peak_utc_end_minute: 30,
3387
- peak_price_per_million: 0.27,
3388
- off_peak_price_per_million: 0.135,
3389
- },
3390
- cached_input_per_million: {
3391
- peak_utc_start_hour: 0,
3392
- peak_utc_start_minute: 30,
3393
- peak_utc_end_hour: 16,
3394
- peak_utc_end_minute: 30,
3395
- peak_price_per_million: 0.07,
3396
- off_peak_price_per_million: 0.035,
3397
- },
3398
- output_per_million: {
3399
- peak_utc_start_hour: 0,
3400
- peak_utc_start_minute: 30,
3401
- peak_utc_end_hour: 16,
3402
- peak_utc_end_minute: 30,
3403
- peak_price_per_million: 1.1,
3404
- off_peak_price_per_million: 0.55,
3405
- },
3575
+ input_per_million: 0.435,
3576
+ cached_input_per_million: 0.003625,
3577
+ output_per_million: 0.87,
3406
3578
  },
3407
3579
  features: {
3408
- context_length: 64000,
3409
- max_output_tokens: 8192,
3580
+ context_length: 1_000_000,
3581
+ max_output_tokens: 384_000,
3410
3582
  input_modality: ['text'],
3411
3583
  output_modality: ['text'],
3412
3584
  tool_use: true,
3413
3585
  streaming: true,
3414
3586
  json_output: true,
3587
+ reasoning_output: true,
3415
3588
  },
3416
- class: 'standard',
3417
- score: 75,
3418
- 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.',
3419
3591
  },
3420
3592
  {
3421
- id: 'deepseek-reasoner',
3422
- aliases: ['deepseek-r1-0528'],
3593
+ id: 'deepseek-v4-flash',
3594
+ aliases: ['DeepSeek-V4-Flash'],
3423
3595
  provider: 'deepseek',
3424
3596
  cost: {
3425
- input_per_million: {
3426
- peak_utc_start_hour: 0,
3427
- peak_utc_start_minute: 30,
3428
- peak_utc_end_hour: 16,
3429
- peak_utc_end_minute: 30,
3430
- peak_price_per_million: 0.55,
3431
- off_peak_price_per_million: 0.1375,
3432
- },
3433
- cached_input_per_million: {
3434
- peak_utc_start_hour: 0,
3435
- peak_utc_start_minute: 30,
3436
- peak_utc_end_hour: 16,
3437
- peak_utc_end_minute: 30,
3438
- peak_price_per_million: 0.14,
3439
- off_peak_price_per_million: 0.035,
3440
- },
3441
- output_per_million: {
3442
- peak_utc_start_hour: 0,
3443
- peak_utc_start_minute: 30,
3444
- peak_utc_end_hour: 16,
3445
- peak_utc_end_minute: 30,
3446
- peak_price_per_million: 2.19,
3447
- off_peak_price_per_million: 0.5475,
3448
- },
3597
+ input_per_million: 0.14,
3598
+ cached_input_per_million: 0.0028,
3599
+ output_per_million: 0.28,
3449
3600
  },
3450
3601
  features: {
3451
- context_length: 64000,
3452
- max_output_tokens: 64000,
3602
+ context_length: 1_000_000,
3603
+ max_output_tokens: 384_000,
3453
3604
  input_modality: ['text'],
3454
3605
  output_modality: ['text'],
3455
3606
  tool_use: true,
3456
- simulate_tools: true,
3457
3607
  streaming: true,
3458
3608
  json_output: true,
3459
3609
  reasoning_output: true,
3460
3610
  },
3461
3611
  class: 'reasoning',
3462
- score: 85,
3463
- 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.',
3464
3613
  },
3465
3614
  {
3466
3615
  id: 'gpt-oss-120b',
@@ -3468,8 +3617,8 @@ export const MODEL_REGISTRY = [
3468
3617
  provider: 'openrouter',
3469
3618
  openrouter_id: 'openai/gpt-oss-120b',
3470
3619
  cost: {
3471
- input_per_million: 0.03,
3472
- output_per_million: 0.15,
3620
+ input_per_million: 0.037,
3621
+ output_per_million: 0.17,
3473
3622
  },
3474
3623
  features: {
3475
3624
  context_length: 131072,
@@ -3490,8 +3639,8 @@ export const MODEL_REGISTRY = [
3490
3639
  provider: 'openrouter',
3491
3640
  openrouter_id: 'openai/gpt-oss-20b',
3492
3641
  cost: {
3493
- input_per_million: 0.029,
3494
- output_per_million: 0.14,
3642
+ input_per_million: 0.03,
3643
+ output_per_million: 0.13,
3495
3644
  },
3496
3645
  features: {
3497
3646
  context_length: 131072,
@@ -3511,9 +3660,9 @@ export const MODEL_REGISTRY = [
3511
3660
  provider: 'openrouter',
3512
3661
  openrouter_id: 'qwen/qwen3.7-max',
3513
3662
  cost: {
3514
- input_per_million: 1.25,
3515
- cached_input_per_million: 0.25,
3516
- output_per_million: 3.75,
3663
+ input_per_million: 1.475,
3664
+ cached_input_per_million: 0.295,
3665
+ output_per_million: 4.425,
3517
3666
  },
3518
3667
  features: {
3519
3668
  context_length: 1000000,
@@ -3646,9 +3795,9 @@ export const MODEL_REGISTRY = [
3646
3795
  provider: 'openrouter',
3647
3796
  openrouter_id: 'qwen/qwen3.6-27b',
3648
3797
  cost: {
3649
- input_per_million: 0.285,
3798
+ input_per_million: 0.45,
3650
3799
  cached_input_per_million: 0.15,
3651
- output_per_million: 2.4,
3800
+ output_per_million: 2.7,
3652
3801
  },
3653
3802
  features: {
3654
3803
  context_length: 262144,
@@ -3657,7 +3806,7 @@ export const MODEL_REGISTRY = [
3657
3806
  tool_use: true,
3658
3807
  streaming: true,
3659
3808
  json_output: true,
3660
- max_output_tokens: 262140,
3809
+ max_output_tokens: 65536,
3661
3810
  reasoning_output: true,
3662
3811
  },
3663
3812
  class: 'reasoning',
@@ -3669,9 +3818,8 @@ export const MODEL_REGISTRY = [
3669
3818
  provider: 'openrouter',
3670
3819
  openrouter_id: 'qwen/qwen3-235b-a22b-thinking-2507',
3671
3820
  cost: {
3672
- input_per_million: 0.1,
3673
- cached_input_per_million: 0.1,
3674
- output_per_million: 0.1,
3821
+ input_per_million: 0.3,
3822
+ output_per_million: 3,
3675
3823
  },
3676
3824
  features: {
3677
3825
  context_length: 262144,
@@ -3680,7 +3828,7 @@ export const MODEL_REGISTRY = [
3680
3828
  tool_use: true,
3681
3829
  streaming: true,
3682
3830
  json_output: true,
3683
- max_output_tokens: 262144,
3831
+ max_output_tokens: 32768,
3684
3832
  reasoning_output: true,
3685
3833
  },
3686
3834
  class: 'reasoning',
@@ -3693,11 +3841,11 @@ export const MODEL_REGISTRY = [
3693
3841
  provider: 'openrouter',
3694
3842
  openrouter_id: 'qwen/qwen3-coder',
3695
3843
  cost: {
3696
- input_per_million: 0.22,
3697
- output_per_million: 1.8,
3844
+ input_per_million: 0.3,
3845
+ output_per_million: 1,
3698
3846
  },
3699
3847
  features: {
3700
- context_length: 1048576,
3848
+ context_length: 262144,
3701
3849
  input_modality: ['text'],
3702
3850
  output_modality: ['text'],
3703
3851
  tool_use: true,
@@ -3720,7 +3868,7 @@ export const MODEL_REGISTRY = [
3720
3868
  cached_input_per_million: 0.1794,
3721
3869
  },
3722
3870
  features: {
3723
- context_length: 202752,
3871
+ context_length: 204800,
3724
3872
  input_modality: ['text'],
3725
3873
  output_modality: ['text'],
3726
3874
  tool_use: true,
@@ -3737,9 +3885,9 @@ export const MODEL_REGISTRY = [
3737
3885
  provider: 'openrouter',
3738
3886
  openrouter_id: 'z-ai/glm-5.2',
3739
3887
  cost: {
3740
- input_per_million: 0.93,
3741
- output_per_million: 3.0,
3742
- 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,
3743
3891
  },
3744
3892
  features: {
3745
3893
  context_length: 1048576,
@@ -3748,7 +3896,7 @@ export const MODEL_REGISTRY = [
3748
3896
  tool_use: true,
3749
3897
  streaming: true,
3750
3898
  json_output: true,
3751
- max_output_tokens: 32768,
3899
+ max_output_tokens: 131072,
3752
3900
  reasoning_output: true,
3753
3901
  },
3754
3902
  class: 'reasoning',
@@ -3756,7 +3904,6 @@ export const MODEL_REGISTRY = [
3756
3904
  },
3757
3905
  {
3758
3906
  id: 'deepseek/deepseek-v4-pro',
3759
- aliases: ['DeepSeek-V4', 'DeepSeek-V4-Pro', 'deepseek-v4', 'deepseek-v4-pro'],
3760
3907
  provider: 'openrouter',
3761
3908
  openrouter_id: 'deepseek/deepseek-v4-pro',
3762
3909
  cost: {
@@ -3779,13 +3926,12 @@ export const MODEL_REGISTRY = [
3779
3926
  },
3780
3927
  {
3781
3928
  id: 'deepseek/deepseek-v4-flash',
3782
- aliases: ['DeepSeek-V4-Flash', 'deepseek-v4-flash'],
3783
3929
  provider: 'openrouter',
3784
3930
  openrouter_id: 'deepseek/deepseek-v4-flash',
3785
3931
  cost: {
3786
- input_per_million: 0.09,
3787
- cached_input_per_million: 0.018,
3788
- output_per_million: 0.18,
3932
+ input_per_million: 0.0938,
3933
+ cached_input_per_million: 0.01876,
3934
+ output_per_million: 0.1876,
3789
3935
  },
3790
3936
  features: {
3791
3937
  context_length: 1048576,
@@ -3794,7 +3940,7 @@ export const MODEL_REGISTRY = [
3794
3940
  tool_use: true,
3795
3941
  streaming: true,
3796
3942
  json_output: true,
3797
- max_output_tokens: 131072,
3943
+ max_output_tokens: 384000,
3798
3944
  reasoning_output: true,
3799
3945
  },
3800
3946
  class: 'reasoning',
@@ -3806,12 +3952,12 @@ export const MODEL_REGISTRY = [
3806
3952
  provider: 'openrouter',
3807
3953
  openrouter_id: 'xiaomi/mimo-v2.5',
3808
3954
  cost: {
3809
- input_per_million: 0.105,
3810
- cached_input_per_million: 0.028,
3955
+ input_per_million: 0.14,
3956
+ cached_input_per_million: 0.0028,
3811
3957
  output_per_million: 0.28,
3812
3958
  },
3813
3959
  features: {
3814
- context_length: 1048576,
3960
+ context_length: 1050000,
3815
3961
  input_modality: ['text', 'audio', 'image', 'video'],
3816
3962
  output_modality: ['text'],
3817
3963
  tool_use: true,
@@ -3834,7 +3980,7 @@ export const MODEL_REGISTRY = [
3834
3980
  output_per_million: 0.87,
3835
3981
  },
3836
3982
  features: {
3837
- context_length: 1048576,
3983
+ context_length: 1050000,
3838
3984
  input_modality: ['text'],
3839
3985
  output_modality: ['text'],
3840
3986
  tool_use: true,
@@ -3876,9 +4022,9 @@ export const MODEL_REGISTRY = [
3876
4022
  provider: 'openrouter',
3877
4023
  openrouter_id: 'tencent/hy3',
3878
4024
  cost: {
3879
- input_per_million: 0.2,
3880
- cached_input_per_million: 0.5,
3881
- output_per_million: 0.8,
4025
+ input_per_million: 0.14,
4026
+ cached_input_per_million: 0.035,
4027
+ output_per_million: 0.58,
3882
4028
  },
3883
4029
  features: {
3884
4030
  context_length: 262144,
@@ -3887,7 +4033,7 @@ export const MODEL_REGISTRY = [
3887
4033
  tool_use: true,
3888
4034
  streaming: true,
3889
4035
  json_output: false,
3890
- max_output_tokens: 131072,
4036
+ max_output_tokens: 262144,
3891
4037
  reasoning_output: true,
3892
4038
  },
3893
4039
  class: 'reasoning',
@@ -3898,9 +4044,9 @@ export const MODEL_REGISTRY = [
3898
4044
  aliases: ['kimi-k2.5', 'kimi-k2-5'],
3899
4045
  provider: 'openrouter',
3900
4046
  cost: {
3901
- input_per_million: 0.375,
3902
- output_per_million: 2.025,
3903
- 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,
3904
4050
  },
3905
4051
  features: {
3906
4052
  context_length: 262144,
@@ -3921,9 +4067,9 @@ export const MODEL_REGISTRY = [
3921
4067
  provider: 'openrouter',
3922
4068
  openrouter_id: 'moonshotai/kimi-k2.6',
3923
4069
  cost: {
3924
- input_per_million: 0.66,
3925
- output_per_million: 3.41,
3926
- 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,
3927
4073
  },
3928
4074
  features: {
3929
4075
  context_length: 262144,
@@ -3944,9 +4090,9 @@ export const MODEL_REGISTRY = [
3944
4090
  provider: 'openrouter',
3945
4091
  openrouter_id: 'moonshotai/kimi-k2.7-code',
3946
4092
  cost: {
3947
- input_per_million: 0.74,
3948
- output_per_million: 3.5,
3949
- 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,
3950
4096
  },
3951
4097
  features: {
3952
4098
  context_length: 262144,
@@ -3955,7 +4101,7 @@ export const MODEL_REGISTRY = [
3955
4101
  tool_use: true,
3956
4102
  streaming: true,
3957
4103
  json_output: true,
3958
- max_output_tokens: 16384,
4104
+ max_output_tokens: 262144,
3959
4105
  reasoning_output: true,
3960
4106
  },
3961
4107
  class: 'code',
@@ -3995,7 +4141,7 @@ export const MODEL_REGISTRY = [
3995
4141
  output_per_million: 1.2,
3996
4142
  },
3997
4143
  features: {
3998
- context_length: 1_048_576,
4144
+ context_length: 1_048_756,
3999
4145
  input_modality: ['text'],
4000
4146
  output_modality: ['text'],
4001
4147
  tool_use: true,
@@ -4018,7 +4164,7 @@ export const MODEL_REGISTRY = [
4018
4164
  output_per_million: 4.05,
4019
4165
  },
4020
4166
  features: {
4021
- context_length: 1_048_576,
4167
+ context_length: 524_288,
4022
4168
  input_modality: ['text', 'image', 'audio'],
4023
4169
  output_modality: ['text'],
4024
4170
  tool_use: true,
@@ -4098,6 +4244,28 @@ export const MODEL_REGISTRY = [
4098
4244
  class: 'code',
4099
4245
  description: 'Kwaipilot KAT-Coder Air V2.5 via OpenRouter. Cost-efficient agentic coding model for autonomous repository changes and tool-driven workflows.',
4100
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
+ },
4101
4269
  ];
4102
4270
  export function findModel(modelId) {
4103
4271
  const externalModel = getExternalModel(modelId);