@combycode/llm-sdk 1.5.1 → 1.6.1

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.
@@ -1902,6 +1902,31 @@ function parseRetryAfter(headers) {
1902
1902
  return void 0;
1903
1903
  }
1904
1904
 
1905
+ // src/llm/output-errors.ts
1906
+ var AgentRunError = class extends Error {
1907
+ /** Machine-readable failure reason (e.g. `'invalid_final_output'`). */
1908
+ reason;
1909
+ constructor(reason, message, options) {
1910
+ super(message, options);
1911
+ this.name = "AgentRunError";
1912
+ this.reason = reason;
1913
+ }
1914
+ };
1915
+ var InvalidFinalOutputError = class extends AgentRunError {
1916
+ reason = "invalid_final_output";
1917
+ /** The raw model output that failed to parse. */
1918
+ rawText;
1919
+ constructor(rawText, options) {
1920
+ super(
1921
+ "invalid_final_output",
1922
+ `Model final output did not match the requested schema: ${options?.cause instanceof Error ? options.cause.message : "parse failed"}`,
1923
+ options
1924
+ );
1925
+ this.name = "InvalidFinalOutputError";
1926
+ this.rawText = rawText;
1927
+ }
1928
+ };
1929
+
1905
1930
  // src/network/semaphore.ts
