@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
@@ -139,13 +139,17 @@ exports.MODEL_CLASSES = {
139
139
  'luma-photon-1',
140
140
  'ideogram-3.0',
141
141
  'midjourney-v7',
142
- 'grok-imagine-image-pro',
142
+ 'grok-imagine-image-quality',
143
143
  'flux-kontext-pro',
144
144
  'stability-ultra',
145
145
  'runway-gen4-image',
146
146
  'recraft-v3',
147
147
  ],
148
148
  },
149
+ video_generation: {
150
+ models: ['grok-imagine-video', 'grok-imagine-video-1.5'],
151
+ description: 'Video generation and image-to-video models',
152
+ },
149
153
  embedding: {
150
154
  models: [
151
155
  'text-embedding-3-large',
@@ -156,7 +160,7 @@ exports.MODEL_CLASSES = {
156
160
  voice: {
157
161
  models: [
158
162
  'tts-1-hd',
159
- 'eleven_multilingual_v2',
163
+ 'eleven_v3',
160
164
  'gemini-3.1-flash-tts-preview',
161
165
  ],
162
166
  description: 'Text-to-Speech models for voice generation',
@@ -449,8 +453,8 @@ exports.MODEL_REGISTRY = [
449
453
  id: 'meta-llama/llama-4-maverick',
450
454
  provider: 'openrouter',
451
455
  cost: {
452
- input_per_million: 0.15,
453
- output_per_million: 0.6,
456
+ input_per_million: 0.2,
457
+ output_per_million: 0.8,
454
458
  },
455
459
  features: {
456
460
  context_length: 1048576,
@@ -474,11 +478,11 @@ exports.MODEL_REGISTRY = [
474
478
  id: 'meta-llama/llama-4-scout',
475
479
  provider: 'openrouter',
476
480
  cost: {
477
- input_per_million: 0.08,
481
+ input_per_million: 0.1,
478
482
  output_per_million: 0.3,
479
483
  },
480
484
  features: {
481
- context_length: 10000000,
485
+ context_length: 1310720,
482
486
  input_modality: ['text', 'image'],
483
487
  output_modality: ['text'],
484
488
  tool_use: true,
@@ -544,12 +548,27 @@ exports.MODEL_REGISTRY = [
544
548
  },
545
549
  {
546
550
  id: 'grok-4.5',
547
- aliases: ['grok-4.5-latest', 'grok-build-latest'],
551
+ aliases: ['grok-4.5-latest'],
548
552
  provider: 'xai',
549
553
  cost: {
550
- input_per_million: 2.0,
551
- output_per_million: 6.0,
552
- cached_input_per_million: 0.5,
554
+ input_per_million: {
555
+ threshold_tokens: 200_000,
556
+ price_below_threshold_per_million: 2,
557
+ price_above_threshold_per_million: 4,
558
+ tier_basis: 'input_tokens',
559
+ },
560
+ cached_input_per_million: {
561
+ threshold_tokens: 200_000,
562
+ price_below_threshold_per_million: 0.3,
563
+ price_above_threshold_per_million: 0.6,
564
+ tier_basis: 'input_tokens',
565
+ },
566
+ output_per_million: {
567
+ threshold_tokens: 200_000,
568
+ price_below_threshold_per_million: 6,
569
+ price_above_threshold_per_million: 12,
570
+ tier_basis: 'input_tokens',
571
+ },
553
572
  },
554
573
  features: {
555
574
  context_length: 500_000,
@@ -565,10 +584,27 @@ exports.MODEL_REGISTRY = [
565
584
  },
566
585
  {
567
586
  id: 'grok-4.3',
587
+ aliases: ['grok-4.3-latest', 'grok-latest'],
568
588
  provider: 'xai',
569
589
  cost: {
570
- input_per_million: 1.25,
571
- output_per_million: 2.5,
590
+ input_per_million: {
591
+ threshold_tokens: 200_000,
592
+ price_below_threshold_per_million: 1.25,
593
+ price_above_threshold_per_million: 2.5,
594
+ tier_basis: 'input_tokens',
595
+ },
596
+ cached_input_per_million: {
597
+ threshold_tokens: 200_000,
598
+ price_below_threshold_per_million: 0.2,
599
+ price_above_threshold_per_million: 0.4,
600
+ tier_basis: 'input_tokens',
601
+ },
602
+ output_per_million: {
603
+ threshold_tokens: 200_000,
604
+ price_below_threshold_per_million: 2.5,
605
+ price_above_threshold_per_million: 5,
606
+ tier_basis: 'input_tokens',
607
+ },
572
608
  },
573
609
  features: {
574
610
  context_length: 1_000_000,
@@ -583,11 +619,27 @@ exports.MODEL_REGISTRY = [
583
619
  },
584
620
  {
585
621
  id: 'grok-build-0.1',
586
- aliases: ['grok-build'],
622
+ aliases: ['grok-build', 'grok-build-latest', 'grok-code-fast-1', 'grok-code-fast'],
587
623
  provider: 'xai',
588
624
  cost: {
589
- input_per_million: 1.0,
590
- output_per_million: 2.0,
625
+ input_per_million: {
626
+ threshold_tokens: 200_000,
627
+ price_below_threshold_per_million: 1,
628
+ price_above_threshold_per_million: 2,
629
+ tier_basis: 'input_tokens',
630
+ },
631
+ cached_input_per_million: {
632
+ threshold_tokens: 200_000,
633
+ price_below_threshold_per_million: 0.2,
634
+ price_above_threshold_per_million: 0.4,
635
+ tier_basis: 'input_tokens',
636
+ },
637
+ output_per_million: {
638
+ threshold_tokens: 200_000,
639
+ price_below_threshold_per_million: 2,
640
+ price_above_threshold_per_million: 4,
641
+ tier_basis: 'input_tokens',
642
+ },
591
643
  },
592
644
  features: {
593
645
  context_length: 256000,
@@ -653,16 +705,31 @@ exports.MODEL_REGISTRY = [
653
705
  description: 'Grok 4.1 Fast without reasoning. 2M context, flat pricing, text/image input.',
654
706
  },
655
707
  {
656
- id: 'grok-4',
657
- aliases: ['grok-4-2025-09-01', 'grok-4.20-0309-reasoning'],
708
+ id: 'grok-4.20-0309-reasoning',
709
+ aliases: ['grok-4', 'grok-4.20', 'grok-4.20-reasoning', 'grok-4.20-reasoning-latest'],
658
710
  provider: 'xai',
659
711
  cost: {
660
- input_per_million: 2.0,
661
- output_per_million: 6.0,
662
- cached_input_per_million: 0.2,
712
+ input_per_million: {
713
+ threshold_tokens: 200_000,
714
+ price_below_threshold_per_million: 1.25,
715
+ price_above_threshold_per_million: 2.5,
716
+ tier_basis: 'input_tokens',
717
+ },
718
+ cached_input_per_million: {
719
+ threshold_tokens: 200_000,
720
+ price_below_threshold_per_million: 0.2,
721
+ price_above_threshold_per_million: 0.4,
722
+ tier_basis: 'input_tokens',
723
+ },
724
+ output_per_million: {
725
+ threshold_tokens: 200_000,
726
+ price_below_threshold_per_million: 2.5,
727
+ price_above_threshold_per_million: 5,
728
+ tier_basis: 'input_tokens',
729
+ },
663
730
  },
664
731
  features: {
665
- context_length: 2_000_000,
732
+ context_length: 1_000_000,
666
733
  input_modality: ['text', 'image'],
667
734
  output_modality: ['text'],
668
735
  tool_use: true,
@@ -676,18 +743,34 @@ exports.MODEL_REGISTRY = [
676
743
  code: 88,
677
744
  reasoning: 85,
678
745
  },
679
- description: 'Grok-4 stable alias, currently resolving to the Grok 4.20 reasoning model with 2M context.',
746
+ description: 'Grok 4.20 reasoning model with 1M context and long-context pricing above 200k input tokens.',
680
747
  },
681
748
  {
682
749
  id: 'grok-4.20-0309-non-reasoning',
750
+ aliases: ['grok-4.20-non-reasoning', 'grok-4.20-non-reasoning-latest'],
683
751
  provider: 'xai',
684
752
  cost: {
685
- input_per_million: 2.0,
686
- output_per_million: 6.0,
687
- cached_input_per_million: 0.2,
753
+ input_per_million: {
754
+ threshold_tokens: 200_000,
755
+ price_below_threshold_per_million: 1.25,
756
+ price_above_threshold_per_million: 2.5,
757
+ tier_basis: 'input_tokens',
758
+ },
759
+ cached_input_per_million: {
760
+ threshold_tokens: 200_000,
761
+ price_below_threshold_per_million: 0.2,
762
+ price_above_threshold_per_million: 0.4,
763
+ tier_basis: 'input_tokens',
764
+ },
765
+ output_per_million: {
766
+ threshold_tokens: 200_000,
767
+ price_below_threshold_per_million: 2.5,
768
+ price_above_threshold_per_million: 5,
769
+ tier_basis: 'input_tokens',
770
+ },
688
771
  },
689
772
  features: {
690
- context_length: 2_000_000,
773
+ context_length: 1_000_000,
691
774
  input_modality: ['text', 'image'],
692
775
  output_modality: ['text'],
693
776
  tool_use: true,
@@ -705,14 +788,30 @@ exports.MODEL_REGISTRY = [
705
788
  },
706
789
  {
707
790
  id: 'grok-4.20-multi-agent-0309',
791
+ aliases: ['grok-4.20-multi-agent', 'grok-4.20-multi-agent-latest'],
708
792
  provider: 'xai',
709
793
  cost: {
710
- input_per_million: 2.0,
711
- output_per_million: 6.0,
712
- cached_input_per_million: 0.2,
794
+ input_per_million: {
795
+ threshold_tokens: 200_000,
796
+ price_below_threshold_per_million: 1.25,
797
+ price_above_threshold_per_million: 2.5,
798
+ tier_basis: 'input_tokens',
799
+ },
800
+ cached_input_per_million: {
801
+ threshold_tokens: 200_000,
802
+ price_below_threshold_per_million: 0.2,
803
+ price_above_threshold_per_million: 0.4,
804
+ tier_basis: 'input_tokens',
805
+ },
806
+ output_per_million: {
807
+ threshold_tokens: 200_000,
808
+ price_below_threshold_per_million: 2.5,
809
+ price_above_threshold_per_million: 5,
810
+ tier_basis: 'input_tokens',
811
+ },
713
812
  },
714
813
  features: {
715
- context_length: 2_000_000,
814
+ context_length: 1_000_000,
716
815
  input_modality: ['text', 'image'],
717
816
  output_modality: ['text'],
718
817
  tool_use: true,
@@ -2775,6 +2874,63 @@ exports.MODEL_REGISTRY = [
2775
2874
  class: 'voice',
2776
2875
  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.",
2777
2876
  },
2877
+ {
2878
+ id: 'gpt-realtime-2.1',
2879
+ provider: 'openai',
2880
+ cost: {
2881
+ input_per_million: { text: 4, audio: 32, image: 5 },
2882
+ cached_input_per_million: { text: 0.4 },
2883
+ output_per_million: { text: 24, audio: 64 },
2884
+ },
2885
+ features: {
2886
+ context_length: 128000,
2887
+ max_output_tokens: 32000,
2888
+ input_modality: ['text', 'audio', 'image'],
2889
+ output_modality: ['text', 'audio'],
2890
+ tool_use: true,
2891
+ streaming: true,
2892
+ reasoning_output: true,
2893
+ },
2894
+ class: 'voice',
2895
+ description: 'OpenAI flagship GA Realtime model for low-latency text and audio conversations with tools.',
2896
+ },
2897
+ {
2898
+ id: 'gpt-realtime-2.1-mini',
2899
+ provider: 'openai',
2900
+ cost: {
2901
+ input_per_million: { text: 0.6, audio: 10, image: 0.8 },
2902
+ cached_input_per_million: { text: 0.06 },
2903
+ output_per_million: { text: 2.4, audio: 20 },
2904
+ },
2905
+ features: {
2906
+ context_length: 128000,
2907
+ max_output_tokens: 32000,
2908
+ input_modality: ['text', 'audio', 'image'],
2909
+ output_modality: ['text', 'audio'],
2910
+ tool_use: true,
2911
+ streaming: true,
2912
+ },
2913
+ class: 'voice',
2914
+ description: 'OpenAI cost-efficient GA Realtime model for low-latency text and audio conversations.',
2915
+ },
2916
+ {
2917
+ id: 'gpt-audio-1.5',
2918
+ provider: 'openai',
2919
+ cost: {
2920
+ input_per_million: { text: 2.5, audio: 32 },
2921
+ output_per_million: { text: 10, audio: 64 },
2922
+ },
2923
+ features: {
2924
+ context_length: 128000,
2925
+ max_output_tokens: 16384,
2926
+ input_modality: ['text', 'audio'],
2927
+ output_modality: ['text', 'audio'],
2928
+ tool_use: true,
2929
+ streaming: true,
2930
+ },
2931
+ class: 'voice',
2932
+ description: 'OpenAI Chat Completions audio model supporting audio input/output, streaming, and tools.',
2933
+ },
2778
2934
  {
2779
2935
  id: 'tts-1',
2780
2936
  provider: 'openai',
@@ -2816,27 +2972,30 @@ exports.MODEL_REGISTRY = [
2816
2972
  input_modality: ['text'],
2817
2973
  output_modality: ['audio'],
2818
2974
  streaming: true,
2975
+ max_input_characters: 10000,
2819
2976
  },
2820
2977
  class: 'voice',
2821
2978
  description: "ElevenLabs' multilingual high quality text-to-speech model supporting 29 languages with natural voice capabilities.",
2822
2979
  },
2823
2980
  {
2824
- id: 'eleven_turbo_v2_5',
2981
+ id: 'eleven_v3',
2825
2982
  provider: 'elevenlabs',
2826
2983
  cost: {
2827
- input_per_million: 27.5,
2984
+ input_per_million: 55,
2828
2985
  output_per_million: 0,
2829
2986
  },
2830
2987
  features: {
2831
2988
  input_modality: ['text'],
2832
2989
  output_modality: ['audio'],
2833
2990
  streaming: true,
2991
+ max_input_characters: 5000,
2834
2992
  },
2835
2993
  class: 'voice',
2836
- description: "ElevenLabs' turbo model optimized for low-latency text-to-speech with high quality output.",
2994
+ description: "ElevenLabs' most expressive multilingual text-to-speech model with audio tags and dialogue support.",
2837
2995
  },
2838
2996
  {
2839
2997
  id: 'eleven_flash_v2_5',
2998
+ aliases: ['eleven_turbo_v2_5'],
2840
2999
  provider: 'elevenlabs',
2841
3000
  cost: {
2842
3001
  input_per_million: 27.5,
@@ -2846,6 +3005,7 @@ exports.MODEL_REGISTRY = [
2846
3005
  input_modality: ['text'],
2847
3006
  output_modality: ['audio'],
2848
3007
  streaming: true,
3008
+ max_input_characters: 40000,
2849
3009
  },
2850
3010
  class: 'voice',
2851
3011
  description: "ElevenLabs' fastest model optimized for ultra low-latency text-to-speech.",
@@ -3187,23 +3347,26 @@ exports.MODEL_REGISTRY = [
3187
3347
  description: 'Midjourney v7 text-to-image (via KIE API; requires third-party API key).',
3188
3348
  },
3189
3349
  {
3190
- id: 'grok-imagine-image-pro',
3350
+ id: 'grok-imagine-image-quality',
3351
+ aliases: ['grok-imagine-image-pro'],
3191
3352
  provider: 'xai',
3192
3353
  cost: {
3193
- per_image: 0.07,
3354
+ per_input_image: 0.01,
3355
+ per_image_by_resolution: { '1k': 0.05, '2k': 0.07 },
3194
3356
  },
3195
3357
  features: {
3196
3358
  input_modality: ['text', 'image'],
3197
3359
  output_modality: ['image'],
3198
3360
  },
3199
3361
  class: 'image_generation',
3200
- description: 'xAI Grok Imagine Image Pro for premium text-to-image and image-guided image generation.',
3362
+ description: 'xAI Grok Imagine Image Quality for premium 1K/2K image generation and editing.',
3201
3363
  },
3202
3364
  {
3203
3365
  id: 'grok-imagine-image',
3204
3366
  provider: 'xai',
3205
3367
  cost: {
3206
3368
  per_image: 0.02,
3369
+ per_input_image: 0.002,
3207
3370
  },
3208
3371
  features: {
3209
3372
  input_modality: ['text', 'image'],
@@ -3212,6 +3375,36 @@ exports.MODEL_REGISTRY = [
3212
3375
  class: 'image_generation',
3213
3376
  description: 'xAI Grok Imagine Image for lower-cost text-to-image and image-guided image generation.',
3214
3377
  },
3378
+ {
3379
+ id: 'grok-imagine-video',
3380
+ provider: 'xai',
3381
+ cost: {
3382
+ per_input_image: 0.002,
3383
+ per_input_second: 0.01,
3384
+ per_second_by_resolution: { '480p': 0.05, '720p': 0.07 },
3385
+ },
3386
+ features: {
3387
+ input_modality: ['text', 'image', 'video'],
3388
+ output_modality: ['video'],
3389
+ },
3390
+ class: 'video_generation',
3391
+ description: 'xAI Grok Imagine Video for text-to-video, image-to-video, and video editing up to 15 seconds.',
3392
+ },
3393
+ {
3394
+ id: 'grok-imagine-video-1.5',
3395
+ aliases: ['grok-imagine-video-1.5-preview'],
3396
+ provider: 'xai',
3397
+ cost: {
3398
+ per_input_image: 0.01,
3399
+ per_second_by_resolution: { '480p': 0.08, '720p': 0.14, '1080p': 0.25 },
3400
+ },
3401
+ features: {
3402
+ input_modality: ['image'],
3403
+ output_modality: ['video'],
3404
+ },
3405
+ class: 'video_generation',
3406
+ description: 'xAI Grok Imagine Video 1.5 for premium image-to-video generation up to 1080p.',
3407
+ },
3215
3408
  {
3216
3409
  id: 'imagen-2',
3217
3410
  provider: 'google',
@@ -3379,92 +3572,48 @@ exports.MODEL_REGISTRY = [
3379
3572
  description: 'OpenAI Whisper transcription with full-turn output',
3380
3573
  },
3381
3574
  {
3382
- id: 'deepseek-chat',
3383
- aliases: ['deepseek-v3-0324'],
3575
+ id: 'deepseek-v4-pro',
3576
+ aliases: ['DeepSeek-V4', 'DeepSeek-V4-Pro', 'deepseek-v4'],
3384
3577
  provider: 'deepseek',
3385
3578
  cost: {
3386
- input_per_million: {
3387
- peak_utc_start_hour: 0,
3388
- peak_utc_start_minute: 30,
3389
- peak_utc_end_hour: 16,
3390
- peak_utc_end_minute: 30,
3391
- peak_price_per_million: 0.27,
3392
- off_peak_price_per_million: 0.135,
3393
- },
3394
- cached_input_per_million: {
3395
- peak_utc_start_hour: 0,
3396
- peak_utc_start_minute: 30,
3397
- peak_utc_end_hour: 16,
3398
- peak_utc_end_minute: 30,
3399
- peak_price_per_million: 0.07,
3400
- off_peak_price_per_million: 0.035,
3401
- },
3402
- output_per_million: {
3403
- peak_utc_start_hour: 0,
3404
- peak_utc_start_minute: 30,
3405
- peak_utc_end_hour: 16,
3406
- peak_utc_end_minute: 30,
3407
- peak_price_per_million: 1.1,
3408
- off_peak_price_per_million: 0.55,
3409
- },
3579
+ input_per_million: 0.435,
3580
+ cached_input_per_million: 0.003625,
3581
+ output_per_million: 0.87,
3410
3582
  },
3411
3583
  features: {
3412
- context_length: 64000,
3413
- max_output_tokens: 8192,
3584
+ context_length: 1_000_000,
3585
+ max_output_tokens: 384_000,
3414
3586
  input_modality: ['text'],
3415
3587
  output_modality: ['text'],
3416
3588
  tool_use: true,
3417
3589
  streaming: true,
3418
3590
  json_output: true,
3591
+ reasoning_output: true,
3419
3592
  },
3420
- class: 'standard',
3421
- score: 75,
3422
- description: 'DeepSeek-V3 chat model with FIM completion support and time-based pricing',
3593
+ class: 'reasoning',
3594
+ description: 'DeepSeek V4 Pro direct API model with native tools, JSON output, and high/max reasoning.',
3423
3595
  },
3424
3596
  {
3425
- id: 'deepseek-reasoner',
3426
- aliases: ['deepseek-r1-0528'],
3597
+ id: 'deepseek-v4-flash',
3598
+ aliases: ['DeepSeek-V4-Flash'],
3427
3599
  provider: 'deepseek',
3428
3600
  cost: {
3429
- input_per_million: {
3430
- peak_utc_start_hour: 0,
3431
- peak_utc_start_minute: 30,
3432
- peak_utc_end_hour: 16,
3433
- peak_utc_end_minute: 30,
3434
- peak_price_per_million: 0.55,
3435
- off_peak_price_per_million: 0.1375,
3436
- },
3437
- cached_input_per_million: {
3438
- peak_utc_start_hour: 0,
3439
- peak_utc_start_minute: 30,
3440
- peak_utc_end_hour: 16,
3441
- peak_utc_end_minute: 30,
3442
- peak_price_per_million: 0.14,
3443
- off_peak_price_per_million: 0.035,
3444
- },
3445
- output_per_million: {
3446
- peak_utc_start_hour: 0,
3447
- peak_utc_start_minute: 30,
3448
- peak_utc_end_hour: 16,
3449
- peak_utc_end_minute: 30,
3450
- peak_price_per_million: 2.19,
3451
- off_peak_price_per_million: 0.5475,
3452
- },
3601
+ input_per_million: 0.14,
3602
+ cached_input_per_million: 0.0028,
3603
+ output_per_million: 0.28,
3453
3604
  },
3454
3605
  features: {
3455
- context_length: 64000,
3456
- max_output_tokens: 64000,
3606
+ context_length: 1_000_000,
3607
+ max_output_tokens: 384_000,
3457
3608
  input_modality: ['text'],
3458
3609
  output_modality: ['text'],
3459
3610
  tool_use: true,
3460
- simulate_tools: true,
3461
3611
  streaming: true,
3462
3612
  json_output: true,
3463
3613
  reasoning_output: true,
3464
3614
  },
3465
3615
  class: 'reasoning',
3466
- score: 85,
3467
- description: 'DeepSeek-R1 advanced reasoning model with extended output and time-based pricing',
3616
+ description: 'DeepSeek V4 Flash direct API model with native tools and switchable thinking.',
3468
3617
  },
3469
3618
  {
3470
3619
  id: 'gpt-oss-120b',
@@ -3472,8 +3621,8 @@ exports.MODEL_REGISTRY = [
3472
3621
  provider: 'openrouter',
3473
3622
  openrouter_id: 'openai/gpt-oss-120b',
3474
3623
  cost: {
3475
- input_per_million: 0.03,
3476
- output_per_million: 0.15,
3624
+ input_per_million: 0.037,
3625
+ output_per_million: 0.17,
3477
3626
  },
3478
3627
  features: {
3479
3628
  context_length: 131072,
@@ -3494,8 +3643,8 @@ exports.MODEL_REGISTRY = [
3494
3643
  provider: 'openrouter',
3495
3644
  openrouter_id: 'openai/gpt-oss-20b',
3496
3645
  cost: {
3497
- input_per_million: 0.029,
3498
- output_per_million: 0.14,
3646
+ input_per_million: 0.03,
3647
+ output_per_million: 0.13,
3499
3648
  },
3500
3649
  features: {
3501
3650
  context_length: 131072,
@@ -3515,9 +3664,9 @@ exports.MODEL_REGISTRY = [
3515
3664
  provider: 'openrouter',
3516
3665
  openrouter_id: 'qwen/qwen3.7-max',
3517
3666
  cost: {
3518
- input_per_million: 1.25,
3519
- cached_input_per_million: 0.25,
3520
- output_per_million: 3.75,
3667
+ input_per_million: 1.475,
3668
+ cached_input_per_million: 0.295,
3669
+ output_per_million: 4.425,
3521
3670
  },
3522
3671
  features: {
3523
3672
  context_length: 1000000,
@@ -3650,9 +3799,9 @@ exports.MODEL_REGISTRY = [
3650
3799
  provider: 'openrouter',
3651
3800
  openrouter_id: 'qwen/qwen3.6-27b',
3652
3801
  cost: {
3653
- input_per_million: 0.285,
3802
+ input_per_million: 0.45,
3654
3803
  cached_input_per_million: 0.15,
3655
- output_per_million: 2.4,
3804
+ output_per_million: 2.7,
3656
3805
  },
3657
3806
  features: {
3658
3807
  context_length: 262144,
@@ -3661,7 +3810,7 @@ exports.MODEL_REGISTRY = [
3661
3810
  tool_use: true,
3662
3811
  streaming: true,
3663
3812
  json_output: true,
3664
- max_output_tokens: 262140,
3813
+ max_output_tokens: 65536,
3665
3814
  reasoning_output: true,
3666
3815
  },
3667
3816
  class: 'reasoning',
@@ -3673,9 +3822,8 @@ exports.MODEL_REGISTRY = [
3673
3822
  provider: 'openrouter',
3674
3823
  openrouter_id: 'qwen/qwen3-235b-a22b-thinking-2507',
3675
3824
  cost: {
3676
- input_per_million: 0.1,
3677
- cached_input_per_million: 0.1,
3678
- output_per_million: 0.1,
3825
+ input_per_million: 0.3,
3826
+ output_per_million: 3,
3679
3827
  },
3680
3828
  features: {
3681
3829
  context_length: 262144,
@@ -3684,7 +3832,7 @@ exports.MODEL_REGISTRY = [
3684
3832
  tool_use: true,
3685
3833
  streaming: true,
3686
3834
  json_output: true,
3687
- max_output_tokens: 262144,
3835
+ max_output_tokens: 32768,
3688
3836
  reasoning_output: true,
3689
3837
  },
3690
3838
  class: 'reasoning',
@@ -3697,11 +3845,11 @@ exports.MODEL_REGISTRY = [
3697
3845
  provider: 'openrouter',
3698
3846
  openrouter_id: 'qwen/qwen3-coder',
3699
3847
  cost: {
3700
- input_per_million: 0.22,
3701
- output_per_million: 1.8,
3848
+ input_per_million: 0.3,
3849
+ output_per_million: 1,
3702
3850
  },
3703
3851
  features: {
3704
- context_length: 1048576,
3852
+ context_length: 262144,
3705
3853
  input_modality: ['text'],
3706
3854
  output_modality: ['text'],
3707
3855
  tool_use: true,
@@ -3724,7 +3872,7 @@ exports.MODEL_REGISTRY = [
3724
3872
  cached_input_per_million: 0.1794,
3725
3873
  },
3726
3874
  features: {
3727
- context_length: 202752,
3875
+ context_length: 204800,
3728
3876
  input_modality: ['text'],
3729
3877
  output_modality: ['text'],
3730
3878
  tool_use: true,
@@ -3741,9 +3889,9 @@ exports.MODEL_REGISTRY = [
3741
3889
  provider: 'openrouter',
3742
3890
  openrouter_id: 'z-ai/glm-5.2',
3743
3891
  cost: {
3744
- input_per_million: 0.93,
3745
- output_per_million: 3.0,
3746
- cached_input_per_million: 0.18,
3892
+ input_per_million: 0.7756,
3893
+ output_per_million: 2.4376,
3894
+ cached_input_per_million: 0.14404,
3747
3895
  },
3748
3896
  features: {
3749
3897
  context_length: 1048576,
@@ -3752,7 +3900,7 @@ exports.MODEL_REGISTRY = [
3752
3900
  tool_use: true,
3753
3901
  streaming: true,
3754
3902
  json_output: true,
3755
- max_output_tokens: 32768,
3903
+ max_output_tokens: 131072,
3756
3904
  reasoning_output: true,
3757
3905
  },
3758
3906
  class: 'reasoning',
@@ -3760,7 +3908,6 @@ exports.MODEL_REGISTRY = [
3760
3908
  },
3761
3909
  {
3762
3910
  id: 'deepseek/deepseek-v4-pro',
3763
- aliases: ['DeepSeek-V4', 'DeepSeek-V4-Pro', 'deepseek-v4', 'deepseek-v4-pro'],
3764
3911
  provider: 'openrouter',
3765
3912
  openrouter_id: 'deepseek/deepseek-v4-pro',
3766
3913
  cost: {
@@ -3783,13 +3930,12 @@ exports.MODEL_REGISTRY = [
3783
3930
  },
3784
3931
  {
3785
3932
  id: 'deepseek/deepseek-v4-flash',
3786
- aliases: ['DeepSeek-V4-Flash', 'deepseek-v4-flash'],
3787
3933
  provider: 'openrouter',
3788
3934
  openrouter_id: 'deepseek/deepseek-v4-flash',
3789
3935
  cost: {
3790
- input_per_million: 0.09,
3791
- cached_input_per_million: 0.018,
3792
- output_per_million: 0.18,
3936
+ input_per_million: 0.0938,
3937
+ cached_input_per_million: 0.01876,
3938
+ output_per_million: 0.1876,
3793
3939
  },
3794
3940
  features: {
3795
3941
  context_length: 1048576,
@@ -3798,7 +3944,7 @@ exports.MODEL_REGISTRY = [
3798
3944
  tool_use: true,
3799
3945
  streaming: true,
3800
3946
  json_output: true,
3801
- max_output_tokens: 131072,
3947
+ max_output_tokens: 384000,
3802
3948
  reasoning_output: true,
3803
3949
  },
3804
3950
  class: 'reasoning',
@@ -3810,12 +3956,12 @@ exports.MODEL_REGISTRY = [
3810
3956
  provider: 'openrouter',
3811
3957
  openrouter_id: 'xiaomi/mimo-v2.5',
3812
3958
  cost: {
3813
- input_per_million: 0.105,
3814
- cached_input_per_million: 0.028,
3959
+ input_per_million: 0.14,
3960
+ cached_input_per_million: 0.0028,
3815
3961
  output_per_million: 0.28,
3816
3962
  },
3817
3963
  features: {
3818
- context_length: 1048576,
3964
+ context_length: 1050000,
3819
3965
  input_modality: ['text', 'audio', 'image', 'video'],
3820
3966
  output_modality: ['text'],
3821
3967
  tool_use: true,
@@ -3838,7 +3984,7 @@ exports.MODEL_REGISTRY = [
3838
3984
  output_per_million: 0.87,
3839
3985
  },
3840
3986
  features: {
3841
- context_length: 1048576,
3987
+ context_length: 1050000,
3842
3988
  input_modality: ['text'],
3843
3989
  output_modality: ['text'],
3844
3990
  tool_use: true,
@@ -3880,9 +4026,9 @@ exports.MODEL_REGISTRY = [
3880
4026
  provider: 'openrouter',
3881
4027
  openrouter_id: 'tencent/hy3',
3882
4028
  cost: {
3883
- input_per_million: 0.2,
3884
- cached_input_per_million: 0.5,
3885
- output_per_million: 0.8,
4029
+ input_per_million: 0.14,
4030
+ cached_input_per_million: 0.035,
4031
+ output_per_million: 0.58,
3886
4032
  },
3887
4033
  features: {
3888
4034
  context_length: 262144,
@@ -3891,7 +4037,7 @@ exports.MODEL_REGISTRY = [
3891
4037
  tool_use: true,
3892
4038
  streaming: true,
3893
4039
  json_output: false,
3894
- max_output_tokens: 131072,
4040
+ max_output_tokens: 262144,
3895
4041
  reasoning_output: true,
3896
4042
  },
3897
4043
  class: 'reasoning',
@@ -3902,9 +4048,9 @@ exports.MODEL_REGISTRY = [
3902
4048
  aliases: ['kimi-k2.5', 'kimi-k2-5'],
3903
4049
  provider: 'openrouter',
3904
4050
  cost: {
3905
- input_per_million: 0.375,
3906
- output_per_million: 2.025,
3907
- cached_input_per_million: 0.203,
4051
+ input_per_million: 0.57,
4052
+ output_per_million: 2.85,
4053
+ cached_input_per_million: 0.095,
3908
4054
  },
3909
4055
  features: {
3910
4056
  context_length: 262144,
@@ -3925,9 +4071,9 @@ exports.MODEL_REGISTRY = [
3925
4071
  provider: 'openrouter',
3926
4072
  openrouter_id: 'moonshotai/kimi-k2.6',
3927
4073
  cost: {
3928
- input_per_million: 0.66,
3929
- output_per_million: 3.41,
3930
- cached_input_per_million: 0.14,
4074
+ input_per_million: 0.684,
4075
+ output_per_million: 3.42,
4076
+ cached_input_per_million: 0.144,
3931
4077
  },
3932
4078
  features: {
3933
4079
  context_length: 262144,
@@ -3948,9 +4094,9 @@ exports.MODEL_REGISTRY = [
3948
4094
  provider: 'openrouter',
3949
4095
  openrouter_id: 'moonshotai/kimi-k2.7-code',
3950
4096
  cost: {
3951
- input_per_million: 0.74,
3952
- output_per_million: 3.5,
3953
- cached_input_per_million: 0.15,
4097
+ input_per_million: 0.82,
4098
+ output_per_million: 3.75,
4099
+ cached_input_per_million: 0.16,
3954
4100
  },
3955
4101
  features: {
3956
4102
  context_length: 262144,
@@ -3959,7 +4105,7 @@ exports.MODEL_REGISTRY = [
3959
4105
  tool_use: true,
3960
4106
  streaming: true,
3961
4107
  json_output: true,
3962
- max_output_tokens: 16384,
4108
+ max_output_tokens: 262144,
3963
4109
  reasoning_output: true,
3964
4110
  },
3965
4111
  class: 'code',
@@ -3999,7 +4145,7 @@ exports.MODEL_REGISTRY = [
3999
4145
  output_per_million: 1.2,
4000
4146
  },
4001
4147
  features: {
4002
- context_length: 1_048_576,
4148
+ context_length: 1_048_756,
4003
4149
  input_modality: ['text'],
4004
4150
  output_modality: ['text'],
4005
4151
  tool_use: true,
@@ -4022,7 +4168,7 @@ exports.MODEL_REGISTRY = [
4022
4168
  output_per_million: 4.05,
4023
4169
  },
4024
4170
  features: {
4025
- context_length: 1_048_576,
4171
+ context_length: 524_288,
4026
4172
  input_modality: ['text', 'image', 'audio'],
4027
4173
  output_modality: ['text'],
4028
4174
  tool_use: true,
@@ -4102,6 +4248,28 @@ exports.MODEL_REGISTRY = [
4102
4248
  class: 'code',
4103
4249
  description: 'Kwaipilot KAT-Coder Air V2.5 via OpenRouter. Cost-efficient agentic coding model for autonomous repository changes and tool-driven workflows.',
4104
4250
  },
4251
+ {
4252
+ id: 'poolside/laguna-s-2.1',
4253
+ aliases: ['Laguna S 2.1', 'laguna-s-2.1', 'laguna-2.1'],
4254
+ provider: 'openrouter',
4255
+ openrouter_id: 'poolside/laguna-s-2.1',
4256
+ cost: {
4257
+ input_per_million: 0.1,
4258
+ cached_input_per_million: 0.01,
4259
+ output_per_million: 0.2,
4260
+ },
4261
+ features: {
4262
+ context_length: 1_048_576,
4263
+ input_modality: ['text'],
4264
+ output_modality: ['text'],
4265
+ tool_use: true,
4266
+ streaming: true,
4267
+ json_output: true,
4268
+ max_output_tokens: 131_072,
4269
+ },
4270
+ class: 'code',
4271
+ description: 'Poolside Laguna S 2.1 via OpenRouter, optimized for long-context agentic coding workflows.',
4272
+ },
4105
4273
  ];
4106
4274
  function findModel(modelId) {
4107
4275
  const externalModel = (0, external_models_js_1.getExternalModel)(modelId);