1906
1931
  var Semaphore = class {
1907
1932
  constructor(max) {
@@ -2916,7 +2941,7 @@ var catalog_default = {
2916
2941
  family: "claude-opus",
2917
2942
  version: "4",
2918
2943
  status: "legacy",
2919
- active: true,
2944
+ active: false,
2920
2945
  deprecation: {
2921
2946
  date: "2026-05-14",
2922
2947
  source: "litellm"
@@ -3260,7 +3285,7 @@ var catalog_default = {
3260
3285
  family: "claude-sonnet",
3261
3286
  version: "4",
3262
3287
  status: "legacy",
3263
- active: true,
3288
+ active: false,
3264
3289
  deprecation: {
3265
3290
  date: "2026-05-14",
3266
3291
  source: "litellm"
@@ -3427,50 +3452,35 @@ var catalog_default = {
3427
3452
  version: "4.5",
3428
3453
  status: "stable",
3429
3454
  active: true
3430
- }
3431
- };
3432
-
3433
- // src/llm/providers/google/catalog.json
3434
- var catalog_default2 = {
3435
- "google/gemini-2.5-pro": {
3436
- providerModelName: "gemini-2.5-pro",
3455
+ },
3456
+ "anthropic/claude-fable-5": {
3457
+ providerModelName: "claude-fable-5",
3437
3458
  aliases: [
3438
- "gemini-2.5-pro"
3459
+ "claude-fable-5"
3439
3460
  ],
3440
3461
  pricing: {
3441
- inputPerMTok: 1.25,
3442
- outputPerMTok: 10,
3443
- cacheReadPerMTok: 0.125,
3462
+ inputPerMTok: 10,
3463
+ outputPerMTok: 50,
3464
+ cacheReadPerMTok: 1,
3444
3465
  tiers: {
3445
3466
  batch: {
3446
- inputPerMTok: 0.625,
3447
- outputPerMTok: 5,
3448
- cacheReadPerMTok: 0.125
3449
- },
3450
- flex: {
3451
- inputPerMTok: 0.625,
3452
- outputPerMTok: 5,
3453
- cacheReadPerMTok: 0.125
3454
- },
3455
- priority: {
3456
- inputPerMTok: 2.25,
3457
- outputPerMTok: 18,
3458
- cacheReadPerMTok: 0.225
3467
+ inputPerMTok: 5,
3468
+ outputPerMTok: 25
3459
3469
  }
3460
3470
  }
3461
3471
  },
3462
- preferredApi: "generate",
3472
+ preferredApi: "messages",
3463
3473
  supportedApis: [
3464
- "generate"
3474
+ "messages"
3465
3475
  ],
3466
- contextWindow: 1048576,
3467
- maxOutput: 65536,
3476
+ contextWindow: 1e6,
3477
+ maxOutput: 128e3,
3468
3478
  capabilities: {
3469
3479
  toolUse: true,
3470
3480
  streaming: true,
3471
3481
  structuredOutput: true,
3472
3482
  vision: true,
3473
- audio: true,
3483
+ audio: false,
3474
3484
  video: false,
3475
3485
  imageGeneration: false,
3476
3486
  audioGeneration: false,
@@ -3487,103 +3497,44 @@ var catalog_default2 = {
3487
3497
  inputModalities: [
3488
3498
  "text",
3489
3499
  "image",
3490
- "audio"
3500
+ "pdf"
3491
3501
  ],
3492
3502
  outputModalities: [
3493
3503
  "text"
3494
3504
  ],
3495
- family: "gemini-pro",
3496
- version: "2.5",
3505
+ family: "claude-fable",
3506
+ version: "5",
3497
3507
  status: "stable",
3498
3508
  active: true
3499
3509
  },
3500
- "google/gemini-3.1-pro": {
3501
- providerModelName: "gemini-3.1-pro-preview",
3510
+ "anthropic/claude-sonnet-5": {
3511
+ providerModelName: "claude-sonnet-5",
3502
3512
  aliases: [
3503
- "gemini-3.1-pro-preview"
3513
+ "claude-sonnet-5"
3504
3514
  ],
3505
3515
  pricing: {
3506
3516
  inputPerMTok: 2,
3507
- outputPerMTok: 12,
3517
+ outputPerMTok: 10,
3508
3518
  cacheReadPerMTok: 0.2,
3509
3519
  tiers: {
3510
3520
  batch: {
3511
3521
  inputPerMTok: 1,
3512
- outputPerMTok: 6,
3513
- cacheReadPerMTok: 0.2
3514
- },
3515
- flex: {
3516
- inputPerMTok: 1,
3517
- outputPerMTok: 6,
3518
- cacheReadPerMTok: 0.2
3519
- },
3520
- priority: {
3521
- inputPerMTok: 3.6,
3522
- outputPerMTok: 21.6,
3523
- cacheReadPerMTok: 0.36
3522
+ outputPerMTok: 5
3524
3523
  }
3525
3524
  }
3526
3525
  },
3527
- preferredApi: "generate",
3528
- supportedApis: [
3529
- "generate"
3530
- ],
3531
- contextWindow: 1048576,
3532
- maxOutput: 65536,
3533
- capabilities: {
3534
- toolUse: true,
3535
- streaming: true,
3536
- structuredOutput: true,
3537
- vision: true,
3538
- audio: true,
3539
- video: false,
3540
- imageGeneration: false,
3541
- audioGeneration: false,
3542
- videoGeneration: false
3543
- },
3544
- reasoning: {
3545
- supported: true,
3546
- automatic: false,
3547
- effortControl: false,
3548
- encryptedContent: false,
3549
- summaryAvailable: false
3550
- },
3551
- type: "chat",
3552
- inputModalities: [
3553
- "text",
3554
- "image",
3555
- "audio"
3556
- ],
3557
- outputModalities: [
3558
- "text"
3559
- ],
3560
- family: "gemini-pro",
3561
- version: "3.1",
3562
- status: "preview",
3563
- active: true
3564
- },
3565
- "google/gemini-3.1-pro-customtools": {
3566
- providerModelName: "gemini-3.1-pro-preview-customtools",
3567
- aliases: [
3568
- "gemini-3.1-pro-preview-customtools"
3569
- ],
3570
- pricing: {
3571
- inputPerMTok: 2,
3572
- outputPerMTok: 12,
3573
- cacheReadPerMTok: 0.2
3574
- },
3575
- preferredApi: "generate",
3526
+ preferredApi: "messages",
3576
3527
  supportedApis: [
3577
- "generate"
3528
+ "messages"
3578
3529
  ],
3579
- contextWindow: 1048576,
3580
- maxOutput: 65536,
3530
+ contextWindow: 1e6,
3531
+ maxOutput: 128e3,
3581
3532
  capabilities: {
3582
3533
  toolUse: true,
3583
3534
  streaming: true,
3584
3535
  structuredOutput: true,
3585
3536
  vision: true,
3586
- audio: true,
3537
+ audio: false,
3587
3538
  video: false,
3588
3539
  imageGeneration: false,
3589
3540
  audioGeneration: false,
@@ -3600,66 +3551,49 @@ var catalog_default2 = {
3600
3551
  inputModalities: [
3601
3552
  "text",
3602
3553
  "image",
3603
- "audio"
3554
+ "pdf"
3604
3555
  ],
3605
3556
  outputModalities: [
3606
3557
  "text"
3607
3558
  ],
3608
- family: "gemini-pro",
3609
- version: "3.1",
3610
- status: "preview",
3559
+ family: "claude-sonnet",
3560
+ version: "5",
3561
+ status: "stable",
3611
3562
  active: true
3612
3563
  },
3613
- "google/gemini-2.5-flash": {
3614
- providerModelName: "gemini-2.5-flash",
3564
+ "anthropic/claude-mythos-5": {
3565
+ providerModelName: "claude-mythos-5",
3615
3566
  aliases: [
3616
- "gemini-2.5-flash"
3567
+ "claude-mythos-5"
3617
3568
  ],
3618
3569
  pricing: {
3619
- inputPerMTok: 0.3,
3620
- outputPerMTok: 2.5,
3621
- cacheReadPerMTok: 0.03,
3622
- audioInputPerMTok: 1,
3570
+ inputPerMTok: 10,
3571
+ outputPerMTok: 50,
3572
+ cacheReadPerMTok: 1,
3623
3573
  tiers: {
3624
3574
  batch: {
3625
- inputPerMTok: 0.15,
3626
- outputPerMTok: 1.25,
3627
- cacheReadPerMTok: 0.03,
3628
- audioInputPerMTok: 0.5
3629
- },
3630
- flex: {
3631
- inputPerMTok: 0.15,
3632
- outputPerMTok: 1.25,
3633
- cacheReadPerMTok: 0.03,
3634
- audioInputPerMTok: 0.5
3635
- },
3636
- priority: {
3637
- inputPerMTok: 0.54,
3638
- outputPerMTok: 4.5,
3639
- cacheReadPerMTok: 0.054,
3640
- audioInputPerMTok: 1.8
3575
+ inputPerMTok: 5,
3576
+ outputPerMTok: 25
3641
3577
  }
3642
3578
  }
3643
3579
  },
3644
- preferredApi: "generate",
3580
+ preferredApi: "messages",
3645
3581
  supportedApis: [
3646
- "generate"
3582
+ "messages"
3647
3583
  ],
3648
- contextWindow: 1048576,
3649
- maxOutput: 65536,
3650
3584
  capabilities: {
3651
3585
  toolUse: true,
3652
3586
  streaming: true,
3653
3587
  structuredOutput: true,
3654
- vision: true,
3655
- audio: true,
3588
+ vision: false,
3589
+ audio: false,
3656
3590
  video: false,
3657
3591
  imageGeneration: false,
3658
3592
  audioGeneration: false,
3659
3593
  videoGeneration: false
3660
3594
  },
3661
3595
  reasoning: {
3662
- supported: true,
3596
+ supported: false,
3663
3597
  automatic: false,
3664
3598
  effortControl: false,
3665
3599
  encryptedContent: false,
@@ -3667,46 +3601,45 @@ var catalog_default2 = {
3667
3601
  },
3668
3602
  type: "chat",
3669
3603
  inputModalities: [
3670
- "text",
3671
- "image",
3672
- "audio"
3604
+ "text"
3673
3605
  ],
3674
3606
  outputModalities: [
3675
3607
  "text"
3676
3608
  ],
3677
- family: "gemini-flash",
3678
- version: "2.5",
3609
+ family: "claude-mythos",
3610
+ version: "5",
3679
3611
  status: "stable",
3680
- active: true
3681
- },
3682
- "google/gemini-3-flash": {
3683
- providerModelName: "gemini-3-flash-preview",
3612
+ active: true,
3613
+ availability: "limited"
3614
+ }
3615
+ };
3616
+
3617
+ // src/llm/providers/google/catalog.json
3618
+ var catalog_default2 = {
3619
+ "google/gemini-2.5-pro": {
3620
+ providerModelName: "gemini-2.5-pro",
3684
3621
  aliases: [
3685
- "gemini-3-flash-preview"
3622
+ "gemini-2.5-pro"
3686
3623
  ],
3687
3624
  pricing: {
3688
- inputPerMTok: 0.5,
3689
- outputPerMTok: 3,
3690
- cacheReadPerMTok: 0.05,
3691
- audioInputPerMTok: 1,
3625
+ inputPerMTok: 1.25,
3626
+ outputPerMTok: 10,
3627
+ cacheReadPerMTok: 0.125,
3692
3628
  tiers: {
3693
3629
  batch: {
3694
- inputPerMTok: 0.25,
3695
- outputPerMTok: 1.5,
3696
- cacheReadPerMTok: 0.05,
3697
- audioInputPerMTok: 0.5
3630
+ inputPerMTok: 0.625,
3631
+ outputPerMTok: 5,
3632
+ cacheReadPerMTok: 0.125
3698
3633
  },
3699
3634
  flex: {
3700
- inputPerMTok: 0.25,
3701
- outputPerMTok: 1.5,
3702
- cacheReadPerMTok: 0.05,
3703
- audioInputPerMTok: 0.5
3635
+ inputPerMTok: 0.625,
3636
+ outputPerMTok: 5,
3637
+ cacheReadPerMTok: 0.125
3704
3638
  },
3705
3639
  priority: {
3706
- inputPerMTok: 0.9,
3707
- outputPerMTok: 5.4,
3708
- cacheReadPerMTok: 0.09,
3709
- audioInputPerMTok: 1.8
3640
+ inputPerMTok: 2.25,
3641
+ outputPerMTok: 18,
3642
+ cacheReadPerMTok: 0.225
3710
3643
  }
3711
3644
  }
3712
3645
  },
@@ -3743,35 +3676,286 @@ var catalog_default2 = {
3743
3676
  outputModalities: [
3744
3677
  "text"
3745
3678
  ],
3746
- family: "gemini-flash",
3747
- version: "3",
3748
- status: "preview",
3679
+ family: "gemini-pro",
3680
+ version: "2.5",
3681
+ status: "stable",
3749
3682
  active: true
3750
3683
  },
3751
- "google/gemini-3.5-flash": {
3752
- providerModelName: "gemini-3.5-flash",
3684
+ "google/gemini-3.1-pro": {
3685
+ providerModelName: "gemini-3.1-pro-preview",
3753
3686
  aliases: [
3754
- "gemini-3.5-flash"
3687
+ "gemini-3.1-pro-preview"
3755
3688
  ],
3756
3689
  pricing: {
3757
- inputPerMTok: 1.5,
3758
- outputPerMTok: 9,
3759
- cacheReadPerMTok: 0.15,
3690
+ inputPerMTok: 2,
3691
+ outputPerMTok: 12,
3692
+ cacheReadPerMTok: 0.2,
3760
3693
  tiers: {
3761
3694
  batch: {
3762
- inputPerMTok: 0.75,
3763
- outputPerMTok: 4.5,
3764
- cacheReadPerMTok: 0.075
3695
+ inputPerMTok: 1,
3696
+ outputPerMTok: 6,
3697
+ cacheReadPerMTok: 0.2
3765
3698
  },
3766
3699
  flex: {
3767
- inputPerMTok: 0.75,
3768
- outputPerMTok: 4.5,
3769
- cacheReadPerMTok: 0.08
3700
+ inputPerMTok: 1,
3701
+ outputPerMTok: 6,
3702
+ cacheReadPerMTok: 0.2
3770
3703
  },
3771
3704
  priority: {
3772
- inputPerMTok: 2.7,
3773
- outputPerMTok: 16.2,
3774
- cacheReadPerMTok: 0.27
3705
+ inputPerMTok: 3.6,
3706
+ outputPerMTok: 21.6,
3707
+ cacheReadPerMTok: 0.36
3708
+ }
3709
+ }
3710
+ },
3711
+ preferredApi: "generate",
3712
+ supportedApis: [
3713
+ "generate"
3714
+ ],
3715
+ contextWindow: 1048576,
3716
+ maxOutput: 65536,
3717
+ capabilities: {
3718
+ toolUse: true,
3719
+ streaming: true,
3720
+ structuredOutput: true,
3721
+ vision: true,
3722
+ audio: true,
3723
+ video: false,
3724
+ imageGeneration: false,
3725
+ audioGeneration: false,
3726
+ videoGeneration: false
3727
+ },
3728
+ reasoning: {
3729
+ supported: true,
3730
+ automatic: false,
3731
+ effortControl: false,
3732
+ encryptedContent: false,
3733
+ summaryAvailable: false
3734
+ },
3735
+ type: "chat",
3736
+ inputModalities: [
3737
+ "text",
3738
+ "image",
3739
+ "audio"
3740
+ ],
3741
+ outputModalities: [
3742
+ "text"
3743
+ ],
3744
+ family: "gemini-pro",
3745
+ version: "3.1",
3746
+ status: "preview",
3747
+ active: true
3748
+ },
3749
+ "google/gemini-3.1-pro-customtools": {
3750
+ providerModelName: "gemini-3.1-pro-preview-customtools",
3751
+ aliases: [
3752
+ "gemini-3.1-pro-preview-customtools"
3753
+ ],
3754
+ pricing: {
3755
+ inputPerMTok: 2,
3756
+ outputPerMTok: 12,
3757
+ cacheReadPerMTok: 0.2
3758
+ },
3759
+ preferredApi: "generate",
3760
+ supportedApis: [
3761
+ "generate"
3762
+ ],
3763
+ contextWindow: 1048576,
3764
+ maxOutput: 65536,
3765
+ capabilities: {
3766
+ toolUse: true,
3767
+ streaming: true,
3768
+ structuredOutput: true,
3769
+ vision: true,
3770
+ audio: true,
3771
+ video: false,
3772
+ imageGeneration: false,
3773
+ audioGeneration: false,
3774
+ videoGeneration: false
3775
+ },
3776
+ reasoning: {
3777
+ supported: true,
3778
+ automatic: false,
3779
+ effortControl: false,
3780
+ encryptedContent: false,
3781
+ summaryAvailable: false
3782
+ },
3783
+ type: "chat",
3784
+ inputModalities: [
3785
+ "text",
3786
+ "image",
3787
+ "audio"
3788
+ ],
3789
+ outputModalities: [
3790
+ "text"
3791
+ ],
3792
+ family: "gemini-pro",
3793
+ version: "3.1",
3794
+ status: "preview",
3795
+ active: true
3796
+ },
3797
+ "google/gemini-2.5-flash": {
3798
+ providerModelName: "gemini-2.5-flash",
3799
+ aliases: [
3800
+ "gemini-2.5-flash"
3801
+ ],
3802
+ pricing: {
3803
+ inputPerMTok: 0.3,
3804
+ outputPerMTok: 2.5,
3805
+ cacheReadPerMTok: 0.03,
3806
+ audioInputPerMTok: 1,
3807
+ tiers: {
3808
+ batch: {
3809
+ inputPerMTok: 0.15,
3810
+ outputPerMTok: 1.25,
3811
+ cacheReadPerMTok: 0.03,
3812
+ audioInputPerMTok: 0.5
3813
+ },
3814
+ flex: {
3815
+ inputPerMTok: 0.15,
3816
+ outputPerMTok: 1.25,
3817
+ cacheReadPerMTok: 0.03,
3818
+ audioInputPerMTok: 0.5
3819
+ },
3820
+ priority: {
3821
+ inputPerMTok: 0.54,
3822
+ outputPerMTok: 4.5,
3823
+ cacheReadPerMTok: 0.054,
3824
+ audioInputPerMTok: 1.8
3825
+ }
3826
+ }
3827
+ },
3828
+ preferredApi: "generate",
3829
+ supportedApis: [
3830
+ "generate"
3831
+ ],
3832
+ contextWindow: 1048576,
3833
+ maxOutput: 65536,
3834
+ capabilities: {
3835
+ toolUse: true,
3836
+ streaming: true,
3837
+ structuredOutput: true,
3838
+ vision: true,
3839
+ audio: true,
3840
+ video: false,
3841
+ imageGeneration: false,
3842
+ audioGeneration: false,
3843
+ videoGeneration: false
3844
+ },
3845
+ reasoning: {
3846
+ supported: true,
3847
+ automatic: false,
3848
+ effortControl: false,
3849
+ encryptedContent: false,
3850
+ summaryAvailable: false
3851
+ },
3852
+ type: "chat",
3853
+ inputModalities: [
3854
+ "text",
3855
+ "image",
3856
+ "audio"
3857
+ ],
3858
+ outputModalities: [
3859
+ "text"
3860
+ ],
3861
+ family: "gemini-flash",
3862
+ version: "2.5",
3863
+ status: "stable",
3864
+ active: true
3865
+ },
3866
+ "google/gemini-3-flash": {
3867
+ providerModelName: "gemini-3-flash-preview",
3868
+ aliases: [
3869
+ "gemini-3-flash-preview"
3870
+ ],
3871
+ pricing: {
3872
+ inputPerMTok: 0.5,
3873
+ outputPerMTok: 3,
3874
+ cacheReadPerMTok: 0.05,
3875
+ audioInputPerMTok: 1,
3876
+ tiers: {
3877
+ batch: {
3878
+ inputPerMTok: 0.25,
3879
+ outputPerMTok: 1.5,
3880
+ cacheReadPerMTok: 0.05,
3881
+ audioInputPerMTok: 0.5
3882
+ },
3883
+ flex: {
3884
+ inputPerMTok: 0.25,
3885
+ outputPerMTok: 1.5,
3886
+ cacheReadPerMTok: 0.05,
3887
+ audioInputPerMTok: 0.5
3888
+ },
3889
+ priority: {
3890
+ inputPerMTok: 0.9,
3891
+ outputPerMTok: 5.4,
3892
+ cacheReadPerMTok: 0.09,
3893
+ audioInputPerMTok: 1.8
3894
+ }
3895
+ }
3896
+ },
3897
+ preferredApi: "generate",
3898
+ supportedApis: [
3899
+ "generate"
3900
+ ],
3901
+ contextWindow: 1048576,
3902
+ maxOutput: 65536,
3903
+ capabilities: {
3904
+ toolUse: true,
3905
+ streaming: true,
3906
+ structuredOutput: true,
3907
+ vision: true,
3908
+ audio: true,
3909
+ video: false,
3910
+ imageGeneration: false,
3911
+ audioGeneration: false,
3912
+ videoGeneration: false
3913
+ },
3914
+ reasoning: {
3915
+ supported: true,
3916
+ automatic: false,
3917
+ effortControl: false,
3918
+ encryptedContent: false,
3919
+ summaryAvailable: false
3920
+ },
3921
+ type: "chat",
3922
+ inputModalities: [
3923
+ "text",
3924
+ "image",
3925
+ "audio"
3926
+ ],
3927
+ outputModalities: [
3928
+ "text"
3929
+ ],
3930
+ family: "gemini-flash",
3931
+ version: "3",
3932
+ status: "preview",
3933
+ active: true
3934
+ },
3935
+ "google/gemini-3.5-flash": {
3936
+ providerModelName: "gemini-3.5-flash",
3937
+ aliases: [
3938
+ "gemini-3.5-flash"
3939
+ ],
3940
+ pricing: {
3941
+ inputPerMTok: 1.5,
3942
+ outputPerMTok: 9,
3943
+ cacheReadPerMTok: 0.15,
3944
+ tiers: {
3945
+ batch: {
3946
+ inputPerMTok: 0.75,
3947
+ outputPerMTok: 4.5,
3948
+ cacheReadPerMTok: 0.075
3949
+ },
3950
+ flex: {
3951
+ inputPerMTok: 0.75,
3952
+ outputPerMTok: 4.5,
3953
+ cacheReadPerMTok: 0.08
3954
+ },
3955
+ priority: {
3956
+ inputPerMTok: 2.7,
3957
+ outputPerMTok: 16.2,
3958
+ cacheReadPerMTok: 0.27
3775
3959
  }
3776
3960
  }
3777
3961
  },
@@ -4122,7 +4306,6 @@ var catalog_default2 = {
4122
4306
  },
4123
4307
  imageSize: {
4124
4308
  values: [
4125
- "512",
4126
4309
  "1K",
4127
4310
  "2K",
4128
4311
  "4K"
@@ -4287,7 +4470,6 @@ var catalog_default2 = {
4287
4470
  },
4288
4471
  imageSize: {
4289
4472
  values: [
4290
- "512",
4291
4473
  "1K",
4292
4474
  "2K",
4293
4475
  "4K"
@@ -4622,7 +4804,8 @@ var catalog_default2 = {
4622
4804
  outputPerMTok: 4.5,
4623
4805
  audioInputPerMTok: 3,
4624
4806
  audioOutputPerMTok: 12,
4625
- perMinute: 5e-3
4807
+ perMinute: 5e-3,
4808
+ perSecond: 2e-3
4626
4809
  },
4627
4810
  preferredApi: "generate",
4628
4811
  supportedApis: [
@@ -4671,7 +4854,9 @@ var catalog_default2 = {
4671
4854
  pricing: {
4672
4855
  inputPerMTok: 3.5,
4673
4856
  outputPerMTok: 21,
4674
- perMinute: 53e-4
4857
+ perMinute: 53e-4,
4858
+ audioInputPerMTok: 53e-4,
4859
+ audioOutputPerMTok: 0.0315
4675
4860
  },
4676
4861
  preferredApi: "generate",
4677
4862
  supportedApis: [
@@ -5245,7 +5430,8 @@ var catalog_default2 = {
5245
5430
  "720p": 0.1,
5246
5431
  "1080p": 0.12,
5247
5432
  "4k": 0.3
5248
- }
5433
+ },
5434
+ perSecond: 0.1
5249
5435
  },
5250
5436
  preferredApi: "generate",
5251
5437
  supportedApis: [
@@ -5392,7 +5578,8 @@ var catalog_default2 = {
5392
5578
  "720p": 0.1,
5393
5579
  "1080p": 0.12,
5394
5580
  "4k": 0.3
5395
- }
5581
+ },
5582
+ perSecond: 0.1
5396
5583
  },
5397
5584
  preferredApi: "generate",
5398
5585
  supportedApis: [
@@ -5463,8 +5650,10 @@ var catalog_default2 = {
5463
5650
  pricing: {
5464
5651
  perUnit: {
5465
5652
  "720p": 0.05,
5466
- "1080p": 0.08
5467
- }
5653
+ "1080p": 0.08,
5654
+ "4k": 0
5655
+ },
5656
+ perSecond: 0.05
5468
5657
  },
5469
5658
  preferredApi: "generate",
5470
5659
  supportedApis: [
@@ -5765,6 +5954,126 @@ var catalog_default2 = {
5765
5954
  version: "1.6",
5766
5955
  status: "preview",
5767
5956
  active: true
5957
+ },
5958
+ "google/gemini-3.1-flash-lite-image": {
5959
+ providerModelName: "gemini-3.1-flash-lite-image",
5960
+ aliases: [
5961
+ "gemini-3.1-flash-lite-image"
5962
+ ],
5963
+ pricing: {
5964
+ inputPerMTok: 0.25,
5965
+ outputPerMTok: 1.5,
5966
+ perUnit: {
5967
+ "1k": 0.0336
5968
+ }
5969
+ },
5970
+ preferredApi: "generate",
5971
+ supportedApis: [
5972
+ "generate"
5973
+ ],
5974
+ contextWindow: 65536,
5975
+ maxOutput: 65536,
5976
+ capabilities: {
5977
+ toolUse: false,
5978
+ streaming: true,
5979
+ structuredOutput: false,
5980
+ vision: true,
5981
+ audio: false,
5982
+ video: false,
5983
+ imageGeneration: true,
5984
+ audioGeneration: false,
5985
+ videoGeneration: false
5986
+ },
5987
+ reasoning: {
5988
+ supported: true,
5989
+ automatic: false,
5990
+ effortControl: false,
5991
+ encryptedContent: false,
5992
+ summaryAvailable: false
5993
+ },
5994
+ type: "image",
5995
+ inputModalities: [
5996
+ "text",
5997
+ "image"
5998
+ ],
5999
+ outputModalities: [
6000
+ "image"
6001
+ ],
6002
+ family: "gemini-image",
6003
+ version: "3.1",
6004
+ status: "stable",
6005
+ active: true,
6006
+ mediaParams: {
6007
+ aspectRatio: {
6008
+ values: [
6009
+ "1:1",
6010
+ "1:4",
6011
+ "1:8",
6012
+ "2:3",
6013
+ "3:2",
6014
+ "3:4",
6015
+ "4:1",
6016
+ "4:3",
6017
+ "4:5",
6018
+ "5:4",
6019
+ "9:16",
6020
+ "16:9",
6021
+ "21:9"
6022
+ ],
6023
+ default: "1:1"
6024
+ },
6025
+ imageSize: {
6026
+ values: [
6027
+ "1K"
6028
+ ],
6029
+ default: "1K"
6030
+ }
6031
+ }
6032
+ },
6033
+ "google/gemini-omni-flash": {
6034
+ providerModelName: "gemini-omni-flash-preview",
6035
+ aliases: [
6036
+ "gemini-omni-flash-preview"
6037
+ ],
6038
+ pricing: {
6039
+ inputPerMTok: 1.5
6040
+ },
6041
+ preferredApi: "generate",
6042
+ supportedApis: [
6043
+ "generate"
6044
+ ],
6045
+ contextWindow: 131072,
6046
+ maxOutput: 65536,
6047
+ capabilities: {
6048
+ toolUse: true,
6049
+ streaming: true,
6050
+ structuredOutput: true,
6051
+ vision: false,
6052
+ audio: true,
6053
+ video: false,
6054
+ imageGeneration: false,
6055
+ audioGeneration: false,
6056
+ videoGeneration: false
6057
+ },
6058
+ reasoning: {
6059
+ supported: false,
6060
+ automatic: false,
6061
+ effortControl: false,
6062
+ encryptedContent: false,
6063
+ summaryAvailable: false
6064
+ },
6065
+ type: "audio-chat",
6066
+ inputModalities: [
6067
+ "text",
6068
+ "audio"
6069
+ ],
6070
+ outputModalities: [
6071
+ "text"
6072
+ ],
6073
+ family: "gemini-audio",
6074
+ version: "1",
6075
+ status: "preview",
6076
+ active: true
5768
6077
  }
5769
6078
  };
5770
6079
 
@@ -7364,9 +7673,10 @@ var catalog_default3 = {
7364
7673
  "gpt-4o-mini-2024-07-18"
7365
7674
  ],
7366
7675
  pricing: {
7367
- inputPerMTok: 1.25,
7368
- outputPerMTok: 5,
7369
- perMinute: 3e-3
7676
+ inputPerMTok: 0.15,
7677
+ outputPerMTok: 0.6,
7678
+ perMinute: 3e-3,
7679
+ cacheReadPerMTok: 0.075
7370
7680
  },
7371
7681
  preferredApi: "responses",
7372
7682
  supportedApis: [
@@ -8019,8 +8329,8 @@ var catalog_default3 = {
8019
8329
  "gpt-realtime-2025-08-28"
8020
8330
  ],
8021
8331
  pricing: {
8022
- inputPerMTok: 4,
8023
- outputPerMTok: 24,
8332
+ inputPerMTok: 32,
8333
+ outputPerMTok: 64,
8024
8334
  cacheReadPerMTok: 0.4,
8025
8335
  audioInputPerMTok: 32,
8026
8336
  audioOutputPerMTok: 64
@@ -8119,8 +8429,8 @@ var catalog_default3 = {
8119
8429
  "gpt-realtime-2"
8120
8430
  ],
8121
8431
  pricing: {
8122
- inputPerMTok: 4,
8123
- outputPerMTok: 24,
8432
+ inputPerMTok: 32,
8433
+ outputPerMTok: 64,
8124
8434
  cacheReadPerMTok: 0.4,
8125
8435
  audioInputPerMTok: 32,
8126
8436
  audioOutputPerMTok: 64
@@ -8255,7 +8565,8 @@ var catalog_default3 = {
8255
8565
  family: "gpt-realtime",
8256
8566
  version: "1",
8257
8567
  status: "stable",
8258
- active: true
8568
+ active: true,
8569
+ contextWindow: 128e3
8259
8570
  },
8260
8571
  "openai/gpt-realtime-whisper": {
8261
8572
  providerModelName: "gpt-realtime-whisper",
@@ -8298,7 +8609,8 @@ var catalog_default3 = {
8298
8609
  family: "gpt-realtime",
8299
8610
  version: "1",
8300
8611
  status: "stable",
8301
- active: true
8612
+ active: true,
8613
+ contextWindow: 128e3
8302
8614
  },
8303
8615
  "openai/o1": {
8304
8616
  providerModelName: "o1",
@@ -8407,7 +8719,8 @@ var catalog_default3 = {
8407
8719
  },
8408
8720
  preferredApi: "responses",
8409
8721
  supportedApis: [
8410
- "responses"
8722
+ "responses",
8723
+ "completions"
8411
8724
  ],
8412
8725
  contextWindow: 2e5,
8413
8726
  maxOutput: 1e5,
@@ -8541,9 +8854,9 @@ var catalog_default3 = {
8541
8854
  "o4-mini-2025-04-16"
8542
8855
  ],
8543
8856
  pricing: {
8544
- inputPerMTok: 4,
8545
- outputPerMTok: 16,
8546
- cacheReadPerMTok: 1,
8857
+ inputPerMTok: 1.1,
8858
+ outputPerMTok: 4.4,
8859
+ cacheReadPerMTok: 0.275,
8547
8860
  tiers: {
8548
8861
  batch: {
8549
8862
  inputPerMTok: 2,
@@ -8880,167 +9193,171 @@ var catalog_default3 = {
8880
9193
  "tts-1",
8881
9194
  "tts-1-1106"
8882
9195
  ],
8883
- pricing: { perMChars: 15 },
8884
- preferredApi: "responses",
8885
- supportedApis: [
8886
- "responses",
8887
- "completions"
8888
- ],
8889
- capabilities: {
8890
- toolUse: false,
8891
- streaming: true,
8892
- structuredOutput: false,
8893
- vision: false,
8894
- audio: false,
8895
- video: false,
8896
- imageGeneration: false,
8897
- audioGeneration: true,
8898
- videoGeneration: false
8899
- },
8900
- reasoning: {
8901
- supported: false,
8902
- automatic: false,
8903
- effortControl: false,
8904
- encryptedContent: false,
8905
- summaryAvailable: false
8906
- },
8907
- type: "tts",
8908
- inputModalities: [
8909
- "text"
8910
- ],
8911
- outputModalities: [
8912
- "audio"
8913
- ],
8914
- family: "tts",
8915
- version: "1",
8916
- status: "legacy",
8917
- active: true,
8918
- mediaParams: {
8919
- voice: {
8920
- values: [
8921
- "alloy",
8922
- "ash",
8923
- "ballad",
8924
- "coral",
8925
- "echo",
8926
- "fable",
8927
- "onyx",
8928
- "nova",
8929
- "sage",
8930
- "shimmer",
8931
- "verse",
8932
- "marin",
8933
- "cedar"
8934
- ],
8935
- default: "alloy"
8936
- },
8937
- format: {
8938
- values: [
8939
- "mp3",
8940
- "opus",
8941
- "aac",
8942
- "flac",
8943
- "wav",
8944
- "pcm"
8945
- ],
8946
- default: "mp3"
8947
- },
8948
- speed: {
8949
- min: 0.25,
8950
- max: 4,
8951
- default: 1
8952
- }
8953
- }
8954
- },
8955
- "openai/tts-1-hd": {
8956
- providerModelName: "tts-1-hd",
8957
- aliases: [
8958
- "tts-1-hd",
8959
- "tts-1-hd-1106"
8960
- ],
8961
- pricing: { perMChars: 30 },
8962
- preferredApi: "responses",
8963
- supportedApis: [
8964
- "responses",
8965
- "completions"
8966
- ],
8967
- capabilities: {
8968
- toolUse: false,
8969
- streaming: true,
8970
- structuredOutput: false,
8971
- vision: false,
8972
- audio: false,
8973
- video: false,
8974
- imageGeneration: false,
8975
- audioGeneration: true,
8976
- videoGeneration: false
8977
- },
8978
- reasoning: {
8979
- supported: false,
8980
- automatic: false,
8981
- effortControl: false,
8982
- encryptedContent: false,
8983
- summaryAvailable: false
8984
- },
8985
- type: "tts",
8986
- inputModalities: [
8987
- "text"
8988
- ],
8989
- outputModalities: [
8990
- "audio"
8991
- ],
8992
- family: "tts",
8993
- version: "1",
8994
- status: "legacy",
8995
- active: true,
8996
- mediaParams: {
8997
- voice: {
8998
- values: [
8999
- "alloy",
9000
- "ash",
9001
- "ballad",
9002
- "coral",
9003
- "echo",
9004
- "fable",
9005
- "onyx",
9006
- "nova",
9007
- "sage",
9008
- "shimmer",
9009
- "verse",
9010
- "marin",
9011
- "cedar"
9012
- ],
9013
- default: "alloy"
9014
- },
9015
- format: {
9016
- values: [
9017
- "mp3",
9018
- "opus",
9019
- "aac",
9020
- "flac",
9021
- "wav",
9022
- "pcm"
9023
- ],
9024
- default: "mp3"
9025
- },
9026
- speed: {
9027
- min: 0.25,
9028
- max: 4,
9029
- default: 1
9030
- }
9031
- }
9032
- },
9033
- "openai/gpt-4o-mini-tts": {
9034
- providerModelName: "gpt-4o-mini-tts",
9035
- aliases: [
9036
- "gpt-4o-mini-tts",
9037
- "gpt-4o-mini-tts-2025-03-20",
9038
- "gpt-4o-mini-tts-2025-12-15"
9039
- ],
9040
9196
  pricing: {
9041
- inputPerMTok: 2.5,
9042
- outputPerMTok: 10,
9043
- audioOutputPerMTok: 12
9197
+ perMChars: 15
9198
+ },
9199
+ preferredApi: "responses",
9200
+ supportedApis: [
9201
+ "responses",
9202
+ "completions"
9203
+ ],
9204
+ capabilities: {
9205
+ toolUse: false,
9206
+ streaming: true,
9207
+ structuredOutput: false,
9208
+ vision: false,
9209
+ audio: false,
9210
+ video: false,
9211
+ imageGeneration: false,
9212
+ audioGeneration: true,
9213
+ videoGeneration: false
9214
+ },
9215
+ reasoning: {
9216
+ supported: false,
9217
+ automatic: false,
9218
+ effortControl: false,
9219
+ encryptedContent: false,
9220
+ summaryAvailable: false
9221
+ },
9222
+ type: "tts",
9223
+ inputModalities: [
9224
+ "text"
9225
+ ],
9226
+ outputModalities: [
9227
+ "audio"
9228
+ ],
9229
+ family: "tts",
9230
+ version: "1",
9231
+ status: "legacy",
9232
+ active: true,
9233
+ mediaParams: {
9234
+ voice: {
9235
+ values: [
9236
+ "alloy",
9237
+ "ash",
9238
+ "ballad",
9239
+ "coral",
9240
+ "echo",
9241
+ "fable",
9242
+ "onyx",
9243
+ "nova",
9244
+ "sage",
9245
+ "shimmer",
9246
+ "verse",
9247
+ "marin",
9248
+ "cedar"
9249
+ ],
9250
+ default: "alloy"
9251
+ },
9252
+ format: {
9253
+ values: [
9254
+ "mp3",
9255
+ "opus",
9256
+ "aac",
9257
+ "flac",
9258
+ "wav",
9259
+ "pcm"
9260
+ ],
9261
+ default: "mp3"
9262
+ },
9263
+ speed: {
9264
+ min: 0.25,
9265
+ max: 4,
9266
+ default: 1
9267
+ }
9268
+ }
9269
+ },
9270
+ "openai/tts-1-hd": {
9271
+ providerModelName: "tts-1-hd",
9272
+ aliases: [
9273
+ "tts-1-hd",
9274
+ "tts-1-hd-1106"
9275
+ ],
9276
+ pricing: {
9277
+ perMChars: 30
9278
+ },
9279
+ preferredApi: "responses",
9280
+ supportedApis: [
9281
+ "responses",
9282
+ "completions"
9283
+ ],
9284
+ capabilities: {
9285
+ toolUse: false,
9286
+ streaming: true,
9287
+ structuredOutput: false,
9288
+ vision: false,
9289
+ audio: false,
9290
+ video: false,
9291
+ imageGeneration: false,
9292
+ audioGeneration: true,
9293
+ videoGeneration: false
9294
+ },
9295
+ reasoning: {
9296
+ supported: false,
9297
+ automatic: false,
9298
+ effortControl: false,
9299
+ encryptedContent: false,
9300
+ summaryAvailable: false
9301
+ },
9302
+ type: "tts",
9303
+ inputModalities: [
9304
+ "text"
9305
+ ],
9306
+ outputModalities: [
9307
+ "audio"
9308
+ ],
9309
+ family: "tts",
9310
+ version: "1",
9311
+ status: "legacy",
9312
+ active: true,
9313
+ mediaParams: {
9314
+ voice: {
9315
+ values: [
9316
+ "alloy",
9317
+ "ash",
9318
+ "ballad",
9319
+ "coral",
9320
+ "echo",
9321
+ "fable",
9322
+ "onyx",
9323
+ "nova",
9324
+ "sage",
9325
+ "shimmer",
9326
+ "verse",
9327
+ "marin",
9328
+ "cedar"
9329
+ ],
9330
+ default: "alloy"
9331
+ },
9332
+ format: {
9333
+ values: [
9334
+ "mp3",
9335
+ "opus",
9336
+ "aac",
9337
+ "flac",
9338
+ "wav",
9339
+ "pcm"
9340
+ ],
9341
+ default: "mp3"
9342
+ },
9343
+ speed: {
9344
+ min: 0.25,
9345
+ max: 4,
9346
+ default: 1
9347
+ }
9348
+ }
9349
+ },
9350
+ "openai/gpt-4o-mini-tts": {
9351
+ providerModelName: "gpt-4o-mini-tts",
9352
+ aliases: [
9353
+ "gpt-4o-mini-tts",
9354
+ "gpt-4o-mini-tts-2025-03-20",
9355
+ "gpt-4o-mini-tts-2025-12-15"
9356
+ ],
9357
+ pricing: {
9358
+ inputPerMTok: 2.5,
9359
+ outputPerMTok: 10,
9360
+ audioOutputPerMTok: 12
9044
9361
  },
9045
9362
  preferredApi: "responses",
9046
9363
  supportedApis: [
@@ -9118,7 +9435,9 @@ var catalog_default3 = {
9118
9435
  aliases: [
9119
9436
  "whisper-1"
9120
9437
  ],
9121
- pricing: { perMinute: 6e-3 },
9438
+ pricing: {
9439
+ perMinute: 6e-3
9440
+ },
9122
9441
  preferredApi: "responses",
9123
9442
  supportedApis: [
9124
9443
  "responses",
@@ -9152,7 +9471,8 @@ var catalog_default3 = {
9152
9471
  family: "whisper",
9153
9472
  version: "1",
9154
9473
  status: "legacy",
9155
- active: true
9474
+ active: true,
9475
+ contextWindow: 16e3
9156
9476
  },
9157
9477
  "openai/gpt-4o-transcribe": {
9158
9478
  providerModelName: "gpt-4o-transcribe",
@@ -9344,6 +9664,300 @@ var catalog_default3 = {
9344
9664
  version: "1",
9345
9665
  status: "stable",
9346
9666
  active: true
9667
+ },
9668
+ "openai/gpt-realtime-2.1-mini": {
9669
+ providerModelName: "gpt-realtime-2.1-mini",
9670
+ aliases: [
9671
+ "gpt-realtime-2.1-mini"
9672
+ ],
9673
+ pricing: {
9674
+ inputPerMTok: 10,
9675
+ cacheReadPerMTok: 0.3,
9676
+ outputPerMTok: 20
9677
+ },
9678
+ preferredApi: "responses",
9679
+ supportedApis: [
9680
+ "responses",
9681
+ "completions"
9682
+ ],
9683
+ contextWindow: 128e3,
9684
+ maxOutput: 4096,
9685
+ capabilities: {
9686
+ toolUse: true,
9687
+ streaming: true,
9688
+ structuredOutput: false,
9689
+ vision: false,
9690
+ audio: true,
9691
+ video: false,
9692
+ imageGeneration: false,
9693
+ audioGeneration: false,
9694
+ videoGeneration: false
9695
+ },
9696
+ reasoning: {
9697
+ supported: false,
9698
+ automatic: false,
9699
+ effortControl: false,
9700
+ encryptedContent: false,
9701
+ summaryAvailable: false
9702
+ },
9703
+ type: "realtime",
9704
+ inputModalities: [
9705
+ "text",
9706
+ "audio"
9707
+ ],
9708
+ outputModalities: [
9709
+ "text"
9710
+ ],
9711
+ family: "gpt-realtime",
9712
+ version: "2.1",
9713
+ status: "stable",
9714
+ active: true
9715
+ },
9716
+ "openai/gpt-realtime-2.1": {
9717
+ providerModelName: "gpt-realtime-2.1",
9718
+ aliases: [
9719
+ "gpt-realtime-2.1"
9720
+ ],
9721
+ pricing: {
9722
+ inputPerMTok: 32,
9723
+ cacheReadPerMTok: 0.4,
9724
+ outputPerMTok: 64
9725
+ },
9726
+ preferredApi: "responses",
9727
+ supportedApis: [
9728
+ "responses",
9729
+ "completions"
9730
+ ],
9731
+ contextWindow: 128e3,
9732
+ maxOutput: 32e3,
9733
+ capabilities: {
9734
+ toolUse: true,
9735
+ streaming: true,
9736
+ structuredOutput: false,
9737
+ vision: false,
9738
+ audio: true,
9739
+ video: false,
9740
+ imageGeneration: false,
9741
+ audioGeneration: false,
9742
+ videoGeneration: false
9743
+ },
9744
+ reasoning: {
9745
+ supported: false,
9746
+ automatic: false,
9747
+ effortControl: false,
9748
+ encryptedContent: false,
9749
+ summaryAvailable: false
9750
+ },
9751
+ type: "realtime",
9752
+ inputModalities: [
9753
+ "text",
9754
+ "audio"
9755
+ ],
9756
+ outputModalities: [
9757
+ "text"
9758
+ ],
9759
+ family: "gpt-realtime",
9760
+ version: "2.1",
9761
+ status: "stable",
9762
+ active: true
9763
+ },
9764
+ "openai/gpt-5.6-sol": {
9765
+ providerModelName: "gpt-5.6-sol",
9766
+ aliases: [
9767
+ "gpt-5.6-sol"
9768
+ ],
9769
+ pricing: {
9770
+ inputPerMTok: 5,
9771
+ outputPerMTok: 30,
9772
+ cacheReadPerMTok: 0.5,
9773
+ tiers: {
9774
+ batch: {
9775
+ inputPerMTok: 2.5,
9776
+ outputPerMTok: 15,
9777
+ cacheReadPerMTok: 0.25
9778
+ },
9779
+ flex: {
9780
+ inputPerMTok: 2.5,
9781
+ outputPerMTok: 15,
9782
+ cacheReadPerMTok: 0.25
9783
+ },
9784
+ priority: {
9785
+ inputPerMTok: 10,
9786
+ outputPerMTok: 60,
9787
+ cacheReadPerMTok: 1
9788
+ }
9789
+ }
9790
+ },
9791
+ preferredApi: "responses",
9792
+ supportedApis: [
9793
+ "responses",
9794
+ "completions"
9795
+ ],
9796
+ contextWindow: 105e4,
9797
+ maxOutput: 128e3,
9798
+ capabilities: {
9799
+ toolUse: true,
9800
+ streaming: true,
9801
+ structuredOutput: true,
9802
+ vision: true,
9803
+ audio: false,
9804
+ video: false,
9805
+ imageGeneration: false,
9806
+ audioGeneration: false,
9807
+ videoGeneration: false,
9808
+ webSearch: true
9809
+ },
9810
+ reasoning: {
9811
+ supported: true,
9812
+ automatic: false,
9813
+ effortControl: false,
9814
+ encryptedContent: false,
9815
+ summaryAvailable: false
9816
+ },
9817
+ type: "chat",
9818
+ inputModalities: [
9819
+ "text",
9820
+ "image"
9821
+ ],
9822
+ outputModalities: [
9823
+ "text"
9824
+ ],
9825
+ family: "gpt-sol",
9826
+ version: "5.6",
9827
+ status: "stable",
9828
+ active: true
9829
+ },
9830
+ "openai/gpt-5.6-terra": {
9831
+ providerModelName: "gpt-5.6-terra",
9832
+ aliases: [
9833
+ "gpt-5.6-terra"
9834
+ ],
9835
+ pricing: {
9836
+ inputPerMTok: 2.5,
9837
+ outputPerMTok: 15,
9838
+ cacheReadPerMTok: 0.25,
9839
+ tiers: {
9840
+ batch: {
9841
+ inputPerMTok: 1.25,
9842
+ outputPerMTok: 7.5,
9843
+ cacheReadPerMTok: 0.125
9844
+ },
9845
+ flex: {
9846
+ inputPerMTok: 1.25,
9847
+ outputPerMTok: 7.5,
9848
+ cacheReadPerMTok: 0.125
9849
+ },
9850
+ priority: {
9851
+ inputPerMTok: 5,
9852
+ outputPerMTok: 30,
9853
+ cacheReadPerMTok: 0.5
9854
+ }
9855
+ }
9856
+ },
9857
+ preferredApi: "responses",
9858
+ supportedApis: [
9859
+ "responses",
9860
+ "completions"
9861
+ ],
9862
+ contextWindow: 105e4,
9863
+ maxOutput: 128e3,
9864
+ capabilities: {
9865
+ toolUse: true,
9866
+ streaming: true,
9867
+ structuredOutput: true,
9868
+ vision: true,
9869
+ audio: false,
9870
+ video: false,
9871
+ imageGeneration: false,
9872
+ audioGeneration: false,
9873
+ videoGeneration: false,
9874
+ webSearch: true
9875
+ },
9876
+ reasoning: {
9877
+ supported: true,
9878
+ automatic: false,
9879
+ effortControl: false,
9880
+ encryptedContent: false,
9881
+ summaryAvailable: false
9882
+ },
9883
+ type: "chat",
9884
+ inputModalities: [
9885
+ "text",
9886
+ "image"
9887
+ ],
9888
+ outputModalities: [
9889
+ "text"
9890
+ ],
9891
+ family: "gpt-terra",
9892
+ version: "5.6",
9893
+ status: "stable",
9894
+ active: true
9895
+ },
9896
+ "openai/gpt-5.6-luna": {
9897
+ providerModelName: "gpt-5.6-luna",
9898
+ aliases: [
9899
+ "gpt-5.6-luna"
9900
+ ],
9901
+ pricing: {
9902
+ inputPerMTok: 1,
9903
+ outputPerMTok: 6,
9904
+ cacheReadPerMTok: 0.1,
9905
+ tiers: {
9906
+ batch: {
9907
+ inputPerMTok: 0.5,
9908
+ outputPerMTok: 3,
9909
+ cacheReadPerMTok: 0.05
9910
+ },
9911
+ flex: {
9912
+ inputPerMTok: 0.5,
9913
+ outputPerMTok: 3,
9914
+ cacheReadPerMTok: 0.05
9915
+ },
9916
+ priority: {
9917
+ inputPerMTok: 2,
9918
+ outputPerMTok: 12,
9919
+ cacheReadPerMTok: 0.2
9920
+ }
9921
+ }
9922
+ },
9923
+ preferredApi: "responses",
9924
+ supportedApis: [
9925
+ "responses",
9926
+ "completions"
9927
+ ],
9928
+ contextWindow: 105e4,
9929
+ maxOutput: 128e3,
9930
+ capabilities: {
9931
+ toolUse: true,
9932
+ streaming: true,
9933
+ structuredOutput: true,
9934
+ vision: true,
9935
+ audio: false,
9936
+ video: false,
9937
+ imageGeneration: false,
9938
+ audioGeneration: false,
9939
+ videoGeneration: false,
9940
+ webSearch: true
9941
+ },
9942
+ reasoning: {
9943
+ supported: true,
9944
+ automatic: false,
9945
+ effortControl: false,
9946
+ encryptedContent: false,
9947
+ summaryAvailable: false
9948
+ },
9949
+ type: "chat",
9950
+ inputModalities: [
9951
+ "text",
9952
+ "image"
9953
+ ],
9954
+ outputModalities: [
9955
+ "text"
9956
+ ],
9957
+ family: "gpt-luna",
9958
+ version: "5.6",
9959
+ status: "stable",
9960
+ active: true
9347
9961
  }
9348
9962
  };
9349
9963
 
@@ -9451,7 +10065,7 @@ var catalog_default4 = {
9451
10065
  supportedApis: [
9452
10066
  "completions"
9453
10067
  ],
9454
- contextWindow: 128e3,
10068
+ contextWindow: 1e6,
9455
10069
  capabilities: {
9456
10070
  toolUse: false,
9457
10071
  streaming: true,
@@ -9810,7 +10424,7 @@ var catalog_default4 = {
9810
10424
  capabilities: {
9811
10425
  toolUse: false,
9812
10426
  streaming: true,
9813
- structuredOutput: false,
10427
+ structuredOutput: true,
9814
10428
  vision: false,
9815
10429
  audio: false,
9816
10430
  video: false,
@@ -12410,7 +13024,7 @@ var catalog_default4 = {
12410
13024
  "openai/gpt-oss-120b:free"
12411
13025
  ],
12412
13026
  pricing: {
12413
- inputPerMTok: 0.039,
13027
+ inputPerMTok: 0.036,
12414
13028
  outputPerMTok: 0.18
12415
13029
  },
12416
13030
  preferredApi: "completions",
@@ -13461,7 +14075,8 @@ var catalog_default4 = {
13461
14075
  "openrouter/gemini-3-pro-image": {
13462
14076
  providerModelName: "google/gemini-3-pro-image-preview",
13463
14077
  aliases: [
13464
- "google/gemini-3-pro-image-preview"
14078
+ "google/gemini-3-pro-image-preview",
14079
+ "google/gemini-3-pro-image"
13465
14080
  ],
13466
14081
  pricing: {
13467
14082
  inputPerMTok: 2,
@@ -13533,7 +14148,8 @@ var catalog_default4 = {
13533
14148
  "openrouter/gemini-3.1-flash-image": {
13534
14149
  providerModelName: "google/gemini-3.1-flash-image-preview",
13535
14150
  aliases: [
13536
- "google/gemini-3.1-flash-image-preview"
14151
+ "google/gemini-3.1-flash-image-preview",
14152
+ "google/gemini-3.1-flash-image"
13537
14153
  ],
13538
14154
  pricing: {
13539
14155
  inputPerMTok: 0.5,
@@ -14066,8 +14682,8 @@ var catalog_default4 = {
14066
14682
  "x-ai/grok-4.20-multi-agent"
14067
14683
  ],
14068
14684
  pricing: {
14069
- inputPerMTok: 2,
14070
- outputPerMTok: 6,
14685
+ inputPerMTok: 1.25,
14686
+ outputPerMTok: 2.5,
14071
14687
  cacheReadPerMTok: 0.2
14072
14688
  },
14073
14689
  preferredApi: "completions",
@@ -14249,8 +14865,8 @@ var catalog_default4 = {
14249
14865
  "deepseek/deepseek-chat-v3-0324"
14250
14866
  ],
14251
14867
  pricing: {
14252
- inputPerMTok: 0.2,
14253
- outputPerMTok: 0.77,
14868
+ inputPerMTok: 0.24,
14869
+ outputPerMTok: 0.9,
14254
14870
  cacheReadPerMTok: 0.135
14255
14871
  },
14256
14872
  preferredApi: "completions",
@@ -14343,8 +14959,9 @@ var catalog_default4 = {
14343
14959
  "deepseek/deepseek-v3.2-exp"
14344
14960
  ],
14345
14961
  pricing: {
14346
- inputPerMTok: 0.2288,
14347
- outputPerMTok: 0.3432
14962
+ inputPerMTok: 0.2145,
14963
+ outputPerMTok: 0.32175,
14964
+ cacheReadPerMTok: 0.02145
14348
14965
  },
14349
14966
  preferredApi: "completions",
14350
14967
  supportedApis: [
@@ -14388,9 +15005,9 @@ var catalog_default4 = {
14388
15005
  "deepseek/deepseek-v4-flash"
14389
15006
  ],
14390
15007
  pricing: {
14391
- inputPerMTok: 0.098,
14392
- outputPerMTok: 0.196,
14393
- cacheReadPerMTok: 0.02
15008
+ inputPerMTok: 0.077,
15009
+ outputPerMTok: 0.154,
15010
+ cacheReadPerMTok: 0.0154
14394
15011
  },
14395
15012
  preferredApi: "completions",
14396
15013
  supportedApis: [
@@ -14752,8 +15369,8 @@ var catalog_default4 = {
14752
15369
  "qwen/qwen3-8b"
14753
15370
  ],
14754
15371
  pricing: {
14755
- inputPerMTok: 0.05,
14756
- outputPerMTok: 0.4,
15372
+ inputPerMTok: 0.117,
15373
+ outputPerMTok: 0.455,
14757
15374
  cacheReadPerMTok: 0.05
14758
15375
  },
14759
15376
  preferredApi: "completions",
@@ -15214,14 +15831,15 @@ var catalog_default4 = {
15214
15831
  "qwen/qwen3.5-397b-a17b"
15215
15832
  ],
15216
15833
  pricing: {
15217
- inputPerMTok: 0.39,
15218
- outputPerMTok: 2.34
15834
+ inputPerMTok: 0.385,
15835
+ outputPerMTok: 2.45,
15836
+ cacheReadPerMTok: 0.111
15219
15837
  },
15220
15838
  preferredApi: "completions",
15221
15839
  supportedApis: [
15222
15840
  "completions"
15223
15841
  ],
15224
- contextWindow: 262144,
15842
+ contextWindow: 256e3,
15225
15843
  maxOutput: 65536,
15226
15844
  capabilities: {
15227
15845
  toolUse: true,
@@ -15260,8 +15878,9 @@ var catalog_default4 = {
15260
15878
  "qwen/qwen3.6-27b"
15261
15879
  ],
15262
15880
  pricing: {
15263
- inputPerMTok: 0.2885,
15264
- outputPerMTok: 3.17
15881
+ inputPerMTok: 0.285,
15882
+ outputPerMTok: 2.4,
15883
+ cacheReadPerMTok: 0.15
15265
15884
  },
15266
15885
  preferredApi: "completions",
15267
15886
  supportedApis: [
@@ -15306,7 +15925,7 @@ var catalog_default4 = {
15306
15925
  "qwen/qwen3.6-35b-a3b"
15307
15926
  ],
15308
15927
  pricing: {
15309
- inputPerMTok: 0.15,
15928
+ inputPerMTok: 0.14,
15310
15929
  outputPerMTok: 1,
15311
15930
  cacheReadPerMTok: 0.05
15312
15931
  },
@@ -15911,8 +16530,8 @@ var catalog_default4 = {
15911
16530
  "qwen/qwen3-vl-8b-thinking"
15912
16531
  ],
15913
16532
  pricing: {
15914
- inputPerMTok: 0.08,
15915
- outputPerMTok: 0.5
16533
+ inputPerMTok: 0.117,
16534
+ outputPerMTok: 0.455
15916
16535
  },
15917
16536
  preferredApi: "completions",
15918
16537
  supportedApis: [
@@ -16327,8 +16946,8 @@ var catalog_default4 = {
16327
16946
  "meta-llama/llama-3.2-3b-instruct:free"
16328
16947
  ],
16329
16948
  pricing: {
16330
- inputPerMTok: 0.0509,
16331
- outputPerMTok: 0.335
16949
+ inputPerMTok: 0.05,
16950
+ outputPerMTok: 0.33
16332
16951
  },
16333
16952
  preferredApi: "completions",
16334
16953
  supportedApis: [
@@ -16410,7 +17029,11 @@ var catalog_default4 = {
16410
17029
  family: "llama",
16411
17030
  version: "3.2",
16412
17031
  status: "legacy",
16413
- active: true
17032
+ active: true,
17033
+ deprecation: {
17034
+ shutdownDate: "2026-07-17",
17035
+ source: "openrouter"
17036
+ }
16414
17037
  },
16415
17038
  "openrouter/llama-3.3-70b": {
16416
17039
  providerModelName: "meta-llama/llama-3.3-70b-instruct",
@@ -16588,7 +17211,8 @@ var catalog_default4 = {
16588
17211
  family: "llama-guard",
16589
17212
  version: "3",
16590
17213
  status: "stable",
16591
- active: true
17214
+ active: true,
17215
+ contextWindow: 163840
16592
17216
  },
16593
17217
  "openrouter/llama-guard-4-12b": {
16594
17218
  providerModelName: "meta-llama/llama-guard-4-12b",
@@ -17292,9 +17916,9 @@ var catalog_default4 = {
17292
17916
  "moonshotai/kimi-k2.6"
17293
17917
  ],
17294
17918
  pricing: {
17295
- inputPerMTok: 0.68,
17919
+ inputPerMTok: 0.66,
17296
17920
  outputPerMTok: 3.41,
17297
- cacheReadPerMTok: 0.34
17921
+ cacheReadPerMTok: 0.15
17298
17922
  },
17299
17923
  preferredApi: "completions",
17300
17924
  supportedApis: [
@@ -17381,7 +18005,7 @@ var catalog_default4 = {
17381
18005
  status: "legacy",
17382
18006
  active: true,
17383
18007
  deprecation: {
17384
- shutdownDate: "2026-06-19",
18008
+ shutdownDate: "2026-12-31",
17385
18009
  source: "openrouter"
17386
18010
  }
17387
18011
  },
@@ -17532,9 +18156,9 @@ var catalog_default4 = {
17532
18156
  "z-ai/glm-5.1"
17533
18157
  ],
17534
18158
  pricing: {
17535
- inputPerMTok: 0.98,
17536
- outputPerMTok: 3.08,
17537
- cacheReadPerMTok: 0.182
18159
+ inputPerMTok: 0.966,
18160
+ outputPerMTok: 3.036,
18161
+ cacheReadPerMTok: 0.1794
17538
18162
  },
17539
18163
  preferredApi: "completions",
17540
18164
  supportedApis: [
@@ -17671,7 +18295,7 @@ var catalog_default4 = {
17671
18295
  ],
17672
18296
  pricing: {
17673
18297
  inputPerMTok: 0.255,
17674
- outputPerMTok: 1,
18298
+ outputPerMTok: 1.02,
17675
18299
  cacheReadPerMTok: 0.03
17676
18300
  },
17677
18301
  preferredApi: "completions",
@@ -17762,8 +18386,8 @@ var catalog_default4 = {
17762
18386
  "minimax/minimax-m2.7"
17763
18387
  ],
17764
18388
  pricing: {
17765
- inputPerMTok: 0.25,
17766
- outputPerMTok: 1,
18389
+ inputPerMTok: 0.24,
18390
+ outputPerMTok: 0.96,
17767
18391
  cacheReadPerMTok: 0.05
17768
18392
  },
17769
18393
  preferredApi: "completions",
@@ -17982,7 +18606,11 @@ var catalog_default4 = {
17982
18606
  family: "nemotron",
17983
18607
  version: "1.5",
17984
18608
  status: "stable",
17985
- active: true
18609
+ active: true,
18610
+ deprecation: {
18611
+ shutdownDate: "2026-07-17",
18612
+ source: "openrouter"
18613
+ }
17986
18614
  },
17987
18615
  "openrouter/nemotron-3-nano-30b-a3b": {
17988
18616
  providerModelName: "nvidia/nemotron-3-nano-30b-a3b",
@@ -18038,7 +18666,7 @@ var catalog_default4 = {
18038
18666
  "nvidia/nemotron-3-super-120b-a12b:free"
18039
18667
  ],
18040
18668
  pricing: {
18041
- inputPerMTok: 0.09,
18669
+ inputPerMTok: 0.08,
18042
18670
  outputPerMTok: 0.45
18043
18671
  },
18044
18672
  preferredApi: "completions",
@@ -18084,8 +18712,8 @@ var catalog_default4 = {
18084
18712
  ],
18085
18713
  pricing: {
18086
18714
  inputPerMTok: 0.5,
18087
- outputPerMTok: 2.5,
18088
- cacheReadPerMTok: 0.15
18715
+ outputPerMTok: 2.2,
18716
+ cacheReadPerMTok: 0.1
18089
18717
  },
18090
18718
  preferredApi: "completions",
18091
18719
  supportedApis: [
@@ -18585,7 +19213,7 @@ var catalog_default4 = {
18585
19213
  "microsoft/phi-4"
18586
19214
  ],
18587
19215
  pricing: {
18588
- inputPerMTok: 0.065,
19216
+ inputPerMTok: 0.07,
18589
19217
  outputPerMTok: 0.14
18590
19218
  },
18591
19219
  preferredApi: "completions",
@@ -19452,8 +20080,8 @@ var catalog_default4 = {
19452
20080
  "arcee-ai/trinity-large-thinking"
19453
20081
  ],
19454
20082
  pricing: {
19455
- inputPerMTok: 0.22,
19456
- outputPerMTok: 0.85,
20083
+ inputPerMTok: 0.25,
20084
+ outputPerMTok: 0.8,
19457
20085
  cacheReadPerMTok: 0.06
19458
20086
  },
19459
20087
  preferredApi: "completions",
@@ -20402,7 +21030,7 @@ var catalog_default4 = {
20402
21030
  "stepfun/step-3.5-flash"
20403
21031
  ],
20404
21032
  pricing: {
20405
- inputPerMTok: 0.09,
21033
+ inputPerMTok: 0.1,
20406
21034
  outputPerMTok: 0.3,
20407
21035
  cacheReadPerMTok: 0.02
20408
21036
  },
@@ -20537,7 +21165,9 @@ var catalog_default4 = {
20537
21165
  "openrouter/hunyuan-hy3": {
20538
21166
  providerModelName: "tencent/hy3-preview",
20539
21167
  aliases: [
20540
- "tencent/hy3-preview"
21168
+ "tencent/hy3-preview",
21169
+ "tencent/hy3",
21170
+ "tencent/hy3:free"
20541
21171
  ],
20542
21172
  pricing: {
20543
21173
  inputPerMTok: 0.063,
@@ -20721,9 +21351,9 @@ var catalog_default4 = {
20721
21351
  "xiaomi/mimo-v2.5"
20722
21352
  ],
20723
21353
  pricing: {
20724
- inputPerMTok: 0.14,
21354
+ inputPerMTok: 0.105,
20725
21355
  outputPerMTok: 0.28,
20726
- cacheReadPerMTok: 28e-4
21356
+ cacheReadPerMTok: 0.028
20727
21357
  },
20728
21358
  preferredApi: "completions",
20729
21359
  supportedApis: [
@@ -20812,11 +21442,13 @@ var catalog_default4 = {
20812
21442
  "openrouter/nex-n2-pro": {
20813
21443
  providerModelName: "nex-agi/nex-n2-pro:free",
20814
21444
  aliases: [
20815
- "nex-agi/nex-n2-pro:free"
21445
+ "nex-agi/nex-n2-pro:free",
21446
+ "nex-agi/nex-n2-pro"
20816
21447
  ],
20817
21448
  pricing: {
20818
- inputPerMTok: 0,
20819
- outputPerMTok: 0
21449
+ inputPerMTok: 0.25,
21450
+ outputPerMTok: 1,
21451
+ cacheReadPerMTok: 0.025
20820
21452
  },
20821
21453
  preferredApi: "completions",
20822
21454
  supportedApis: [
@@ -20904,7 +21536,8 @@ var catalog_default4 = {
20904
21536
  "openrouter/laguna-m.1": {
20905
21537
  providerModelName: "poolside/laguna-m.1:free",
20906
21538
  aliases: [
20907
- "poolside/laguna-m.1:free"
21539
+ "poolside/laguna-m.1:free",
21540
+ "poolside/laguna-m.1"
20908
21541
  ],
20909
21542
  pricing: {
20910
21543
  inputPerMTok: 0,
@@ -21084,7 +21717,8 @@ var catalog_default4 = {
21084
21717
  "openrouter/dolphin-mistral-24b-venice": {
21085
21718
  providerModelName: "cognitivecomputations/dolphin-mistral-24b-venice-edition:free",
21086
21719
  aliases: [
21087
- "cognitivecomputations/dolphin-mistral-24b-venice-edition:free"
21720
+ "cognitivecomputations/dolphin-mistral-24b-venice-edition:free",
21721
+ "cognitivecomputations/dolphin-mistral-24b-venice-edition"
21088
21722
  ],
21089
21723
  pricing: {
21090
21724
  inputPerMTok: 0,
@@ -21123,7 +21757,11 @@ var catalog_default4 = {
21123
21757
  family: "roleplay-finetunes",
21124
21758
  version: "1",
21125
21759
  status: "stable",
21126
- active: true
21760
+ active: true,
21761
+ deprecation: {
21762
+ shutdownDate: "2026-07-19",
21763
+ source: "openrouter"
21764
+ }
21127
21765
  },
21128
21766
  "openrouter/mythomax-l2-13b": {
21129
21767
  providerModelName: "gryphe/mythomax-l2-13b",
@@ -21359,15 +21997,15 @@ var catalog_default4 = {
21359
21997
  "thedrummer/rocinante-12b"
21360
21998
  ],
21361
21999
  pricing: {
21362
- inputPerMTok: 0.17,
21363
- outputPerMTok: 0.43
22000
+ inputPerMTok: 0.25,
22001
+ outputPerMTok: 0.5
21364
22002
  },
21365
22003
  preferredApi: "completions",
21366
22004
  supportedApis: [
21367
22005
  "completions"
21368
22006
  ],
21369
- contextWindow: 32768,
21370
- maxOutput: 32768,
22007
+ contextWindow: 65536,
22008
+ maxOutput: 65536,
21371
22009
  capabilities: {
21372
22010
  toolUse: true,
21373
22011
  streaming: true,
@@ -21533,35 +22171,23 @@ var catalog_default4 = {
21533
22171
  version: "2",
21534
22172
  status: "legacy",
21535
22173
  active: true
21536
- }
21537
- };
21538
-
21539
- // src/llm/providers/xai/catalog.json
21540
- var catalog_default5 = {
21541
- "xai/grok-4.20": {
21542
- providerModelName: "grok-4.20-0309-reasoning",
22174
+ },
22175
+ "openrouter/claude-sonnet-5": {
22176
+ providerModelName: "anthropic/claude-sonnet-5",
21543
22177
  aliases: [
21544
- "grok-4.20-0309-reasoning"
22178
+ "anthropic/claude-sonnet-5"
21545
22179
  ],
21546
22180
  pricing: {
21547
- inputPerMTok: 1.25,
21548
- outputPerMTok: 2.5,
21549
- cacheReadPerMTok: 0.2,
21550
- tiers: {
21551
- "long-context": {
21552
- inputPerMTok: 2.5,
21553
- outputPerMTok: 5,
21554
- cacheReadPerMTok: 0.4
21555
- }
21556
- }
22181
+ inputPerMTok: 2,
22182
+ outputPerMTok: 10,
22183
+ cacheReadPerMTok: 0.2
21557
22184
  },
21558
- preferredApi: "responses",
22185
+ preferredApi: "completions",
21559
22186
  supportedApis: [
21560
- "responses",
21561
22187
  "completions"
21562
22188
  ],
21563
- contextWindow: 2e6,
21564
- maxOutput: 2e6,
22189
+ contextWindow: 1e6,
22190
+ maxOutput: 128e3,
21565
22191
  capabilities: {
21566
22192
  toolUse: true,
21567
22193
  streaming: true,
@@ -21574,7 +22200,7 @@ var catalog_default5 = {
21574
22200
  videoGeneration: false
21575
22201
  },
21576
22202
  reasoning: {
21577
- supported: false,
22203
+ supported: true,
21578
22204
  automatic: false,
21579
22205
  effortControl: false,
21580
22206
  encryptedContent: false,
@@ -21588,33 +22214,27 @@ var catalog_default5 = {
21588
22214
  outputModalities: [
21589
22215
  "text"
21590
22216
  ],
21591
- family: "grok",
21592
- version: "4.20",
22217
+ family: "claude-sonnet",
22218
+ version: "5",
21593
22219
  status: "stable",
21594
22220
  active: true
21595
22221
  },
21596
- "xai/grok-4.20-non-reasoning": {
21597
- providerModelName: "grok-4.20-0309-non-reasoning",
22222
+ "openrouter/gpt-5.6-luna": {
22223
+ providerModelName: "openai/gpt-5.6-luna",
21598
22224
  aliases: [
21599
- "grok-4.20-0309-non-reasoning"
22225
+ "openai/gpt-5.6-luna"
21600
22226
  ],
21601
22227
  pricing: {
21602
- inputPerMTok: 1.25,
21603
- outputPerMTok: 2.5,
21604
- cacheReadPerMTok: 0.2,
21605
- tiers: {
21606
- "long-context": {
21607
- inputPerMTok: 2.5,
21608
- outputPerMTok: 5,
21609
- cacheReadPerMTok: 0.4
21610
- }
21611
- }
22228
+ inputPerMTok: 1,
22229
+ outputPerMTok: 6,
22230
+ cacheReadPerMTok: 0.1
21612
22231
  },
21613
- preferredApi: "responses",
22232
+ preferredApi: "completions",
21614
22233
  supportedApis: [
21615
- "responses",
21616
22234
  "completions"
21617
22235
  ],
22236
+ contextWindow: 105e4,
22237
+ maxOutput: 128e3,
21618
22238
  capabilities: {
21619
22239
  toolUse: true,
21620
22240
  streaming: true,
@@ -21627,7 +22247,7 @@ var catalog_default5 = {
21627
22247
  videoGeneration: false
21628
22248
  },
21629
22249
  reasoning: {
21630
- supported: false,
22250
+ supported: true,
21631
22251
  automatic: false,
21632
22252
  effortControl: false,
21633
22253
  encryptedContent: false,
@@ -21641,33 +22261,332 @@ var catalog_default5 = {
21641
22261
  outputModalities: [
21642
22262
  "text"
21643
22263
  ],
21644
- family: "grok",
21645
- version: "4.20",
22264
+ family: "gpt",
22265
+ version: "5.6",
21646
22266
  status: "stable",
21647
22267
  active: true
21648
22268
  },
21649
- "xai/grok-4.20-multi-agent": {
21650
- providerModelName: "grok-4.20-multi-agent-0309",
22269
+ "openrouter/gpt-5.6-terra": {
22270
+ providerModelName: "openai/gpt-5.6-terra",
21651
22271
  aliases: [
21652
- "grok-4.20-multi-agent-0309"
22272
+ "openai/gpt-5.6-terra"
21653
22273
  ],
21654
22274
  pricing: {
21655
- inputPerMTok: 1.25,
21656
- outputPerMTok: 2.5,
21657
- cacheReadPerMTok: 0.2,
21658
- tiers: {
21659
- "long-context": {
21660
- inputPerMTok: 2.5,
21661
- outputPerMTok: 5,
21662
- cacheReadPerMTok: 0.4
21663
- }
22275
+ inputPerMTok: 2.5,
22276
+ outputPerMTok: 15,
22277
+ cacheReadPerMTok: 0.25
22278
+ },
22279
+ preferredApi: "completions",
22280
+ supportedApis: [
22281
+ "completions"
22282
+ ],
22283
+ contextWindow: 105e4,
22284
+ maxOutput: 128e3,
22285
+ capabilities: {
22286
+ toolUse: true,
22287
+ streaming: true,
22288
+ structuredOutput: true,
22289
+ vision: true,
22290
+ audio: false,
22291
+ video: false,
22292
+ imageGeneration: false,
22293
+ audioGeneration: false,
22294
+ videoGeneration: false
22295
+ },
22296
+ reasoning: {
22297
+ supported: true,
22298
+ automatic: false,
22299
+ effortControl: false,
22300
+ encryptedContent: false,
22301
+ summaryAvailable: false
22302
+ },
22303
+ type: "chat",
22304
+ inputModalities: [
22305
+ "text",
22306
+ "image"
22307
+ ],
22308
+ outputModalities: [
22309
+ "text"
22310
+ ],
22311
+ family: "gpt",
22312
+ version: "5.6",
22313
+ status: "stable",
22314
+ active: true
22315
+ },
22316
+ "openrouter/gpt-5.6-sol": {
22317
+ providerModelName: "openai/gpt-5.6-sol",
22318
+ aliases: [
22319
+ "openai/gpt-5.6-sol"
22320
+ ],
22321
+ pricing: {
22322
+ inputPerMTok: 5,
22323
+ outputPerMTok: 30,
22324
+ cacheReadPerMTok: 0.5
22325
+ },
22326
+ preferredApi: "completions",
22327
+ supportedApis: [
22328
+ "completions"
22329
+ ],
22330
+ contextWindow: 105e4,
22331
+ maxOutput: 128e3,
22332
+ capabilities: {
22333
+ toolUse: true,
22334
+ streaming: true,
22335
+ structuredOutput: true,
22336
+ vision: true,
22337
+ audio: false,
22338
+ video: false,
22339
+ imageGeneration: false,
22340
+ audioGeneration: false,
22341
+ videoGeneration: false
22342
+ },
22343
+ reasoning: {
22344
+ supported: true,
22345
+ automatic: false,
22346
+ effortControl: false,
22347
+ encryptedContent: false,
22348
+ summaryAvailable: false
22349
+ },
22350
+ type: "chat",
22351
+ inputModalities: [
22352
+ "text",
22353
+ "image"
22354
+ ],
22355
+ outputModalities: [
22356
+ "text"
22357
+ ],
22358
+ family: "gpt",
22359
+ version: "5.6",
22360
+ status: "stable",
22361
+ active: true
22362
+ },
22363
+ "openrouter/gpt-5.6-luna-pro": {
22364
+ providerModelName: "openai/gpt-5.6-luna-pro",
22365
+ aliases: [
22366
+ "openai/gpt-5.6-luna-pro"
22367
+ ],
22368
+ pricing: {
22369
+ inputPerMTok: 1,
22370
+ outputPerMTok: 6,
22371
+ cacheReadPerMTok: 0.1
22372
+ },
22373
+ preferredApi: "completions",
22374
+ supportedApis: [
22375
+ "completions"
22376
+ ],
22377
+ contextWindow: 105e4,
22378
+ maxOutput: 128e3,
22379
+ capabilities: {
22380
+ toolUse: true,
22381
+ streaming: true,
22382
+ structuredOutput: true,
22383
+ vision: true,
22384
+ audio: false,
22385
+ video: false,
22386
+ imageGeneration: false,
22387
+ audioGeneration: false,
22388
+ videoGeneration: false
22389
+ },
22390
+ reasoning: {
22391
+ supported: true,
22392
+ automatic: false,
22393
+ effortControl: false,
22394
+ encryptedContent: false,
22395
+ summaryAvailable: false
22396
+ },
22397
+ type: "chat",
22398
+ inputModalities: [
22399
+ "text",
22400
+ "image"
22401
+ ],
22402
+ outputModalities: [
22403
+ "text"
22404
+ ],
22405
+ family: "gpt-pro",
22406
+ version: "5.6",
22407
+ status: "stable",
22408
+ active: true
22409
+ },
22410
+ "openrouter/gpt-5.6-terra-pro": {
22411
+ providerModelName: "openai/gpt-5.6-terra-pro",
22412
+ aliases: [
22413
+ "openai/gpt-5.6-terra-pro"
22414
+ ],
22415
+ pricing: {
22416
+ inputPerMTok: 2.5,
22417
+ outputPerMTok: 15,
22418
+ cacheReadPerMTok: 0.25
22419
+ },
22420
+ preferredApi: "completions",
22421
+ supportedApis: [
22422
+ "completions"
22423
+ ],
22424
+ contextWindow: 105e4,
22425
+ maxOutput: 128e3,
22426
+ capabilities: {
22427
+ toolUse: true,
22428
+ streaming: true,
22429
+ structuredOutput: true,
22430
+ vision: true,
22431
+ audio: false,
22432
+ video: false,
22433
+ imageGeneration: false,
22434
+ audioGeneration: false,
22435
+ videoGeneration: false
22436
+ },
22437
+ reasoning: {
22438
+ supported: true,
22439
+ automatic: false,
22440
+ effortControl: false,
22441
+ encryptedContent: false,
22442
+ summaryAvailable: false
22443
+ },
22444
+ type: "chat",
22445
+ inputModalities: [
22446
+ "text",
22447
+ "image"
22448
+ ],
22449
+ outputModalities: [
22450
+ "text"
22451
+ ],
22452
+ family: "gpt-pro",
22453
+ version: "5.6",
22454
+ status: "stable",
22455
+ active: true
22456
+ },
22457
+ "openrouter/gpt-5.6-sol-pro": {
22458
+ providerModelName: "openai/gpt-5.6-sol-pro",
22459
+ aliases: [
22460
+ "openai/gpt-5.6-sol-pro"
22461
+ ],
22462
+ pricing: {
22463
+ inputPerMTok: 5,
22464
+ outputPerMTok: 30,
22465
+ cacheReadPerMTok: 0.5
22466
+ },
22467
+ preferredApi: "completions",
22468
+ supportedApis: [
22469
+ "completions"
22470
+ ],
22471
+ contextWindow: 105e4,
22472
+ maxOutput: 128e3,
22473
+ capabilities: {
22474
+ toolUse: true,
22475
+ streaming: true,
22476
+ structuredOutput: true,
22477
+ vision: true,
22478
+ audio: false,
22479
+ video: false,
22480
+ imageGeneration: false,
22481
+ audioGeneration: false,
22482
+ videoGeneration: false
22483
+ },
22484
+ reasoning: {
22485
+ supported: true,
22486
+ automatic: false,
22487
+ effortControl: false,
22488
+ encryptedContent: false,
22489
+ summaryAvailable: false
22490
+ },
22491
+ type: "chat",
22492
+ inputModalities: [
22493
+ "text",
22494
+ "image"
22495
+ ],
22496
+ outputModalities: [
22497
+ "text"
22498
+ ],
22499
+ family: "gpt-pro",
22500
+ version: "5.6",
22501
+ status: "stable",
22502
+ active: true
22503
+ },
22504
+ "openrouter/gemini-3.1-flash-lite-image": {
22505
+ providerModelName: "google/gemini-3.1-flash-lite-image",
22506
+ aliases: [
22507
+ "google/gemini-3.1-flash-lite-image"
22508
+ ],
22509
+ pricing: {
22510
+ inputPerMTok: 0.25,
22511
+ outputPerMTok: 1.5
22512
+ },
22513
+ preferredApi: "completions",
22514
+ supportedApis: [
22515
+ "completions"
22516
+ ],
22517
+ contextWindow: 65536,
22518
+ maxOutput: 66e3,
22519
+ capabilities: {
22520
+ toolUse: false,
22521
+ streaming: true,
22522
+ structuredOutput: false,
22523
+ vision: true,
22524
+ audio: false,
22525
+ video: false,
22526
+ imageGeneration: true,
22527
+ audioGeneration: false,
22528
+ videoGeneration: false
22529
+ },
22530
+ reasoning: {
22531
+ supported: true,
22532
+ automatic: false,
22533
+ effortControl: false,
22534
+ encryptedContent: false,
22535
+ summaryAvailable: false
22536
+ },
22537
+ type: "image",
22538
+ inputModalities: [
22539
+ "text",
22540
+ "image"
22541
+ ],
22542
+ outputModalities: [
22543
+ "image"
22544
+ ],
22545
+ family: "gemini-image",
22546
+ version: "3.1",
22547
+ status: "stable",
22548
+ active: true,
22549
+ mediaParams: {
22550
+ aspectRatio: {
22551
+ values: [
22552
+ "1:1",
22553
+ "2:3",
22554
+ "3:2",
22555
+ "3:4",
22556
+ "4:3",
22557
+ "4:5",
22558
+ "5:4",
22559
+ "9:16",
22560
+ "16:9",
22561
+ "21:9"
22562
+ ]
22563
+ },
22564
+ imageSize: {
22565
+ values: [
22566
+ "0.5K",
22567
+ "1K",
22568
+ "2K",
22569
+ "4K"
22570
+ ],
22571
+ default: "1K"
21664
22572
  }
22573
+ }
22574
+ },
22575
+ "openrouter/grok-4.5": {
22576
+ providerModelName: "x-ai/grok-4.5",
22577
+ aliases: [
22578
+ "x-ai/grok-4.5"
22579
+ ],
22580
+ pricing: {
22581
+ inputPerMTok: 2,
22582
+ outputPerMTok: 6,
22583
+ cacheReadPerMTok: 0.5
21665
22584
  },
21666
- preferredApi: "responses",
22585
+ preferredApi: "completions",
21667
22586
  supportedApis: [
21668
- "responses"
22587
+ "completions"
21669
22588
  ],
21670
- contextWindow: 2e6,
22589
+ contextWindow: 5e5,
21671
22590
  capabilities: {
21672
22591
  toolUse: true,
21673
22592
  streaming: true,
@@ -21680,7 +22599,7 @@ var catalog_default5 = {
21680
22599
  videoGeneration: false
21681
22600
  },
21682
22601
  reasoning: {
21683
- supported: false,
22602
+ supported: true,
21684
22603
  automatic: false,
21685
22604
  effortControl: false,
21686
22605
  encryptedContent: false,
@@ -21695,34 +22614,1030 @@ var catalog_default5 = {
21695
22614
  "text"
21696
22615
  ],
21697
22616
  family: "grok",
21698
- version: "4.20",
22617
+ version: "4.5",
21699
22618
  status: "stable",
21700
22619
  active: true
21701
22620
  },
21702
- "xai/grok-4.3": {
21703
- providerModelName: "grok-4.3",
22621
+ "openrouter/glm-5.2": {
22622
+ providerModelName: "z-ai/glm-5.2",
21704
22623
  aliases: [
21705
- "grok-4.3"
22624
+ "z-ai/glm-5.2"
21706
22625
  ],
21707
22626
  pricing: {
21708
- inputPerMTok: 1.25,
21709
- outputPerMTok: 2.5,
21710
- cacheReadPerMTok: 0.2,
21711
- tiers: {
21712
- "long-context": {
21713
- inputPerMTok: 2.5,
21714
- outputPerMTok: 5,
21715
- cacheReadPerMTok: 0.4
21716
- }
21717
- }
22627
+ inputPerMTok: 0.35,
22628
+ outputPerMTok: 1.1,
22629
+ cacheReadPerMTok: 0.065
21718
22630
  },
21719
- preferredApi: "responses",
22631
+ preferredApi: "completions",
21720
22632
  supportedApis: [
21721
- "responses",
21722
22633
  "completions"
21723
22634
  ],
21724
- contextWindow: 1e6,
21725
- maxOutput: 1e6,
22635
+ contextWindow: 1048576,
22636
+ maxOutput: 128e3,
22637
+ capabilities: {
22638
+ toolUse: true,
22639
+ streaming: true,
22640
+ structuredOutput: true,
22641
+ vision: false,
22642
+ audio: false,
22643
+ video: false,
22644
+ imageGeneration: false,
22645
+ audioGeneration: false,
22646
+ videoGeneration: false
22647
+ },
22648
+ reasoning: {
22649
+ supported: true,
22650
+ automatic: false,
22651
+ effortControl: false,
22652
+ encryptedContent: false,
22653
+ summaryAvailable: false
22654
+ },
22655
+ type: "chat",
22656
+ inputModalities: [
22657
+ "text"
22658
+ ],
22659
+ outputModalities: [
22660
+ "text"
22661
+ ],
22662
+ family: "glm",
22663
+ version: "5.2",
22664
+ status: "stable",
22665
+ active: true
22666
+ },
22667
+ "openrouter/glm-5v-turbo": {
22668
+ providerModelName: "z-ai/glm-5v-turbo",
22669
+ aliases: [
22670
+ "z-ai/glm-5v-turbo"
22671
+ ],
22672
+ pricing: {
22673
+ inputPerMTok: 1.2,
22674
+ outputPerMTok: 4,
22675
+ cacheReadPerMTok: 0.24
22676
+ },
22677
+ preferredApi: "completions",
22678
+ supportedApis: [
22679
+ "completions"
22680
+ ],
22681
+ contextWindow: 202752,
22682
+ maxOutput: 131072,
22683
+ capabilities: {
22684
+ toolUse: true,
22685
+ streaming: true,
22686
+ structuredOutput: true,
22687
+ vision: true,
22688
+ audio: false,
22689
+ video: false,
22690
+ imageGeneration: false,
22691
+ audioGeneration: false,
22692
+ videoGeneration: false
22693
+ },
22694
+ reasoning: {
22695
+ supported: true,
22696
+ automatic: false,
22697
+ effortControl: false,
22698
+ encryptedContent: false,
22699
+ summaryAvailable: false
22700
+ },
22701
+ type: "vision",
22702
+ inputModalities: [
22703
+ "text",
22704
+ "image"
22705
+ ],
22706
+ outputModalities: [
22707
+ "text"
22708
+ ],
22709
+ family: "glm",
22710
+ version: "5",
22711
+ status: "stable",
22712
+ active: true,
22713
+ deprecation: {
22714
+ shutdownDate: "2098-12-31",
22715
+ source: "openrouter"
22716
+ }
22717
+ },
22718
+ "openrouter/aion-3.0-mini": {
22719
+ providerModelName: "aion-labs/aion-3.0-mini",
22720
+ aliases: [
22721
+ "aion-labs/aion-3.0-mini"
22722
+ ],
22723
+ pricing: {
22724
+ inputPerMTok: 0.7,
22725
+ outputPerMTok: 1.4,
22726
+ cacheReadPerMTok: 0.18
22727
+ },
22728
+ preferredApi: "completions",
22729
+ supportedApis: [
22730
+ "completions"
22731
+ ],
22732
+ contextWindow: 131072,
22733
+ maxOutput: 32768,
22734
+ capabilities: {
22735
+ toolUse: true,
22736
+ streaming: true,
22737
+ structuredOutput: true,
22738
+ vision: false,
22739
+ audio: false,
22740
+ video: false,
22741
+ imageGeneration: false,
22742
+ audioGeneration: false,
22743
+ videoGeneration: false
22744
+ },
22745
+ reasoning: {
22746
+ supported: true,
22747
+ automatic: false,
22748
+ effortControl: false,
22749
+ encryptedContent: false,
22750
+ summaryAvailable: false
22751
+ },
22752
+ type: "chat",
22753
+ inputModalities: [
22754
+ "text"
22755
+ ],
22756
+ outputModalities: [
22757
+ "text"
22758
+ ],
22759
+ family: "aion",
22760
+ version: "3.0",
22761
+ status: "stable",
22762
+ active: true
22763
+ },
22764
+ "openrouter/aion-3.0": {
22765
+ providerModelName: "aion-labs/aion-3.0",
22766
+ aliases: [
22767
+ "aion-labs/aion-3.0"
22768
+ ],
22769
+ pricing: {
22770
+ inputPerMTok: 3,
22771
+ outputPerMTok: 6,
22772
+ cacheReadPerMTok: 0.75
22773
+ },
22774
+ preferredApi: "completions",
22775
+ supportedApis: [
22776
+ "completions"
22777
+ ],
22778
+ contextWindow: 131072,
22779
+ maxOutput: 32768,
22780
+ capabilities: {
22781
+ toolUse: true,
22782
+ streaming: true,
22783
+ structuredOutput: true,
22784
+ vision: false,
22785
+ audio: false,
22786
+ video: false,
22787
+ imageGeneration: false,
22788
+ audioGeneration: false,
22789
+ videoGeneration: false
22790
+ },
22791
+ reasoning: {
22792
+ supported: true,
22793
+ automatic: false,
22794
+ effortControl: false,
22795
+ encryptedContent: false,
22796
+ summaryAvailable: false
22797
+ },
22798
+ type: "chat",
22799
+ inputModalities: [
22800
+ "text"
22801
+ ],
22802
+ outputModalities: [
22803
+ "text"
22804
+ ],
22805
+ family: "aion",
22806
+ version: "3.0",
22807
+ status: "stable",
22808
+ active: true
22809
+ },
22810
+ "openrouter/nex-n2-mini": {
22811
+ providerModelName: "nex-agi/nex-n2-mini",
22812
+ aliases: [
22813
+ "nex-agi/nex-n2-mini"
22814
+ ],
22815
+ pricing: {
22816
+ inputPerMTok: 0.025,
22817
+ outputPerMTok: 0.1,
22818
+ cacheReadPerMTok: 25e-4
22819
+ },
22820
+ preferredApi: "completions",
22821
+ supportedApis: [
22822
+ "completions"
22823
+ ],
22824
+ contextWindow: 262144,
22825
+ maxOutput: 262144,
22826
+ capabilities: {
22827
+ toolUse: true,
22828
+ streaming: true,
22829
+ structuredOutput: true,
22830
+ vision: true,
22831
+ audio: false,
22832
+ video: false,
22833
+ imageGeneration: false,
22834
+ audioGeneration: false,
22835
+ videoGeneration: false
22836
+ },
22837
+ reasoning: {
22838
+ supported: true,
22839
+ automatic: false,
22840
+ effortControl: false,
22841
+ encryptedContent: false,
22842
+ summaryAvailable: false
22843
+ },
22844
+ type: "chat",
22845
+ inputModalities: [
22846
+ "text",
22847
+ "image"
22848
+ ],
22849
+ outputModalities: [
22850
+ "text"
22851
+ ],
22852
+ family: "nex",
22853
+ version: "2",
22854
+ status: "stable",
22855
+ active: true
22856
+ },
22857
+ "openrouter/laguna-xs.2.1": {
22858
+ providerModelName: "poolside/laguna-xs-2.1",
22859
+ aliases: [
22860
+ "poolside/laguna-xs-2.1",
22861
+ "poolside/laguna-xs-2.1:free"
22862
+ ],
22863
+ pricing: {
22864
+ inputPerMTok: 0.06,
22865
+ outputPerMTok: 0.12,
22866
+ cacheReadPerMTok: 0.03
22867
+ },
22868
+ preferredApi: "completions",
22869
+ supportedApis: [
22870
+ "completions"
22871
+ ],
22872
+ contextWindow: 262144,
22873
+ maxOutput: 32768,
22874
+ capabilities: {
22875
+ toolUse: true,
22876
+ streaming: true,
22877
+ structuredOutput: true,
22878
+ vision: false,
22879
+ audio: false,
22880
+ video: false,
22881
+ imageGeneration: false,
22882
+ audioGeneration: false,
22883
+ videoGeneration: false
22884
+ },
22885
+ reasoning: {
22886
+ supported: true,
22887
+ automatic: false,
22888
+ effortControl: false,
22889
+ encryptedContent: false,
22890
+ summaryAvailable: false
22891
+ },
22892
+ type: "code",
22893
+ inputModalities: [
22894
+ "text"
22895
+ ],
22896
+ outputModalities: [
22897
+ "text"
22898
+ ],
22899
+ family: "laguna",
22900
+ version: "2.1",
22901
+ status: "preview",
22902
+ active: true
22903
+ },
22904
+ "openrouter/fugu-ultra": {
22905
+ providerModelName: "sakana/fugu-ultra",
22906
+ aliases: [
22907
+ "sakana/fugu-ultra"
22908
+ ],
22909
+ pricing: {
22910
+ inputPerMTok: 5,
22911
+ outputPerMTok: 30,
22912
+ cacheReadPerMTok: 0.5
22913
+ },
22914
+ preferredApi: "completions",
22915
+ supportedApis: [
22916
+ "completions"
22917
+ ],
22918
+ contextWindow: 1e6,
22919
+ maxOutput: 128e3,
22920
+ capabilities: {
22921
+ toolUse: true,
22922
+ streaming: true,
22923
+ structuredOutput: true,
22924
+ vision: true,
22925
+ audio: false,
22926
+ video: false,
22927
+ imageGeneration: false,
22928
+ audioGeneration: false,
22929
+ videoGeneration: false,
22930
+ webSearch: true
22931
+ },
22932
+ reasoning: {
22933
+ supported: true,
22934
+ automatic: false,
22935
+ effortControl: false,
22936
+ encryptedContent: false,
22937
+ summaryAvailable: false
22938
+ },
22939
+ type: "chat",
22940
+ inputModalities: [
22941
+ "text",
22942
+ "image"
22943
+ ],
22944
+ outputModalities: [
22945
+ "text"
22946
+ ],
22947
+ family: "fugu",
22948
+ version: "1",
22949
+ status: "stable",
22950
+ active: true
22951
+ },
22952
+ "openrouter/north-mini-code": {
22953
+ providerModelName: "cohere/north-mini-code:free",
22954
+ aliases: [
22955
+ "cohere/north-mini-code:free"
22956
+ ],
22957
+ pricing: {
22958
+ inputPerMTok: 0,
22959
+ outputPerMTok: 0
22960
+ },
22961
+ preferredApi: "completions",
22962
+ supportedApis: [
22963
+ "completions"
22964
+ ],
22965
+ contextWindow: 256e3,
22966
+ maxOutput: 64e3,
22967
+ capabilities: {
22968
+ toolUse: true,
22969
+ streaming: true,
22970
+ structuredOutput: true,
22971
+ vision: false,
22972
+ audio: false,
22973
+ video: false,
22974
+ imageGeneration: false,
22975
+ audioGeneration: false,
22976
+ videoGeneration: false
22977
+ },
22978
+ reasoning: {
22979
+ supported: true,
22980
+ automatic: false,
22981
+ effortControl: false,
22982
+ encryptedContent: false,
22983
+ summaryAvailable: false
22984
+ },
22985
+ type: "code",
22986
+ inputModalities: [
22987
+ "text"
22988
+ ],
22989
+ outputModalities: [
22990
+ "text"
22991
+ ],
22992
+ family: "north-code",
22993
+ version: "1",
22994
+ status: "stable",
22995
+ active: true
22996
+ },
22997
+ "openrouter/kimi-k2.7-code": {
22998
+ providerModelName: "moonshotai/kimi-k2.7-code",
22999
+ aliases: [
23000
+ "moonshotai/kimi-k2.7-code"
23001
+ ],
23002
+ pricing: {
23003
+ inputPerMTok: 0.72,
23004
+ outputPerMTok: 3.49,
23005
+ cacheReadPerMTok: 0.159
23006
+ },
23007
+ preferredApi: "completions",
23008
+ supportedApis: [
23009
+ "completions"
23010
+ ],
23011
+ contextWindow: 262144,
23012
+ maxOutput: 262144,
23013
+ capabilities: {
23014
+ toolUse: true,
23015
+ streaming: true,
23016
+ structuredOutput: true,
23017
+ vision: true,
23018
+ audio: false,
23019
+ video: false,
23020
+ imageGeneration: false,
23021
+ audioGeneration: false,
23022
+ videoGeneration: false
23023
+ },
23024
+ reasoning: {
23025
+ supported: true,
23026
+ automatic: false,
23027
+ effortControl: false,
23028
+ encryptedContent: false,
23029
+ summaryAvailable: false
23030
+ },
23031
+ type: "code",
23032
+ inputModalities: [
23033
+ "text",
23034
+ "image"
23035
+ ],
23036
+ outputModalities: [
23037
+ "text"
23038
+ ],
23039
+ family: "kimi-code",
23040
+ version: "2.7",
23041
+ status: "stable",
23042
+ active: true
23043
+ }
23044
+ };
23045
+
23046
+ // src/llm/providers/xai/catalog.json
23047
+ var catalog_default5 = {
23048
+ "xai/grok-4.20": {
23049
+ providerModelName: "grok-4.20-0309-reasoning",
23050
+ aliases: [
23051
+ "grok-4.20-0309-reasoning"
23052
+ ],
23053
+ pricing: {
23054
+ inputPerMTok: 1.25,
23055
+ outputPerMTok: 2.5,
23056
+ cacheReadPerMTok: 0.2,
23057
+ tiers: {
23058
+ "long-context": {
23059
+ inputPerMTok: 2.5,
23060
+ outputPerMTok: 5,
23061
+ cacheReadPerMTok: 0.4
23062
+ }
23063
+ }
23064
+ },
23065
+ preferredApi: "responses",
23066
+ supportedApis: [
23067
+ "responses",
23068
+ "completions"
23069
+ ],
23070
+ contextWindow: 2e6,
23071
+ maxOutput: 2e6,
23072
+ capabilities: {
23073
+ toolUse: true,
23074
+ streaming: true,
23075
+ structuredOutput: true,
23076
+ vision: true,
23077
+ audio: false,
23078
+ video: false,
23079
+ imageGeneration: false,
23080
+ audioGeneration: false,
23081
+ videoGeneration: false
23082
+ },
23083
+ reasoning: {
23084
+ supported: false,
23085
+ automatic: false,
23086
+ effortControl: false,
23087
+ encryptedContent: false,
23088
+ summaryAvailable: false
23089
+ },
23090
+ type: "chat",
23091
+ inputModalities: [
23092
+ "text",
23093
+ "image"
23094
+ ],
23095
+ outputModalities: [
23096
+ "text"
23097
+ ],
23098
+ family: "grok",
23099
+ version: "4.20",
23100
+ status: "stable",
23101
+ active: true
23102
+ },
23103
+ "xai/grok-4.20-non-reasoning": {
23104
+ providerModelName: "grok-4.20-0309-non-reasoning",
23105
+ aliases: [
23106
+ "grok-4.20-0309-non-reasoning"
23107
+ ],
23108
+ pricing: {
23109
+ inputPerMTok: 1.25,
23110
+ outputPerMTok: 2.5,
23111
+ cacheReadPerMTok: 0.2,
23112
+ tiers: {
23113
+ "long-context": {
23114
+ inputPerMTok: 2.5,
23115
+ outputPerMTok: 5,
23116
+ cacheReadPerMTok: 0.4
23117
+ }
23118
+ }
23119
+ },
23120
+ preferredApi: "responses",
23121
+ supportedApis: [
23122
+ "responses",
23123
+ "completions"
23124
+ ],
23125
+ capabilities: {
23126
+ toolUse: true,
23127
+ streaming: true,
23128
+ structuredOutput: true,
23129
+ vision: true,
23130
+ audio: false,
23131
+ video: false,
23132
+ imageGeneration: false,
23133
+ audioGeneration: false,
23134
+ videoGeneration: false
23135
+ },
23136
+ reasoning: {
23137
+ supported: false,
23138
+ automatic: false,
23139
+ effortControl: false,
23140
+ encryptedContent: false,
23141
+ summaryAvailable: false
23142
+ },
23143
+ type: "chat",
23144
+ inputModalities: [
23145
+ "text",
23146
+ "image"
23147
+ ],
23148
+ outputModalities: [
23149
+ "text"
23150
+ ],
23151
+ family: "grok",
23152
+ version: "4.20",
23153
+ status: "stable",
23154
+ active: true,
23155
+ contextWindow: 2e6
23156
+ },
23157
+ "xai/grok-4.20-multi-agent": {
23158
+ providerModelName: "grok-4.20-multi-agent-0309",
23159
+ aliases: [
23160
+ "grok-4.20-multi-agent-0309"
23161
+ ],
23162
+ pricing: {
23163
+ inputPerMTok: 1.25,
23164
+ outputPerMTok: 2.5,
23165
+ cacheReadPerMTok: 0.2,
23166
+ tiers: {
23167
+ "long-context": {
23168
+ inputPerMTok: 2.5,
23169
+ outputPerMTok: 5,
23170
+ cacheReadPerMTok: 0.4
23171
+ }
23172
+ }
23173
+ },
23174
+ preferredApi: "responses",
23175
+ supportedApis: [
23176
+ "responses"
23177
+ ],
23178
+ contextWindow: 2e6,
23179
+ capabilities: {
23180
+ toolUse: true,
23181
+ streaming: true,
23182
+ structuredOutput: true,
23183
+ vision: true,
23184
+ audio: false,
23185
+ video: false,
23186
+ imageGeneration: false,
23187
+ audioGeneration: false,
23188
+ videoGeneration: false
23189
+ },
23190
+ reasoning: {
23191
+ supported: false,
23192
+ automatic: false,
23193
+ effortControl: false,
23194
+ encryptedContent: false,
23195
+ summaryAvailable: false
23196
+ },
23197
+ type: "chat",
23198
+ inputModalities: [
23199
+ "text",
23200
+ "image"
23201
+ ],
23202
+ outputModalities: [
23203
+ "text"
23204
+ ],
23205
+ family: "grok",
23206
+ version: "4.20",
23207
+ status: "stable",
23208
+ active: true
23209
+ },
23210
+ "xai/grok-4.3": {
23211
+ providerModelName: "grok-4.3",
23212
+ aliases: [
23213
+ "grok-4.3"
23214
+ ],
23215
+ pricing: {
23216
+ inputPerMTok: 1.25,
23217
+ outputPerMTok: 2.5,
23218
+ cacheReadPerMTok: 0.2,
23219
+ tiers: {
23220
+ "long-context": {
23221
+ inputPerMTok: 2.5,
23222
+ outputPerMTok: 5,
23223
+ cacheReadPerMTok: 0.4
23224
+ }
23225
+ }
23226
+ },
23227
+ preferredApi: "responses",
23228
+ supportedApis: [
23229
+ "responses",
23230
+ "completions"
23231
+ ],
23232
+ contextWindow: 1e6,
23233
+ maxOutput: 1e6,
23234
+ capabilities: {
23235
+ toolUse: true,
23236
+ streaming: true,
23237
+ structuredOutput: true,
23238
+ vision: true,
23239
+ audio: false,
23240
+ video: false,
23241
+ imageGeneration: false,
23242
+ audioGeneration: false,
23243
+ videoGeneration: false
23244
+ },
23245
+ reasoning: {
23246
+ supported: false,
23247
+ automatic: false,
23248
+ effortControl: false,
23249
+ encryptedContent: false,
23250
+ summaryAvailable: false
23251
+ },
23252
+ type: "chat",
23253
+ inputModalities: [
23254
+ "text",
23255
+ "image"
23256
+ ],
23257
+ outputModalities: [
23258
+ "text"
23259
+ ],
23260
+ family: "grok",
23261
+ version: "4.3",
23262
+ status: "stable",
23263
+ active: true
23264
+ },
23265
+ "xai/grok-build-0.1": {
23266
+ providerModelName: "grok-build-0.1",
23267
+ aliases: [
23268
+ "grok-build-0.1"
23269
+ ],
23270
+ pricing: {
23271
+ inputPerMTok: 1,
23272
+ outputPerMTok: 2,
23273
+ cacheReadPerMTok: 0.2,
23274
+ tiers: {
23275
+ "long-context": {
23276
+ inputPerMTok: 2,
23277
+ outputPerMTok: 4,
23278
+ cacheReadPerMTok: 0.4
23279
+ }
23280
+ }
23281
+ },
23282
+ preferredApi: "responses",
23283
+ supportedApis: [
23284
+ "responses",
23285
+ "completions"
23286
+ ],
23287
+ contextWindow: 256e3,
23288
+ capabilities: {
23289
+ toolUse: true,
23290
+ streaming: true,
23291
+ structuredOutput: true,
23292
+ vision: true,
23293
+ audio: false,
23294
+ video: false,
23295
+ imageGeneration: false,
23296
+ audioGeneration: false,
23297
+ videoGeneration: false
23298
+ },
23299
+ reasoning: {
23300
+ supported: false,
23301
+ automatic: false,
23302
+ effortControl: false,
23303
+ encryptedContent: false,
23304
+ summaryAvailable: false
23305
+ },
23306
+ type: "code",
23307
+ inputModalities: [
23308
+ "text",
23309
+ "image"
23310
+ ],
23311
+ outputModalities: [
23312
+ "text"
23313
+ ],
23314
+ family: "grok",
23315
+ version: "0.1",
23316
+ status: "preview",
23317
+ active: true
23318
+ },
23319
+ "xai/grok-imagine-image": {
23320
+ providerModelName: "grok-imagine-image",
23321
+ aliases: [
23322
+ "grok-imagine-image"
23323
+ ],
23324
+ pricing: {
23325
+ perUnit: {
23326
+ "1k": 0.02,
23327
+ "2k": 0.02
23328
+ },
23329
+ perImage: 0.02
23330
+ },
23331
+ preferredApi: "responses",
23332
+ supportedApis: [
23333
+ "responses",
23334
+ "completions"
23335
+ ],
23336
+ capabilities: {
23337
+ toolUse: false,
23338
+ streaming: true,
23339
+ structuredOutput: false,
23340
+ vision: true,
23341
+ audio: false,
23342
+ video: false,
23343
+ imageGeneration: true,
23344
+ audioGeneration: false,
23345
+ videoGeneration: false
23346
+ },
23347
+ reasoning: {
23348
+ supported: false,
23349
+ automatic: false,
23350
+ effortControl: false,
23351
+ encryptedContent: false,
23352
+ summaryAvailable: false
23353
+ },
23354
+ type: "image",
23355
+ inputModalities: [
23356
+ "text",
23357
+ "image"
23358
+ ],
23359
+ outputModalities: [
23360
+ "image"
23361
+ ],
23362
+ family: "grok-imagine-image",
23363
+ version: "1",
23364
+ status: "stable",
23365
+ active: true,
23366
+ mediaParams: {
23367
+ aspectRatio: {
23368
+ values: [
23369
+ "1:1",
23370
+ "3:4",
23371
+ "4:3",
23372
+ "9:16",
23373
+ "16:9",
23374
+ "2:3",
23375
+ "3:2",
23376
+ "9:19.5",
23377
+ "19.5:9",
23378
+ "9:20",
23379
+ "20:9",
23380
+ "1:2",
23381
+ "2:1",
23382
+ "auto"
23383
+ ]
23384
+ },
23385
+ resolution: {
23386
+ values: [
23387
+ "1k",
23388
+ "2k"
23389
+ ]
23390
+ }
23391
+ }
23392
+ },
23393
+ "xai/grok-imagine-image-quality": {
23394
+ providerModelName: "grok-imagine-image-quality",
23395
+ aliases: [
23396
+ "grok-imagine-image-quality"
23397
+ ],
23398
+ pricing: {
23399
+ perUnit: {
23400
+ "1k": 0.05,
23401
+ "2k": 0.07
23402
+ },
23403
+ perImage: 0.05
23404
+ },
23405
+ preferredApi: "responses",
23406
+ supportedApis: [
23407
+ "responses",
23408
+ "completions"
23409
+ ],
23410
+ capabilities: {
23411
+ toolUse: false,
23412
+ streaming: true,
23413
+ structuredOutput: false,
23414
+ vision: true,
23415
+ audio: false,
23416
+ video: false,
23417
+ imageGeneration: true,
23418
+ audioGeneration: false,
23419
+ videoGeneration: false
23420
+ },
23421
+ reasoning: {
23422
+ supported: false,
23423
+ automatic: false,
23424
+ effortControl: false,
23425
+ encryptedContent: false,
23426
+ summaryAvailable: false
23427
+ },
23428
+ type: "image",
23429
+ inputModalities: [
23430
+ "text",
23431
+ "image"
23432
+ ],
23433
+ outputModalities: [
23434
+ "image"
23435
+ ],
23436
+ family: "grok-imagine-image",
23437
+ version: "1",
23438
+ status: "stable",
23439
+ active: true,
23440
+ mediaParams: {
23441
+ aspectRatio: {
23442
+ values: [
23443
+ "1:1",
23444
+ "3:4",
23445
+ "4:3",
23446
+ "9:16",
23447
+ "16:9",
23448
+ "2:3",
23449
+ "3:2",
23450
+ "9:19.5",
23451
+ "19.5:9",
23452
+ "9:20",
23453
+ "20:9",
23454
+ "1:2",
23455
+ "2:1",
23456
+ "auto"
23457
+ ]
23458
+ },
23459
+ resolution: {
23460
+ values: [
23461
+ "1k",
23462
+ "2k"
23463
+ ]
23464
+ }
23465
+ }
23466
+ },
23467
+ "xai/grok-imagine-video": {
23468
+ providerModelName: "grok-imagine-video",
23469
+ aliases: [
23470
+ "grok-imagine-video"
23471
+ ],
23472
+ pricing: {
23473
+ perSecond: 0.01,
23474
+ perUnit: {
23475
+ "480p": 0.05,
23476
+ "720p": 0.07
23477
+ },
23478
+ perImage: 2e-3
23479
+ },
23480
+ preferredApi: "responses",
23481
+ supportedApis: [
23482
+ "responses",
23483
+ "completions"
23484
+ ],
23485
+ capabilities: {
23486
+ toolUse: false,
23487
+ streaming: true,
23488
+ structuredOutput: false,
23489
+ vision: true,
23490
+ audio: false,
23491
+ video: false,
23492
+ imageGeneration: false,
23493
+ audioGeneration: false,
23494
+ videoGeneration: true
23495
+ },
23496
+ reasoning: {
23497
+ supported: false,
23498
+ automatic: false,
23499
+ effortControl: false,
23500
+ encryptedContent: false,
23501
+ summaryAvailable: false
23502
+ },
23503
+ type: "video",
23504
+ inputModalities: [
23505
+ "text",
23506
+ "image"
23507
+ ],
23508
+ outputModalities: [
23509
+ "video"
23510
+ ],
23511
+ family: "grok-imagine-video",
23512
+ version: "1",
23513
+ status: "stable",
23514
+ active: true,
23515
+ mediaParams: {
23516
+ duration: {
23517
+ min: 1,
23518
+ max: 15,
23519
+ default: 8
23520
+ },
23521
+ aspectRatio: {
23522
+ values: [
23523
+ "1:1",
23524
+ "16:9",
23525
+ "9:16",
23526
+ "4:3",
23527
+ "3:4",
23528
+ "3:2",
23529
+ "2:3"
23530
+ ]
23531
+ },
23532
+ resolution: {
23533
+ values: [
23534
+ "480p",
23535
+ "720p",
23536
+ "1080p"
23537
+ ]
23538
+ }
23539
+ }
23540
+ },
23541
+ "xai/grok-imagine-video-1.5": {
23542
+ providerModelName: "grok-imagine-video-1.5-preview",
23543
+ aliases: [
23544
+ "grok-imagine-video-1.5-preview",
23545
+ "grok-imagine-video-1.5"
23546
+ ],
23547
+ pricing: {
23548
+ perSecond: 0.01,
23549
+ perUnit: {
23550
+ "480p": 0.08,
23551
+ "720p": 0.14,
23552
+ "1080p": 0.25
23553
+ },
23554
+ perImage: 0.01
23555
+ },
23556
+ preferredApi: "responses",
23557
+ supportedApis: [
23558
+ "responses",
23559
+ "completions"
23560
+ ],
23561
+ capabilities: {
23562
+ toolUse: false,
23563
+ streaming: true,
23564
+ structuredOutput: false,
23565
+ vision: true,
23566
+ audio: false,
23567
+ video: false,
23568
+ imageGeneration: false,
23569
+ audioGeneration: false,
23570
+ videoGeneration: true
23571
+ },
23572
+ reasoning: {
23573
+ supported: false,
23574
+ automatic: false,
23575
+ effortControl: false,
23576
+ encryptedContent: false,
23577
+ summaryAvailable: false
23578
+ },
23579
+ type: "video",
23580
+ inputModalities: [
23581
+ "text",
23582
+ "image"
23583
+ ],
23584
+ outputModalities: [
23585
+ "video"
23586
+ ],
23587
+ family: "grok-imagine-video",
23588
+ version: "1.5",
23589
+ status: "preview",
23590
+ active: true,
23591
+ mediaParams: {
23592
+ duration: {
23593
+ min: 1,
23594
+ max: 15,
23595
+ default: 8
23596
+ },
23597
+ aspectRatio: {
23598
+ values: [
23599
+ "1:1",
23600
+ "16:9",
23601
+ "9:16",
23602
+ "4:3",
23603
+ "3:4",
23604
+ "3:2",
23605
+ "2:3"
23606
+ ]
23607
+ },
23608
+ resolution: {
23609
+ values: [
23610
+ "480p",
23611
+ "720p",
23612
+ "1080p"
23613
+ ]
23614
+ }
23615
+ }
23616
+ },
23617
+ "xai/grok-4.5": {
23618
+ providerModelName: "grok-4.5",
23619
+ aliases: [
23620
+ "grok-4.5"
23621
+ ],
23622
+ pricing: {
23623
+ inputPerMTok: 2,
23624
+ outputPerMTok: 6,
23625
+ cacheReadPerMTok: 0.5,
23626
+ tiers: {
23627
+ "long-context": {
23628
+ inputPerMTok: 4,
23629
+ outputPerMTok: 12,
23630
+ cacheReadPerMTok: 1
23631
+ }
23632
+ }
23633
+ },
23634
+ preferredApi: "responses",
23635
+ supportedApis: [
23636
+ "responses",
23637
+ "completions"
23638
+ ],
23639
+ contextWindow: 5e5,
23640
+ maxOutput: 5e5,
21726
23641
  capabilities: {
21727
23642
  toolUse: true,
21728
23643
  streaming: true,
@@ -21750,366 +23665,17 @@ var catalog_default5 = {
21750
23665
  "text"
21751
23666
  ],
21752
23667
  family: "grok",
21753
- version: "4.3",
23668
+ version: "4.5",
21754
23669
  status: "stable",
21755
23670
  active: true
21756
- },
21757
- "xai/grok-build-0.1": {
21758
- providerModelName: "grok-build-0.1",
21759
- aliases: [
21760
- "grok-build-0.1"
21761
- ],
21762
- pricing: {
21763
- inputPerMTok: 1,
21764
- outputPerMTok: 2,
21765
- cacheReadPerMTok: 0.2,
21766
- tiers: {
21767
- "long-context": {
21768
- inputPerMTok: 2,
21769
- outputPerMTok: 4,
21770
- cacheReadPerMTok: 0.4
21771
- }
21772
- }
21773
- },
21774
- preferredApi: "responses",
21775
- supportedApis: [
21776
- "responses",
21777
- "completions"
21778
- ],
21779
- contextWindow: 256e3,
21780
- capabilities: {
21781
- toolUse: true,
21782
- streaming: true,
21783
- structuredOutput: true,
21784
- vision: true,
21785
- audio: false,
21786
- video: false,
21787
- imageGeneration: false,
21788
- audioGeneration: false,
21789
- videoGeneration: false
21790
- },
21791
- reasoning: {
21792
- supported: false,
21793
- automatic: false,
21794
- effortControl: false,
21795
- encryptedContent: false,
21796
- summaryAvailable: false
21797
- },
21798
- type: "code",
21799
- inputModalities: [
21800
- "text",
21801
- "image"
21802
- ],
21803
- outputModalities: [
21804
- "text"
21805
- ],
21806
- family: "grok",
21807
- version: "0.1",
21808
- status: "preview",
21809
- active: true
21810
- },
21811
- "xai/grok-imagine-image": {
21812
- providerModelName: "grok-imagine-image",
21813
- aliases: [
21814
- "grok-imagine-image"
21815
- ],
21816
- pricing: {
21817
- perUnit: {
21818
- "1k": 2e-3,
21819
- "2k": 0.02
21820
- },
21821
- perImage: 0.02
21822
- },
21823
- preferredApi: "responses",
21824
- supportedApis: [
21825
- "responses",
21826
- "completions"
21827
- ],
21828
- capabilities: {
21829
- toolUse: false,
21830
- streaming: true,
21831
- structuredOutput: false,
21832
- vision: true,
21833
- audio: false,
21834
- video: false,
21835
- imageGeneration: true,
21836
- audioGeneration: false,
21837
- videoGeneration: false
21838
- },
21839
- reasoning: {
21840
- supported: false,
21841
- automatic: false,
21842
- effortControl: false,
21843
- encryptedContent: false,
21844
- summaryAvailable: false
21845
- },
21846
- type: "image",
21847
- inputModalities: [
21848
- "text",
21849
- "image"
21850
- ],
21851
- outputModalities: [
21852
- "image"
21853
- ],
21854
- family: "grok-imagine-image",
21855
- version: "1",
21856
- status: "stable",
21857
- active: true,
21858
- mediaParams: {
21859
- aspectRatio: {
21860
- values: [
21861
- "1:1",
21862
- "3:4",
21863
- "4:3",
21864
- "9:16",
21865
- "16:9",
21866
- "2:3",
21867
- "3:2",
21868
- "9:19.5",
21869
- "19.5:9",
21870
- "9:20",
21871
- "20:9",
21872
- "1:2",
21873
- "2:1",
21874
- "auto"
21875
- ]
21876
- },
21877
- resolution: {
21878
- values: [
21879
- "1k",
21880
- "2k"
21881
- ]
21882
- }
21883
- }
21884
- },
21885
- "xai/grok-imagine-image-quality": {
21886
- providerModelName: "grok-imagine-image-quality",
21887
- aliases: [
21888
- "grok-imagine-image-quality"
21889
- ],
21890
- pricing: {
21891
- perUnit: {
21892
- "1k": 0.01,
21893
- "2k": 0.05
21894
- },
21895
- perImage: 0.04
21896
- },
21897
- preferredApi: "responses",
21898
- supportedApis: [
21899
- "responses",
21900
- "completions"
21901
- ],
21902
- capabilities: {
21903
- toolUse: false,
21904
- streaming: true,
21905
- structuredOutput: false,
21906
- vision: true,
21907
- audio: false,
21908
- video: false,
21909
- imageGeneration: true,
21910
- audioGeneration: false,
21911
- videoGeneration: false
21912
- },
21913
- reasoning: {
21914
- supported: false,
21915
- automatic: false,
21916
- effortControl: false,
21917
- encryptedContent: false,
21918
- summaryAvailable: false
21919
- },
21920
- type: "image",
21921
- inputModalities: [
21922
- "text",
21923
- "image"
21924
- ],
21925
- outputModalities: [
21926
- "image"
21927
- ],
21928
- family: "grok-imagine-image",
21929
- version: "1",
21930
- status: "stable",
21931
- active: true,
21932
- mediaParams: {
21933
- aspectRatio: {
21934
- values: [
21935
- "1:1",
21936
- "3:4",
21937
- "4:3",
21938
- "9:16",
21939
- "16:9",
21940
- "2:3",
21941
- "3:2",
21942
- "9:19.5",
21943
- "19.5:9",
21944
- "9:20",
21945
- "20:9",
21946
- "1:2",
21947
- "2:1",
21948
- "auto"
21949
- ]
21950
- },
21951
- resolution: {
21952
- values: [
21953
- "1k",
21954
- "2k"
21955
- ]
21956
- }
21957
- }
21958
- },
21959
- "xai/grok-imagine-video": {
21960
- providerModelName: "grok-imagine-video",
21961
- aliases: [
21962
- "grok-imagine-video"
21963
- ],
21964
- pricing: {
21965
- perSecond: 0.01,
21966
- perUnit: {
21967
- "480p": 2e-3,
21968
- "720p": 0.05,
21969
- "1080p": 0.07
21970
- }
21971
- },
21972
- preferredApi: "responses",
21973
- supportedApis: [
21974
- "responses",
21975
- "completions"
21976
- ],
21977
- capabilities: {
21978
- toolUse: false,
21979
- streaming: true,
21980
- structuredOutput: false,
21981
- vision: true,
21982
- audio: false,
21983
- video: false,
21984
- imageGeneration: false,
21985
- audioGeneration: false,
21986
- videoGeneration: true
21987
- },
21988
- reasoning: {
21989
- supported: false,
21990
- automatic: false,
21991
- effortControl: false,
21992
- encryptedContent: false,
21993
- summaryAvailable: false
21994
- },
21995
- type: "video",
21996
- inputModalities: [
21997
- "text",
21998
- "image"
21999
- ],
22000
- outputModalities: [
22001
- "video"
22002
- ],
22003
- family: "grok-imagine-video",
22004
- version: "1",
22005
- status: "stable",
22006
- active: true,
22007
- mediaParams: {
22008
- duration: {
22009
- min: 1,
22010
- max: 15,
22011
- default: 8
22012
- },
22013
- aspectRatio: {
22014
- values: [
22015
- "1:1",
22016
- "16:9",
22017
- "9:16",
22018
- "4:3",
22019
- "3:4",
22020
- "3:2",
22021
- "2:3"
22022
- ]
22023
- },
22024
- resolution: {
22025
- values: [
22026
- "480p",
22027
- "720p",
22028
- "1080p"
22029
- ]
22030
- }
22031
- }
22032
- },
22033
- "xai/grok-imagine-video-1.5": {
22034
- providerModelName: "grok-imagine-video-1.5-preview",
22035
- aliases: [
22036
- "grok-imagine-video-1.5-preview"
22037
- ],
22038
- pricing: {
22039
- perSecond: 0.01,
22040
- perUnit: {
22041
- "480p": 0.08,
22042
- "720p": 0.14
22043
- }
22044
- },
22045
- preferredApi: "responses",
22046
- supportedApis: [
22047
- "responses",
22048
- "completions"
22049
- ],
22050
- capabilities: {
22051
- toolUse: false,
22052
- streaming: true,
22053
- structuredOutput: false,
22054
- vision: true,
22055
- audio: false,
22056
- video: false,
22057
- imageGeneration: false,
22058
- audioGeneration: false,
22059
- videoGeneration: true
22060
- },
22061
- reasoning: {
22062
- supported: false,
22063
- automatic: false,
22064
- effortControl: false,
22065
- encryptedContent: false,
22066
- summaryAvailable: false
22067
- },
22068
- type: "video",
22069
- inputModalities: [
22070
- "text",
22071
- "image"
22072
- ],
22073
- outputModalities: [
22074
- "video"
22075
- ],
22076
- family: "grok-imagine-video",
22077
- version: "1.5",
22078
- status: "preview",
22079
- active: true,
22080
- mediaParams: {
22081
- duration: {
22082
- min: 1,
22083
- max: 15,
22084
- default: 8
22085
- },
22086
- aspectRatio: {
22087
- values: [
22088
- "1:1",
22089
- "16:9",
22090
- "9:16",
22091
- "4:3",
22092
- "3:4",
22093
- "3:2",
22094
- "2:3"
22095
- ]
22096
- },
22097
- resolution: {
22098
- values: [
22099
- "480p",
22100
- "720p",
22101
- "1080p"
22102
- ]
22103
- }
22104
- }
22105
23671
  }
22106
23672
  };
22107
23673
 
22108
23674
  // src/llm/providers/builtin-tools.ts
22109
23675
  var PROVIDER_BUILTIN_TOOLS = {
22110
- anthropic: ["web_search", "code_interpreter"],
23676
+ anthropic: ["web_search", "web_fetch", "code_interpreter"],
22111
23677
  openai: ["web_search", "code_interpreter"],
22112
- google: ["web_search", "code_interpreter"],
23678
+ google: ["web_search", "web_fetch", "code_interpreter"],
22113
23679
  xai: ["web_search", "code_interpreter"],
22114
23680
  openrouter: ["web_search"]
22115
23681
  };
@@ -22664,6 +24230,20 @@ function resolveServerState(args) {
22664
24230
  // src/llm/client-internal.ts
22665
24231
  var PRIORITY_INTERACTIVE = 1;
22666
24232
  var PRIORITY_BACKGROUND = 2;
24233
+ function buildAssistantMessage(response, origin) {
24234
+ const stateful = origin.api === "responses" || origin.api === "interactions";
24235
+ return {
24236
+ role: "assistant",
24237
+ content: response.content,
24238
+ id: response.id || crypto.randomUUID(),
24239
+ createdAt: Date.now(),
24240
+ origin: {
24241
+ provider: origin.provider,
24242
+ model: origin.model,
24243
+ ...stateful && response.id ? { serverStateId: response.id } : {}
24244
+ }
24245
+ };
24246
+ }
22667
24247
  function normalizeInput(input) {
22668
24248
  if (typeof input === "string") {
22669
24249
  return [{ role: "user", content: input }];
@@ -22694,7 +24274,11 @@ function contentToText(content) {
22694
24274
  }
22695
24275
  function parseStructured(text) {
22696
24276
  const stripped = text.trim().replace(/^```(?:json)?\s*/i, "").replace(/```\s*$/i, "").trim();
22697
- return JSON.parse(stripped);
24277
+ try {
24278
+ return JSON.parse(stripped);
24279
+ } catch (cause) {
24280
+ throw new InvalidFinalOutputError(text, { cause });
24281
+ }
22698
24282
  }
22699
24283
  function buildContext(client, options) {
22700
24284
  const provided = options.ctx ?? {};
@@ -22815,18 +24399,11 @@ var LLMClient = class {
22815
24399
  * const r2 = await llm.complete(messages); // sends id + only the new turn
22816
24400
  */
22817
24401
  assistantMessage(response) {
22818
- const stateful = this.api === "responses" || this.api === "interactions";
22819
- return {
22820
- role: "assistant",
22821
- content: response.content,
22822
- id: response.id || crypto.randomUUID(),
22823
- createdAt: Date.now(),
22824
- origin: {
22825
- provider: this.provider,
22826
- model: this.model,
22827
- ...stateful && response.id ? { serverStateId: response.id } : {}
22828
- }
22829
- };
24402
+ return buildAssistantMessage(response, {
24403
+ provider: this.provider,
24404
+ model: this.model,
24405
+ api: this.api
24406
+ });
22830
24407
  }
22831
24408
  // ─── Moderation helpers ───────────────────────────────────────────────
22832
24409
  /** Resolve the OpenAI key the emulated moderation path needs. Reuses the
@@ -22891,6 +24468,8 @@ var LLMClient = class {
22891
24468
  maxTokens: options.maxTokens,
22892
24469
  temperature: options.temperature,
22893
24470
  topP: options.topP,
24471
+ presencePenalty: options.presencePenalty,
24472
+ frequencyPenalty: options.frequencyPenalty,
22894
24473
  stop: options.stop,
22895
24474
  tools: options.tools,
22896
24475
  toolChoice: options.toolChoice,
@@ -23017,11 +24596,24 @@ var LLMClient = class {
23017
24596
  * leading/trailing markdown fences from the model reply, then JSON.parses
23018
24597
  * to T. Throws if the parse fails — callers should catch + retry. */
23019
24598
  async structuredComplete(input, schema, options = {}) {
23020
- const res = await this.complete(input, {
23021
- ...options,
23022
- structured: { ...options.structured ?? {}, schema }
23023
- });
23024
- return parseStructured(res.text);
24599
+ const structured = { ...options.structured ?? {}, schema };
24600
+ const repairAttempts = Math.max(0, structured.repairAttempts ?? 0);
24601
+ const messages = normalizeInput(input);
24602
+ for (let attempt = 0; ; attempt++) {
24603
+ const res = await this.complete(messages, { ...options, structured });
24604
+ try {
24605
+ return parseStructured(res.text);
24606
+ } catch (err) {
24607
+ if (!(err instanceof InvalidFinalOutputError) || attempt >= repairAttempts) throw err;
24608
+ messages.push(
24609
+ { role: "assistant", content: res.text },
24610
+ {
24611
+ role: "user",
24612
+ content: `Your previous reply was not valid JSON for the required schema (${err.message}). Reply with ONLY the JSON object matching the schema \u2014 no prose, no code fences.`
24613
+ }
24614
+ );
24615
+ }
24616
+ }
23025
24617
  }
23026
24618
  async *stream(input, options = {}) {
23027
24619
  if (!this.fetchStreamFn) {
@@ -23038,6 +24630,8 @@ var LLMClient = class {
23038
24630
  maxTokens: options.maxTokens,
23039
24631
  temperature: options.temperature,
23040
24632
  topP: options.topP,
24633
+ presencePenalty: options.presencePenalty,
24634
+ frequencyPenalty: options.frequencyPenalty,
23041
24635
  stop: options.stop,
23042
24636
  tools: options.tools,
23043
24637
  toolChoice: options.toolChoice,
@@ -23142,8 +24736,15 @@ var LLMClient = class {
23142
24736
  case "file":
23143
24737
  files.push(event.file);
23144
24738
  break;
23145
- case "builtin_tool_start":
23146
- builtinToolCalls.push({ tool: event.tool, ...event.id ? { id: event.id } : {} });
24739
+ case "builtin_tool_end":
24740
+ builtinToolCalls.push({
24741
+ tool: event.tool,
24742
+ ...event.id ? { id: event.id } : {},
24743
+ ...event.code ? { code: event.code } : {},
24744
+ ...event.output ? { output: event.output } : {},
24745
+ ...event.query ? { query: event.query } : {},
24746
+ ...event.url ? { url: event.url } : {}
24747
+ });
23147
24748
  break;
23148
24749
  case "moderation":
23149
24750
  moderationReport = this.mergeModeration(
@@ -23409,10 +25010,12 @@ var NATIVE_TO_UNIFIED = {
23409
25010
  code_interpreter_call: "code_interpreter",
23410
25011
  // Anthropic server_tool_use names
23411
25012
  web_search: "web_search",
25013
+ web_fetch: "web_fetch",
23412
25014
  code_execution: "code_interpreter",
23413
25015
  bash_code_execution: "code_interpreter",
23414
25016
  // Anthropic *_tool_result block types
23415
25017
  web_search_tool_result: "web_search",
25018
+ web_fetch_tool_result: "web_fetch",
23416
25019
  code_execution_tool_result: "code_interpreter",
23417
25020
  bash_code_execution_tool_result: "code_interpreter"
23418
25021
  };
@@ -23463,6 +25066,24 @@ function filesFromCodeExecBlock(block) {
23463
25066
  }
23464
25067
  return files;
23465
25068
  }
25069
+ function builtinInputPayload(tool, input) {
25070
+ if (!input) return {};
25071
+ if (tool === "code_interpreter") {
25072
+ const code = input.code ?? input.command;
25073
+ return typeof code === "string" ? { code } : {};
25074
+ }
25075
+ if (tool === "web_search") {
25076
+ return typeof input.query === "string" ? { query: input.query } : {};
25077
+ }
25078
+ if (tool === "web_fetch") {
25079
+ return typeof input.url === "string" ? { url: input.url } : {};
25080
+ }
25081
+ return {};
25082
+ }
25083
+ function resultStdout(content) {
25084
+ const c = content;
25085
+ return c && typeof c.stdout === "string" ? c.stdout : void 0;
25086
+ }
23466
25087
  var AnthropicAdapter = class {
23467
25088
  name = "anthropic";
23468
25089
  apiKey;
@@ -23510,7 +25131,21 @@ var AnthropicAdapter = class {
23510
25131
  body.tools = req.tools.map((t, i) => {
23511
25132
  if (!isFunctionTool(t)) {
23512
25133
  if (t.type === "web_search") {
23513
- return { type: "web_search_20250305", name: "web_search", max_uses: 5 };
25134
+ return {
25135
+ type: "web_search_20260318",
25136
+ name: "web_search",
25137
+ max_uses: 5,
25138
+ allowed_callers: ["direct"],
25139
+ ...t.params
25140
+ };
25141
+ }
25142
+ if (t.type === "web_fetch") {
25143
+ return {
25144
+ type: "web_fetch_20260318",
25145
+ name: "web_fetch",
25146
+ allowed_callers: ["direct"],
25147
+ ...t.params
25148
+ };
23514
25149
  }
23515
25150
  if (t.type === "code_interpreter") {
23516
25151
  return { type: "code_execution_20260521", name: "code_execution" };
@@ -23558,6 +25193,10 @@ var AnthropicAdapter = class {
23558
25193
  });
23559
25194
  const headers = {};
23560
25195
  if (hasFileRef) headers["anthropic-beta"] = "files-api-2025-04-14";
25196
+ const userProfileId = req.providerOptions?.userProfileId;
25197
+ if (typeof userProfileId === "string" && userProfileId) {
25198
+ headers["anthropic-user-profile-id"] = userProfileId;
25199
+ }
23561
25200
  const usesCodeExec = req.tools?.some(
23562
25201
  (t) => !isFunctionTool(t) && t.type === "code_interpreter"
23563
25202
  );
@@ -23645,11 +25284,20 @@ var AnthropicAdapter = class {
23645
25284
  content.push(tc);
23646
25285
  toolCalls.push(tc);
23647
25286
  } else if (block.type === "server_tool_use") {
25287
+ const tool = unifiedBuiltinTool(block.name);
23648
25288
  builtinToolCalls.push({
23649
- tool: unifiedBuiltinTool(block.name),
23650
- ...typeof block.id === "string" ? { id: block.id } : {}
25289
+ tool,
25290
+ ...typeof block.id === "string" ? { id: block.id } : {},
25291
+ ...builtinInputPayload(tool, block.input)
23651
25292
  });
23652
25293
  } else {
25294
+ if (typeof block.type === "string" && block.type.endsWith("_tool_result")) {
25295
+ const output = resultStdout(block.content);
25296
+ if (output) {
25297
+ const call = builtinToolCalls.find((c) => c.id === block.tool_use_id);
25298
+ if (call) call.output = output;
25299
+ }
25300
+ }
23653
25301
  files.push(...filesFromCodeExecBlock(block));
23654
25302
  }
23655
25303
  }
@@ -23673,6 +25321,17 @@ var AnthropicAdapter = class {
23673
25321
  };
23674
25322
  }
23675
25323
  parseStreamEvent(event) {
25324
+ return this.streamEvents(event, { pending: /* @__PURE__ */ new Map() });
25325
+ }
25326
+ /** Stateful — Anthropic streams `server_tool_use` input via `input_json_delta`
25327
+ * (empty at block start) and returns the result in a separate `*_tool_result`
25328
+ * block. The closure accumulates each call's input (code / query) and attaches it
25329
+ * to the matching `builtin_tool_end`. */
25330
+ createStreamParser() {
25331
+ const state = { pending: /* @__PURE__ */ new Map() };
25332
+ return (event) => this.streamEvents(event, state);
25333
+ }
25334
+ streamEvents(event, state) {
23676
25335
  if (event.event === "ping") return [];
23677
25336
  const data = JSON.parse(event.data);
23678
25337
  const type = data.type;
@@ -23682,33 +25341,58 @@ var AnthropicAdapter = class {
23682
25341
  if (delta.type === "thinking_delta")
23683
25342
  return [{ type: "thinking", text: delta.thinking }];
23684
25343
  if (delta.type === "input_json_delta") {
25344
+ if (state.current) {
25345
+ state.current.json += delta.partial_json ?? "";
25346
+ return [];
25347
+ }
23685
25348
  return [{ type: "tool_call_delta", id: "", arguments: delta.partial_json }];
23686
25349
  }
23687
25350
  }
23688
25351
  if (type === "content_block_start") {
23689
25352
  const block = data.content_block;
23690
25353
  if (block.type === "tool_use") {
25354
+ state.current = void 0;
23691
25355
  return [{ type: "tool_call_start", id: block.id, name: block.name }];
23692
25356
  }
23693
25357
  const events = [];
23694
25358
  const blockType = block.type;
23695
25359
  if (blockType === "server_tool_use") {
25360
+ const tool = unifiedBuiltinTool(block.name);
25361
+ state.current = { id: block.id ?? "", tool, json: "" };
23696
25362
  events.push({
23697
25363
  type: "builtin_tool_start",
23698
- tool: unifiedBuiltinTool(block.name),
25364
+ tool,
23699
25365
  ...typeof block.id === "string" ? { id: block.id } : {}
23700
25366
  });
23701
25367
  } else if (blockType?.endsWith("_tool_result")) {
25368
+ const tool = unifiedBuiltinTool(blockType);
25369
+ const id = typeof block.tool_use_id === "string" ? block.tool_use_id : void 0;
25370
+ const input = id ? state.pending.get(id) : void 0;
25371
+ if (id) state.pending.delete(id);
25372
+ const output = resultStdout(block.content);
23702
25373
  events.push({
23703
25374
  type: "builtin_tool_end",
23704
- tool: unifiedBuiltinTool(blockType),
23705
- ...typeof block.tool_use_id === "string" ? { id: block.tool_use_id } : {}
25375
+ tool,
25376
+ ...id ? { id } : {},
25377
+ ...input?.code ? { code: input.code } : {},
25378
+ ...input?.query ? { query: input.query } : {},
25379
+ ...input?.url ? { url: input.url } : {},
25380
+ ...output ? { output } : {}
23706
25381
  });
23707
25382
  }
23708
25383
  for (const file of filesFromCodeExecBlock(block)) events.push({ type: "file", file });
23709
25384
  return events;
23710
25385
  }
23711
25386
  if (type === "content_block_stop") {
25387
+ if (state.current) {
25388
+ let input = {};
25389
+ try {
25390
+ input = JSON.parse(state.current.json || "{}");
25391
+ } catch {
25392
+ }
25393
+ state.pending.set(state.current.id, builtinInputPayload(state.current.tool, input));
25394
+ state.current = void 0;
25395
+ }
23712
25396
  }
23713
25397
  if (type === "message_delta") {
23714
25398
  const delta = data.delta;
@@ -23730,11 +25414,6 @@ var AnthropicAdapter = class {
23730
25414
  }
23731
25415
  return [];
23732
25416
  }
23733
- /** Stateless — every event is self-contained (code-execution result blocks
23734
- * arrive complete in a single content_block_start). */
23735
- createStreamParser() {
23736
- return (event) => this.parseStreamEvent(event);
23737
- }
23738
25417
  parseUsage(u) {
23739
25418
  if (!u) return emptyUsage();
23740
25419
  const inputTokens = u.input_tokens ?? 0;
@@ -24045,6 +25724,8 @@ var GoogleAdapter = class {
24045
25724
  if (req.maxTokens) config.maxOutputTokens = req.maxTokens;
24046
25725
  if (req.temperature !== void 0) config.temperature = req.temperature;
24047
25726
  if (req.topP !== void 0) config.topP = req.topP;
25727
+ if (req.presencePenalty !== void 0) config.presencePenalty = req.presencePenalty;
25728
+ if (req.frequencyPenalty !== void 0) config.frequencyPenalty = req.frequencyPenalty;
24048
25729
  if (req.stop) config.stopSequences = req.stop;
24049
25730
  if (req.outputModalities?.includes("audio")) {
24050
25731
  config.responseModalities = ["AUDIO"];
@@ -24080,6 +25761,9 @@ var GoogleAdapter = class {
24080
25761
  if (req.tools.some((t) => !isFunctionTool(t) && t.type === "code_interpreter")) {
24081
25762
  tools.push({ codeExecution: {} });
24082
25763
  }
25764
+ if (req.tools.some((t) => !isFunctionTool(t) && t.type === "web_fetch")) {
25765
+ tools.push({ urlContext: {} });
25766
+ }
24083
25767
  if (tools.length) body.tools = tools;
24084
25768
  }
24085
25769
  if (req.toolChoice) {
@@ -24243,8 +25927,32 @@ var GoogleAdapter = class {
24243
25927
  { MAX_TOKENS: "length", SAFETY: "content_filter" }
24244
25928
  );
24245
25929
  const builtinToolCalls = [];
24246
- if (hasCodeExec) builtinToolCalls.push({ tool: "code_interpreter" });
24247
- if (candidate.groundingMetadata) builtinToolCalls.push({ tool: "web_search" });
25930
+ const codes = parts.filter((p) => p.executableCode?.code).map((p) => p.executableCode.code);
25931
+ const outputs = parts.filter((p) => p.codeExecutionResult).map((p) => String(p.codeExecutionResult.output ?? ""));
25932
+ if (codes.length) {
25933
+ codes.forEach((code, i) => {
25934
+ builtinToolCalls.push({
25935
+ tool: "code_interpreter",
25936
+ code,
25937
+ ...outputs[i] ? { output: outputs[i] } : {}
25938
+ });
25939
+ });
25940
+ } else if (hasCodeExec) {
25941
+ builtinToolCalls.push({ tool: "code_interpreter", ...outputs[0] ? { output: outputs[0] } : {} });
25942
+ }
25943
+ const grounding = candidate.groundingMetadata;
25944
+ if (grounding) {
25945
+ const q = grounding.webSearchQueries?.[0];
25946
+ builtinToolCalls.push({ tool: "web_search", ...typeof q === "string" ? { query: q } : {} });
25947
+ }
25948
+ const urlCtx = candidate.urlContextMetadata;
25949
+ const urlMeta = urlCtx?.urlMetadata;
25950
+ if (Array.isArray(urlMeta)) {
25951
+ for (const m of urlMeta) {
25952
+ const url = m.retrievedUrl;
25953
+ builtinToolCalls.push({ tool: "web_fetch", ...typeof url === "string" ? { url } : {} });
25954
+ }
25955
+ }
24248
25956
  return {
24249
25957
  id: crypto.randomUUID(),
24250
25958
  // Google doesn't return a response ID in generateContent
@@ -24295,8 +26003,21 @@ var GoogleAdapter = class {
24295
26003
  if (part.text !== void 0 && !part.thought)
24296
26004
  events.push({ type: "text", text: part.text });
24297
26005
  if (part.thought && part.text) events.push({ type: "thinking", text: part.text });
24298
- if (part.executableCode) events.push({ type: "builtin_tool_start", tool: "code_interpreter" });
24299
- if (part.codeExecutionResult) events.push({ type: "builtin_tool_end", tool: "code_interpreter" });
26006
+ if (part.executableCode) {
26007
+ const code = part.executableCode.code;
26008
+ state.pendingCode = typeof code === "string" ? code : void 0;
26009
+ events.push({ type: "builtin_tool_start", tool: "code_interpreter" });
26010
+ }
26011
+ if (part.codeExecutionResult) {
26012
+ const output = part.codeExecutionResult.output;
26013
+ events.push({
26014
+ type: "builtin_tool_end",
26015
+ tool: "code_interpreter",
26016
+ ...state.pendingCode ? { code: state.pendingCode } : {},
26017
+ ...typeof output === "string" && output ? { output } : {}
26018
+ });
26019
+ state.pendingCode = void 0;
26020
+ }
24300
26021
  if (part.inlineData) {
24301
26022
  const inline = part.inlineData;
24302
26023
  const mime = inline.mimeType;
@@ -24329,8 +26050,26 @@ var GoogleAdapter = class {
24329
26050
  }
24330
26051
  if (candidate.groundingMetadata && !state.webSearchEmitted) {
24331
26052
  state.webSearchEmitted = true;
26053
+ const q = candidate.groundingMetadata.webSearchQueries?.[0];
24332
26054
  events.push({ type: "builtin_tool_start", tool: "web_search" });
24333
- events.push({ type: "builtin_tool_end", tool: "web_search" });
26055
+ events.push({
26056
+ type: "builtin_tool_end",
26057
+ tool: "web_search",
26058
+ ...typeof q === "string" ? { query: q } : {}
26059
+ });
26060
+ }
26061
+ const streamUrlMeta = candidate.urlContextMetadata?.urlMetadata;
26062
+ if (Array.isArray(streamUrlMeta) && !state.urlFetchEmitted) {
26063
+ state.urlFetchEmitted = true;
26064
+ for (const m of streamUrlMeta) {
26065
+ const url = m.retrievedUrl;
26066
+ events.push({ type: "builtin_tool_start", tool: "web_fetch" });
26067
+ events.push({
26068
+ type: "builtin_tool_end",
26069
+ tool: "web_fetch",
26070
+ ...typeof url === "string" ? { url } : {}
26071
+ });
26072
+ }
24334
26073
  }
24335
26074
  const fr = candidate.finishReason;
24336
26075
  if (fr)
@@ -24400,6 +26139,8 @@ var GoogleInteractionsAdapter = class {
24400
26139
  if (req.maxTokens) genConfig.max_output_tokens = req.maxTokens;
24401
26140
  if (req.temperature !== void 0) genConfig.temperature = req.temperature;
24402
26141
  if (req.topP !== void 0) genConfig.top_p = req.topP;
26142
+ if (req.presencePenalty !== void 0) genConfig.presence_penalty = req.presencePenalty;
26143
+ if (req.frequencyPenalty !== void 0) genConfig.frequency_penalty = req.frequencyPenalty;
24403
26144
  if (req.stop) genConfig.stop_sequences = req.stop;
24404
26145
  if (req.tools?.length) {
24405
26146
  body.tools = req.tools.filter(isFunctionTool).map((t) => ({
@@ -24415,6 +26156,8 @@ var GoogleInteractionsAdapter = class {
24415
26156
  };
24416
26157
  }
24417
26158
  if (Object.keys(genConfig).length > 0) body.generation_config = genConfig;
26159
+ const cachedContent = req.providerOptions?.cachedContent;
26160
+ if (typeof cachedContent === "string" && cachedContent) body.cached_content = cachedContent;
24418
26161
  if (req.structured) {
24419
26162
  body.response_format = {
24420
26163
  type: "text",
@@ -24572,47 +26315,77 @@ var GoogleInteractionsAdapter = class {
24572
26315
  raw
24573
26316
  };
24574
26317
  }
24575
- parseStreamEvent(event) {
26318
+ /** Translate one Interactions SSE event to unified events. The 2.10 wire is a
26319
+ * step machine (verified live): `step.start` opens a typed step (`model_output`,
26320
+ * `function_call`, `thought`…), `step.delta` streams its payload (`{type:'text'}`,
26321
+ * `{type:'arguments_delta'}`, `{type:'thought_summary'}`, internal
26322
+ * `thought_signature`), `step.stop` closes it, and `interaction.completed` /
26323
+ * `interaction.failed` finish the turn (usage under `interaction.usage`). A
26324
+ * function call's `arguments_delta` carries no id, so we correlate it to the
26325
+ * currently-open call id held in `state`. */
26326
+ streamEvents(event, state) {
24576
26327
  const data = JSON.parse(event.data);
24577
26328
  const type = data.event_type ?? data.type;
24578
26329
  const events = [];
24579
- if (type === "content.delta") {
24580
- const delta = data.delta;
24581
- if (delta?.type === "text") {
24582
- events.push({ type: "text", text: delta.text });
24583
- }
24584
- if (delta?.type === "function_call") {
24585
- events.push({
24586
- type: "tool_call_start",
24587
- id: delta.id ?? "",
24588
- name: delta.name ?? ""
24589
- });
24590
- if (delta.arguments) {
24591
- events.push({
24592
- type: "tool_call_delta",
24593
- id: delta.id ?? "",
24594
- arguments: JSON.stringify(delta.arguments)
24595
- });
26330
+ if (type === "step.start") {
26331
+ const step = data.step ?? {};
26332
+ if (step.type === "function_call") {
26333
+ const id = step.id ?? "";
26334
+ state.callId = id;
26335
+ state.sawToolCall = true;
26336
+ events.push({ type: "tool_call_start", id, name: step.name ?? "" });
26337
+ const args = step.arguments;
26338
+ if (args && Object.keys(args).length > 0) {
26339
+ events.push({ type: "tool_call_delta", id, arguments: JSON.stringify(args) });
24596
26340
  }
24597
- events.push({ type: "tool_call_end", id: delta.id ?? "" });
24598
26341
  }
26342
+ return events;
26343
+ }
26344
+ if (type === "step.delta") {
26345
+ const delta = data.delta ?? {};
26346
+ const dtype = delta.type;
26347
+ if (dtype === "text") {
26348
+ events.push({ type: "text", text: delta.text ?? "" });
26349
+ } else if (dtype === "thought_summary") {
26350
+ events.push({ type: "thinking", text: delta.text ?? "" });
26351
+ } else if (dtype === "arguments_delta") {
26352
+ events.push({ type: "tool_call_delta", id: state.callId ?? "", arguments: delta.arguments ?? "" });
26353
+ }
26354
+ return events;
26355
+ }
26356
+ if (type === "step.stop") {
26357
+ if (state.callId) {
26358
+ events.push({ type: "tool_call_end", id: state.callId });
26359
+ state.callId = void 0;
26360
+ }
26361
+ return events;
24599
26362
  }
24600
- if (type === "interaction.complete") {
26363
+ if (type === "interaction.completed" || type === "interaction.failed") {
26364
+ if (state.callId) {
26365
+ events.push({ type: "tool_call_end", id: state.callId });
26366
+ state.callId = void 0;
26367
+ }
24601
26368
  const interaction = data.interaction ?? {};
24602
- const usage = interaction.usage;
26369
+ const usage = interaction.usage ?? data.metadata?.total_usage;
24603
26370
  if (usage) events.push({ type: "usage", usage: this.parseUsage(usage) });
24604
26371
  events.push({
24605
26372
  type: "done",
24606
- finishReason: extractFinishReason(false, interaction.status, {
26373
+ finishReason: extractFinishReason(state.sawToolCall, interaction.status, {
24607
26374
  failed: "error"
24608
26375
  })
24609
26376
  });
26377
+ return events;
24610
26378
  }
24611
26379
  return events;
24612
26380
  }
24613
- /** Stateless — the Interactions adapter surfaces no code-execution file outputs. */
26381
+ parseStreamEvent(event) {
26382
+ return this.streamEvents(event, { sawToolCall: false });
26383
+ }
26384
+ /** Per-stream stateful parser — correlates a function call's streamed arguments
26385
+ * and end to the call opened by its `step.start`. */
24614
26386
  createStreamParser() {
24615
- return (event) => this.parseStreamEvent(event);
26387
+ const state = { sawToolCall: false };
26388
+ return (event) => this.streamEvents(event, state);
24616
26389
  }
24617
26390
  parseUsage(u) {
24618
26391
  if (!u) return emptyUsage();
@@ -24769,7 +26542,7 @@ var GoogleMediaAdapter = class {
24769
26542
  const image = {};
24770
26543
  if (req.params?.aspectRatio) image.aspectRatio = req.params.aspectRatio;
24771
26544
  if (req.params?.imageSize) image.imageSize = req.params.imageSize;
24772
- if (Object.keys(image).length) generationConfig.responseFormat = { image };
26545
+ if (Object.keys(image).length) generationConfig.imageConfig = image;
24773
26546
  const { items, usage } = await this.generateContentMedia(
24774
26547
  model,
24775
26548
  req.prompt,
@@ -25343,6 +27116,8 @@ var OpenAIAdapter = class {
25343
27116
  };
25344
27117
  if (req.temperature !== void 0) body.temperature = req.temperature;
25345
27118
  if (req.topP !== void 0) body.top_p = req.topP;
27119
+ if (req.presencePenalty !== void 0) body.presence_penalty = req.presencePenalty;
27120
+ if (req.frequencyPenalty !== void 0) body.frequency_penalty = req.frequencyPenalty;
25346
27121
  if (req.stop) body.stop = req.stop;
25347
27122
  const tier = openaiRequestTier(req.serviceTier);
25348
27123
  if (tier) body.service_tier = tier;
@@ -26098,32 +27873,98 @@ function filenameForMime(mimeType) {
26098
27873
  if (mimeType.startsWith("image/")) return `file.${mimeType.slice("image/".length)}`;
26099
27874
  return "file.bin";
26100
27875
  }
27876
+ function codeOutputFromResponsesItem(item) {
27877
+ const parts = [];
27878
+ for (const out of item.outputs ?? []) {
27879
+ if (out.type !== "logs" || typeof out.logs !== "string") continue;
27880
+ try {
27881
+ const j = JSON.parse(out.logs);
27882
+ if (typeof j.stdout === "string") {
27883
+ parts.push(j.stdout);
27884
+ continue;
27885
+ }
27886
+ } catch {
27887
+ }
27888
+ parts.push(out.logs);
27889
+ }
27890
+ return parts.length ? parts.join("") : void 0;
27891
+ }
27892
+ function searchActionPayload(item) {
27893
+ const action = item.action;
27894
+ if (!action) return {};
27895
+ const out = {};
27896
+ if (Array.isArray(action.queries) && typeof action.queries[0] === "string")
27897
+ out.query = action.queries[0];
27898
+ else if (typeof action.query === "string") out.query = action.query;
27899
+ if (typeof action.url === "string") out.url = action.url;
27900
+ return out;
27901
+ }
26101
27902
  var RESPONSES_BUILTIN_ITEMS = /* @__PURE__ */ new Set(["web_search_call", "code_interpreter_call"]);
26102
27903
  function builtinCallFromResponsesItem(item) {
26103
27904
  const type = item.type;
26104
27905
  if (!RESPONSES_BUILTIN_ITEMS.has(type)) return null;
27906
+ const call = { tool: unifiedBuiltinTool(type) };
27907
+ if (typeof item.id === "string") call.id = item.id;
27908
+ if (type === "code_interpreter_call") {
27909
+ if (typeof item.code === "string") call.code = item.code;
27910
+ const output = codeOutputFromResponsesItem(item);
27911
+ if (output) call.output = output;
27912
+ } else if (type === "web_search_call") {
27913
+ const { query, url } = searchActionPayload(item);
27914
+ if (query) call.query = query;
27915
+ if (url) call.url = url;
27916
+ }
27917
+ return call;
27918
+ }
27919
+ function builtinEndPayload(call) {
26105
27920
  return {
26106
- tool: unifiedBuiltinTool(type),
26107
- ...typeof item.id === "string" ? { id: item.id } : {}
27921
+ ...call.id ? { id: call.id } : {},
27922
+ ...call.code ? { code: call.code } : {},
27923
+ ...call.output ? { output: call.output } : {},
27924
+ ...call.query ? { query: call.query } : {},
27925
+ ...call.url ? { url: call.url } : {}
26108
27926
  };
26109
27927
  }
27928
+ var IMAGE_EXTS = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"]);
27929
+ function fileExt(name) {
27930
+ const i = name.lastIndexOf(".");
27931
+ return i >= 0 ? name.slice(i + 1).toLowerCase() : "";
27932
+ }
27933
+ function isDisplayArtifact(c) {
27934
+ if (!c.filename) return false;
27935
+ const ext = fileExt(c.filename);
27936
+ return c.filename === `${c.fileId}.${ext}` && IMAGE_EXTS.has(ext) && c.span[0] === c.span[1];
27937
+ }
26110
27938
  function filesFromResponsesOutputItem(item) {
26111
27939
  const files = [];
26112
27940
  const type = item.type;
26113
27941
  if (type === "message") {
27942
+ const citations = [];
26114
27943
  for (const c of item.content ?? []) {
26115
27944
  if (c.type !== "output_text") continue;
26116
27945
  for (const a of c.annotations ?? []) {
26117
27946
  if (a.type === "container_file_citation" && typeof a.file_id === "string") {
26118
- files.push({
26119
- id: a.file_id,
26120
- ...typeof a.filename === "string" ? { name: a.filename } : {},
26121
- ...typeof a.container_id === "string" ? { ref: { containerId: a.container_id } } : {},
26122
- source: "code_execution"
27947
+ citations.push({
27948
+ fileId: a.file_id,
27949
+ filename: typeof a.filename === "string" ? a.filename : void 0,
27950
+ containerId: typeof a.container_id === "string" ? a.container_id : void 0,
27951
+ span: [Number(a.start_index) || 0, Number(a.end_index) || 0]
26123
27952
  });
26124
27953
  }
26125
27954
  }
26126
27955
  }
27956
+ const hasSavedImage = citations.some(
27957
+ (c) => !isDisplayArtifact(c) && IMAGE_EXTS.has(fileExt(c.filename ?? ""))
27958
+ );
27959
+ for (const c of citations) {
27960
+ if (hasSavedImage && isDisplayArtifact(c)) continue;
27961
+ files.push({
27962
+ id: c.fileId,
27963
+ ...c.filename ? { name: c.filename } : {},
27964
+ ...c.containerId ? { ref: { containerId: c.containerId } } : {},
27965
+ source: "code_execution"
27966
+ });
27967
+ }
26127
27968
  }
26128
27969
  if (type === "code_interpreter_call") {
26129
27970
  for (const out of item.outputs ?? []) {
@@ -26427,7 +28268,7 @@ var OpenAIResponsesAdapter = class {
26427
28268
  for (const file of this.filesFromOutputItem(item)) events.push({ type: "file", file });
26428
28269
  const builtin = builtinCallFromResponsesItem(item ?? {});
26429
28270
  if (builtin) {
26430
- events.push({ type: "builtin_tool_end", tool: builtin.tool, ...builtin.id ? { id: builtin.id } : {} });
28271
+ events.push({ type: "builtin_tool_end", tool: builtin.tool, ...builtinEndPayload(builtin) });
26431
28272
  }
26432
28273
  if (item?.type === "function_call") {
26433
28274
  events.push({ type: "tool_call_end", id: item.call_id ?? "" });
@@ -27065,6 +28906,14 @@ var XAIMediaAdapter = class {
27065
28906
  }
27066
28907
  };
27067
28908
 
28909
+ // src/llm/providers/xai/tiers.ts
28910
+ function xaiRequestTier(t) {
28911
+ if (!t) return void 0;
28912
+ if (t === "priority") return "priority";
28913
+ if (t === "standard" || t === "default") return "default";
28914
+ return void 0;
28915
+ }
28916
+
27068
28917
  // src/llm/providers/xai/responses.ts
27069
28918
  function xaiCodeExecFiles(item) {
27070
28919
  if (item.type !== "code_interpreter_call") return [];
@@ -27108,6 +28957,9 @@ var XAIResponsesAdapter = class extends OpenAIResponsesAdapter {
27108
28957
  if (!req.model.includes("multi-agent")) {
27109
28958
  delete body.reasoning;
27110
28959
  }
28960
+ const xaiTier = xaiRequestTier(req.serviceTier);
28961
+ if (xaiTier) body.service_tier = xaiTier;
28962
+ else delete body.service_tier;
27111
28963
  const usesCodeInterpreter = req.tools?.some(
27112
28964
  (t) => !isFunctionTool(t) && t.type === "code_interpreter"
27113
28965
  );
@@ -28326,6 +30178,7 @@ var AgentLoop = class _AgentLoop {
28326
30178
  let lastResponse = null;
28327
30179
  let reason = "done";
28328
30180
  let errorMsg;
30181
+ let caughtError;
28329
30182
  let guardrailTripReason;
28330
30183
  try {
28331
30184
  while (true) {
@@ -28374,7 +30227,11 @@ var AgentLoop = class _AgentLoop {
28374
30227
  totalLlmTimeMs += stepLatency;
28375
30228
  addUsage(totalUsage, lastResponse.usage);
28376
30229
  this._history.append(
28377
- { role: "assistant", content: lastResponse.content },
30230
+ buildAssistantMessage(lastResponse, {
30231
+ provider: this.client.provider,
30232
+ model: this.client.model,
30233
+ api: this.client.api
30234
+ }),
28378
30235
  { model: this.client.model, usage: lastResponse.usage, latencyMs: stepLatency }
28379
30236
  );
28380
30237
  const hasToolCalls = lastResponse.finishReason === "tool_use" && lastResponse.toolCalls.length > 0;
@@ -28428,6 +30285,7 @@ var AgentLoop = class _AgentLoop {
28428
30285
  } catch (e) {
28429
30286
  reason = "error";
28430
30287
  errorMsg = e instanceof Error ? e.message : String(e);
30288
+ caughtError = e;
28431
30289
  await this.hooks.emit("onRunError", {
28432
30290
  runId,
28433
30291
  agentId: this.id,
@@ -28478,6 +30336,7 @@ var AgentLoop = class _AgentLoop {
28478
30336
  totalToolTimeMs,
28479
30337
  runTrace
28480
30338
  });
30339
+ if (reason === "error") throw caughtError ?? new Error(errorMsg ?? "agent run failed");
28481
30340
  return finalResponse;
28482
30341
  }
28483
30342
  /** Run `complete` with a JSON Schema enforced via `structured`, then
@@ -28504,6 +30363,7 @@ var AgentLoop = class _AgentLoop {
28504
30363
  let lastResponse = null;
28505
30364
  let reason = "done";
28506
30365
  let errorMsg;
30366
+ let caughtError;
28507
30367
  let guardrailTripReason;
28508
30368
  try {
28509
30369
  while (true) {
@@ -28565,7 +30425,14 @@ var AgentLoop = class _AgentLoop {
28565
30425
  finalText = state.stepText;
28566
30426
  lastResponse = stepResponse;
28567
30427
  this._history.append(
28568
- { role: "assistant", content },
30428
+ {
30429
+ ...buildAssistantMessage(lastResponse, {
30430
+ provider: this.client.provider,
30431
+ model: this.client.model,
30432
+ api: this.client.api
30433
+ }),
30434
+ content
30435
+ },
28569
30436
  { model: this.client.model, usage: state.stepUsage, latencyMs: stepLatency }
28570
30437
  );
28571
30438
  const hasToolCalls = state.stepToolCalls.length > 0;
@@ -28627,6 +30494,7 @@ var AgentLoop = class _AgentLoop {
28627
30494
  } catch (e) {
28628
30495
  reason = "error";
28629
30496
  errorMsg = e instanceof Error ? e.message : String(e);
30497
+ caughtError = e;
28630
30498
  await this.hooks.emit("onRunError", {
28631
30499
  runId,
28632
30500
  agentId: this.id,
@@ -28675,6 +30543,7 @@ var AgentLoop = class _AgentLoop {
28675
30543
  totalToolTimeMs,
28676
30544
  runTrace
28677
30545
  });
30546
+ if (reason === "error") throw caughtError ?? new Error(errorMsg ?? "agent run failed");
28678
30547
  yield { type: "done", response: finalResponse };
28679
30548
  }
28680
30549
  /** Yield tool_call_start events for all tool calls in this step. */
@@ -37056,6 +38925,7 @@ var CAP_KEYS = {
37056
38925
  var BUILTIN_TOOL_KEYS = {
37057
38926
  search: "web_search",
37058
38927
  web_search: "web_search",
38928
+ web_fetch: "web_fetch",
37059
38929
  code_interpreter: "code_interpreter"
37060
38930
  };
37061
38931
  var KNOWN_KEYS = /* @__PURE__ */ new Set([
@@ -38605,6 +40475,7 @@ function createRetrieval(backend, config) {
38605
40475
  export {
38606
40476
  AgentBus,
38607
40477
  AgentLoop,
40478
+ AgentRunError,
38608
40479
  AnthropicAdapter,
38609
40480
  AnthropicBatchAdapter,
38610
40481
  AnthropicCountApi,
@@ -38660,6 +40531,7 @@ export {
38660
40531
  INPUT_SIZE_BUCKET_LABELS,
38661
40532
  InMemoryVectorStore,
38662
40533
  InternalToolRunner,
40534
+ InvalidFinalOutputError,
38663
40535
  JSON_API_SYSTEM_PROMPT,
38664
40536
  LAYER_AGENTLOOP_CONTEXT,
38665
40537
  LAYER_AGENTLOOP_SYSTEM,