@combycode/llm-sdk 1.5.1 → 1.6.0
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.
- package/CHANGELOG.md +99 -5
- package/dist/index.browser.js +2796 -919
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2796 -919
- package/dist/llm/client-internal.d.ts +11 -0
- package/dist/llm/output-errors.d.ts +24 -0
- package/dist/llm/providers/anthropic/messages.d.ts +5 -2
- package/dist/llm/providers/builtin-tools.d.ts +4 -1
- package/dist/llm/providers/google/interactions.d.ts +11 -1
- package/dist/llm/providers/xai/tiers.d.ts +12 -0
- package/dist/llm/types/options.d.ts +10 -0
- package/dist/llm/types/request.d.ts +6 -0
- package/dist/llm/types/response.d.ts +11 -1
- package/dist/llm/types/stream.d.ts +7 -1
- package/dist/llm/types/tools.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.browser.js
CHANGED
|
@@ -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:
|
|
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:
|
|
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
|
-
"
|
|
3459
|
+
"claude-fable-5"
|
|
3439
3460
|
],
|
|
3440
3461
|
pricing: {
|
|
3441
|
-
inputPerMTok:
|
|
3442
|
-
outputPerMTok:
|
|
3443
|
-
cacheReadPerMTok:
|
|
3462
|
+
inputPerMTok: 10,
|
|
3463
|
+
outputPerMTok: 50,
|
|
3464
|
+
cacheReadPerMTok: 1,
|
|
3444
3465
|
tiers: {
|
|
3445
3466
|
batch: {
|
|
3446
|
-
inputPerMTok:
|
|
3447
|
-
outputPerMTok:
|
|
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: "
|
|
3472
|
+
preferredApi: "messages",
|
|
3463
3473
|
supportedApis: [
|
|
3464
|
-
"
|
|
3474
|
+
"messages"
|
|
3465
3475
|
],
|
|
3466
|
-
contextWindow:
|
|
3467
|
-
maxOutput:
|
|
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:
|
|
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
|
-
"
|
|
3500
|
+
"pdf"
|
|
3491
3501
|
],
|
|
3492
3502
|
outputModalities: [
|
|
3493
3503
|
"text"
|
|
3494
3504
|
],
|
|
3495
|
-
family: "
|
|
3496
|
-
version: "
|
|
3505
|
+
family: "claude-fable",
|
|
3506
|
+
version: "5",
|
|
3497
3507
|
status: "stable",
|
|
3498
3508
|
active: true
|
|
3499
3509
|
},
|
|
3500
|
-
"
|
|
3501
|
-
providerModelName: "
|
|
3510
|
+
"anthropic/claude-sonnet-5": {
|
|
3511
|
+
providerModelName: "claude-sonnet-5",
|
|
3502
3512
|
aliases: [
|
|
3503
|
-
"
|
|
3513
|
+
"claude-sonnet-5"
|
|
3504
3514
|
],
|
|
3505
3515
|
pricing: {
|
|
3506
3516
|
inputPerMTok: 2,
|
|
3507
|
-
outputPerMTok:
|
|
3517
|
+
outputPerMTok: 10,
|
|
3508
3518
|
cacheReadPerMTok: 0.2,
|
|
3509
3519
|
tiers: {
|
|
3510
3520
|
batch: {
|
|
3511
3521
|
inputPerMTok: 1,
|
|
3512
|
-
outputPerMTok:
|
|
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: "
|
|
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
|
-
"
|
|
3528
|
+
"messages"
|
|
3578
3529
|
],
|
|
3579
|
-
contextWindow:
|
|
3580
|
-
maxOutput:
|
|
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:
|
|
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
|
-
"
|
|
3554
|
+
"pdf"
|
|
3604
3555
|
],
|
|
3605
3556
|
outputModalities: [
|
|
3606
3557
|
"text"
|
|
3607
3558
|
],
|
|
3608
|
-
family: "
|
|
3609
|
-
version: "
|
|
3610
|
-
status: "
|
|
3559
|
+
family: "claude-sonnet",
|
|
3560
|
+
version: "5",
|
|
3561
|
+
status: "stable",
|
|
3611
3562
|
active: true
|
|
3612
3563
|
},
|
|
3613
|
-
"
|
|
3614
|
-
providerModelName: "
|
|
3564
|
+
"anthropic/claude-mythos-5": {
|
|
3565
|
+
providerModelName: "claude-mythos-5",
|
|
3615
3566
|
aliases: [
|
|
3616
|
-
"
|
|
3567
|
+
"claude-mythos-5"
|
|
3617
3568
|
],
|
|
3618
3569
|
pricing: {
|
|
3619
|
-
inputPerMTok:
|
|
3620
|
-
outputPerMTok:
|
|
3621
|
-
cacheReadPerMTok:
|
|
3622
|
-
audioInputPerMTok: 1,
|
|
3570
|
+
inputPerMTok: 10,
|
|
3571
|
+
outputPerMTok: 50,
|
|
3572
|
+
cacheReadPerMTok: 1,
|
|
3623
3573
|
tiers: {
|
|
3624
3574
|
batch: {
|
|
3625
|
-
inputPerMTok:
|
|
3626
|
-
outputPerMTok:
|
|
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: "
|
|
3580
|
+
preferredApi: "messages",
|
|
3645
3581
|
supportedApis: [
|
|
3646
|
-
"
|
|
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:
|
|
3655
|
-
audio:
|
|
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:
|
|
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: "
|
|
3678
|
-
version: "
|
|
3609
|
+
family: "claude-mythos",
|
|
3610
|
+
version: "5",
|
|
3679
3611
|
status: "stable",
|
|
3680
|
-
active: true
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
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-
|
|
3622
|
+
"gemini-2.5-pro"
|
|
3686
3623
|
],
|
|
3687
3624
|
pricing: {
|
|
3688
|
-
inputPerMTok:
|
|
3689
|
-
outputPerMTok:
|
|
3690
|
-
cacheReadPerMTok: 0.
|
|
3691
|
-
audioInputPerMTok: 1,
|
|
3625
|
+
inputPerMTok: 1.25,
|
|
3626
|
+
outputPerMTok: 10,
|
|
3627
|
+
cacheReadPerMTok: 0.125,
|
|
3692
3628
|
tiers: {
|
|
3693
3629
|
batch: {
|
|
3694
|
-
inputPerMTok: 0.
|
|
3695
|
-
outputPerMTok:
|
|
3696
|
-
cacheReadPerMTok: 0.
|
|
3697
|
-
audioInputPerMTok: 0.5
|
|
3630
|
+
inputPerMTok: 0.625,
|
|
3631
|
+
outputPerMTok: 5,
|
|
3632
|
+
cacheReadPerMTok: 0.125
|
|
3698
3633
|
},
|
|
3699
3634
|
flex: {
|
|
3700
|
-
inputPerMTok: 0.
|
|
3701
|
-
outputPerMTok:
|
|
3702
|
-
cacheReadPerMTok: 0.
|
|
3703
|
-
audioInputPerMTok: 0.5
|
|
3635
|
+
inputPerMTok: 0.625,
|
|
3636
|
+
outputPerMTok: 5,
|
|
3637
|
+
cacheReadPerMTok: 0.125
|
|
3704
3638
|
},
|
|
3705
3639
|
priority: {
|
|
3706
|
-
inputPerMTok:
|
|
3707
|
-
outputPerMTok:
|
|
3708
|
-
cacheReadPerMTok: 0.
|
|
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-
|
|
3747
|
-
version: "
|
|
3748
|
-
status: "
|
|
3679
|
+
family: "gemini-pro",
|
|
3680
|
+
version: "2.5",
|
|
3681
|
+
status: "stable",
|
|
3749
3682
|
active: true
|
|
3750
3683
|
},
|
|
3751
|
-
"google/gemini-3.
|
|
3752
|
-
providerModelName: "gemini-3.
|
|
3684
|
+
"google/gemini-3.1-pro": {
|
|
3685
|
+
providerModelName: "gemini-3.1-pro-preview",
|
|
3753
3686
|
aliases: [
|
|
3754
|
-
"gemini-3.
|
|
3687
|
+
"gemini-3.1-pro-preview"
|
|
3755
3688
|
],
|
|
3756
3689
|
pricing: {
|
|
3757
|
-
inputPerMTok:
|
|
3758
|
-
outputPerMTok:
|
|
3759
|
-
cacheReadPerMTok: 0.
|
|
3690
|
+
inputPerMTok: 2,
|
|
3691
|
+
outputPerMTok: 12,
|
|
3692
|
+
cacheReadPerMTok: 0.2,
|
|
3760
3693
|
tiers: {
|
|
3761
3694
|
batch: {
|
|
3762
|
-
inputPerMTok:
|
|
3763
|
-
outputPerMTok:
|
|
3764
|
-
cacheReadPerMTok: 0.
|
|
3695
|
+
inputPerMTok: 1,
|
|
3696
|
+
outputPerMTok: 6,
|
|
3697
|
+
cacheReadPerMTok: 0.2
|
|
3765
3698
|
},
|
|
3766
3699
|
flex: {
|
|
3767
|
-
inputPerMTok:
|
|
3768
|
-
outputPerMTok:
|
|
3769
|
-
cacheReadPerMTok: 0.
|
|
3700
|
+
inputPerMTok: 1,
|
|
3701
|
+
outputPerMTok: 6,
|
|
3702
|
+
cacheReadPerMTok: 0.2
|
|
3770
3703
|
},
|
|
3771
3704
|
priority: {
|
|
3772
|
-
inputPerMTok:
|
|
3773
|
-
outputPerMTok:
|
|
3774
|
-
cacheReadPerMTok: 0.
|
|
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
|
},
|
|
@@ -4622,7 +4806,8 @@ var catalog_default2 = {
|
|
|
4622
4806
|
outputPerMTok: 4.5,
|
|
4623
4807
|
audioInputPerMTok: 3,
|
|
4624
4808
|
audioOutputPerMTok: 12,
|
|
4625
|
-
perMinute: 5e-3
|
|
4809
|
+
perMinute: 5e-3,
|
|
4810
|
+
perSecond: 2e-3
|
|
4626
4811
|
},
|
|
4627
4812
|
preferredApi: "generate",
|
|
4628
4813
|
supportedApis: [
|
|
@@ -4671,7 +4856,9 @@ var catalog_default2 = {
|
|
|
4671
4856
|
pricing: {
|
|
4672
4857
|
inputPerMTok: 3.5,
|
|
4673
4858
|
outputPerMTok: 21,
|
|
4674
|
-
perMinute: 53e-4
|
|
4859
|
+
perMinute: 53e-4,
|
|
4860
|
+
audioInputPerMTok: 53e-4,
|
|
4861
|
+
audioOutputPerMTok: 0.0315
|
|
4675
4862
|
},
|
|
4676
4863
|
preferredApi: "generate",
|
|
4677
4864
|
supportedApis: [
|
|
@@ -5245,7 +5432,8 @@ var catalog_default2 = {
|
|
|
5245
5432
|
"720p": 0.1,
|
|
5246
5433
|
"1080p": 0.12,
|
|
5247
5434
|
"4k": 0.3
|
|
5248
|
-
}
|
|
5435
|
+
},
|
|
5436
|
+
perSecond: 0.1
|
|
5249
5437
|
},
|
|
5250
5438
|
preferredApi: "generate",
|
|
5251
5439
|
supportedApis: [
|
|
@@ -5392,7 +5580,8 @@ var catalog_default2 = {
|
|
|
5392
5580
|
"720p": 0.1,
|
|
5393
5581
|
"1080p": 0.12,
|
|
5394
5582
|
"4k": 0.3
|
|
5395
|
-
}
|
|
5583
|
+
},
|
|
5584
|
+
perSecond: 0.1
|
|
5396
5585
|
},
|
|
5397
5586
|
preferredApi: "generate",
|
|
5398
5587
|
supportedApis: [
|
|
@@ -5463,8 +5652,10 @@ var catalog_default2 = {
|
|
|
5463
5652
|
pricing: {
|
|
5464
5653
|
perUnit: {
|
|
5465
5654
|
"720p": 0.05,
|
|
5466
|
-
"1080p": 0.08
|
|
5467
|
-
|
|
5655
|
+
"1080p": 0.08,
|
|
5656
|
+
"4k": 0
|
|
5657
|
+
},
|
|
5658
|
+
perSecond: 0.05
|
|
5468
5659
|
},
|
|
5469
5660
|
preferredApi: "generate",
|
|
5470
5661
|
supportedApis: [
|
|
@@ -5765,6 +5956,129 @@ var catalog_default2 = {
|
|
|
5765
5956
|
version: "1.6",
|
|
5766
5957
|
status: "preview",
|
|
5767
5958
|
active: true
|
|
5959
|
+
},
|
|
5960
|
+
"google/gemini-3.1-flash-lite-image": {
|
|
5961
|
+
providerModelName: "gemini-3.1-flash-lite-image",
|
|
5962
|
+
aliases: [
|
|
5963
|
+
"gemini-3.1-flash-lite-image"
|
|
5964
|
+
],
|
|
5965
|
+
pricing: {
|
|
5966
|
+
inputPerMTok: 0.25,
|
|
5967
|
+
outputPerMTok: 1.5,
|
|
5968
|
+
perUnit: {
|
|
5969
|
+
"1k": 0.0336
|
|
5970
|
+
}
|
|
5971
|
+
},
|
|
5972
|
+
preferredApi: "generate",
|
|
5973
|
+
supportedApis: [
|
|
5974
|
+
"generate"
|
|
5975
|
+
],
|
|
5976
|
+
contextWindow: 65536,
|
|
5977
|
+
maxOutput: 65536,
|
|
5978
|
+
capabilities: {
|
|
5979
|
+
toolUse: false,
|
|
5980
|
+
streaming: true,
|
|
5981
|
+
structuredOutput: false,
|
|
5982
|
+
vision: true,
|
|
5983
|
+
audio: false,
|
|
5984
|
+
video: false,
|
|
5985
|
+
imageGeneration: true,
|
|
5986
|
+
audioGeneration: false,
|
|
5987
|
+
videoGeneration: false
|
|
5988
|
+
},
|
|
5989
|
+
reasoning: {
|
|
5990
|
+
supported: true,
|
|
5991
|
+
automatic: false,
|
|
5992
|
+
effortControl: false,
|
|
5993
|
+
encryptedContent: false,
|
|
5994
|
+
summaryAvailable: false
|
|
5995
|
+
},
|
|
5996
|
+
type: "image",
|
|
5997
|
+
inputModalities: [
|
|
5998
|
+
"text",
|
|
5999
|
+
"image"
|
|
6000
|
+
],
|
|
6001
|
+
outputModalities: [
|
|
6002
|
+
"image"
|
|
6003
|
+
],
|
|
6004
|
+
family: "gemini-image",
|
|
6005
|
+
version: "3.1",
|
|
6006
|
+
status: "stable",
|
|
6007
|
+
active: true,
|
|
6008
|
+
mediaParams: {
|
|
6009
|
+
aspectRatio: {
|
|
6010
|
+
values: [
|
|
6011
|
+
"1:1",
|
|
6012
|
+
"1:4",
|
|
6013
|
+
"1:8",
|
|
6014
|
+
"2:3",
|
|
6015
|
+
"3:2",
|
|
6016
|
+
"3:4",
|
|
6017
|
+
"4:1",
|
|
6018
|
+
"4:3",
|
|
6019
|
+
"4:5",
|
|
6020
|
+
"5:4",
|
|
6021
|
+
"9:16",
|
|
6022
|
+
"16:9",
|
|
6023
|
+
"21:9"
|
|
6024
|
+
],
|
|
6025
|
+
default: "1:1"
|
|
6026
|
+
},
|
|
6027
|
+
imageSize: {
|
|
6028
|
+
values: [
|
|
6029
|
+
"512",
|
|
6030
|
+
"1K",
|
|
6031
|
+
"2K",
|
|
6032
|
+
"4K"
|
|
6033
|
+
],
|
|
6034
|
+
default: "1K"
|
|
6035
|
+
}
|
|
6036
|
+
}
|
|
6037
|
+
},
|
|
6038
|
+
"google/gemini-omni-flash": {
|
|
6039
|
+
providerModelName: "gemini-omni-flash-preview",
|
|
6040
|
+
aliases: [
|
|
6041
|
+
"gemini-omni-flash-preview"
|
|
6042
|
+
],
|
|
6043
|
+
pricing: {
|
|
6044
|
+
inputPerMTok: 1.5
|
|
6045
|
+
},
|
|
6046
|
+
preferredApi: "generate",
|
|
6047
|
+
supportedApis: [
|
|
6048
|
+
"generate"
|
|
6049
|
+
],
|
|
6050
|
+
contextWindow: 131072,
|
|
6051
|
+
maxOutput: 65536,
|
|
6052
|
+
capabilities: {
|
|
6053
|
+
toolUse: true,
|
|
6054
|
+
streaming: true,
|
|
6055
|
+
structuredOutput: true,
|
|
6056
|
+
vision: false,
|
|
6057
|
+
audio: true,
|
|
6058
|
+
video: false,
|
|
6059
|
+
imageGeneration: false,
|
|
6060
|
+
audioGeneration: false,
|
|
6061
|
+
videoGeneration: false
|
|
6062
|
+
},
|
|
6063
|
+
reasoning: {
|
|
6064
|
+
supported: false,
|
|
6065
|
+
automatic: false,
|
|
6066
|
+
effortControl: false,
|
|
6067
|
+
encryptedContent: false,
|
|
6068
|
+
summaryAvailable: false
|
|
6069
|
+
},
|
|
6070
|
+
type: "audio-chat",
|
|
6071
|
+
inputModalities: [
|
|
6072
|
+
"text",
|
|
6073
|
+
"audio"
|
|
6074
|
+
],
|
|
6075
|
+
outputModalities: [
|
|
6076
|
+
"text"
|
|
6077
|
+
],
|
|
6078
|
+
family: "gemini-audio",
|
|
6079
|
+
version: "1",
|
|
6080
|
+
status: "preview",
|
|
6081
|
+
active: true
|
|
5768
6082
|
}
|
|
5769
6083
|
};
|
|
5770
6084
|
|
|
@@ -7364,9 +7678,10 @@ var catalog_default3 = {
|
|
|
7364
7678
|
"gpt-4o-mini-2024-07-18"
|
|
7365
7679
|
],
|
|
7366
7680
|
pricing: {
|
|
7367
|
-
inputPerMTok:
|
|
7368
|
-
outputPerMTok:
|
|
7369
|
-
perMinute: 3e-3
|
|
7681
|
+
inputPerMTok: 0.15,
|
|
7682
|
+
outputPerMTok: 0.6,
|
|
7683
|
+
perMinute: 3e-3,
|
|
7684
|
+
cacheReadPerMTok: 0.075
|
|
7370
7685
|
},
|
|
7371
7686
|
preferredApi: "responses",
|
|
7372
7687
|
supportedApis: [
|
|
@@ -8019,8 +8334,8 @@ var catalog_default3 = {
|
|
|
8019
8334
|
"gpt-realtime-2025-08-28"
|
|
8020
8335
|
],
|
|
8021
8336
|
pricing: {
|
|
8022
|
-
inputPerMTok:
|
|
8023
|
-
outputPerMTok:
|
|
8337
|
+
inputPerMTok: 32,
|
|
8338
|
+
outputPerMTok: 64,
|
|
8024
8339
|
cacheReadPerMTok: 0.4,
|
|
8025
8340
|
audioInputPerMTok: 32,
|
|
8026
8341
|
audioOutputPerMTok: 64
|
|
@@ -8119,8 +8434,8 @@ var catalog_default3 = {
|
|
|
8119
8434
|
"gpt-realtime-2"
|
|
8120
8435
|
],
|
|
8121
8436
|
pricing: {
|
|
8122
|
-
inputPerMTok:
|
|
8123
|
-
outputPerMTok:
|
|
8437
|
+
inputPerMTok: 32,
|
|
8438
|
+
outputPerMTok: 64,
|
|
8124
8439
|
cacheReadPerMTok: 0.4,
|
|
8125
8440
|
audioInputPerMTok: 32,
|
|
8126
8441
|
audioOutputPerMTok: 64
|
|
@@ -8255,7 +8570,8 @@ var catalog_default3 = {
|
|
|
8255
8570
|
family: "gpt-realtime",
|
|
8256
8571
|
version: "1",
|
|
8257
8572
|
status: "stable",
|
|
8258
|
-
active: true
|
|
8573
|
+
active: true,
|
|
8574
|
+
contextWindow: 128e3
|
|
8259
8575
|
},
|
|
8260
8576
|
"openai/gpt-realtime-whisper": {
|
|
8261
8577
|
providerModelName: "gpt-realtime-whisper",
|
|
@@ -8298,7 +8614,8 @@ var catalog_default3 = {
|
|
|
8298
8614
|
family: "gpt-realtime",
|
|
8299
8615
|
version: "1",
|
|
8300
8616
|
status: "stable",
|
|
8301
|
-
active: true
|
|
8617
|
+
active: true,
|
|
8618
|
+
contextWindow: 128e3
|
|
8302
8619
|
},
|
|
8303
8620
|
"openai/o1": {
|
|
8304
8621
|
providerModelName: "o1",
|
|
@@ -8407,7 +8724,8 @@ var catalog_default3 = {
|
|
|
8407
8724
|
},
|
|
8408
8725
|
preferredApi: "responses",
|
|
8409
8726
|
supportedApis: [
|
|
8410
|
-
"responses"
|
|
8727
|
+
"responses",
|
|
8728
|
+
"completions"
|
|
8411
8729
|
],
|
|
8412
8730
|
contextWindow: 2e5,
|
|
8413
8731
|
maxOutput: 1e5,
|
|
@@ -8541,9 +8859,9 @@ var catalog_default3 = {
|
|
|
8541
8859
|
"o4-mini-2025-04-16"
|
|
8542
8860
|
],
|
|
8543
8861
|
pricing: {
|
|
8544
|
-
inputPerMTok:
|
|
8545
|
-
outputPerMTok:
|
|
8546
|
-
cacheReadPerMTok:
|
|
8862
|
+
inputPerMTok: 1.1,
|
|
8863
|
+
outputPerMTok: 4.4,
|
|
8864
|
+
cacheReadPerMTok: 0.275,
|
|
8547
8865
|
tiers: {
|
|
8548
8866
|
batch: {
|
|
8549
8867
|
inputPerMTok: 2,
|
|
@@ -8880,167 +9198,171 @@ var catalog_default3 = {
|
|
|
8880
9198
|
"tts-1",
|
|
8881
9199
|
"tts-1-1106"
|
|
8882
9200
|
],
|
|
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
9201
|
pricing: {
|
|
9041
|
-
|
|
9042
|
-
|
|
9043
|
-
|
|
9202
|
+
perMChars: 15
|
|
9203
|
+
},
|
|
9204
|
+
preferredApi: "responses",
|
|
9205
|
+
supportedApis: [
|
|
9206
|
+
"responses",
|
|
9207
|
+
"completions"
|
|
9208
|
+
],
|
|
9209
|
+
capabilities: {
|
|
9210
|
+
toolUse: false,
|
|
9211
|
+
streaming: true,
|
|
9212
|
+
structuredOutput: false,
|
|
9213
|
+
vision: false,
|
|
9214
|
+
audio: false,
|
|
9215
|
+
video: false,
|
|
9216
|
+
imageGeneration: false,
|
|
9217
|
+
audioGeneration: true,
|
|
9218
|
+
videoGeneration: false
|
|
9219
|
+
},
|
|
9220
|
+
reasoning: {
|
|
9221
|
+
supported: false,
|
|
9222
|
+
automatic: false,
|
|
9223
|
+
effortControl: false,
|
|
9224
|
+
encryptedContent: false,
|
|
9225
|
+
summaryAvailable: false
|
|
9226
|
+
},
|
|
9227
|
+
type: "tts",
|
|
9228
|
+
inputModalities: [
|
|
9229
|
+
"text"
|
|
9230
|
+
],
|
|
9231
|
+
outputModalities: [
|
|
9232
|
+
"audio"
|
|
9233
|
+
],
|
|
9234
|
+
family: "tts",
|
|
9235
|
+
version: "1",
|
|
9236
|
+
status: "legacy",
|
|
9237
|
+
active: true,
|
|
9238
|
+
mediaParams: {
|
|
9239
|
+
voice: {
|
|
9240
|
+
values: [
|
|
9241
|
+
"alloy",
|
|
9242
|
+
"ash",
|
|
9243
|
+
"ballad",
|
|
9244
|
+
"coral",
|
|
9245
|
+
"echo",
|
|
9246
|
+
"fable",
|
|
9247
|
+
"onyx",
|
|
9248
|
+
"nova",
|
|
9249
|
+
"sage",
|
|
9250
|
+
"shimmer",
|
|
9251
|
+
"verse",
|
|
9252
|
+
"marin",
|
|
9253
|
+
"cedar"
|
|
9254
|
+
],
|
|
9255
|
+
default: "alloy"
|
|
9256
|
+
},
|
|
9257
|
+
format: {
|
|
9258
|
+
values: [
|
|
9259
|
+
"mp3",
|
|
9260
|
+
"opus",
|
|
9261
|
+
"aac",
|
|
9262
|
+
"flac",
|
|
9263
|
+
"wav",
|
|
9264
|
+
"pcm"
|
|
9265
|
+
],
|
|
9266
|
+
default: "mp3"
|
|
9267
|
+
},
|
|
9268
|
+
speed: {
|
|
9269
|
+
min: 0.25,
|
|
9270
|
+
max: 4,
|
|
9271
|
+
default: 1
|
|
9272
|
+
}
|
|
9273
|
+
}
|
|
9274
|
+
},
|
|
9275
|
+
"openai/tts-1-hd": {
|
|
9276
|
+
providerModelName: "tts-1-hd",
|
|
9277
|
+
aliases: [
|
|
9278
|
+
"tts-1-hd",
|
|
9279
|
+
"tts-1-hd-1106"
|
|
9280
|
+
],
|
|
9281
|
+
pricing: {
|
|
9282
|
+
perMChars: 30
|
|
9283
|
+
},
|
|
9284
|
+
preferredApi: "responses",
|
|
9285
|
+
supportedApis: [
|
|
9286
|
+
"responses",
|
|
9287
|
+
"completions"
|
|
9288
|
+
],
|
|
9289
|
+
capabilities: {
|
|
9290
|
+
toolUse: false,
|
|
9291
|
+
streaming: true,
|
|
9292
|
+
structuredOutput: false,
|
|
9293
|
+
vision: false,
|
|
9294
|
+
audio: false,
|
|
9295
|
+
video: false,
|
|
9296
|
+
imageGeneration: false,
|
|
9297
|
+
audioGeneration: true,
|
|
9298
|
+
videoGeneration: false
|
|
9299
|
+
},
|
|
9300
|
+
reasoning: {
|
|
9301
|
+
supported: false,
|
|
9302
|
+
automatic: false,
|
|
9303
|
+
effortControl: false,
|
|
9304
|
+
encryptedContent: false,
|
|
9305
|
+
summaryAvailable: false
|
|
9306
|
+
},
|
|
9307
|
+
type: "tts",
|
|
9308
|
+
inputModalities: [
|
|
9309
|
+
"text"
|
|
9310
|
+
],
|
|
9311
|
+
outputModalities: [
|
|
9312
|
+
"audio"
|
|
9313
|
+
],
|
|
9314
|
+
family: "tts",
|
|
9315
|
+
version: "1",
|
|
9316
|
+
status: "legacy",
|
|
9317
|
+
active: true,
|
|
9318
|
+
mediaParams: {
|
|
9319
|
+
voice: {
|
|
9320
|
+
values: [
|
|
9321
|
+
"alloy",
|
|
9322
|
+
"ash",
|
|
9323
|
+
"ballad",
|
|
9324
|
+
"coral",
|
|
9325
|
+
"echo",
|
|
9326
|
+
"fable",
|
|
9327
|
+
"onyx",
|
|
9328
|
+
"nova",
|
|
9329
|
+
"sage",
|
|
9330
|
+
"shimmer",
|
|
9331
|
+
"verse",
|
|
9332
|
+
"marin",
|
|
9333
|
+
"cedar"
|
|
9334
|
+
],
|
|
9335
|
+
default: "alloy"
|
|
9336
|
+
},
|
|
9337
|
+
format: {
|
|
9338
|
+
values: [
|
|
9339
|
+
"mp3",
|
|
9340
|
+
"opus",
|
|
9341
|
+
"aac",
|
|
9342
|
+
"flac",
|
|
9343
|
+
"wav",
|
|
9344
|
+
"pcm"
|
|
9345
|
+
],
|
|
9346
|
+
default: "mp3"
|
|
9347
|
+
},
|
|
9348
|
+
speed: {
|
|
9349
|
+
min: 0.25,
|
|
9350
|
+
max: 4,
|
|
9351
|
+
default: 1
|
|
9352
|
+
}
|
|
9353
|
+
}
|
|
9354
|
+
},
|
|
9355
|
+
"openai/gpt-4o-mini-tts": {
|
|
9356
|
+
providerModelName: "gpt-4o-mini-tts",
|
|
9357
|
+
aliases: [
|
|
9358
|
+
"gpt-4o-mini-tts",
|
|
9359
|
+
"gpt-4o-mini-tts-2025-03-20",
|
|
9360
|
+
"gpt-4o-mini-tts-2025-12-15"
|
|
9361
|
+
],
|
|
9362
|
+
pricing: {
|
|
9363
|
+
inputPerMTok: 2.5,
|
|
9364
|
+
outputPerMTok: 10,
|
|
9365
|
+
audioOutputPerMTok: 12
|
|
9044
9366
|
},
|
|
9045
9367
|
preferredApi: "responses",
|
|
9046
9368
|
supportedApis: [
|
|
@@ -9118,7 +9440,9 @@ var catalog_default3 = {
|
|
|
9118
9440
|
aliases: [
|
|
9119
9441
|
"whisper-1"
|
|
9120
9442
|
],
|
|
9121
|
-
pricing: {
|
|
9443
|
+
pricing: {
|
|
9444
|
+
perMinute: 6e-3
|
|
9445
|
+
},
|
|
9122
9446
|
preferredApi: "responses",
|
|
9123
9447
|
supportedApis: [
|
|
9124
9448
|
"responses",
|
|
@@ -9152,7 +9476,8 @@ var catalog_default3 = {
|
|
|
9152
9476
|
family: "whisper",
|
|
9153
9477
|
version: "1",
|
|
9154
9478
|
status: "legacy",
|
|
9155
|
-
active: true
|
|
9479
|
+
active: true,
|
|
9480
|
+
contextWindow: 16e3
|
|
9156
9481
|
},
|
|
9157
9482
|
"openai/gpt-4o-transcribe": {
|
|
9158
9483
|
providerModelName: "gpt-4o-transcribe",
|
|
@@ -9344,6 +9669,300 @@ var catalog_default3 = {
|
|
|
9344
9669
|
version: "1",
|
|
9345
9670
|
status: "stable",
|
|
9346
9671
|
active: true
|
|
9672
|
+
},
|
|
9673
|
+
"openai/gpt-realtime-2.1-mini": {
|
|
9674
|
+
providerModelName: "gpt-realtime-2.1-mini",
|
|
9675
|
+
aliases: [
|
|
9676
|
+
"gpt-realtime-2.1-mini"
|
|
9677
|
+
],
|
|
9678
|
+
pricing: {
|
|
9679
|
+
inputPerMTok: 10,
|
|
9680
|
+
cacheReadPerMTok: 0.3,
|
|
9681
|
+
outputPerMTok: 20
|
|
9682
|
+
},
|
|
9683
|
+
preferredApi: "responses",
|
|
9684
|
+
supportedApis: [
|
|
9685
|
+
"responses",
|
|
9686
|
+
"completions"
|
|
9687
|
+
],
|
|
9688
|
+
contextWindow: 128e3,
|
|
9689
|
+
maxOutput: 4096,
|
|
9690
|
+
capabilities: {
|
|
9691
|
+
toolUse: true,
|
|
9692
|
+
streaming: true,
|
|
9693
|
+
structuredOutput: false,
|
|
9694
|
+
vision: false,
|
|
9695
|
+
audio: true,
|
|
9696
|
+
video: false,
|
|
9697
|
+
imageGeneration: false,
|
|
9698
|
+
audioGeneration: false,
|
|
9699
|
+
videoGeneration: false
|
|
9700
|
+
},
|
|
9701
|
+
reasoning: {
|
|
9702
|
+
supported: false,
|
|
9703
|
+
automatic: false,
|
|
9704
|
+
effortControl: false,
|
|
9705
|
+
encryptedContent: false,
|
|
9706
|
+
summaryAvailable: false
|
|
9707
|
+
},
|
|
9708
|
+
type: "realtime",
|
|
9709
|
+
inputModalities: [
|
|
9710
|
+
"text",
|
|
9711
|
+
"audio"
|
|
9712
|
+
],
|
|
9713
|
+
outputModalities: [
|
|
9714
|
+
"text"
|
|
9715
|
+
],
|
|
9716
|
+
family: "gpt-realtime",
|
|
9717
|
+
version: "2.1",
|
|
9718
|
+
status: "stable",
|
|
9719
|
+
active: true
|
|
9720
|
+
},
|
|
9721
|
+
"openai/gpt-realtime-2.1": {
|
|
9722
|
+
providerModelName: "gpt-realtime-2.1",
|
|
9723
|
+
aliases: [
|
|
9724
|
+
"gpt-realtime-2.1"
|
|
9725
|
+
],
|
|
9726
|
+
pricing: {
|
|
9727
|
+
inputPerMTok: 32,
|
|
9728
|
+
cacheReadPerMTok: 0.4,
|
|
9729
|
+
outputPerMTok: 64
|
|
9730
|
+
},
|
|
9731
|
+
preferredApi: "responses",
|
|
9732
|
+
supportedApis: [
|
|
9733
|
+
"responses",
|
|
9734
|
+
"completions"
|
|
9735
|
+
],
|
|
9736
|
+
contextWindow: 128e3,
|
|
9737
|
+
maxOutput: 32e3,
|
|
9738
|
+
capabilities: {
|
|
9739
|
+
toolUse: true,
|
|
9740
|
+
streaming: true,
|
|
9741
|
+
structuredOutput: false,
|
|
9742
|
+
vision: false,
|
|
9743
|
+
audio: true,
|
|
9744
|
+
video: false,
|
|
9745
|
+
imageGeneration: false,
|
|
9746
|
+
audioGeneration: false,
|
|
9747
|
+
videoGeneration: false
|
|
9748
|
+
},
|
|
9749
|
+
reasoning: {
|
|
9750
|
+
supported: false,
|
|
9751
|
+
automatic: false,
|
|
9752
|
+
effortControl: false,
|
|
9753
|
+
encryptedContent: false,
|
|
9754
|
+
summaryAvailable: false
|
|
9755
|
+
},
|
|
9756
|
+
type: "realtime",
|
|
9757
|
+
inputModalities: [
|
|
9758
|
+
"text",
|
|
9759
|
+
"audio"
|
|
9760
|
+
],
|
|
9761
|
+
outputModalities: [
|
|
9762
|
+
"text"
|
|
9763
|
+
],
|
|
9764
|
+
family: "gpt-realtime",
|
|
9765
|
+
version: "2.1",
|
|
9766
|
+
status: "stable",
|
|
9767
|
+
active: true
|
|
9768
|
+
},
|
|
9769
|
+
"openai/gpt-5.6-sol": {
|
|
9770
|
+
providerModelName: "gpt-5.6-sol",
|
|
9771
|
+
aliases: [
|
|
9772
|
+
"gpt-5.6-sol"
|
|
9773
|
+
],
|
|
9774
|
+
pricing: {
|
|
9775
|
+
inputPerMTok: 5,
|
|
9776
|
+
outputPerMTok: 30,
|
|
9777
|
+
cacheReadPerMTok: 0.5,
|
|
9778
|
+
tiers: {
|
|
9779
|
+
batch: {
|
|
9780
|
+
inputPerMTok: 2.5,
|
|
9781
|
+
outputPerMTok: 15,
|
|
9782
|
+
cacheReadPerMTok: 0.25
|
|
9783
|
+
},
|
|
9784
|
+
flex: {
|
|
9785
|
+
inputPerMTok: 2.5,
|
|
9786
|
+
outputPerMTok: 15,
|
|
9787
|
+
cacheReadPerMTok: 0.25
|
|
9788
|
+
},
|
|
9789
|
+
priority: {
|
|
9790
|
+
inputPerMTok: 10,
|
|
9791
|
+
outputPerMTok: 60,
|
|
9792
|
+
cacheReadPerMTok: 1
|
|
9793
|
+
}
|
|
9794
|
+
}
|
|
9795
|
+
},
|
|
9796
|
+
preferredApi: "responses",
|
|
9797
|
+
supportedApis: [
|
|
9798
|
+
"responses",
|
|
9799
|
+
"completions"
|
|
9800
|
+
],
|
|
9801
|
+
contextWindow: 105e4,
|
|
9802
|
+
maxOutput: 128e3,
|
|
9803
|
+
capabilities: {
|
|
9804
|
+
toolUse: true,
|
|
9805
|
+
streaming: true,
|
|
9806
|
+
structuredOutput: true,
|
|
9807
|
+
vision: true,
|
|
9808
|
+
audio: false,
|
|
9809
|
+
video: false,
|
|
9810
|
+
imageGeneration: false,
|
|
9811
|
+
audioGeneration: false,
|
|
9812
|
+
videoGeneration: false,
|
|
9813
|
+
webSearch: true
|
|
9814
|
+
},
|
|
9815
|
+
reasoning: {
|
|
9816
|
+
supported: true,
|
|
9817
|
+
automatic: false,
|
|
9818
|
+
effortControl: false,
|
|
9819
|
+
encryptedContent: false,
|
|
9820
|
+
summaryAvailable: false
|
|
9821
|
+
},
|
|
9822
|
+
type: "chat",
|
|
9823
|
+
inputModalities: [
|
|
9824
|
+
"text",
|
|
9825
|
+
"image"
|
|
9826
|
+
],
|
|
9827
|
+
outputModalities: [
|
|
9828
|
+
"text"
|
|
9829
|
+
],
|
|
9830
|
+
family: "gpt-sol",
|
|
9831
|
+
version: "5.6",
|
|
9832
|
+
status: "stable",
|
|
9833
|
+
active: true
|
|
9834
|
+
},
|
|
9835
|
+
"openai/gpt-5.6-terra": {
|
|
9836
|
+
providerModelName: "gpt-5.6-terra",
|
|
9837
|
+
aliases: [
|
|
9838
|
+
"gpt-5.6-terra"
|
|
9839
|
+
],
|
|
9840
|
+
pricing: {
|
|
9841
|
+
inputPerMTok: 2.5,
|
|
9842
|
+
outputPerMTok: 15,
|
|
9843
|
+
cacheReadPerMTok: 0.25,
|
|
9844
|
+
tiers: {
|
|
9845
|
+
batch: {
|
|
9846
|
+
inputPerMTok: 1.25,
|
|
9847
|
+
outputPerMTok: 7.5,
|
|
9848
|
+
cacheReadPerMTok: 0.125
|
|
9849
|
+
},
|
|
9850
|
+
flex: {
|
|
9851
|
+
inputPerMTok: 1.25,
|
|
9852
|
+
outputPerMTok: 7.5,
|
|
9853
|
+
cacheReadPerMTok: 0.125
|
|
9854
|
+
},
|
|
9855
|
+
priority: {
|
|
9856
|
+
inputPerMTok: 5,
|
|
9857
|
+
outputPerMTok: 30,
|
|
9858
|
+
cacheReadPerMTok: 0.5
|
|
9859
|
+
}
|
|
9860
|
+
}
|
|
9861
|
+
},
|
|
9862
|
+
preferredApi: "responses",
|
|
9863
|
+
supportedApis: [
|
|
9864
|
+
"responses",
|
|
9865
|
+
"completions"
|
|
9866
|
+
],
|
|
9867
|
+
contextWindow: 105e4,
|
|
9868
|
+
maxOutput: 128e3,
|
|
9869
|
+
capabilities: {
|
|
9870
|
+
toolUse: true,
|
|
9871
|
+
streaming: true,
|
|
9872
|
+
structuredOutput: true,
|
|
9873
|
+
vision: true,
|
|
9874
|
+
audio: false,
|
|
9875
|
+
video: false,
|
|
9876
|
+
imageGeneration: false,
|
|
9877
|
+
audioGeneration: false,
|
|
9878
|
+
videoGeneration: false,
|
|
9879
|
+
webSearch: true
|
|
9880
|
+
},
|
|
9881
|
+
reasoning: {
|
|
9882
|
+
supported: true,
|
|
9883
|
+
automatic: false,
|
|
9884
|
+
effortControl: false,
|
|
9885
|
+
encryptedContent: false,
|
|
9886
|
+
summaryAvailable: false
|
|
9887
|
+
},
|
|
9888
|
+
type: "chat",
|
|
9889
|
+
inputModalities: [
|
|
9890
|
+
"text",
|
|
9891
|
+
"image"
|
|
9892
|
+
],
|
|
9893
|
+
outputModalities: [
|
|
9894
|
+
"text"
|
|
9895
|
+
],
|
|
9896
|
+
family: "gpt-terra",
|
|
9897
|
+
version: "5.6",
|
|
9898
|
+
status: "stable",
|
|
9899
|
+
active: true
|
|
9900
|
+
},
|
|
9901
|
+
"openai/gpt-5.6-luna": {
|
|
9902
|
+
providerModelName: "gpt-5.6-luna",
|
|
9903
|
+
aliases: [
|
|
9904
|
+
"gpt-5.6-luna"
|
|
9905
|
+
],
|
|
9906
|
+
pricing: {
|
|
9907
|
+
inputPerMTok: 1,
|
|
9908
|
+
outputPerMTok: 6,
|
|
9909
|
+
cacheReadPerMTok: 0.1,
|
|
9910
|
+
tiers: {
|
|
9911
|
+
batch: {
|
|
9912
|
+
inputPerMTok: 0.5,
|
|
9913
|
+
outputPerMTok: 3,
|
|
9914
|
+
cacheReadPerMTok: 0.05
|
|
9915
|
+
},
|
|
9916
|
+
flex: {
|
|
9917
|
+
inputPerMTok: 0.5,
|
|
9918
|
+
outputPerMTok: 3,
|
|
9919
|
+
cacheReadPerMTok: 0.05
|
|
9920
|
+
},
|
|
9921
|
+
priority: {
|
|
9922
|
+
inputPerMTok: 2,
|
|
9923
|
+
outputPerMTok: 12,
|
|
9924
|
+
cacheReadPerMTok: 0.2
|
|
9925
|
+
}
|
|
9926
|
+
}
|
|
9927
|
+
},
|
|
9928
|
+
preferredApi: "responses",
|
|
9929
|
+
supportedApis: [
|
|
9930
|
+
"responses",
|
|
9931
|
+
"completions"
|
|
9932
|
+
],
|
|
9933
|
+
contextWindow: 105e4,
|
|
9934
|
+
maxOutput: 128e3,
|
|
9935
|
+
capabilities: {
|
|
9936
|
+
toolUse: true,
|
|
9937
|
+
streaming: true,
|
|
9938
|
+
structuredOutput: true,
|
|
9939
|
+
vision: true,
|
|
9940
|
+
audio: false,
|
|
9941
|
+
video: false,
|
|
9942
|
+
imageGeneration: false,
|
|
9943
|
+
audioGeneration: false,
|
|
9944
|
+
videoGeneration: false,
|
|
9945
|
+
webSearch: true
|
|
9946
|
+
},
|
|
9947
|
+
reasoning: {
|
|
9948
|
+
supported: true,
|
|
9949
|
+
automatic: false,
|
|
9950
|
+
effortControl: false,
|
|
9951
|
+
encryptedContent: false,
|
|
9952
|
+
summaryAvailable: false
|
|
9953
|
+
},
|
|
9954
|
+
type: "chat",
|
|
9955
|
+
inputModalities: [
|
|
9956
|
+
"text",
|
|
9957
|
+
"image"
|
|
9958
|
+
],
|
|
9959
|
+
outputModalities: [
|
|
9960
|
+
"text"
|
|
9961
|
+
],
|
|
9962
|
+
family: "gpt-luna",
|
|
9963
|
+
version: "5.6",
|
|
9964
|
+
status: "stable",
|
|
9965
|
+
active: true
|
|
9347
9966
|
}
|
|
9348
9967
|
};
|
|
9349
9968
|
|
|
@@ -9451,7 +10070,7 @@ var catalog_default4 = {
|
|
|
9451
10070
|
supportedApis: [
|
|
9452
10071
|
"completions"
|
|
9453
10072
|
],
|
|
9454
|
-
contextWindow:
|
|
10073
|
+
contextWindow: 1e6,
|
|
9455
10074
|
capabilities: {
|
|
9456
10075
|
toolUse: false,
|
|
9457
10076
|
streaming: true,
|
|
@@ -9810,7 +10429,7 @@ var catalog_default4 = {
|
|
|
9810
10429
|
capabilities: {
|
|
9811
10430
|
toolUse: false,
|
|
9812
10431
|
streaming: true,
|
|
9813
|
-
structuredOutput:
|
|
10432
|
+
structuredOutput: true,
|
|
9814
10433
|
vision: false,
|
|
9815
10434
|
audio: false,
|
|
9816
10435
|
video: false,
|
|
@@ -12410,7 +13029,7 @@ var catalog_default4 = {
|
|
|
12410
13029
|
"openai/gpt-oss-120b:free"
|
|
12411
13030
|
],
|
|
12412
13031
|
pricing: {
|
|
12413
|
-
inputPerMTok: 0.
|
|
13032
|
+
inputPerMTok: 0.036,
|
|
12414
13033
|
outputPerMTok: 0.18
|
|
12415
13034
|
},
|
|
12416
13035
|
preferredApi: "completions",
|
|
@@ -13461,7 +14080,8 @@ var catalog_default4 = {
|
|
|
13461
14080
|
"openrouter/gemini-3-pro-image": {
|
|
13462
14081
|
providerModelName: "google/gemini-3-pro-image-preview",
|
|
13463
14082
|
aliases: [
|
|
13464
|
-
"google/gemini-3-pro-image-preview"
|
|
14083
|
+
"google/gemini-3-pro-image-preview",
|
|
14084
|
+
"google/gemini-3-pro-image"
|
|
13465
14085
|
],
|
|
13466
14086
|
pricing: {
|
|
13467
14087
|
inputPerMTok: 2,
|
|
@@ -13533,7 +14153,8 @@ var catalog_default4 = {
|
|
|
13533
14153
|
"openrouter/gemini-3.1-flash-image": {
|
|
13534
14154
|
providerModelName: "google/gemini-3.1-flash-image-preview",
|
|
13535
14155
|
aliases: [
|
|
13536
|
-
"google/gemini-3.1-flash-image-preview"
|
|
14156
|
+
"google/gemini-3.1-flash-image-preview",
|
|
14157
|
+
"google/gemini-3.1-flash-image"
|
|
13537
14158
|
],
|
|
13538
14159
|
pricing: {
|
|
13539
14160
|
inputPerMTok: 0.5,
|
|
@@ -14066,8 +14687,8 @@ var catalog_default4 = {
|
|
|
14066
14687
|
"x-ai/grok-4.20-multi-agent"
|
|
14067
14688
|
],
|
|
14068
14689
|
pricing: {
|
|
14069
|
-
inputPerMTok:
|
|
14070
|
-
outputPerMTok:
|
|
14690
|
+
inputPerMTok: 1.25,
|
|
14691
|
+
outputPerMTok: 2.5,
|
|
14071
14692
|
cacheReadPerMTok: 0.2
|
|
14072
14693
|
},
|
|
14073
14694
|
preferredApi: "completions",
|
|
@@ -14249,8 +14870,8 @@ var catalog_default4 = {
|
|
|
14249
14870
|
"deepseek/deepseek-chat-v3-0324"
|
|
14250
14871
|
],
|
|
14251
14872
|
pricing: {
|
|
14252
|
-
inputPerMTok: 0.
|
|
14253
|
-
outputPerMTok: 0.
|
|
14873
|
+
inputPerMTok: 0.24,
|
|
14874
|
+
outputPerMTok: 0.9,
|
|
14254
14875
|
cacheReadPerMTok: 0.135
|
|
14255
14876
|
},
|
|
14256
14877
|
preferredApi: "completions",
|
|
@@ -14343,8 +14964,9 @@ var catalog_default4 = {
|
|
|
14343
14964
|
"deepseek/deepseek-v3.2-exp"
|
|
14344
14965
|
],
|
|
14345
14966
|
pricing: {
|
|
14346
|
-
inputPerMTok: 0.
|
|
14347
|
-
outputPerMTok: 0.
|
|
14967
|
+
inputPerMTok: 0.2145,
|
|
14968
|
+
outputPerMTok: 0.32175,
|
|
14969
|
+
cacheReadPerMTok: 0.02145
|
|
14348
14970
|
},
|
|
14349
14971
|
preferredApi: "completions",
|
|
14350
14972
|
supportedApis: [
|
|
@@ -14388,9 +15010,9 @@ var catalog_default4 = {
|
|
|
14388
15010
|
"deepseek/deepseek-v4-flash"
|
|
14389
15011
|
],
|
|
14390
15012
|
pricing: {
|
|
14391
|
-
inputPerMTok: 0.
|
|
14392
|
-
outputPerMTok: 0.
|
|
14393
|
-
cacheReadPerMTok: 0.
|
|
15013
|
+
inputPerMTok: 0.077,
|
|
15014
|
+
outputPerMTok: 0.154,
|
|
15015
|
+
cacheReadPerMTok: 0.0154
|
|
14394
15016
|
},
|
|
14395
15017
|
preferredApi: "completions",
|
|
14396
15018
|
supportedApis: [
|
|
@@ -14752,8 +15374,8 @@ var catalog_default4 = {
|
|
|
14752
15374
|
"qwen/qwen3-8b"
|
|
14753
15375
|
],
|
|
14754
15376
|
pricing: {
|
|
14755
|
-
inputPerMTok: 0.
|
|
14756
|
-
outputPerMTok: 0.
|
|
15377
|
+
inputPerMTok: 0.117,
|
|
15378
|
+
outputPerMTok: 0.455,
|
|
14757
15379
|
cacheReadPerMTok: 0.05
|
|
14758
15380
|
},
|
|
14759
15381
|
preferredApi: "completions",
|
|
@@ -15214,14 +15836,15 @@ var catalog_default4 = {
|
|
|
15214
15836
|
"qwen/qwen3.5-397b-a17b"
|
|
15215
15837
|
],
|
|
15216
15838
|
pricing: {
|
|
15217
|
-
inputPerMTok: 0.
|
|
15218
|
-
outputPerMTok: 2.
|
|
15839
|
+
inputPerMTok: 0.385,
|
|
15840
|
+
outputPerMTok: 2.45,
|
|
15841
|
+
cacheReadPerMTok: 0.111
|
|
15219
15842
|
},
|
|
15220
15843
|
preferredApi: "completions",
|
|
15221
15844
|
supportedApis: [
|
|
15222
15845
|
"completions"
|
|
15223
15846
|
],
|
|
15224
|
-
contextWindow:
|
|
15847
|
+
contextWindow: 256e3,
|
|
15225
15848
|
maxOutput: 65536,
|
|
15226
15849
|
capabilities: {
|
|
15227
15850
|
toolUse: true,
|
|
@@ -15260,8 +15883,9 @@ var catalog_default4 = {
|
|
|
15260
15883
|
"qwen/qwen3.6-27b"
|
|
15261
15884
|
],
|
|
15262
15885
|
pricing: {
|
|
15263
|
-
inputPerMTok: 0.
|
|
15264
|
-
outputPerMTok:
|
|
15886
|
+
inputPerMTok: 0.285,
|
|
15887
|
+
outputPerMTok: 2.4,
|
|
15888
|
+
cacheReadPerMTok: 0.15
|
|
15265
15889
|
},
|
|
15266
15890
|
preferredApi: "completions",
|
|
15267
15891
|
supportedApis: [
|
|
@@ -15306,7 +15930,7 @@ var catalog_default4 = {
|
|
|
15306
15930
|
"qwen/qwen3.6-35b-a3b"
|
|
15307
15931
|
],
|
|
15308
15932
|
pricing: {
|
|
15309
|
-
inputPerMTok: 0.
|
|
15933
|
+
inputPerMTok: 0.14,
|
|
15310
15934
|
outputPerMTok: 1,
|
|
15311
15935
|
cacheReadPerMTok: 0.05
|
|
15312
15936
|
},
|
|
@@ -15911,8 +16535,8 @@ var catalog_default4 = {
|
|
|
15911
16535
|
"qwen/qwen3-vl-8b-thinking"
|
|
15912
16536
|
],
|
|
15913
16537
|
pricing: {
|
|
15914
|
-
inputPerMTok: 0.
|
|
15915
|
-
outputPerMTok: 0.
|
|
16538
|
+
inputPerMTok: 0.117,
|
|
16539
|
+
outputPerMTok: 0.455
|
|
15916
16540
|
},
|
|
15917
16541
|
preferredApi: "completions",
|
|
15918
16542
|
supportedApis: [
|
|
@@ -16327,8 +16951,8 @@ var catalog_default4 = {
|
|
|
16327
16951
|
"meta-llama/llama-3.2-3b-instruct:free"
|
|
16328
16952
|
],
|
|
16329
16953
|
pricing: {
|
|
16330
|
-
inputPerMTok: 0.
|
|
16331
|
-
outputPerMTok: 0.
|
|
16954
|
+
inputPerMTok: 0.05,
|
|
16955
|
+
outputPerMTok: 0.33
|
|
16332
16956
|
},
|
|
16333
16957
|
preferredApi: "completions",
|
|
16334
16958
|
supportedApis: [
|
|
@@ -16410,7 +17034,11 @@ var catalog_default4 = {
|
|
|
16410
17034
|
family: "llama",
|
|
16411
17035
|
version: "3.2",
|
|
16412
17036
|
status: "legacy",
|
|
16413
|
-
active: true
|
|
17037
|
+
active: true,
|
|
17038
|
+
deprecation: {
|
|
17039
|
+
shutdownDate: "2026-07-17",
|
|
17040
|
+
source: "openrouter"
|
|
17041
|
+
}
|
|
16414
17042
|
},
|
|
16415
17043
|
"openrouter/llama-3.3-70b": {
|
|
16416
17044
|
providerModelName: "meta-llama/llama-3.3-70b-instruct",
|
|
@@ -16588,7 +17216,8 @@ var catalog_default4 = {
|
|
|
16588
17216
|
family: "llama-guard",
|
|
16589
17217
|
version: "3",
|
|
16590
17218
|
status: "stable",
|
|
16591
|
-
active: true
|
|
17219
|
+
active: true,
|
|
17220
|
+
contextWindow: 163840
|
|
16592
17221
|
},
|
|
16593
17222
|
"openrouter/llama-guard-4-12b": {
|
|
16594
17223
|
providerModelName: "meta-llama/llama-guard-4-12b",
|
|
@@ -17292,9 +17921,9 @@ var catalog_default4 = {
|
|
|
17292
17921
|
"moonshotai/kimi-k2.6"
|
|
17293
17922
|
],
|
|
17294
17923
|
pricing: {
|
|
17295
|
-
inputPerMTok: 0.
|
|
17924
|
+
inputPerMTok: 0.66,
|
|
17296
17925
|
outputPerMTok: 3.41,
|
|
17297
|
-
cacheReadPerMTok: 0.
|
|
17926
|
+
cacheReadPerMTok: 0.15
|
|
17298
17927
|
},
|
|
17299
17928
|
preferredApi: "completions",
|
|
17300
17929
|
supportedApis: [
|
|
@@ -17381,7 +18010,7 @@ var catalog_default4 = {
|
|
|
17381
18010
|
status: "legacy",
|
|
17382
18011
|
active: true,
|
|
17383
18012
|
deprecation: {
|
|
17384
|
-
shutdownDate: "2026-
|
|
18013
|
+
shutdownDate: "2026-12-31",
|
|
17385
18014
|
source: "openrouter"
|
|
17386
18015
|
}
|
|
17387
18016
|
},
|
|
@@ -17532,9 +18161,9 @@ var catalog_default4 = {
|
|
|
17532
18161
|
"z-ai/glm-5.1"
|
|
17533
18162
|
],
|
|
17534
18163
|
pricing: {
|
|
17535
|
-
inputPerMTok: 0.
|
|
17536
|
-
outputPerMTok: 3.
|
|
17537
|
-
cacheReadPerMTok: 0.
|
|
18164
|
+
inputPerMTok: 0.966,
|
|
18165
|
+
outputPerMTok: 3.036,
|
|
18166
|
+
cacheReadPerMTok: 0.1794
|
|
17538
18167
|
},
|
|
17539
18168
|
preferredApi: "completions",
|
|
17540
18169
|
supportedApis: [
|
|
@@ -17671,7 +18300,7 @@ var catalog_default4 = {
|
|
|
17671
18300
|
],
|
|
17672
18301
|
pricing: {
|
|
17673
18302
|
inputPerMTok: 0.255,
|
|
17674
|
-
outputPerMTok: 1,
|
|
18303
|
+
outputPerMTok: 1.02,
|
|
17675
18304
|
cacheReadPerMTok: 0.03
|
|
17676
18305
|
},
|
|
17677
18306
|
preferredApi: "completions",
|
|
@@ -17762,8 +18391,8 @@ var catalog_default4 = {
|
|
|
17762
18391
|
"minimax/minimax-m2.7"
|
|
17763
18392
|
],
|
|
17764
18393
|
pricing: {
|
|
17765
|
-
inputPerMTok: 0.
|
|
17766
|
-
outputPerMTok:
|
|
18394
|
+
inputPerMTok: 0.24,
|
|
18395
|
+
outputPerMTok: 0.96,
|
|
17767
18396
|
cacheReadPerMTok: 0.05
|
|
17768
18397
|
},
|
|
17769
18398
|
preferredApi: "completions",
|
|
@@ -17982,7 +18611,11 @@ var catalog_default4 = {
|
|
|
17982
18611
|
family: "nemotron",
|
|
17983
18612
|
version: "1.5",
|
|
17984
18613
|
status: "stable",
|
|
17985
|
-
active: true
|
|
18614
|
+
active: true,
|
|
18615
|
+
deprecation: {
|
|
18616
|
+
shutdownDate: "2026-07-17",
|
|
18617
|
+
source: "openrouter"
|
|
18618
|
+
}
|
|
17986
18619
|
},
|
|
17987
18620
|
"openrouter/nemotron-3-nano-30b-a3b": {
|
|
17988
18621
|
providerModelName: "nvidia/nemotron-3-nano-30b-a3b",
|
|
@@ -18038,7 +18671,7 @@ var catalog_default4 = {
|
|
|
18038
18671
|
"nvidia/nemotron-3-super-120b-a12b:free"
|
|
18039
18672
|
],
|
|
18040
18673
|
pricing: {
|
|
18041
|
-
inputPerMTok: 0.
|
|
18674
|
+
inputPerMTok: 0.08,
|
|
18042
18675
|
outputPerMTok: 0.45
|
|
18043
18676
|
},
|
|
18044
18677
|
preferredApi: "completions",
|
|
@@ -18084,8 +18717,8 @@ var catalog_default4 = {
|
|
|
18084
18717
|
],
|
|
18085
18718
|
pricing: {
|
|
18086
18719
|
inputPerMTok: 0.5,
|
|
18087
|
-
outputPerMTok: 2.
|
|
18088
|
-
cacheReadPerMTok: 0.
|
|
18720
|
+
outputPerMTok: 2.2,
|
|
18721
|
+
cacheReadPerMTok: 0.1
|
|
18089
18722
|
},
|
|
18090
18723
|
preferredApi: "completions",
|
|
18091
18724
|
supportedApis: [
|
|
@@ -18585,7 +19218,7 @@ var catalog_default4 = {
|
|
|
18585
19218
|
"microsoft/phi-4"
|
|
18586
19219
|
],
|
|
18587
19220
|
pricing: {
|
|
18588
|
-
inputPerMTok: 0.
|
|
19221
|
+
inputPerMTok: 0.07,
|
|
18589
19222
|
outputPerMTok: 0.14
|
|
18590
19223
|
},
|
|
18591
19224
|
preferredApi: "completions",
|
|
@@ -19452,8 +20085,8 @@ var catalog_default4 = {
|
|
|
19452
20085
|
"arcee-ai/trinity-large-thinking"
|
|
19453
20086
|
],
|
|
19454
20087
|
pricing: {
|
|
19455
|
-
inputPerMTok: 0.
|
|
19456
|
-
outputPerMTok: 0.
|
|
20088
|
+
inputPerMTok: 0.25,
|
|
20089
|
+
outputPerMTok: 0.8,
|
|
19457
20090
|
cacheReadPerMTok: 0.06
|
|
19458
20091
|
},
|
|
19459
20092
|
preferredApi: "completions",
|
|
@@ -20402,7 +21035,7 @@ var catalog_default4 = {
|
|
|
20402
21035
|
"stepfun/step-3.5-flash"
|
|
20403
21036
|
],
|
|
20404
21037
|
pricing: {
|
|
20405
|
-
inputPerMTok: 0.
|
|
21038
|
+
inputPerMTok: 0.1,
|
|
20406
21039
|
outputPerMTok: 0.3,
|
|
20407
21040
|
cacheReadPerMTok: 0.02
|
|
20408
21041
|
},
|
|
@@ -20537,7 +21170,9 @@ var catalog_default4 = {
|
|
|
20537
21170
|
"openrouter/hunyuan-hy3": {
|
|
20538
21171
|
providerModelName: "tencent/hy3-preview",
|
|
20539
21172
|
aliases: [
|
|
20540
|
-
"tencent/hy3-preview"
|
|
21173
|
+
"tencent/hy3-preview",
|
|
21174
|
+
"tencent/hy3",
|
|
21175
|
+
"tencent/hy3:free"
|
|
20541
21176
|
],
|
|
20542
21177
|
pricing: {
|
|
20543
21178
|
inputPerMTok: 0.063,
|
|
@@ -20721,9 +21356,9 @@ var catalog_default4 = {
|
|
|
20721
21356
|
"xiaomi/mimo-v2.5"
|
|
20722
21357
|
],
|
|
20723
21358
|
pricing: {
|
|
20724
|
-
inputPerMTok: 0.
|
|
21359
|
+
inputPerMTok: 0.105,
|
|
20725
21360
|
outputPerMTok: 0.28,
|
|
20726
|
-
cacheReadPerMTok:
|
|
21361
|
+
cacheReadPerMTok: 0.028
|
|
20727
21362
|
},
|
|
20728
21363
|
preferredApi: "completions",
|
|
20729
21364
|
supportedApis: [
|
|
@@ -20812,11 +21447,13 @@ var catalog_default4 = {
|
|
|
20812
21447
|
"openrouter/nex-n2-pro": {
|
|
20813
21448
|
providerModelName: "nex-agi/nex-n2-pro:free",
|
|
20814
21449
|
aliases: [
|
|
20815
|
-
"nex-agi/nex-n2-pro:free"
|
|
21450
|
+
"nex-agi/nex-n2-pro:free",
|
|
21451
|
+
"nex-agi/nex-n2-pro"
|
|
20816
21452
|
],
|
|
20817
21453
|
pricing: {
|
|
20818
|
-
inputPerMTok: 0,
|
|
20819
|
-
outputPerMTok:
|
|
21454
|
+
inputPerMTok: 0.25,
|
|
21455
|
+
outputPerMTok: 1,
|
|
21456
|
+
cacheReadPerMTok: 0.025
|
|
20820
21457
|
},
|
|
20821
21458
|
preferredApi: "completions",
|
|
20822
21459
|
supportedApis: [
|
|
@@ -20904,7 +21541,8 @@ var catalog_default4 = {
|
|
|
20904
21541
|
"openrouter/laguna-m.1": {
|
|
20905
21542
|
providerModelName: "poolside/laguna-m.1:free",
|
|
20906
21543
|
aliases: [
|
|
20907
|
-
"poolside/laguna-m.1:free"
|
|
21544
|
+
"poolside/laguna-m.1:free",
|
|
21545
|
+
"poolside/laguna-m.1"
|
|
20908
21546
|
],
|
|
20909
21547
|
pricing: {
|
|
20910
21548
|
inputPerMTok: 0,
|
|
@@ -21084,7 +21722,8 @@ var catalog_default4 = {
|
|
|
21084
21722
|
"openrouter/dolphin-mistral-24b-venice": {
|
|
21085
21723
|
providerModelName: "cognitivecomputations/dolphin-mistral-24b-venice-edition:free",
|
|
21086
21724
|
aliases: [
|
|
21087
|
-
"cognitivecomputations/dolphin-mistral-24b-venice-edition:free"
|
|
21725
|
+
"cognitivecomputations/dolphin-mistral-24b-venice-edition:free",
|
|
21726
|
+
"cognitivecomputations/dolphin-mistral-24b-venice-edition"
|
|
21088
21727
|
],
|
|
21089
21728
|
pricing: {
|
|
21090
21729
|
inputPerMTok: 0,
|
|
@@ -21123,7 +21762,11 @@ var catalog_default4 = {
|
|
|
21123
21762
|
family: "roleplay-finetunes",
|
|
21124
21763
|
version: "1",
|
|
21125
21764
|
status: "stable",
|
|
21126
|
-
active: true
|
|
21765
|
+
active: true,
|
|
21766
|
+
deprecation: {
|
|
21767
|
+
shutdownDate: "2026-07-19",
|
|
21768
|
+
source: "openrouter"
|
|
21769
|
+
}
|
|
21127
21770
|
},
|
|
21128
21771
|
"openrouter/mythomax-l2-13b": {
|
|
21129
21772
|
providerModelName: "gryphe/mythomax-l2-13b",
|
|
@@ -21359,15 +22002,15 @@ var catalog_default4 = {
|
|
|
21359
22002
|
"thedrummer/rocinante-12b"
|
|
21360
22003
|
],
|
|
21361
22004
|
pricing: {
|
|
21362
|
-
inputPerMTok: 0.
|
|
21363
|
-
outputPerMTok: 0.
|
|
22005
|
+
inputPerMTok: 0.25,
|
|
22006
|
+
outputPerMTok: 0.5
|
|
21364
22007
|
},
|
|
21365
22008
|
preferredApi: "completions",
|
|
21366
22009
|
supportedApis: [
|
|
21367
22010
|
"completions"
|
|
21368
22011
|
],
|
|
21369
|
-
contextWindow:
|
|
21370
|
-
maxOutput:
|
|
22012
|
+
contextWindow: 65536,
|
|
22013
|
+
maxOutput: 65536,
|
|
21371
22014
|
capabilities: {
|
|
21372
22015
|
toolUse: true,
|
|
21373
22016
|
streaming: true,
|
|
@@ -21533,35 +22176,23 @@ var catalog_default4 = {
|
|
|
21533
22176
|
version: "2",
|
|
21534
22177
|
status: "legacy",
|
|
21535
22178
|
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",
|
|
22179
|
+
},
|
|
22180
|
+
"openrouter/claude-sonnet-5": {
|
|
22181
|
+
providerModelName: "anthropic/claude-sonnet-5",
|
|
21543
22182
|
aliases: [
|
|
21544
|
-
"
|
|
22183
|
+
"anthropic/claude-sonnet-5"
|
|
21545
22184
|
],
|
|
21546
22185
|
pricing: {
|
|
21547
|
-
inputPerMTok:
|
|
21548
|
-
outputPerMTok:
|
|
21549
|
-
cacheReadPerMTok: 0.2
|
|
21550
|
-
tiers: {
|
|
21551
|
-
"long-context": {
|
|
21552
|
-
inputPerMTok: 2.5,
|
|
21553
|
-
outputPerMTok: 5,
|
|
21554
|
-
cacheReadPerMTok: 0.4
|
|
21555
|
-
}
|
|
21556
|
-
}
|
|
22186
|
+
inputPerMTok: 2,
|
|
22187
|
+
outputPerMTok: 10,
|
|
22188
|
+
cacheReadPerMTok: 0.2
|
|
21557
22189
|
},
|
|
21558
|
-
preferredApi: "
|
|
22190
|
+
preferredApi: "completions",
|
|
21559
22191
|
supportedApis: [
|
|
21560
|
-
"responses",
|
|
21561
22192
|
"completions"
|
|
21562
22193
|
],
|
|
21563
|
-
contextWindow:
|
|
21564
|
-
maxOutput:
|
|
22194
|
+
contextWindow: 1e6,
|
|
22195
|
+
maxOutput: 128e3,
|
|
21565
22196
|
capabilities: {
|
|
21566
22197
|
toolUse: true,
|
|
21567
22198
|
streaming: true,
|
|
@@ -21574,7 +22205,7 @@ var catalog_default5 = {
|
|
|
21574
22205
|
videoGeneration: false
|
|
21575
22206
|
},
|
|
21576
22207
|
reasoning: {
|
|
21577
|
-
supported:
|
|
22208
|
+
supported: true,
|
|
21578
22209
|
automatic: false,
|
|
21579
22210
|
effortControl: false,
|
|
21580
22211
|
encryptedContent: false,
|
|
@@ -21588,33 +22219,27 @@ var catalog_default5 = {
|
|
|
21588
22219
|
outputModalities: [
|
|
21589
22220
|
"text"
|
|
21590
22221
|
],
|
|
21591
|
-
family: "
|
|
21592
|
-
version: "
|
|
22222
|
+
family: "claude-sonnet",
|
|
22223
|
+
version: "5",
|
|
21593
22224
|
status: "stable",
|
|
21594
22225
|
active: true
|
|
21595
22226
|
},
|
|
21596
|
-
"
|
|
21597
|
-
providerModelName: "
|
|
22227
|
+
"openrouter/gpt-5.6-luna": {
|
|
22228
|
+
providerModelName: "openai/gpt-5.6-luna",
|
|
21598
22229
|
aliases: [
|
|
21599
|
-
"
|
|
22230
|
+
"openai/gpt-5.6-luna"
|
|
21600
22231
|
],
|
|
21601
22232
|
pricing: {
|
|
21602
|
-
inputPerMTok: 1
|
|
21603
|
-
outputPerMTok:
|
|
21604
|
-
cacheReadPerMTok: 0.
|
|
21605
|
-
tiers: {
|
|
21606
|
-
"long-context": {
|
|
21607
|
-
inputPerMTok: 2.5,
|
|
21608
|
-
outputPerMTok: 5,
|
|
21609
|
-
cacheReadPerMTok: 0.4
|
|
21610
|
-
}
|
|
21611
|
-
}
|
|
22233
|
+
inputPerMTok: 1,
|
|
22234
|
+
outputPerMTok: 6,
|
|
22235
|
+
cacheReadPerMTok: 0.1
|
|
21612
22236
|
},
|
|
21613
|
-
preferredApi: "
|
|
22237
|
+
preferredApi: "completions",
|
|
21614
22238
|
supportedApis: [
|
|
21615
|
-
"responses",
|
|
21616
22239
|
"completions"
|
|
21617
22240
|
],
|
|
22241
|
+
contextWindow: 105e4,
|
|
22242
|
+
maxOutput: 128e3,
|
|
21618
22243
|
capabilities: {
|
|
21619
22244
|
toolUse: true,
|
|
21620
22245
|
streaming: true,
|
|
@@ -21627,7 +22252,7 @@ var catalog_default5 = {
|
|
|
21627
22252
|
videoGeneration: false
|
|
21628
22253
|
},
|
|
21629
22254
|
reasoning: {
|
|
21630
|
-
supported:
|
|
22255
|
+
supported: true,
|
|
21631
22256
|
automatic: false,
|
|
21632
22257
|
effortControl: false,
|
|
21633
22258
|
encryptedContent: false,
|
|
@@ -21641,33 +22266,332 @@ var catalog_default5 = {
|
|
|
21641
22266
|
outputModalities: [
|
|
21642
22267
|
"text"
|
|
21643
22268
|
],
|
|
21644
|
-
family: "
|
|
21645
|
-
version: "
|
|
22269
|
+
family: "gpt",
|
|
22270
|
+
version: "5.6",
|
|
21646
22271
|
status: "stable",
|
|
21647
22272
|
active: true
|
|
21648
22273
|
},
|
|
21649
|
-
"
|
|
21650
|
-
providerModelName: "
|
|
22274
|
+
"openrouter/gpt-5.6-terra": {
|
|
22275
|
+
providerModelName: "openai/gpt-5.6-terra",
|
|
21651
22276
|
aliases: [
|
|
21652
|
-
"
|
|
22277
|
+
"openai/gpt-5.6-terra"
|
|
21653
22278
|
],
|
|
21654
22279
|
pricing: {
|
|
21655
|
-
inputPerMTok:
|
|
21656
|
-
outputPerMTok:
|
|
21657
|
-
cacheReadPerMTok: 0.
|
|
21658
|
-
|
|
21659
|
-
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
22280
|
+
inputPerMTok: 2.5,
|
|
22281
|
+
outputPerMTok: 15,
|
|
22282
|
+
cacheReadPerMTok: 0.25
|
|
22283
|
+
},
|
|
22284
|
+
preferredApi: "completions",
|
|
22285
|
+
supportedApis: [
|
|
22286
|
+
"completions"
|
|
22287
|
+
],
|
|
22288
|
+
contextWindow: 105e4,
|
|
22289
|
+
maxOutput: 128e3,
|
|
22290
|
+
capabilities: {
|
|
22291
|
+
toolUse: true,
|
|
22292
|
+
streaming: true,
|
|
22293
|
+
structuredOutput: true,
|
|
22294
|
+
vision: true,
|
|
22295
|
+
audio: false,
|
|
22296
|
+
video: false,
|
|
22297
|
+
imageGeneration: false,
|
|
22298
|
+
audioGeneration: false,
|
|
22299
|
+
videoGeneration: false
|
|
22300
|
+
},
|
|
22301
|
+
reasoning: {
|
|
22302
|
+
supported: true,
|
|
22303
|
+
automatic: false,
|
|
22304
|
+
effortControl: false,
|
|
22305
|
+
encryptedContent: false,
|
|
22306
|
+
summaryAvailable: false
|
|
22307
|
+
},
|
|
22308
|
+
type: "chat",
|
|
22309
|
+
inputModalities: [
|
|
22310
|
+
"text",
|
|
22311
|
+
"image"
|
|
22312
|
+
],
|
|
22313
|
+
outputModalities: [
|
|
22314
|
+
"text"
|
|
22315
|
+
],
|
|
22316
|
+
family: "gpt",
|
|
22317
|
+
version: "5.6",
|
|
22318
|
+
status: "stable",
|
|
22319
|
+
active: true
|
|
22320
|
+
},
|
|
22321
|
+
"openrouter/gpt-5.6-sol": {
|
|
22322
|
+
providerModelName: "openai/gpt-5.6-sol",
|
|
22323
|
+
aliases: [
|
|
22324
|
+
"openai/gpt-5.6-sol"
|
|
22325
|
+
],
|
|
22326
|
+
pricing: {
|
|
22327
|
+
inputPerMTok: 5,
|
|
22328
|
+
outputPerMTok: 30,
|
|
22329
|
+
cacheReadPerMTok: 0.5
|
|
22330
|
+
},
|
|
22331
|
+
preferredApi: "completions",
|
|
22332
|
+
supportedApis: [
|
|
22333
|
+
"completions"
|
|
22334
|
+
],
|
|
22335
|
+
contextWindow: 105e4,
|
|
22336
|
+
maxOutput: 128e3,
|
|
22337
|
+
capabilities: {
|
|
22338
|
+
toolUse: true,
|
|
22339
|
+
streaming: true,
|
|
22340
|
+
structuredOutput: true,
|
|
22341
|
+
vision: true,
|
|
22342
|
+
audio: false,
|
|
22343
|
+
video: false,
|
|
22344
|
+
imageGeneration: false,
|
|
22345
|
+
audioGeneration: false,
|
|
22346
|
+
videoGeneration: false
|
|
22347
|
+
},
|
|
22348
|
+
reasoning: {
|
|
22349
|
+
supported: true,
|
|
22350
|
+
automatic: false,
|
|
22351
|
+
effortControl: false,
|
|
22352
|
+
encryptedContent: false,
|
|
22353
|
+
summaryAvailable: false
|
|
22354
|
+
},
|
|
22355
|
+
type: "chat",
|
|
22356
|
+
inputModalities: [
|
|
22357
|
+
"text",
|
|
22358
|
+
"image"
|
|
22359
|
+
],
|
|
22360
|
+
outputModalities: [
|
|
22361
|
+
"text"
|
|
22362
|
+
],
|
|
22363
|
+
family: "gpt",
|
|
22364
|
+
version: "5.6",
|
|
22365
|
+
status: "stable",
|
|
22366
|
+
active: true
|
|
22367
|
+
},
|
|
22368
|
+
"openrouter/gpt-5.6-luna-pro": {
|
|
22369
|
+
providerModelName: "openai/gpt-5.6-luna-pro",
|
|
22370
|
+
aliases: [
|
|
22371
|
+
"openai/gpt-5.6-luna-pro"
|
|
22372
|
+
],
|
|
22373
|
+
pricing: {
|
|
22374
|
+
inputPerMTok: 1,
|
|
22375
|
+
outputPerMTok: 6,
|
|
22376
|
+
cacheReadPerMTok: 0.1
|
|
22377
|
+
},
|
|
22378
|
+
preferredApi: "completions",
|
|
22379
|
+
supportedApis: [
|
|
22380
|
+
"completions"
|
|
22381
|
+
],
|
|
22382
|
+
contextWindow: 105e4,
|
|
22383
|
+
maxOutput: 128e3,
|
|
22384
|
+
capabilities: {
|
|
22385
|
+
toolUse: true,
|
|
22386
|
+
streaming: true,
|
|
22387
|
+
structuredOutput: true,
|
|
22388
|
+
vision: true,
|
|
22389
|
+
audio: false,
|
|
22390
|
+
video: false,
|
|
22391
|
+
imageGeneration: false,
|
|
22392
|
+
audioGeneration: false,
|
|
22393
|
+
videoGeneration: false
|
|
22394
|
+
},
|
|
22395
|
+
reasoning: {
|
|
22396
|
+
supported: true,
|
|
22397
|
+
automatic: false,
|
|
22398
|
+
effortControl: false,
|
|
22399
|
+
encryptedContent: false,
|
|
22400
|
+
summaryAvailable: false
|
|
22401
|
+
},
|
|
22402
|
+
type: "chat",
|
|
22403
|
+
inputModalities: [
|
|
22404
|
+
"text",
|
|
22405
|
+
"image"
|
|
22406
|
+
],
|
|
22407
|
+
outputModalities: [
|
|
22408
|
+
"text"
|
|
22409
|
+
],
|
|
22410
|
+
family: "gpt-pro",
|
|
22411
|
+
version: "5.6",
|
|
22412
|
+
status: "stable",
|
|
22413
|
+
active: true
|
|
22414
|
+
},
|
|
22415
|
+
"openrouter/gpt-5.6-terra-pro": {
|
|
22416
|
+
providerModelName: "openai/gpt-5.6-terra-pro",
|
|
22417
|
+
aliases: [
|
|
22418
|
+
"openai/gpt-5.6-terra-pro"
|
|
22419
|
+
],
|
|
22420
|
+
pricing: {
|
|
22421
|
+
inputPerMTok: 2.5,
|
|
22422
|
+
outputPerMTok: 15,
|
|
22423
|
+
cacheReadPerMTok: 0.25
|
|
22424
|
+
},
|
|
22425
|
+
preferredApi: "completions",
|
|
22426
|
+
supportedApis: [
|
|
22427
|
+
"completions"
|
|
22428
|
+
],
|
|
22429
|
+
contextWindow: 105e4,
|
|
22430
|
+
maxOutput: 128e3,
|
|
22431
|
+
capabilities: {
|
|
22432
|
+
toolUse: true,
|
|
22433
|
+
streaming: true,
|
|
22434
|
+
structuredOutput: true,
|
|
22435
|
+
vision: true,
|
|
22436
|
+
audio: false,
|
|
22437
|
+
video: false,
|
|
22438
|
+
imageGeneration: false,
|
|
22439
|
+
audioGeneration: false,
|
|
22440
|
+
videoGeneration: false
|
|
22441
|
+
},
|
|
22442
|
+
reasoning: {
|
|
22443
|
+
supported: true,
|
|
22444
|
+
automatic: false,
|
|
22445
|
+
effortControl: false,
|
|
22446
|
+
encryptedContent: false,
|
|
22447
|
+
summaryAvailable: false
|
|
22448
|
+
},
|
|
22449
|
+
type: "chat",
|
|
22450
|
+
inputModalities: [
|
|
22451
|
+
"text",
|
|
22452
|
+
"image"
|
|
22453
|
+
],
|
|
22454
|
+
outputModalities: [
|
|
22455
|
+
"text"
|
|
22456
|
+
],
|
|
22457
|
+
family: "gpt-pro",
|
|
22458
|
+
version: "5.6",
|
|
22459
|
+
status: "stable",
|
|
22460
|
+
active: true
|
|
22461
|
+
},
|
|
22462
|
+
"openrouter/gpt-5.6-sol-pro": {
|
|
22463
|
+
providerModelName: "openai/gpt-5.6-sol-pro",
|
|
22464
|
+
aliases: [
|
|
22465
|
+
"openai/gpt-5.6-sol-pro"
|
|
22466
|
+
],
|
|
22467
|
+
pricing: {
|
|
22468
|
+
inputPerMTok: 5,
|
|
22469
|
+
outputPerMTok: 30,
|
|
22470
|
+
cacheReadPerMTok: 0.5
|
|
22471
|
+
},
|
|
22472
|
+
preferredApi: "completions",
|
|
22473
|
+
supportedApis: [
|
|
22474
|
+
"completions"
|
|
22475
|
+
],
|
|
22476
|
+
contextWindow: 105e4,
|
|
22477
|
+
maxOutput: 128e3,
|
|
22478
|
+
capabilities: {
|
|
22479
|
+
toolUse: true,
|
|
22480
|
+
streaming: true,
|
|
22481
|
+
structuredOutput: true,
|
|
22482
|
+
vision: true,
|
|
22483
|
+
audio: false,
|
|
22484
|
+
video: false,
|
|
22485
|
+
imageGeneration: false,
|
|
22486
|
+
audioGeneration: false,
|
|
22487
|
+
videoGeneration: false
|
|
22488
|
+
},
|
|
22489
|
+
reasoning: {
|
|
22490
|
+
supported: true,
|
|
22491
|
+
automatic: false,
|
|
22492
|
+
effortControl: false,
|
|
22493
|
+
encryptedContent: false,
|
|
22494
|
+
summaryAvailable: false
|
|
22495
|
+
},
|
|
22496
|
+
type: "chat",
|
|
22497
|
+
inputModalities: [
|
|
22498
|
+
"text",
|
|
22499
|
+
"image"
|
|
22500
|
+
],
|
|
22501
|
+
outputModalities: [
|
|
22502
|
+
"text"
|
|
22503
|
+
],
|
|
22504
|
+
family: "gpt-pro",
|
|
22505
|
+
version: "5.6",
|
|
22506
|
+
status: "stable",
|
|
22507
|
+
active: true
|
|
22508
|
+
},
|
|
22509
|
+
"openrouter/gemini-3.1-flash-lite-image": {
|
|
22510
|
+
providerModelName: "google/gemini-3.1-flash-lite-image",
|
|
22511
|
+
aliases: [
|
|
22512
|
+
"google/gemini-3.1-flash-lite-image"
|
|
22513
|
+
],
|
|
22514
|
+
pricing: {
|
|
22515
|
+
inputPerMTok: 0.25,
|
|
22516
|
+
outputPerMTok: 1.5
|
|
22517
|
+
},
|
|
22518
|
+
preferredApi: "completions",
|
|
22519
|
+
supportedApis: [
|
|
22520
|
+
"completions"
|
|
22521
|
+
],
|
|
22522
|
+
contextWindow: 65536,
|
|
22523
|
+
maxOutput: 66e3,
|
|
22524
|
+
capabilities: {
|
|
22525
|
+
toolUse: false,
|
|
22526
|
+
streaming: true,
|
|
22527
|
+
structuredOutput: false,
|
|
22528
|
+
vision: true,
|
|
22529
|
+
audio: false,
|
|
22530
|
+
video: false,
|
|
22531
|
+
imageGeneration: true,
|
|
22532
|
+
audioGeneration: false,
|
|
22533
|
+
videoGeneration: false
|
|
22534
|
+
},
|
|
22535
|
+
reasoning: {
|
|
22536
|
+
supported: true,
|
|
22537
|
+
automatic: false,
|
|
22538
|
+
effortControl: false,
|
|
22539
|
+
encryptedContent: false,
|
|
22540
|
+
summaryAvailable: false
|
|
22541
|
+
},
|
|
22542
|
+
type: "image",
|
|
22543
|
+
inputModalities: [
|
|
22544
|
+
"text",
|
|
22545
|
+
"image"
|
|
22546
|
+
],
|
|
22547
|
+
outputModalities: [
|
|
22548
|
+
"image"
|
|
22549
|
+
],
|
|
22550
|
+
family: "gemini-image",
|
|
22551
|
+
version: "3.1",
|
|
22552
|
+
status: "stable",
|
|
22553
|
+
active: true,
|
|
22554
|
+
mediaParams: {
|
|
22555
|
+
aspectRatio: {
|
|
22556
|
+
values: [
|
|
22557
|
+
"1:1",
|
|
22558
|
+
"2:3",
|
|
22559
|
+
"3:2",
|
|
22560
|
+
"3:4",
|
|
22561
|
+
"4:3",
|
|
22562
|
+
"4:5",
|
|
22563
|
+
"5:4",
|
|
22564
|
+
"9:16",
|
|
22565
|
+
"16:9",
|
|
22566
|
+
"21:9"
|
|
22567
|
+
]
|
|
22568
|
+
},
|
|
22569
|
+
imageSize: {
|
|
22570
|
+
values: [
|
|
22571
|
+
"0.5K",
|
|
22572
|
+
"1K",
|
|
22573
|
+
"2K",
|
|
22574
|
+
"4K"
|
|
22575
|
+
],
|
|
22576
|
+
default: "1K"
|
|
21664
22577
|
}
|
|
22578
|
+
}
|
|
22579
|
+
},
|
|
22580
|
+
"openrouter/grok-4.5": {
|
|
22581
|
+
providerModelName: "x-ai/grok-4.5",
|
|
22582
|
+
aliases: [
|
|
22583
|
+
"x-ai/grok-4.5"
|
|
22584
|
+
],
|
|
22585
|
+
pricing: {
|
|
22586
|
+
inputPerMTok: 2,
|
|
22587
|
+
outputPerMTok: 6,
|
|
22588
|
+
cacheReadPerMTok: 0.5
|
|
21665
22589
|
},
|
|
21666
|
-
preferredApi: "
|
|
22590
|
+
preferredApi: "completions",
|
|
21667
22591
|
supportedApis: [
|
|
21668
|
-
"
|
|
22592
|
+
"completions"
|
|
21669
22593
|
],
|
|
21670
|
-
contextWindow:
|
|
22594
|
+
contextWindow: 5e5,
|
|
21671
22595
|
capabilities: {
|
|
21672
22596
|
toolUse: true,
|
|
21673
22597
|
streaming: true,
|
|
@@ -21680,7 +22604,7 @@ var catalog_default5 = {
|
|
|
21680
22604
|
videoGeneration: false
|
|
21681
22605
|
},
|
|
21682
22606
|
reasoning: {
|
|
21683
|
-
supported:
|
|
22607
|
+
supported: true,
|
|
21684
22608
|
automatic: false,
|
|
21685
22609
|
effortControl: false,
|
|
21686
22610
|
encryptedContent: false,
|
|
@@ -21695,34 +22619,1030 @@ var catalog_default5 = {
|
|
|
21695
22619
|
"text"
|
|
21696
22620
|
],
|
|
21697
22621
|
family: "grok",
|
|
21698
|
-
version: "4.
|
|
22622
|
+
version: "4.5",
|
|
21699
22623
|
status: "stable",
|
|
21700
22624
|
active: true
|
|
21701
22625
|
},
|
|
21702
|
-
"
|
|
21703
|
-
providerModelName: "
|
|
22626
|
+
"openrouter/glm-5.2": {
|
|
22627
|
+
providerModelName: "z-ai/glm-5.2",
|
|
21704
22628
|
aliases: [
|
|
21705
|
-
"
|
|
22629
|
+
"z-ai/glm-5.2"
|
|
21706
22630
|
],
|
|
21707
22631
|
pricing: {
|
|
21708
|
-
inputPerMTok:
|
|
21709
|
-
outputPerMTok:
|
|
21710
|
-
cacheReadPerMTok: 0.
|
|
21711
|
-
tiers: {
|
|
21712
|
-
"long-context": {
|
|
21713
|
-
inputPerMTok: 2.5,
|
|
21714
|
-
outputPerMTok: 5,
|
|
21715
|
-
cacheReadPerMTok: 0.4
|
|
21716
|
-
}
|
|
21717
|
-
}
|
|
22632
|
+
inputPerMTok: 0.35,
|
|
22633
|
+
outputPerMTok: 1.1,
|
|
22634
|
+
cacheReadPerMTok: 0.065
|
|
21718
22635
|
},
|
|
21719
|
-
preferredApi: "
|
|
22636
|
+
preferredApi: "completions",
|
|
21720
22637
|
supportedApis: [
|
|
21721
|
-
"responses",
|
|
21722
22638
|
"completions"
|
|
21723
22639
|
],
|
|
21724
|
-
contextWindow:
|
|
21725
|
-
maxOutput:
|
|
22640
|
+
contextWindow: 1048576,
|
|
22641
|
+
maxOutput: 128e3,
|
|
22642
|
+
capabilities: {
|
|
22643
|
+
toolUse: true,
|
|
22644
|
+
streaming: true,
|
|
22645
|
+
structuredOutput: true,
|
|
22646
|
+
vision: false,
|
|
22647
|
+
audio: false,
|
|
22648
|
+
video: false,
|
|
22649
|
+
imageGeneration: false,
|
|
22650
|
+
audioGeneration: false,
|
|
22651
|
+
videoGeneration: false
|
|
22652
|
+
},
|
|
22653
|
+
reasoning: {
|
|
22654
|
+
supported: true,
|
|
22655
|
+
automatic: false,
|
|
22656
|
+
effortControl: false,
|
|
22657
|
+
encryptedContent: false,
|
|
22658
|
+
summaryAvailable: false
|
|
22659
|
+
},
|
|
22660
|
+
type: "chat",
|
|
22661
|
+
inputModalities: [
|
|
22662
|
+
"text"
|
|
22663
|
+
],
|
|
22664
|
+
outputModalities: [
|
|
22665
|
+
"text"
|
|
22666
|
+
],
|
|
22667
|
+
family: "glm",
|
|
22668
|
+
version: "5.2",
|
|
22669
|
+
status: "stable",
|
|
22670
|
+
active: true
|
|
22671
|
+
},
|
|
22672
|
+
"openrouter/glm-5v-turbo": {
|
|
22673
|
+
providerModelName: "z-ai/glm-5v-turbo",
|
|
22674
|
+
aliases: [
|
|
22675
|
+
"z-ai/glm-5v-turbo"
|
|
22676
|
+
],
|
|
22677
|
+
pricing: {
|
|
22678
|
+
inputPerMTok: 1.2,
|
|
22679
|
+
outputPerMTok: 4,
|
|
22680
|
+
cacheReadPerMTok: 0.24
|
|
22681
|
+
},
|
|
22682
|
+
preferredApi: "completions",
|
|
22683
|
+
supportedApis: [
|
|
22684
|
+
"completions"
|
|
22685
|
+
],
|
|
22686
|
+
contextWindow: 202752,
|
|
22687
|
+
maxOutput: 131072,
|
|
22688
|
+
capabilities: {
|
|
22689
|
+
toolUse: true,
|
|
22690
|
+
streaming: true,
|
|
22691
|
+
structuredOutput: true,
|
|
22692
|
+
vision: true,
|
|
22693
|
+
audio: false,
|
|
22694
|
+
video: false,
|
|
22695
|
+
imageGeneration: false,
|
|
22696
|
+
audioGeneration: false,
|
|
22697
|
+
videoGeneration: false
|
|
22698
|
+
},
|
|
22699
|
+
reasoning: {
|
|
22700
|
+
supported: true,
|
|
22701
|
+
automatic: false,
|
|
22702
|
+
effortControl: false,
|
|
22703
|
+
encryptedContent: false,
|
|
22704
|
+
summaryAvailable: false
|
|
22705
|
+
},
|
|
22706
|
+
type: "vision",
|
|
22707
|
+
inputModalities: [
|
|
22708
|
+
"text",
|
|
22709
|
+
"image"
|
|
22710
|
+
],
|
|
22711
|
+
outputModalities: [
|
|
22712
|
+
"text"
|
|
22713
|
+
],
|
|
22714
|
+
family: "glm",
|
|
22715
|
+
version: "5",
|
|
22716
|
+
status: "stable",
|
|
22717
|
+
active: true,
|
|
22718
|
+
deprecation: {
|
|
22719
|
+
shutdownDate: "2098-12-31",
|
|
22720
|
+
source: "openrouter"
|
|
22721
|
+
}
|
|
22722
|
+
},
|
|
22723
|
+
"openrouter/aion-3.0-mini": {
|
|
22724
|
+
providerModelName: "aion-labs/aion-3.0-mini",
|
|
22725
|
+
aliases: [
|
|
22726
|
+
"aion-labs/aion-3.0-mini"
|
|
22727
|
+
],
|
|
22728
|
+
pricing: {
|
|
22729
|
+
inputPerMTok: 0.7,
|
|
22730
|
+
outputPerMTok: 1.4,
|
|
22731
|
+
cacheReadPerMTok: 0.18
|
|
22732
|
+
},
|
|
22733
|
+
preferredApi: "completions",
|
|
22734
|
+
supportedApis: [
|
|
22735
|
+
"completions"
|
|
22736
|
+
],
|
|
22737
|
+
contextWindow: 131072,
|
|
22738
|
+
maxOutput: 32768,
|
|
22739
|
+
capabilities: {
|
|
22740
|
+
toolUse: true,
|
|
22741
|
+
streaming: true,
|
|
22742
|
+
structuredOutput: true,
|
|
22743
|
+
vision: false,
|
|
22744
|
+
audio: false,
|
|
22745
|
+
video: false,
|
|
22746
|
+
imageGeneration: false,
|
|
22747
|
+
audioGeneration: false,
|
|
22748
|
+
videoGeneration: false
|
|
22749
|
+
},
|
|
22750
|
+
reasoning: {
|
|
22751
|
+
supported: true,
|
|
22752
|
+
automatic: false,
|
|
22753
|
+
effortControl: false,
|
|
22754
|
+
encryptedContent: false,
|
|
22755
|
+
summaryAvailable: false
|
|
22756
|
+
},
|
|
22757
|
+
type: "chat",
|
|
22758
|
+
inputModalities: [
|
|
22759
|
+
"text"
|
|
22760
|
+
],
|
|
22761
|
+
outputModalities: [
|
|
22762
|
+
"text"
|
|
22763
|
+
],
|
|
22764
|
+
family: "aion",
|
|
22765
|
+
version: "3.0",
|
|
22766
|
+
status: "stable",
|
|
22767
|
+
active: true
|
|
22768
|
+
},
|
|
22769
|
+
"openrouter/aion-3.0": {
|
|
22770
|
+
providerModelName: "aion-labs/aion-3.0",
|
|
22771
|
+
aliases: [
|
|
22772
|
+
"aion-labs/aion-3.0"
|
|
22773
|
+
],
|
|
22774
|
+
pricing: {
|
|
22775
|
+
inputPerMTok: 3,
|
|
22776
|
+
outputPerMTok: 6,
|
|
22777
|
+
cacheReadPerMTok: 0.75
|
|
22778
|
+
},
|
|
22779
|
+
preferredApi: "completions",
|
|
22780
|
+
supportedApis: [
|
|
22781
|
+
"completions"
|
|
22782
|
+
],
|
|
22783
|
+
contextWindow: 131072,
|
|
22784
|
+
maxOutput: 32768,
|
|
22785
|
+
capabilities: {
|
|
22786
|
+
toolUse: true,
|
|
22787
|
+
streaming: true,
|
|
22788
|
+
structuredOutput: true,
|
|
22789
|
+
vision: false,
|
|
22790
|
+
audio: false,
|
|
22791
|
+
video: false,
|
|
22792
|
+
imageGeneration: false,
|
|
22793
|
+
audioGeneration: false,
|
|
22794
|
+
videoGeneration: false
|
|
22795
|
+
},
|
|
22796
|
+
reasoning: {
|
|
22797
|
+
supported: true,
|
|
22798
|
+
automatic: false,
|
|
22799
|
+
effortControl: false,
|
|
22800
|
+
encryptedContent: false,
|
|
22801
|
+
summaryAvailable: false
|
|
22802
|
+
},
|
|
22803
|
+
type: "chat",
|
|
22804
|
+
inputModalities: [
|
|
22805
|
+
"text"
|
|
22806
|
+
],
|
|
22807
|
+
outputModalities: [
|
|
22808
|
+
"text"
|
|
22809
|
+
],
|
|
22810
|
+
family: "aion",
|
|
22811
|
+
version: "3.0",
|
|
22812
|
+
status: "stable",
|
|
22813
|
+
active: true
|
|
22814
|
+
},
|
|
22815
|
+
"openrouter/nex-n2-mini": {
|
|
22816
|
+
providerModelName: "nex-agi/nex-n2-mini",
|
|
22817
|
+
aliases: [
|
|
22818
|
+
"nex-agi/nex-n2-mini"
|
|
22819
|
+
],
|
|
22820
|
+
pricing: {
|
|
22821
|
+
inputPerMTok: 0.025,
|
|
22822
|
+
outputPerMTok: 0.1,
|
|
22823
|
+
cacheReadPerMTok: 25e-4
|
|
22824
|
+
},
|
|
22825
|
+
preferredApi: "completions",
|
|
22826
|
+
supportedApis: [
|
|
22827
|
+
"completions"
|
|
22828
|
+
],
|
|
22829
|
+
contextWindow: 262144,
|
|
22830
|
+
maxOutput: 262144,
|
|
22831
|
+
capabilities: {
|
|
22832
|
+
toolUse: true,
|
|
22833
|
+
streaming: true,
|
|
22834
|
+
structuredOutput: true,
|
|
22835
|
+
vision: true,
|
|
22836
|
+
audio: false,
|
|
22837
|
+
video: false,
|
|
22838
|
+
imageGeneration: false,
|
|
22839
|
+
audioGeneration: false,
|
|
22840
|
+
videoGeneration: false
|
|
22841
|
+
},
|
|
22842
|
+
reasoning: {
|
|
22843
|
+
supported: true,
|
|
22844
|
+
automatic: false,
|
|
22845
|
+
effortControl: false,
|
|
22846
|
+
encryptedContent: false,
|
|
22847
|
+
summaryAvailable: false
|
|
22848
|
+
},
|
|
22849
|
+
type: "chat",
|
|
22850
|
+
inputModalities: [
|
|
22851
|
+
"text",
|
|
22852
|
+
"image"
|
|
22853
|
+
],
|
|
22854
|
+
outputModalities: [
|
|
22855
|
+
"text"
|
|
22856
|
+
],
|
|
22857
|
+
family: "nex",
|
|
22858
|
+
version: "2",
|
|
22859
|
+
status: "stable",
|
|
22860
|
+
active: true
|
|
22861
|
+
},
|
|
22862
|
+
"openrouter/laguna-xs.2.1": {
|
|
22863
|
+
providerModelName: "poolside/laguna-xs-2.1",
|
|
22864
|
+
aliases: [
|
|
22865
|
+
"poolside/laguna-xs-2.1",
|
|
22866
|
+
"poolside/laguna-xs-2.1:free"
|
|
22867
|
+
],
|
|
22868
|
+
pricing: {
|
|
22869
|
+
inputPerMTok: 0.06,
|
|
22870
|
+
outputPerMTok: 0.12,
|
|
22871
|
+
cacheReadPerMTok: 0.03
|
|
22872
|
+
},
|
|
22873
|
+
preferredApi: "completions",
|
|
22874
|
+
supportedApis: [
|
|
22875
|
+
"completions"
|
|
22876
|
+
],
|
|
22877
|
+
contextWindow: 262144,
|
|
22878
|
+
maxOutput: 32768,
|
|
22879
|
+
capabilities: {
|
|
22880
|
+
toolUse: true,
|
|
22881
|
+
streaming: true,
|
|
22882
|
+
structuredOutput: true,
|
|
22883
|
+
vision: false,
|
|
22884
|
+
audio: false,
|
|
22885
|
+
video: false,
|
|
22886
|
+
imageGeneration: false,
|
|
22887
|
+
audioGeneration: false,
|
|
22888
|
+
videoGeneration: false
|
|
22889
|
+
},
|
|
22890
|
+
reasoning: {
|
|
22891
|
+
supported: true,
|
|
22892
|
+
automatic: false,
|
|
22893
|
+
effortControl: false,
|
|
22894
|
+
encryptedContent: false,
|
|
22895
|
+
summaryAvailable: false
|
|
22896
|
+
},
|
|
22897
|
+
type: "code",
|
|
22898
|
+
inputModalities: [
|
|
22899
|
+
"text"
|
|
22900
|
+
],
|
|
22901
|
+
outputModalities: [
|
|
22902
|
+
"text"
|
|
22903
|
+
],
|
|
22904
|
+
family: "laguna",
|
|
22905
|
+
version: "2.1",
|
|
22906
|
+
status: "preview",
|
|
22907
|
+
active: true
|
|
22908
|
+
},
|
|
22909
|
+
"openrouter/fugu-ultra": {
|
|
22910
|
+
providerModelName: "sakana/fugu-ultra",
|
|
22911
|
+
aliases: [
|
|
22912
|
+
"sakana/fugu-ultra"
|
|
22913
|
+
],
|
|
22914
|
+
pricing: {
|
|
22915
|
+
inputPerMTok: 5,
|
|
22916
|
+
outputPerMTok: 30,
|
|
22917
|
+
cacheReadPerMTok: 0.5
|
|
22918
|
+
},
|
|
22919
|
+
preferredApi: "completions",
|
|
22920
|
+
supportedApis: [
|
|
22921
|
+
"completions"
|
|
22922
|
+
],
|
|
22923
|
+
contextWindow: 1e6,
|
|
22924
|
+
maxOutput: 128e3,
|
|
22925
|
+
capabilities: {
|
|
22926
|
+
toolUse: true,
|
|
22927
|
+
streaming: true,
|
|
22928
|
+
structuredOutput: true,
|
|
22929
|
+
vision: true,
|
|
22930
|
+
audio: false,
|
|
22931
|
+
video: false,
|
|
22932
|
+
imageGeneration: false,
|
|
22933
|
+
audioGeneration: false,
|
|
22934
|
+
videoGeneration: false,
|
|
22935
|
+
webSearch: true
|
|
22936
|
+
},
|
|
22937
|
+
reasoning: {
|
|
22938
|
+
supported: true,
|
|
22939
|
+
automatic: false,
|
|
22940
|
+
effortControl: false,
|
|
22941
|
+
encryptedContent: false,
|
|
22942
|
+
summaryAvailable: false
|
|
22943
|
+
},
|
|
22944
|
+
type: "chat",
|
|
22945
|
+
inputModalities: [
|
|
22946
|
+
"text",
|
|
22947
|
+
"image"
|
|
22948
|
+
],
|
|
22949
|
+
outputModalities: [
|
|
22950
|
+
"text"
|
|
22951
|
+
],
|
|
22952
|
+
family: "fugu",
|
|
22953
|
+
version: "1",
|
|
22954
|
+
status: "stable",
|
|
22955
|
+
active: true
|
|
22956
|
+
},
|
|
22957
|
+
"openrouter/north-mini-code": {
|
|
22958
|
+
providerModelName: "cohere/north-mini-code:free",
|
|
22959
|
+
aliases: [
|
|
22960
|
+
"cohere/north-mini-code:free"
|
|
22961
|
+
],
|
|
22962
|
+
pricing: {
|
|
22963
|
+
inputPerMTok: 0,
|
|
22964
|
+
outputPerMTok: 0
|
|
22965
|
+
},
|
|
22966
|
+
preferredApi: "completions",
|
|
22967
|
+
supportedApis: [
|
|
22968
|
+
"completions"
|
|
22969
|
+
],
|
|
22970
|
+
contextWindow: 256e3,
|
|
22971
|
+
maxOutput: 64e3,
|
|
22972
|
+
capabilities: {
|
|
22973
|
+
toolUse: true,
|
|
22974
|
+
streaming: true,
|
|
22975
|
+
structuredOutput: true,
|
|
22976
|
+
vision: false,
|
|
22977
|
+
audio: false,
|
|
22978
|
+
video: false,
|
|
22979
|
+
imageGeneration: false,
|
|
22980
|
+
audioGeneration: false,
|
|
22981
|
+
videoGeneration: false
|
|
22982
|
+
},
|
|
22983
|
+
reasoning: {
|
|
22984
|
+
supported: true,
|
|
22985
|
+
automatic: false,
|
|
22986
|
+
effortControl: false,
|
|
22987
|
+
encryptedContent: false,
|
|
22988
|
+
summaryAvailable: false
|
|
22989
|
+
},
|
|
22990
|
+
type: "code",
|
|
22991
|
+
inputModalities: [
|
|
22992
|
+
"text"
|
|
22993
|
+
],
|
|
22994
|
+
outputModalities: [
|
|
22995
|
+
"text"
|
|
22996
|
+
],
|
|
22997
|
+
family: "north-code",
|
|
22998
|
+
version: "1",
|
|
22999
|
+
status: "stable",
|
|
23000
|
+
active: true
|
|
23001
|
+
},
|
|
23002
|
+
"openrouter/kimi-k2.7-code": {
|
|
23003
|
+
providerModelName: "moonshotai/kimi-k2.7-code",
|
|
23004
|
+
aliases: [
|
|
23005
|
+
"moonshotai/kimi-k2.7-code"
|
|
23006
|
+
],
|
|
23007
|
+
pricing: {
|
|
23008
|
+
inputPerMTok: 0.72,
|
|
23009
|
+
outputPerMTok: 3.49,
|
|
23010
|
+
cacheReadPerMTok: 0.159
|
|
23011
|
+
},
|
|
23012
|
+
preferredApi: "completions",
|
|
23013
|
+
supportedApis: [
|
|
23014
|
+
"completions"
|
|
23015
|
+
],
|
|
23016
|
+
contextWindow: 262144,
|
|
23017
|
+
maxOutput: 262144,
|
|
23018
|
+
capabilities: {
|
|
23019
|
+
toolUse: true,
|
|
23020
|
+
streaming: true,
|
|
23021
|
+
structuredOutput: true,
|
|
23022
|
+
vision: true,
|
|
23023
|
+
audio: false,
|
|
23024
|
+
video: false,
|
|
23025
|
+
imageGeneration: false,
|
|
23026
|
+
audioGeneration: false,
|
|
23027
|
+
videoGeneration: false
|
|
23028
|
+
},
|
|
23029
|
+
reasoning: {
|
|
23030
|
+
supported: true,
|
|
23031
|
+
automatic: false,
|
|
23032
|
+
effortControl: false,
|
|
23033
|
+
encryptedContent: false,
|
|
23034
|
+
summaryAvailable: false
|
|
23035
|
+
},
|
|
23036
|
+
type: "code",
|
|
23037
|
+
inputModalities: [
|
|
23038
|
+
"text",
|
|
23039
|
+
"image"
|
|
23040
|
+
],
|
|
23041
|
+
outputModalities: [
|
|
23042
|
+
"text"
|
|
23043
|
+
],
|
|
23044
|
+
family: "kimi-code",
|
|
23045
|
+
version: "2.7",
|
|
23046
|
+
status: "stable",
|
|
23047
|
+
active: true
|
|
23048
|
+
}
|
|
23049
|
+
};
|
|
23050
|
+
|
|
23051
|
+
// src/llm/providers/xai/catalog.json
|
|
23052
|
+
var catalog_default5 = {
|
|
23053
|
+
"xai/grok-4.20": {
|
|
23054
|
+
providerModelName: "grok-4.20-0309-reasoning",
|
|
23055
|
+
aliases: [
|
|
23056
|
+
"grok-4.20-0309-reasoning"
|
|
23057
|
+
],
|
|
23058
|
+
pricing: {
|
|
23059
|
+
inputPerMTok: 1.25,
|
|
23060
|
+
outputPerMTok: 2.5,
|
|
23061
|
+
cacheReadPerMTok: 0.2,
|
|
23062
|
+
tiers: {
|
|
23063
|
+
"long-context": {
|
|
23064
|
+
inputPerMTok: 2.5,
|
|
23065
|
+
outputPerMTok: 5,
|
|
23066
|
+
cacheReadPerMTok: 0.4
|
|
23067
|
+
}
|
|
23068
|
+
}
|
|
23069
|
+
},
|
|
23070
|
+
preferredApi: "responses",
|
|
23071
|
+
supportedApis: [
|
|
23072
|
+
"responses",
|
|
23073
|
+
"completions"
|
|
23074
|
+
],
|
|
23075
|
+
contextWindow: 2e6,
|
|
23076
|
+
maxOutput: 2e6,
|
|
23077
|
+
capabilities: {
|
|
23078
|
+
toolUse: true,
|
|
23079
|
+
streaming: true,
|
|
23080
|
+
structuredOutput: true,
|
|
23081
|
+
vision: true,
|
|
23082
|
+
audio: false,
|
|
23083
|
+
video: false,
|
|
23084
|
+
imageGeneration: false,
|
|
23085
|
+
audioGeneration: false,
|
|
23086
|
+
videoGeneration: false
|
|
23087
|
+
},
|
|
23088
|
+
reasoning: {
|
|
23089
|
+
supported: false,
|
|
23090
|
+
automatic: false,
|
|
23091
|
+
effortControl: false,
|
|
23092
|
+
encryptedContent: false,
|
|
23093
|
+
summaryAvailable: false
|
|
23094
|
+
},
|
|
23095
|
+
type: "chat",
|
|
23096
|
+
inputModalities: [
|
|
23097
|
+
"text",
|
|
23098
|
+
"image"
|
|
23099
|
+
],
|
|
23100
|
+
outputModalities: [
|
|
23101
|
+
"text"
|
|
23102
|
+
],
|
|
23103
|
+
family: "grok",
|
|
23104
|
+
version: "4.20",
|
|
23105
|
+
status: "stable",
|
|
23106
|
+
active: true
|
|
23107
|
+
},
|
|
23108
|
+
"xai/grok-4.20-non-reasoning": {
|
|
23109
|
+
providerModelName: "grok-4.20-0309-non-reasoning",
|
|
23110
|
+
aliases: [
|
|
23111
|
+
"grok-4.20-0309-non-reasoning"
|
|
23112
|
+
],
|
|
23113
|
+
pricing: {
|
|
23114
|
+
inputPerMTok: 1.25,
|
|
23115
|
+
outputPerMTok: 2.5,
|
|
23116
|
+
cacheReadPerMTok: 0.2,
|
|
23117
|
+
tiers: {
|
|
23118
|
+
"long-context": {
|
|
23119
|
+
inputPerMTok: 2.5,
|
|
23120
|
+
outputPerMTok: 5,
|
|
23121
|
+
cacheReadPerMTok: 0.4
|
|
23122
|
+
}
|
|
23123
|
+
}
|
|
23124
|
+
},
|
|
23125
|
+
preferredApi: "responses",
|
|
23126
|
+
supportedApis: [
|
|
23127
|
+
"responses",
|
|
23128
|
+
"completions"
|
|
23129
|
+
],
|
|
23130
|
+
capabilities: {
|
|
23131
|
+
toolUse: true,
|
|
23132
|
+
streaming: true,
|
|
23133
|
+
structuredOutput: true,
|
|
23134
|
+
vision: true,
|
|
23135
|
+
audio: false,
|
|
23136
|
+
video: false,
|
|
23137
|
+
imageGeneration: false,
|
|
23138
|
+
audioGeneration: false,
|
|
23139
|
+
videoGeneration: false
|
|
23140
|
+
},
|
|
23141
|
+
reasoning: {
|
|
23142
|
+
supported: false,
|
|
23143
|
+
automatic: false,
|
|
23144
|
+
effortControl: false,
|
|
23145
|
+
encryptedContent: false,
|
|
23146
|
+
summaryAvailable: false
|
|
23147
|
+
},
|
|
23148
|
+
type: "chat",
|
|
23149
|
+
inputModalities: [
|
|
23150
|
+
"text",
|
|
23151
|
+
"image"
|
|
23152
|
+
],
|
|
23153
|
+
outputModalities: [
|
|
23154
|
+
"text"
|
|
23155
|
+
],
|
|
23156
|
+
family: "grok",
|
|
23157
|
+
version: "4.20",
|
|
23158
|
+
status: "stable",
|
|
23159
|
+
active: true,
|
|
23160
|
+
contextWindow: 2e6
|
|
23161
|
+
},
|
|
23162
|
+
"xai/grok-4.20-multi-agent": {
|
|
23163
|
+
providerModelName: "grok-4.20-multi-agent-0309",
|
|
23164
|
+
aliases: [
|
|
23165
|
+
"grok-4.20-multi-agent-0309"
|
|
23166
|
+
],
|
|
23167
|
+
pricing: {
|
|
23168
|
+
inputPerMTok: 1.25,
|
|
23169
|
+
outputPerMTok: 2.5,
|
|
23170
|
+
cacheReadPerMTok: 0.2,
|
|
23171
|
+
tiers: {
|
|
23172
|
+
"long-context": {
|
|
23173
|
+
inputPerMTok: 2.5,
|
|
23174
|
+
outputPerMTok: 5,
|
|
23175
|
+
cacheReadPerMTok: 0.4
|
|
23176
|
+
}
|
|
23177
|
+
}
|
|
23178
|
+
},
|
|
23179
|
+
preferredApi: "responses",
|
|
23180
|
+
supportedApis: [
|
|
23181
|
+
"responses"
|
|
23182
|
+
],
|
|
23183
|
+
contextWindow: 2e6,
|
|
23184
|
+
capabilities: {
|
|
23185
|
+
toolUse: true,
|
|
23186
|
+
streaming: true,
|
|
23187
|
+
structuredOutput: true,
|
|
23188
|
+
vision: true,
|
|
23189
|
+
audio: false,
|
|
23190
|
+
video: false,
|
|
23191
|
+
imageGeneration: false,
|
|
23192
|
+
audioGeneration: false,
|
|
23193
|
+
videoGeneration: false
|
|
23194
|
+
},
|
|
23195
|
+
reasoning: {
|
|
23196
|
+
supported: false,
|
|
23197
|
+
automatic: false,
|
|
23198
|
+
effortControl: false,
|
|
23199
|
+
encryptedContent: false,
|
|
23200
|
+
summaryAvailable: false
|
|
23201
|
+
},
|
|
23202
|
+
type: "chat",
|
|
23203
|
+
inputModalities: [
|
|
23204
|
+
"text",
|
|
23205
|
+
"image"
|
|
23206
|
+
],
|
|
23207
|
+
outputModalities: [
|
|
23208
|
+
"text"
|
|
23209
|
+
],
|
|
23210
|
+
family: "grok",
|
|
23211
|
+
version: "4.20",
|
|
23212
|
+
status: "stable",
|
|
23213
|
+
active: true
|
|
23214
|
+
},
|
|
23215
|
+
"xai/grok-4.3": {
|
|
23216
|
+
providerModelName: "grok-4.3",
|
|
23217
|
+
aliases: [
|
|
23218
|
+
"grok-4.3"
|
|
23219
|
+
],
|
|
23220
|
+
pricing: {
|
|
23221
|
+
inputPerMTok: 1.25,
|
|
23222
|
+
outputPerMTok: 2.5,
|
|
23223
|
+
cacheReadPerMTok: 0.2,
|
|
23224
|
+
tiers: {
|
|
23225
|
+
"long-context": {
|
|
23226
|
+
inputPerMTok: 2.5,
|
|
23227
|
+
outputPerMTok: 5,
|
|
23228
|
+
cacheReadPerMTok: 0.4
|
|
23229
|
+
}
|
|
23230
|
+
}
|
|
23231
|
+
},
|
|
23232
|
+
preferredApi: "responses",
|
|
23233
|
+
supportedApis: [
|
|
23234
|
+
"responses",
|
|
23235
|
+
"completions"
|
|
23236
|
+
],
|
|
23237
|
+
contextWindow: 1e6,
|
|
23238
|
+
maxOutput: 1e6,
|
|
23239
|
+
capabilities: {
|
|
23240
|
+
toolUse: true,
|
|
23241
|
+
streaming: true,
|
|
23242
|
+
structuredOutput: true,
|
|
23243
|
+
vision: true,
|
|
23244
|
+
audio: false,
|
|
23245
|
+
video: false,
|
|
23246
|
+
imageGeneration: false,
|
|
23247
|
+
audioGeneration: false,
|
|
23248
|
+
videoGeneration: false
|
|
23249
|
+
},
|
|
23250
|
+
reasoning: {
|
|
23251
|
+
supported: false,
|
|
23252
|
+
automatic: false,
|
|
23253
|
+
effortControl: false,
|
|
23254
|
+
encryptedContent: false,
|
|
23255
|
+
summaryAvailable: false
|
|
23256
|
+
},
|
|
23257
|
+
type: "chat",
|
|
23258
|
+
inputModalities: [
|
|
23259
|
+
"text",
|
|
23260
|
+
"image"
|
|
23261
|
+
],
|
|
23262
|
+
outputModalities: [
|
|
23263
|
+
"text"
|
|
23264
|
+
],
|
|
23265
|
+
family: "grok",
|
|
23266
|
+
version: "4.3",
|
|
23267
|
+
status: "stable",
|
|
23268
|
+
active: true
|
|
23269
|
+
},
|
|
23270
|
+
"xai/grok-build-0.1": {
|
|
23271
|
+
providerModelName: "grok-build-0.1",
|
|
23272
|
+
aliases: [
|
|
23273
|
+
"grok-build-0.1"
|
|
23274
|
+
],
|
|
23275
|
+
pricing: {
|
|
23276
|
+
inputPerMTok: 1,
|
|
23277
|
+
outputPerMTok: 2,
|
|
23278
|
+
cacheReadPerMTok: 0.2,
|
|
23279
|
+
tiers: {
|
|
23280
|
+
"long-context": {
|
|
23281
|
+
inputPerMTok: 2,
|
|
23282
|
+
outputPerMTok: 4,
|
|
23283
|
+
cacheReadPerMTok: 0.4
|
|
23284
|
+
}
|
|
23285
|
+
}
|
|
23286
|
+
},
|
|
23287
|
+
preferredApi: "responses",
|
|
23288
|
+
supportedApis: [
|
|
23289
|
+
"responses",
|
|
23290
|
+
"completions"
|
|
23291
|
+
],
|
|
23292
|
+
contextWindow: 256e3,
|
|
23293
|
+
capabilities: {
|
|
23294
|
+
toolUse: true,
|
|
23295
|
+
streaming: true,
|
|
23296
|
+
structuredOutput: true,
|
|
23297
|
+
vision: true,
|
|
23298
|
+
audio: false,
|
|
23299
|
+
video: false,
|
|
23300
|
+
imageGeneration: false,
|
|
23301
|
+
audioGeneration: false,
|
|
23302
|
+
videoGeneration: false
|
|
23303
|
+
},
|
|
23304
|
+
reasoning: {
|
|
23305
|
+
supported: false,
|
|
23306
|
+
automatic: false,
|
|
23307
|
+
effortControl: false,
|
|
23308
|
+
encryptedContent: false,
|
|
23309
|
+
summaryAvailable: false
|
|
23310
|
+
},
|
|
23311
|
+
type: "code",
|
|
23312
|
+
inputModalities: [
|
|
23313
|
+
"text",
|
|
23314
|
+
"image"
|
|
23315
|
+
],
|
|
23316
|
+
outputModalities: [
|
|
23317
|
+
"text"
|
|
23318
|
+
],
|
|
23319
|
+
family: "grok",
|
|
23320
|
+
version: "0.1",
|
|
23321
|
+
status: "preview",
|
|
23322
|
+
active: true
|
|
23323
|
+
},
|
|
23324
|
+
"xai/grok-imagine-image": {
|
|
23325
|
+
providerModelName: "grok-imagine-image",
|
|
23326
|
+
aliases: [
|
|
23327
|
+
"grok-imagine-image"
|
|
23328
|
+
],
|
|
23329
|
+
pricing: {
|
|
23330
|
+
perUnit: {
|
|
23331
|
+
"1k": 0.02,
|
|
23332
|
+
"2k": 0.02
|
|
23333
|
+
},
|
|
23334
|
+
perImage: 0.02
|
|
23335
|
+
},
|
|
23336
|
+
preferredApi: "responses",
|
|
23337
|
+
supportedApis: [
|
|
23338
|
+
"responses",
|
|
23339
|
+
"completions"
|
|
23340
|
+
],
|
|
23341
|
+
capabilities: {
|
|
23342
|
+
toolUse: false,
|
|
23343
|
+
streaming: true,
|
|
23344
|
+
structuredOutput: false,
|
|
23345
|
+
vision: true,
|
|
23346
|
+
audio: false,
|
|
23347
|
+
video: false,
|
|
23348
|
+
imageGeneration: true,
|
|
23349
|
+
audioGeneration: false,
|
|
23350
|
+
videoGeneration: false
|
|
23351
|
+
},
|
|
23352
|
+
reasoning: {
|
|
23353
|
+
supported: false,
|
|
23354
|
+
automatic: false,
|
|
23355
|
+
effortControl: false,
|
|
23356
|
+
encryptedContent: false,
|
|
23357
|
+
summaryAvailable: false
|
|
23358
|
+
},
|
|
23359
|
+
type: "image",
|
|
23360
|
+
inputModalities: [
|
|
23361
|
+
"text",
|
|
23362
|
+
"image"
|
|
23363
|
+
],
|
|
23364
|
+
outputModalities: [
|
|
23365
|
+
"image"
|
|
23366
|
+
],
|
|
23367
|
+
family: "grok-imagine-image",
|
|
23368
|
+
version: "1",
|
|
23369
|
+
status: "stable",
|
|
23370
|
+
active: true,
|
|
23371
|
+
mediaParams: {
|
|
23372
|
+
aspectRatio: {
|
|
23373
|
+
values: [
|
|
23374
|
+
"1:1",
|
|
23375
|
+
"3:4",
|
|
23376
|
+
"4:3",
|
|
23377
|
+
"9:16",
|
|
23378
|
+
"16:9",
|
|
23379
|
+
"2:3",
|
|
23380
|
+
"3:2",
|
|
23381
|
+
"9:19.5",
|
|
23382
|
+
"19.5:9",
|
|
23383
|
+
"9:20",
|
|
23384
|
+
"20:9",
|
|
23385
|
+
"1:2",
|
|
23386
|
+
"2:1",
|
|
23387
|
+
"auto"
|
|
23388
|
+
]
|
|
23389
|
+
},
|
|
23390
|
+
resolution: {
|
|
23391
|
+
values: [
|
|
23392
|
+
"1k",
|
|
23393
|
+
"2k"
|
|
23394
|
+
]
|
|
23395
|
+
}
|
|
23396
|
+
}
|
|
23397
|
+
},
|
|
23398
|
+
"xai/grok-imagine-image-quality": {
|
|
23399
|
+
providerModelName: "grok-imagine-image-quality",
|
|
23400
|
+
aliases: [
|
|
23401
|
+
"grok-imagine-image-quality"
|
|
23402
|
+
],
|
|
23403
|
+
pricing: {
|
|
23404
|
+
perUnit: {
|
|
23405
|
+
"1k": 0.05,
|
|
23406
|
+
"2k": 0.07
|
|
23407
|
+
},
|
|
23408
|
+
perImage: 0.05
|
|
23409
|
+
},
|
|
23410
|
+
preferredApi: "responses",
|
|
23411
|
+
supportedApis: [
|
|
23412
|
+
"responses",
|
|
23413
|
+
"completions"
|
|
23414
|
+
],
|
|
23415
|
+
capabilities: {
|
|
23416
|
+
toolUse: false,
|
|
23417
|
+
streaming: true,
|
|
23418
|
+
structuredOutput: false,
|
|
23419
|
+
vision: true,
|
|
23420
|
+
audio: false,
|
|
23421
|
+
video: false,
|
|
23422
|
+
imageGeneration: true,
|
|
23423
|
+
audioGeneration: false,
|
|
23424
|
+
videoGeneration: false
|
|
23425
|
+
},
|
|
23426
|
+
reasoning: {
|
|
23427
|
+
supported: false,
|
|
23428
|
+
automatic: false,
|
|
23429
|
+
effortControl: false,
|
|
23430
|
+
encryptedContent: false,
|
|
23431
|
+
summaryAvailable: false
|
|
23432
|
+
},
|
|
23433
|
+
type: "image",
|
|
23434
|
+
inputModalities: [
|
|
23435
|
+
"text",
|
|
23436
|
+
"image"
|
|
23437
|
+
],
|
|
23438
|
+
outputModalities: [
|
|
23439
|
+
"image"
|
|
23440
|
+
],
|
|
23441
|
+
family: "grok-imagine-image",
|
|
23442
|
+
version: "1",
|
|
23443
|
+
status: "stable",
|
|
23444
|
+
active: true,
|
|
23445
|
+
mediaParams: {
|
|
23446
|
+
aspectRatio: {
|
|
23447
|
+
values: [
|
|
23448
|
+
"1:1",
|
|
23449
|
+
"3:4",
|
|
23450
|
+
"4:3",
|
|
23451
|
+
"9:16",
|
|
23452
|
+
"16:9",
|
|
23453
|
+
"2:3",
|
|
23454
|
+
"3:2",
|
|
23455
|
+
"9:19.5",
|
|
23456
|
+
"19.5:9",
|
|
23457
|
+
"9:20",
|
|
23458
|
+
"20:9",
|
|
23459
|
+
"1:2",
|
|
23460
|
+
"2:1",
|
|
23461
|
+
"auto"
|
|
23462
|
+
]
|
|
23463
|
+
},
|
|
23464
|
+
resolution: {
|
|
23465
|
+
values: [
|
|
23466
|
+
"1k",
|
|
23467
|
+
"2k"
|
|
23468
|
+
]
|
|
23469
|
+
}
|
|
23470
|
+
}
|
|
23471
|
+
},
|
|
23472
|
+
"xai/grok-imagine-video": {
|
|
23473
|
+
providerModelName: "grok-imagine-video",
|
|
23474
|
+
aliases: [
|
|
23475
|
+
"grok-imagine-video"
|
|
23476
|
+
],
|
|
23477
|
+
pricing: {
|
|
23478
|
+
perSecond: 0.01,
|
|
23479
|
+
perUnit: {
|
|
23480
|
+
"480p": 0.05,
|
|
23481
|
+
"720p": 0.07
|
|
23482
|
+
},
|
|
23483
|
+
perImage: 2e-3
|
|
23484
|
+
},
|
|
23485
|
+
preferredApi: "responses",
|
|
23486
|
+
supportedApis: [
|
|
23487
|
+
"responses",
|
|
23488
|
+
"completions"
|
|
23489
|
+
],
|
|
23490
|
+
capabilities: {
|
|
23491
|
+
toolUse: false,
|
|
23492
|
+
streaming: true,
|
|
23493
|
+
structuredOutput: false,
|
|
23494
|
+
vision: true,
|
|
23495
|
+
audio: false,
|
|
23496
|
+
video: false,
|
|
23497
|
+
imageGeneration: false,
|
|
23498
|
+
audioGeneration: false,
|
|
23499
|
+
videoGeneration: true
|
|
23500
|
+
},
|
|
23501
|
+
reasoning: {
|
|
23502
|
+
supported: false,
|
|
23503
|
+
automatic: false,
|
|
23504
|
+
effortControl: false,
|
|
23505
|
+
encryptedContent: false,
|
|
23506
|
+
summaryAvailable: false
|
|
23507
|
+
},
|
|
23508
|
+
type: "video",
|
|
23509
|
+
inputModalities: [
|
|
23510
|
+
"text",
|
|
23511
|
+
"image"
|
|
23512
|
+
],
|
|
23513
|
+
outputModalities: [
|
|
23514
|
+
"video"
|
|
23515
|
+
],
|
|
23516
|
+
family: "grok-imagine-video",
|
|
23517
|
+
version: "1",
|
|
23518
|
+
status: "stable",
|
|
23519
|
+
active: true,
|
|
23520
|
+
mediaParams: {
|
|
23521
|
+
duration: {
|
|
23522
|
+
min: 1,
|
|
23523
|
+
max: 15,
|
|
23524
|
+
default: 8
|
|
23525
|
+
},
|
|
23526
|
+
aspectRatio: {
|
|
23527
|
+
values: [
|
|
23528
|
+
"1:1",
|
|
23529
|
+
"16:9",
|
|
23530
|
+
"9:16",
|
|
23531
|
+
"4:3",
|
|
23532
|
+
"3:4",
|
|
23533
|
+
"3:2",
|
|
23534
|
+
"2:3"
|
|
23535
|
+
]
|
|
23536
|
+
},
|
|
23537
|
+
resolution: {
|
|
23538
|
+
values: [
|
|
23539
|
+
"480p",
|
|
23540
|
+
"720p",
|
|
23541
|
+
"1080p"
|
|
23542
|
+
]
|
|
23543
|
+
}
|
|
23544
|
+
}
|
|
23545
|
+
},
|
|
23546
|
+
"xai/grok-imagine-video-1.5": {
|
|
23547
|
+
providerModelName: "grok-imagine-video-1.5-preview",
|
|
23548
|
+
aliases: [
|
|
23549
|
+
"grok-imagine-video-1.5-preview",
|
|
23550
|
+
"grok-imagine-video-1.5"
|
|
23551
|
+
],
|
|
23552
|
+
pricing: {
|
|
23553
|
+
perSecond: 0.01,
|
|
23554
|
+
perUnit: {
|
|
23555
|
+
"480p": 0.08,
|
|
23556
|
+
"720p": 0.14,
|
|
23557
|
+
"1080p": 0.25
|
|
23558
|
+
},
|
|
23559
|
+
perImage: 0.01
|
|
23560
|
+
},
|
|
23561
|
+
preferredApi: "responses",
|
|
23562
|
+
supportedApis: [
|
|
23563
|
+
"responses",
|
|
23564
|
+
"completions"
|
|
23565
|
+
],
|
|
23566
|
+
capabilities: {
|
|
23567
|
+
toolUse: false,
|
|
23568
|
+
streaming: true,
|
|
23569
|
+
structuredOutput: false,
|
|
23570
|
+
vision: true,
|
|
23571
|
+
audio: false,
|
|
23572
|
+
video: false,
|
|
23573
|
+
imageGeneration: false,
|
|
23574
|
+
audioGeneration: false,
|
|
23575
|
+
videoGeneration: true
|
|
23576
|
+
},
|
|
23577
|
+
reasoning: {
|
|
23578
|
+
supported: false,
|
|
23579
|
+
automatic: false,
|
|
23580
|
+
effortControl: false,
|
|
23581
|
+
encryptedContent: false,
|
|
23582
|
+
summaryAvailable: false
|
|
23583
|
+
},
|
|
23584
|
+
type: "video",
|
|
23585
|
+
inputModalities: [
|
|
23586
|
+
"text",
|
|
23587
|
+
"image"
|
|
23588
|
+
],
|
|
23589
|
+
outputModalities: [
|
|
23590
|
+
"video"
|
|
23591
|
+
],
|
|
23592
|
+
family: "grok-imagine-video",
|
|
23593
|
+
version: "1.5",
|
|
23594
|
+
status: "preview",
|
|
23595
|
+
active: true,
|
|
23596
|
+
mediaParams: {
|
|
23597
|
+
duration: {
|
|
23598
|
+
min: 1,
|
|
23599
|
+
max: 15,
|
|
23600
|
+
default: 8
|
|
23601
|
+
},
|
|
23602
|
+
aspectRatio: {
|
|
23603
|
+
values: [
|
|
23604
|
+
"1:1",
|
|
23605
|
+
"16:9",
|
|
23606
|
+
"9:16",
|
|
23607
|
+
"4:3",
|
|
23608
|
+
"3:4",
|
|
23609
|
+
"3:2",
|
|
23610
|
+
"2:3"
|
|
23611
|
+
]
|
|
23612
|
+
},
|
|
23613
|
+
resolution: {
|
|
23614
|
+
values: [
|
|
23615
|
+
"480p",
|
|
23616
|
+
"720p",
|
|
23617
|
+
"1080p"
|
|
23618
|
+
]
|
|
23619
|
+
}
|
|
23620
|
+
}
|
|
23621
|
+
},
|
|
23622
|
+
"xai/grok-4.5": {
|
|
23623
|
+
providerModelName: "grok-4.5",
|
|
23624
|
+
aliases: [
|
|
23625
|
+
"grok-4.5"
|
|
23626
|
+
],
|
|
23627
|
+
pricing: {
|
|
23628
|
+
inputPerMTok: 2,
|
|
23629
|
+
outputPerMTok: 6,
|
|
23630
|
+
cacheReadPerMTok: 0.5,
|
|
23631
|
+
tiers: {
|
|
23632
|
+
"long-context": {
|
|
23633
|
+
inputPerMTok: 4,
|
|
23634
|
+
outputPerMTok: 12,
|
|
23635
|
+
cacheReadPerMTok: 1
|
|
23636
|
+
}
|
|
23637
|
+
}
|
|
23638
|
+
},
|
|
23639
|
+
preferredApi: "responses",
|
|
23640
|
+
supportedApis: [
|
|
23641
|
+
"responses",
|
|
23642
|
+
"completions"
|
|
23643
|
+
],
|
|
23644
|
+
contextWindow: 5e5,
|
|
23645
|
+
maxOutput: 5e5,
|
|
21726
23646
|
capabilities: {
|
|
21727
23647
|
toolUse: true,
|
|
21728
23648
|
streaming: true,
|
|
@@ -21750,366 +23670,17 @@ var catalog_default5 = {
|
|
|
21750
23670
|
"text"
|
|
21751
23671
|
],
|
|
21752
23672
|
family: "grok",
|
|
21753
|
-
version: "4.
|
|
23673
|
+
version: "4.5",
|
|
21754
23674
|
status: "stable",
|
|
21755
23675
|
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
23676
|
}
|
|
22106
23677
|
};
|
|
22107
23678
|
|
|
22108
23679
|
// src/llm/providers/builtin-tools.ts
|
|
22109
23680
|
var PROVIDER_BUILTIN_TOOLS = {
|
|
22110
|
-
anthropic: ["web_search", "code_interpreter"],
|
|
23681
|
+
anthropic: ["web_search", "web_fetch", "code_interpreter"],
|
|
22111
23682
|
openai: ["web_search", "code_interpreter"],
|
|
22112
|
-
google: ["web_search", "code_interpreter"],
|
|
23683
|
+
google: ["web_search", "web_fetch", "code_interpreter"],
|
|
22113
23684
|
xai: ["web_search", "code_interpreter"],
|
|
22114
23685
|
openrouter: ["web_search"]
|
|
22115
23686
|
};
|
|
@@ -22664,6 +24235,20 @@ function resolveServerState(args) {
|
|
|
22664
24235
|
// src/llm/client-internal.ts
|
|
22665
24236
|
var PRIORITY_INTERACTIVE = 1;
|
|
22666
24237
|
var PRIORITY_BACKGROUND = 2;
|
|
24238
|
+
function buildAssistantMessage(response, origin) {
|
|
24239
|
+
const stateful = origin.api === "responses" || origin.api === "interactions";
|
|
24240
|
+
return {
|
|
24241
|
+
role: "assistant",
|
|
24242
|
+
content: response.content,
|
|
24243
|
+
id: response.id || crypto.randomUUID(),
|
|
24244
|
+
createdAt: Date.now(),
|
|
24245
|
+
origin: {
|
|
24246
|
+
provider: origin.provider,
|
|
24247
|
+
model: origin.model,
|
|
24248
|
+
...stateful && response.id ? { serverStateId: response.id } : {}
|
|
24249
|
+
}
|
|
24250
|
+
};
|
|
24251
|
+
}
|
|
22667
24252
|
function normalizeInput(input) {
|
|
22668
24253
|
if (typeof input === "string") {
|
|
22669
24254
|
return [{ role: "user", content: input }];
|
|
@@ -22694,7 +24279,11 @@ function contentToText(content) {
|
|
|
22694
24279
|
}
|
|
22695
24280
|
function parseStructured(text) {
|
|
22696
24281
|
const stripped = text.trim().replace(/^```(?:json)?\s*/i, "").replace(/```\s*$/i, "").trim();
|
|
22697
|
-
|
|
24282
|
+
try {
|
|
24283
|
+
return JSON.parse(stripped);
|
|
24284
|
+
} catch (cause) {
|
|
24285
|
+
throw new InvalidFinalOutputError(text, { cause });
|
|
24286
|
+
}
|
|
22698
24287
|
}
|
|
22699
24288
|
function buildContext(client, options) {
|
|
22700
24289
|
const provided = options.ctx ?? {};
|
|
@@ -22815,18 +24404,11 @@ var LLMClient = class {
|
|
|
22815
24404
|
* const r2 = await llm.complete(messages); // sends id + only the new turn
|
|
22816
24405
|
*/
|
|
22817
24406
|
assistantMessage(response) {
|
|
22818
|
-
|
|
22819
|
-
|
|
22820
|
-
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
createdAt: Date.now(),
|
|
22824
|
-
origin: {
|
|
22825
|
-
provider: this.provider,
|
|
22826
|
-
model: this.model,
|
|
22827
|
-
...stateful && response.id ? { serverStateId: response.id } : {}
|
|
22828
|
-
}
|
|
22829
|
-
};
|
|
24407
|
+
return buildAssistantMessage(response, {
|
|
24408
|
+
provider: this.provider,
|
|
24409
|
+
model: this.model,
|
|
24410
|
+
api: this.api
|
|
24411
|
+
});
|
|
22830
24412
|
}
|
|
22831
24413
|
// ─── Moderation helpers ───────────────────────────────────────────────
|
|
22832
24414
|
/** Resolve the OpenAI key the emulated moderation path needs. Reuses the
|
|
@@ -22891,6 +24473,8 @@ var LLMClient = class {
|
|
|
22891
24473
|
maxTokens: options.maxTokens,
|
|
22892
24474
|
temperature: options.temperature,
|
|
22893
24475
|
topP: options.topP,
|
|
24476
|
+
presencePenalty: options.presencePenalty,
|
|
24477
|
+
frequencyPenalty: options.frequencyPenalty,
|
|
22894
24478
|
stop: options.stop,
|
|
22895
24479
|
tools: options.tools,
|
|
22896
24480
|
toolChoice: options.toolChoice,
|
|
@@ -23017,11 +24601,24 @@ var LLMClient = class {
|
|
|
23017
24601
|
* leading/trailing markdown fences from the model reply, then JSON.parses
|
|
23018
24602
|
* to T. Throws if the parse fails — callers should catch + retry. */
|
|
23019
24603
|
async structuredComplete(input, schema, options = {}) {
|
|
23020
|
-
const
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
24604
|
+
const structured = { ...options.structured ?? {}, schema };
|
|
24605
|
+
const repairAttempts = Math.max(0, structured.repairAttempts ?? 0);
|
|
24606
|
+
const messages = normalizeInput(input);
|
|
24607
|
+
for (let attempt = 0; ; attempt++) {
|
|
24608
|
+
const res = await this.complete(messages, { ...options, structured });
|
|
24609
|
+
try {
|
|
24610
|
+
return parseStructured(res.text);
|
|
24611
|
+
} catch (err) {
|
|
24612
|
+
if (!(err instanceof InvalidFinalOutputError) || attempt >= repairAttempts) throw err;
|
|
24613
|
+
messages.push(
|
|
24614
|
+
{ role: "assistant", content: res.text },
|
|
24615
|
+
{
|
|
24616
|
+
role: "user",
|
|
24617
|
+
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.`
|
|
24618
|
+
}
|
|
24619
|
+
);
|
|
24620
|
+
}
|
|
24621
|
+
}
|
|
23025
24622
|
}
|
|
23026
24623
|
async *stream(input, options = {}) {
|
|
23027
24624
|
if (!this.fetchStreamFn) {
|
|
@@ -23038,6 +24635,8 @@ var LLMClient = class {
|
|
|
23038
24635
|
maxTokens: options.maxTokens,
|
|
23039
24636
|
temperature: options.temperature,
|
|
23040
24637
|
topP: options.topP,
|
|
24638
|
+
presencePenalty: options.presencePenalty,
|
|
24639
|
+
frequencyPenalty: options.frequencyPenalty,
|
|
23041
24640
|
stop: options.stop,
|
|
23042
24641
|
tools: options.tools,
|
|
23043
24642
|
toolChoice: options.toolChoice,
|
|
@@ -23142,8 +24741,15 @@ var LLMClient = class {
|
|
|
23142
24741
|
case "file":
|
|
23143
24742
|
files.push(event.file);
|
|
23144
24743
|
break;
|
|
23145
|
-
case "
|
|
23146
|
-
builtinToolCalls.push({
|
|
24744
|
+
case "builtin_tool_end":
|
|
24745
|
+
builtinToolCalls.push({
|
|
24746
|
+
tool: event.tool,
|
|
24747
|
+
...event.id ? { id: event.id } : {},
|
|
24748
|
+
...event.code ? { code: event.code } : {},
|
|
24749
|
+
...event.output ? { output: event.output } : {},
|
|
24750
|
+
...event.query ? { query: event.query } : {},
|
|
24751
|
+
...event.url ? { url: event.url } : {}
|
|
24752
|
+
});
|
|
23147
24753
|
break;
|
|
23148
24754
|
case "moderation":
|
|
23149
24755
|
moderationReport = this.mergeModeration(
|
|
@@ -23409,10 +25015,12 @@ var NATIVE_TO_UNIFIED = {
|
|
|
23409
25015
|
code_interpreter_call: "code_interpreter",
|
|
23410
25016
|
// Anthropic server_tool_use names
|
|
23411
25017
|
web_search: "web_search",
|
|
25018
|
+
web_fetch: "web_fetch",
|
|
23412
25019
|
code_execution: "code_interpreter",
|
|
23413
25020
|
bash_code_execution: "code_interpreter",
|
|
23414
25021
|
// Anthropic *_tool_result block types
|
|
23415
25022
|
web_search_tool_result: "web_search",
|
|
25023
|
+
web_fetch_tool_result: "web_fetch",
|
|
23416
25024
|
code_execution_tool_result: "code_interpreter",
|
|
23417
25025
|
bash_code_execution_tool_result: "code_interpreter"
|
|
23418
25026
|
};
|
|
@@ -23463,6 +25071,24 @@ function filesFromCodeExecBlock(block) {
|
|
|
23463
25071
|
}
|
|
23464
25072
|
return files;
|
|
23465
25073
|
}
|
|
25074
|
+
function builtinInputPayload(tool, input) {
|
|
25075
|
+
if (!input) return {};
|
|
25076
|
+
if (tool === "code_interpreter") {
|
|
25077
|
+
const code = input.code ?? input.command;
|
|
25078
|
+
return typeof code === "string" ? { code } : {};
|
|
25079
|
+
}
|
|
25080
|
+
if (tool === "web_search") {
|
|
25081
|
+
return typeof input.query === "string" ? { query: input.query } : {};
|
|
25082
|
+
}
|
|
25083
|
+
if (tool === "web_fetch") {
|
|
25084
|
+
return typeof input.url === "string" ? { url: input.url } : {};
|
|
25085
|
+
}
|
|
25086
|
+
return {};
|
|
25087
|
+
}
|
|
25088
|
+
function resultStdout(content) {
|
|
25089
|
+
const c = content;
|
|
25090
|
+
return c && typeof c.stdout === "string" ? c.stdout : void 0;
|
|
25091
|
+
}
|
|
23466
25092
|
var AnthropicAdapter = class {
|
|
23467
25093
|
name = "anthropic";
|
|
23468
25094
|
apiKey;
|
|
@@ -23510,7 +25136,21 @@ var AnthropicAdapter = class {
|
|
|
23510
25136
|
body.tools = req.tools.map((t, i) => {
|
|
23511
25137
|
if (!isFunctionTool(t)) {
|
|
23512
25138
|
if (t.type === "web_search") {
|
|
23513
|
-
return {
|
|
25139
|
+
return {
|
|
25140
|
+
type: "web_search_20260318",
|
|
25141
|
+
name: "web_search",
|
|
25142
|
+
max_uses: 5,
|
|
25143
|
+
allowed_callers: ["direct"],
|
|
25144
|
+
...t.params
|
|
25145
|
+
};
|
|
25146
|
+
}
|
|
25147
|
+
if (t.type === "web_fetch") {
|
|
25148
|
+
return {
|
|
25149
|
+
type: "web_fetch_20260318",
|
|
25150
|
+
name: "web_fetch",
|
|
25151
|
+
allowed_callers: ["direct"],
|
|
25152
|
+
...t.params
|
|
25153
|
+
};
|
|
23514
25154
|
}
|
|
23515
25155
|
if (t.type === "code_interpreter") {
|
|
23516
25156
|
return { type: "code_execution_20260521", name: "code_execution" };
|
|
@@ -23558,6 +25198,10 @@ var AnthropicAdapter = class {
|
|
|
23558
25198
|
});
|
|
23559
25199
|
const headers = {};
|
|
23560
25200
|
if (hasFileRef) headers["anthropic-beta"] = "files-api-2025-04-14";
|
|
25201
|
+
const userProfileId = req.providerOptions?.userProfileId;
|
|
25202
|
+
if (typeof userProfileId === "string" && userProfileId) {
|
|
25203
|
+
headers["anthropic-user-profile-id"] = userProfileId;
|
|
25204
|
+
}
|
|
23561
25205
|
const usesCodeExec = req.tools?.some(
|
|
23562
25206
|
(t) => !isFunctionTool(t) && t.type === "code_interpreter"
|
|
23563
25207
|
);
|
|
@@ -23645,11 +25289,20 @@ var AnthropicAdapter = class {
|
|
|
23645
25289
|
content.push(tc);
|
|
23646
25290
|
toolCalls.push(tc);
|
|
23647
25291
|
} else if (block.type === "server_tool_use") {
|
|
25292
|
+
const tool = unifiedBuiltinTool(block.name);
|
|
23648
25293
|
builtinToolCalls.push({
|
|
23649
|
-
tool
|
|
23650
|
-
...typeof block.id === "string" ? { id: block.id } : {}
|
|
25294
|
+
tool,
|
|
25295
|
+
...typeof block.id === "string" ? { id: block.id } : {},
|
|
25296
|
+
...builtinInputPayload(tool, block.input)
|
|
23651
25297
|
});
|
|
23652
25298
|
} else {
|
|
25299
|
+
if (typeof block.type === "string" && block.type.endsWith("_tool_result")) {
|
|
25300
|
+
const output = resultStdout(block.content);
|
|
25301
|
+
if (output) {
|
|
25302
|
+
const call = builtinToolCalls.find((c) => c.id === block.tool_use_id);
|
|
25303
|
+
if (call) call.output = output;
|
|
25304
|
+
}
|
|
25305
|
+
}
|
|
23653
25306
|
files.push(...filesFromCodeExecBlock(block));
|
|
23654
25307
|
}
|
|
23655
25308
|
}
|
|
@@ -23673,6 +25326,17 @@ var AnthropicAdapter = class {
|
|
|
23673
25326
|
};
|
|
23674
25327
|
}
|
|
23675
25328
|
parseStreamEvent(event) {
|
|
25329
|
+
return this.streamEvents(event, { pending: /* @__PURE__ */ new Map() });
|
|
25330
|
+
}
|
|
25331
|
+
/** Stateful — Anthropic streams `server_tool_use` input via `input_json_delta`
|
|
25332
|
+
* (empty at block start) and returns the result in a separate `*_tool_result`
|
|
25333
|
+
* block. The closure accumulates each call's input (code / query) and attaches it
|
|
25334
|
+
* to the matching `builtin_tool_end`. */
|
|
25335
|
+
createStreamParser() {
|
|
25336
|
+
const state = { pending: /* @__PURE__ */ new Map() };
|
|
25337
|
+
return (event) => this.streamEvents(event, state);
|
|
25338
|
+
}
|
|
25339
|
+
streamEvents(event, state) {
|
|
23676
25340
|
if (event.event === "ping") return [];
|
|
23677
25341
|
const data = JSON.parse(event.data);
|
|
23678
25342
|
const type = data.type;
|
|
@@ -23682,33 +25346,58 @@ var AnthropicAdapter = class {
|
|
|
23682
25346
|
if (delta.type === "thinking_delta")
|
|
23683
25347
|
return [{ type: "thinking", text: delta.thinking }];
|
|
23684
25348
|
if (delta.type === "input_json_delta") {
|
|
25349
|
+
if (state.current) {
|
|
25350
|
+
state.current.json += delta.partial_json ?? "";
|
|
25351
|
+
return [];
|
|
25352
|
+
}
|
|
23685
25353
|
return [{ type: "tool_call_delta", id: "", arguments: delta.partial_json }];
|
|
23686
25354
|
}
|
|
23687
25355
|
}
|
|
23688
25356
|
if (type === "content_block_start") {
|
|
23689
25357
|
const block = data.content_block;
|
|
23690
25358
|
if (block.type === "tool_use") {
|
|
25359
|
+
state.current = void 0;
|
|
23691
25360
|
return [{ type: "tool_call_start", id: block.id, name: block.name }];
|
|
23692
25361
|
}
|
|
23693
25362
|
const events = [];
|
|
23694
25363
|
const blockType = block.type;
|
|
23695
25364
|
if (blockType === "server_tool_use") {
|
|
25365
|
+
const tool = unifiedBuiltinTool(block.name);
|
|
25366
|
+
state.current = { id: block.id ?? "", tool, json: "" };
|
|
23696
25367
|
events.push({
|
|
23697
25368
|
type: "builtin_tool_start",
|
|
23698
|
-
tool
|
|
25369
|
+
tool,
|
|
23699
25370
|
...typeof block.id === "string" ? { id: block.id } : {}
|
|
23700
25371
|
});
|
|
23701
25372
|
} else if (blockType?.endsWith("_tool_result")) {
|
|
25373
|
+
const tool = unifiedBuiltinTool(blockType);
|
|
25374
|
+
const id = typeof block.tool_use_id === "string" ? block.tool_use_id : void 0;
|
|
25375
|
+
const input = id ? state.pending.get(id) : void 0;
|
|
25376
|
+
if (id) state.pending.delete(id);
|
|
25377
|
+
const output = resultStdout(block.content);
|
|
23702
25378
|
events.push({
|
|
23703
25379
|
type: "builtin_tool_end",
|
|
23704
|
-
tool
|
|
23705
|
-
...
|
|
25380
|
+
tool,
|
|
25381
|
+
...id ? { id } : {},
|
|
25382
|
+
...input?.code ? { code: input.code } : {},
|
|
25383
|
+
...input?.query ? { query: input.query } : {},
|
|
25384
|
+
...input?.url ? { url: input.url } : {},
|
|
25385
|
+
...output ? { output } : {}
|
|
23706
25386
|
});
|
|
23707
25387
|
}
|
|
23708
25388
|
for (const file of filesFromCodeExecBlock(block)) events.push({ type: "file", file });
|
|
23709
25389
|
return events;
|
|
23710
25390
|
}
|
|
23711
25391
|
if (type === "content_block_stop") {
|
|
25392
|
+
if (state.current) {
|
|
25393
|
+
let input = {};
|
|
25394
|
+
try {
|
|
25395
|
+
input = JSON.parse(state.current.json || "{}");
|
|
25396
|
+
} catch {
|
|
25397
|
+
}
|
|
25398
|
+
state.pending.set(state.current.id, builtinInputPayload(state.current.tool, input));
|
|
25399
|
+
state.current = void 0;
|
|
25400
|
+
}
|
|
23712
25401
|
}
|
|
23713
25402
|
if (type === "message_delta") {
|
|
23714
25403
|
const delta = data.delta;
|
|
@@ -23730,11 +25419,6 @@ var AnthropicAdapter = class {
|
|
|
23730
25419
|
}
|
|
23731
25420
|
return [];
|
|
23732
25421
|
}
|
|
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
25422
|
parseUsage(u) {
|
|
23739
25423
|
if (!u) return emptyUsage();
|
|
23740
25424
|
const inputTokens = u.input_tokens ?? 0;
|
|
@@ -24045,6 +25729,8 @@ var GoogleAdapter = class {
|
|
|
24045
25729
|
if (req.maxTokens) config.maxOutputTokens = req.maxTokens;
|
|
24046
25730
|
if (req.temperature !== void 0) config.temperature = req.temperature;
|
|
24047
25731
|
if (req.topP !== void 0) config.topP = req.topP;
|
|
25732
|
+
if (req.presencePenalty !== void 0) config.presencePenalty = req.presencePenalty;
|
|
25733
|
+
if (req.frequencyPenalty !== void 0) config.frequencyPenalty = req.frequencyPenalty;
|
|
24048
25734
|
if (req.stop) config.stopSequences = req.stop;
|
|
24049
25735
|
if (req.outputModalities?.includes("audio")) {
|
|
24050
25736
|
config.responseModalities = ["AUDIO"];
|
|
@@ -24080,6 +25766,9 @@ var GoogleAdapter = class {
|
|
|
24080
25766
|
if (req.tools.some((t) => !isFunctionTool(t) && t.type === "code_interpreter")) {
|
|
24081
25767
|
tools.push({ codeExecution: {} });
|
|
24082
25768
|
}
|
|
25769
|
+
if (req.tools.some((t) => !isFunctionTool(t) && t.type === "web_fetch")) {
|
|
25770
|
+
tools.push({ urlContext: {} });
|
|
25771
|
+
}
|
|
24083
25772
|
if (tools.length) body.tools = tools;
|
|
24084
25773
|
}
|
|
24085
25774
|
if (req.toolChoice) {
|
|
@@ -24243,8 +25932,32 @@ var GoogleAdapter = class {
|
|
|
24243
25932
|
{ MAX_TOKENS: "length", SAFETY: "content_filter" }
|
|
24244
25933
|
);
|
|
24245
25934
|
const builtinToolCalls = [];
|
|
24246
|
-
|
|
24247
|
-
|
|
25935
|
+
const codes = parts.filter((p) => p.executableCode?.code).map((p) => p.executableCode.code);
|
|
25936
|
+
const outputs = parts.filter((p) => p.codeExecutionResult).map((p) => String(p.codeExecutionResult.output ?? ""));
|
|
25937
|
+
if (codes.length) {
|
|
25938
|
+
codes.forEach((code, i) => {
|
|
25939
|
+
builtinToolCalls.push({
|
|
25940
|
+
tool: "code_interpreter",
|
|
25941
|
+
code,
|
|
25942
|
+
...outputs[i] ? { output: outputs[i] } : {}
|
|
25943
|
+
});
|
|
25944
|
+
});
|
|
25945
|
+
} else if (hasCodeExec) {
|
|
25946
|
+
builtinToolCalls.push({ tool: "code_interpreter", ...outputs[0] ? { output: outputs[0] } : {} });
|
|
25947
|
+
}
|
|
25948
|
+
const grounding = candidate.groundingMetadata;
|
|
25949
|
+
if (grounding) {
|
|
25950
|
+
const q = grounding.webSearchQueries?.[0];
|
|
25951
|
+
builtinToolCalls.push({ tool: "web_search", ...typeof q === "string" ? { query: q } : {} });
|
|
25952
|
+
}
|
|
25953
|
+
const urlCtx = candidate.urlContextMetadata;
|
|
25954
|
+
const urlMeta = urlCtx?.urlMetadata;
|
|
25955
|
+
if (Array.isArray(urlMeta)) {
|
|
25956
|
+
for (const m of urlMeta) {
|
|
25957
|
+
const url = m.retrievedUrl;
|
|
25958
|
+
builtinToolCalls.push({ tool: "web_fetch", ...typeof url === "string" ? { url } : {} });
|
|
25959
|
+
}
|
|
25960
|
+
}
|
|
24248
25961
|
return {
|
|
24249
25962
|
id: crypto.randomUUID(),
|
|
24250
25963
|
// Google doesn't return a response ID in generateContent
|
|
@@ -24295,8 +26008,21 @@ var GoogleAdapter = class {
|
|
|
24295
26008
|
if (part.text !== void 0 && !part.thought)
|
|
24296
26009
|
events.push({ type: "text", text: part.text });
|
|
24297
26010
|
if (part.thought && part.text) events.push({ type: "thinking", text: part.text });
|
|
24298
|
-
if (part.executableCode)
|
|
24299
|
-
|
|
26011
|
+
if (part.executableCode) {
|
|
26012
|
+
const code = part.executableCode.code;
|
|
26013
|
+
state.pendingCode = typeof code === "string" ? code : void 0;
|
|
26014
|
+
events.push({ type: "builtin_tool_start", tool: "code_interpreter" });
|
|
26015
|
+
}
|
|
26016
|
+
if (part.codeExecutionResult) {
|
|
26017
|
+
const output = part.codeExecutionResult.output;
|
|
26018
|
+
events.push({
|
|
26019
|
+
type: "builtin_tool_end",
|
|
26020
|
+
tool: "code_interpreter",
|
|
26021
|
+
...state.pendingCode ? { code: state.pendingCode } : {},
|
|
26022
|
+
...typeof output === "string" && output ? { output } : {}
|
|
26023
|
+
});
|
|
26024
|
+
state.pendingCode = void 0;
|
|
26025
|
+
}
|
|
24300
26026
|
if (part.inlineData) {
|
|
24301
26027
|
const inline = part.inlineData;
|
|
24302
26028
|
const mime = inline.mimeType;
|
|
@@ -24329,8 +26055,26 @@ var GoogleAdapter = class {
|
|
|
24329
26055
|
}
|
|
24330
26056
|
if (candidate.groundingMetadata && !state.webSearchEmitted) {
|
|
24331
26057
|
state.webSearchEmitted = true;
|
|
26058
|
+
const q = candidate.groundingMetadata.webSearchQueries?.[0];
|
|
24332
26059
|
events.push({ type: "builtin_tool_start", tool: "web_search" });
|
|
24333
|
-
events.push({
|
|
26060
|
+
events.push({
|
|
26061
|
+
type: "builtin_tool_end",
|
|
26062
|
+
tool: "web_search",
|
|
26063
|
+
...typeof q === "string" ? { query: q } : {}
|
|
26064
|
+
});
|
|
26065
|
+
}
|
|
26066
|
+
const streamUrlMeta = candidate.urlContextMetadata?.urlMetadata;
|
|
26067
|
+
if (Array.isArray(streamUrlMeta) && !state.urlFetchEmitted) {
|
|
26068
|
+
state.urlFetchEmitted = true;
|
|
26069
|
+
for (const m of streamUrlMeta) {
|
|
26070
|
+
const url = m.retrievedUrl;
|
|
26071
|
+
events.push({ type: "builtin_tool_start", tool: "web_fetch" });
|
|
26072
|
+
events.push({
|
|
26073
|
+
type: "builtin_tool_end",
|
|
26074
|
+
tool: "web_fetch",
|
|
26075
|
+
...typeof url === "string" ? { url } : {}
|
|
26076
|
+
});
|
|
26077
|
+
}
|
|
24334
26078
|
}
|
|
24335
26079
|
const fr = candidate.finishReason;
|
|
24336
26080
|
if (fr)
|
|
@@ -24400,6 +26144,8 @@ var GoogleInteractionsAdapter = class {
|
|
|
24400
26144
|
if (req.maxTokens) genConfig.max_output_tokens = req.maxTokens;
|
|
24401
26145
|
if (req.temperature !== void 0) genConfig.temperature = req.temperature;
|
|
24402
26146
|
if (req.topP !== void 0) genConfig.top_p = req.topP;
|
|
26147
|
+
if (req.presencePenalty !== void 0) genConfig.presence_penalty = req.presencePenalty;
|
|
26148
|
+
if (req.frequencyPenalty !== void 0) genConfig.frequency_penalty = req.frequencyPenalty;
|
|
24403
26149
|
if (req.stop) genConfig.stop_sequences = req.stop;
|
|
24404
26150
|
if (req.tools?.length) {
|
|
24405
26151
|
body.tools = req.tools.filter(isFunctionTool).map((t) => ({
|
|
@@ -24415,6 +26161,8 @@ var GoogleInteractionsAdapter = class {
|
|
|
24415
26161
|
};
|
|
24416
26162
|
}
|
|
24417
26163
|
if (Object.keys(genConfig).length > 0) body.generation_config = genConfig;
|
|
26164
|
+
const cachedContent = req.providerOptions?.cachedContent;
|
|
26165
|
+
if (typeof cachedContent === "string" && cachedContent) body.cached_content = cachedContent;
|
|
24418
26166
|
if (req.structured) {
|
|
24419
26167
|
body.response_format = {
|
|
24420
26168
|
type: "text",
|
|
@@ -24572,47 +26320,77 @@ var GoogleInteractionsAdapter = class {
|
|
|
24572
26320
|
raw
|
|
24573
26321
|
};
|
|
24574
26322
|
}
|
|
24575
|
-
|
|
26323
|
+
/** Translate one Interactions SSE event to unified events. The 2.10 wire is a
|
|
26324
|
+
* step machine (verified live): `step.start` opens a typed step (`model_output`,
|
|
26325
|
+
* `function_call`, `thought`…), `step.delta` streams its payload (`{type:'text'}`,
|
|
26326
|
+
* `{type:'arguments_delta'}`, `{type:'thought_summary'}`, internal
|
|
26327
|
+
* `thought_signature`), `step.stop` closes it, and `interaction.completed` /
|
|
26328
|
+
* `interaction.failed` finish the turn (usage under `interaction.usage`). A
|
|
26329
|
+
* function call's `arguments_delta` carries no id, so we correlate it to the
|
|
26330
|
+
* currently-open call id held in `state`. */
|
|
26331
|
+
streamEvents(event, state) {
|
|
24576
26332
|
const data = JSON.parse(event.data);
|
|
24577
26333
|
const type = data.event_type ?? data.type;
|
|
24578
26334
|
const events = [];
|
|
24579
|
-
if (type === "
|
|
24580
|
-
const
|
|
24581
|
-
if (
|
|
24582
|
-
|
|
24583
|
-
|
|
24584
|
-
|
|
24585
|
-
events.push({
|
|
24586
|
-
|
|
24587
|
-
|
|
24588
|
-
|
|
24589
|
-
});
|
|
24590
|
-
if (delta.arguments) {
|
|
24591
|
-
events.push({
|
|
24592
|
-
type: "tool_call_delta",
|
|
24593
|
-
id: delta.id ?? "",
|
|
24594
|
-
arguments: JSON.stringify(delta.arguments)
|
|
24595
|
-
});
|
|
26335
|
+
if (type === "step.start") {
|
|
26336
|
+
const step = data.step ?? {};
|
|
26337
|
+
if (step.type === "function_call") {
|
|
26338
|
+
const id = step.id ?? "";
|
|
26339
|
+
state.callId = id;
|
|
26340
|
+
state.sawToolCall = true;
|
|
26341
|
+
events.push({ type: "tool_call_start", id, name: step.name ?? "" });
|
|
26342
|
+
const args = step.arguments;
|
|
26343
|
+
if (args && Object.keys(args).length > 0) {
|
|
26344
|
+
events.push({ type: "tool_call_delta", id, arguments: JSON.stringify(args) });
|
|
24596
26345
|
}
|
|
24597
|
-
events.push({ type: "tool_call_end", id: delta.id ?? "" });
|
|
24598
26346
|
}
|
|
26347
|
+
return events;
|
|
26348
|
+
}
|
|
26349
|
+
if (type === "step.delta") {
|
|
26350
|
+
const delta = data.delta ?? {};
|
|
26351
|
+
const dtype = delta.type;
|
|
26352
|
+
if (dtype === "text") {
|
|
26353
|
+
events.push({ type: "text", text: delta.text ?? "" });
|
|
26354
|
+
} else if (dtype === "thought_summary") {
|
|
26355
|
+
events.push({ type: "thinking", text: delta.text ?? "" });
|
|
26356
|
+
} else if (dtype === "arguments_delta") {
|
|
26357
|
+
events.push({ type: "tool_call_delta", id: state.callId ?? "", arguments: delta.arguments ?? "" });
|
|
26358
|
+
}
|
|
26359
|
+
return events;
|
|
26360
|
+
}
|
|
26361
|
+
if (type === "step.stop") {
|
|
26362
|
+
if (state.callId) {
|
|
26363
|
+
events.push({ type: "tool_call_end", id: state.callId });
|
|
26364
|
+
state.callId = void 0;
|
|
26365
|
+
}
|
|
26366
|
+
return events;
|
|
24599
26367
|
}
|
|
24600
|
-
if (type === "interaction.
|
|
26368
|
+
if (type === "interaction.completed" || type === "interaction.failed") {
|
|
26369
|
+
if (state.callId) {
|
|
26370
|
+
events.push({ type: "tool_call_end", id: state.callId });
|
|
26371
|
+
state.callId = void 0;
|
|
26372
|
+
}
|
|
24601
26373
|
const interaction = data.interaction ?? {};
|
|
24602
|
-
const usage = interaction.usage;
|
|
26374
|
+
const usage = interaction.usage ?? data.metadata?.total_usage;
|
|
24603
26375
|
if (usage) events.push({ type: "usage", usage: this.parseUsage(usage) });
|
|
24604
26376
|
events.push({
|
|
24605
26377
|
type: "done",
|
|
24606
|
-
finishReason: extractFinishReason(
|
|
26378
|
+
finishReason: extractFinishReason(state.sawToolCall, interaction.status, {
|
|
24607
26379
|
failed: "error"
|
|
24608
26380
|
})
|
|
24609
26381
|
});
|
|
26382
|
+
return events;
|
|
24610
26383
|
}
|
|
24611
26384
|
return events;
|
|
24612
26385
|
}
|
|
24613
|
-
|
|
26386
|
+
parseStreamEvent(event) {
|
|
26387
|
+
return this.streamEvents(event, { sawToolCall: false });
|
|
26388
|
+
}
|
|
26389
|
+
/** Per-stream stateful parser — correlates a function call's streamed arguments
|
|
26390
|
+
* and end to the call opened by its `step.start`. */
|
|
24614
26391
|
createStreamParser() {
|
|
24615
|
-
|
|
26392
|
+
const state = { sawToolCall: false };
|
|
26393
|
+
return (event) => this.streamEvents(event, state);
|
|
24616
26394
|
}
|
|
24617
26395
|
parseUsage(u) {
|
|
24618
26396
|
if (!u) return emptyUsage();
|
|
@@ -25343,6 +27121,8 @@ var OpenAIAdapter = class {
|
|
|
25343
27121
|
};
|
|
25344
27122
|
if (req.temperature !== void 0) body.temperature = req.temperature;
|
|
25345
27123
|
if (req.topP !== void 0) body.top_p = req.topP;
|
|
27124
|
+
if (req.presencePenalty !== void 0) body.presence_penalty = req.presencePenalty;
|
|
27125
|
+
if (req.frequencyPenalty !== void 0) body.frequency_penalty = req.frequencyPenalty;
|
|
25346
27126
|
if (req.stop) body.stop = req.stop;
|
|
25347
27127
|
const tier = openaiRequestTier(req.serviceTier);
|
|
25348
27128
|
if (tier) body.service_tier = tier;
|
|
@@ -26098,32 +27878,98 @@ function filenameForMime(mimeType) {
|
|
|
26098
27878
|
if (mimeType.startsWith("image/")) return `file.${mimeType.slice("image/".length)}`;
|
|
26099
27879
|
return "file.bin";
|
|
26100
27880
|
}
|
|
27881
|
+
function codeOutputFromResponsesItem(item) {
|
|
27882
|
+
const parts = [];
|
|
27883
|
+
for (const out of item.outputs ?? []) {
|
|
27884
|
+
if (out.type !== "logs" || typeof out.logs !== "string") continue;
|
|
27885
|
+
try {
|
|
27886
|
+
const j = JSON.parse(out.logs);
|
|
27887
|
+
if (typeof j.stdout === "string") {
|
|
27888
|
+
parts.push(j.stdout);
|
|
27889
|
+
continue;
|
|
27890
|
+
}
|
|
27891
|
+
} catch {
|
|
27892
|
+
}
|
|
27893
|
+
parts.push(out.logs);
|
|
27894
|
+
}
|
|
27895
|
+
return parts.length ? parts.join("") : void 0;
|
|
27896
|
+
}
|
|
27897
|
+
function searchActionPayload(item) {
|
|
27898
|
+
const action = item.action;
|
|
27899
|
+
if (!action) return {};
|
|
27900
|
+
const out = {};
|
|
27901
|
+
if (Array.isArray(action.queries) && typeof action.queries[0] === "string")
|
|
27902
|
+
out.query = action.queries[0];
|
|
27903
|
+
else if (typeof action.query === "string") out.query = action.query;
|
|
27904
|
+
if (typeof action.url === "string") out.url = action.url;
|
|
27905
|
+
return out;
|
|
27906
|
+
}
|
|
26101
27907
|
var RESPONSES_BUILTIN_ITEMS = /* @__PURE__ */ new Set(["web_search_call", "code_interpreter_call"]);
|
|
26102
27908
|
function builtinCallFromResponsesItem(item) {
|
|
26103
27909
|
const type = item.type;
|
|
26104
27910
|
if (!RESPONSES_BUILTIN_ITEMS.has(type)) return null;
|
|
27911
|
+
const call = { tool: unifiedBuiltinTool(type) };
|
|
27912
|
+
if (typeof item.id === "string") call.id = item.id;
|
|
27913
|
+
if (type === "code_interpreter_call") {
|
|
27914
|
+
if (typeof item.code === "string") call.code = item.code;
|
|
27915
|
+
const output = codeOutputFromResponsesItem(item);
|
|
27916
|
+
if (output) call.output = output;
|
|
27917
|
+
} else if (type === "web_search_call") {
|
|
27918
|
+
const { query, url } = searchActionPayload(item);
|
|
27919
|
+
if (query) call.query = query;
|
|
27920
|
+
if (url) call.url = url;
|
|
27921
|
+
}
|
|
27922
|
+
return call;
|
|
27923
|
+
}
|
|
27924
|
+
function builtinEndPayload(call) {
|
|
26105
27925
|
return {
|
|
26106
|
-
|
|
26107
|
-
...
|
|
27926
|
+
...call.id ? { id: call.id } : {},
|
|
27927
|
+
...call.code ? { code: call.code } : {},
|
|
27928
|
+
...call.output ? { output: call.output } : {},
|
|
27929
|
+
...call.query ? { query: call.query } : {},
|
|
27930
|
+
...call.url ? { url: call.url } : {}
|
|
26108
27931
|
};
|
|
26109
27932
|
}
|
|
27933
|
+
var IMAGE_EXTS = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"]);
|
|
27934
|
+
function fileExt(name) {
|
|
27935
|
+
const i = name.lastIndexOf(".");
|
|
27936
|
+
return i >= 0 ? name.slice(i + 1).toLowerCase() : "";
|
|
27937
|
+
}
|
|
27938
|
+
function isDisplayArtifact(c) {
|
|
27939
|
+
if (!c.filename) return false;
|
|
27940
|
+
const ext = fileExt(c.filename);
|
|
27941
|
+
return c.filename === `${c.fileId}.${ext}` && IMAGE_EXTS.has(ext) && c.span[0] === c.span[1];
|
|
27942
|
+
}
|
|
26110
27943
|
function filesFromResponsesOutputItem(item) {
|
|
26111
27944
|
const files = [];
|
|
26112
27945
|
const type = item.type;
|
|
26113
27946
|
if (type === "message") {
|
|
27947
|
+
const citations = [];
|
|
26114
27948
|
for (const c of item.content ?? []) {
|
|
26115
27949
|
if (c.type !== "output_text") continue;
|
|
26116
27950
|
for (const a of c.annotations ?? []) {
|
|
26117
27951
|
if (a.type === "container_file_citation" && typeof a.file_id === "string") {
|
|
26118
|
-
|
|
26119
|
-
|
|
26120
|
-
|
|
26121
|
-
|
|
26122
|
-
|
|
27952
|
+
citations.push({
|
|
27953
|
+
fileId: a.file_id,
|
|
27954
|
+
filename: typeof a.filename === "string" ? a.filename : void 0,
|
|
27955
|
+
containerId: typeof a.container_id === "string" ? a.container_id : void 0,
|
|
27956
|
+
span: [Number(a.start_index) || 0, Number(a.end_index) || 0]
|
|
26123
27957
|
});
|
|
26124
27958
|
}
|
|
26125
27959
|
}
|
|
26126
27960
|
}
|
|
27961
|
+
const hasSavedImage = citations.some(
|
|
27962
|
+
(c) => !isDisplayArtifact(c) && IMAGE_EXTS.has(fileExt(c.filename ?? ""))
|
|
27963
|
+
);
|
|
27964
|
+
for (const c of citations) {
|
|
27965
|
+
if (hasSavedImage && isDisplayArtifact(c)) continue;
|
|
27966
|
+
files.push({
|
|
27967
|
+
id: c.fileId,
|
|
27968
|
+
...c.filename ? { name: c.filename } : {},
|
|
27969
|
+
...c.containerId ? { ref: { containerId: c.containerId } } : {},
|
|
27970
|
+
source: "code_execution"
|
|
27971
|
+
});
|
|
27972
|
+
}
|
|
26127
27973
|
}
|
|
26128
27974
|
if (type === "code_interpreter_call") {
|
|
26129
27975
|
for (const out of item.outputs ?? []) {
|
|
@@ -26427,7 +28273,7 @@ var OpenAIResponsesAdapter = class {
|
|
|
26427
28273
|
for (const file of this.filesFromOutputItem(item)) events.push({ type: "file", file });
|
|
26428
28274
|
const builtin = builtinCallFromResponsesItem(item ?? {});
|
|
26429
28275
|
if (builtin) {
|
|
26430
|
-
events.push({ type: "builtin_tool_end", tool: builtin.tool, ...builtin
|
|
28276
|
+
events.push({ type: "builtin_tool_end", tool: builtin.tool, ...builtinEndPayload(builtin) });
|
|
26431
28277
|
}
|
|
26432
28278
|
if (item?.type === "function_call") {
|
|
26433
28279
|
events.push({ type: "tool_call_end", id: item.call_id ?? "" });
|
|
@@ -27065,6 +28911,14 @@ var XAIMediaAdapter = class {
|
|
|
27065
28911
|
}
|
|
27066
28912
|
};
|
|
27067
28913
|
|
|
28914
|
+
// src/llm/providers/xai/tiers.ts
|
|
28915
|
+
function xaiRequestTier(t) {
|
|
28916
|
+
if (!t) return void 0;
|
|
28917
|
+
if (t === "priority") return "priority";
|
|
28918
|
+
if (t === "standard" || t === "default") return "default";
|
|
28919
|
+
return void 0;
|
|
28920
|
+
}
|
|
28921
|
+
|
|
27068
28922
|
// src/llm/providers/xai/responses.ts
|
|
27069
28923
|
function xaiCodeExecFiles(item) {
|
|
27070
28924
|
if (item.type !== "code_interpreter_call") return [];
|
|
@@ -27108,6 +28962,9 @@ var XAIResponsesAdapter = class extends OpenAIResponsesAdapter {
|
|
|
27108
28962
|
if (!req.model.includes("multi-agent")) {
|
|
27109
28963
|
delete body.reasoning;
|
|
27110
28964
|
}
|
|
28965
|
+
const xaiTier = xaiRequestTier(req.serviceTier);
|
|
28966
|
+
if (xaiTier) body.service_tier = xaiTier;
|
|
28967
|
+
else delete body.service_tier;
|
|
27111
28968
|
const usesCodeInterpreter = req.tools?.some(
|
|
27112
28969
|
(t) => !isFunctionTool(t) && t.type === "code_interpreter"
|
|
27113
28970
|
);
|
|
@@ -28326,6 +30183,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28326
30183
|
let lastResponse = null;
|
|
28327
30184
|
let reason = "done";
|
|
28328
30185
|
let errorMsg;
|
|
30186
|
+
let caughtError;
|
|
28329
30187
|
let guardrailTripReason;
|
|
28330
30188
|
try {
|
|
28331
30189
|
while (true) {
|
|
@@ -28374,7 +30232,11 @@ var AgentLoop = class _AgentLoop {
|
|
|
28374
30232
|
totalLlmTimeMs += stepLatency;
|
|
28375
30233
|
addUsage(totalUsage, lastResponse.usage);
|
|
28376
30234
|
this._history.append(
|
|
28377
|
-
|
|
30235
|
+
buildAssistantMessage(lastResponse, {
|
|
30236
|
+
provider: this.client.provider,
|
|
30237
|
+
model: this.client.model,
|
|
30238
|
+
api: this.client.api
|
|
30239
|
+
}),
|
|
28378
30240
|
{ model: this.client.model, usage: lastResponse.usage, latencyMs: stepLatency }
|
|
28379
30241
|
);
|
|
28380
30242
|
const hasToolCalls = lastResponse.finishReason === "tool_use" && lastResponse.toolCalls.length > 0;
|
|
@@ -28428,6 +30290,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28428
30290
|
} catch (e) {
|
|
28429
30291
|
reason = "error";
|
|
28430
30292
|
errorMsg = e instanceof Error ? e.message : String(e);
|
|
30293
|
+
caughtError = e;
|
|
28431
30294
|
await this.hooks.emit("onRunError", {
|
|
28432
30295
|
runId,
|
|
28433
30296
|
agentId: this.id,
|
|
@@ -28478,6 +30341,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28478
30341
|
totalToolTimeMs,
|
|
28479
30342
|
runTrace
|
|
28480
30343
|
});
|
|
30344
|
+
if (reason === "error") throw caughtError ?? new Error(errorMsg ?? "agent run failed");
|
|
28481
30345
|
return finalResponse;
|
|
28482
30346
|
}
|
|
28483
30347
|
/** Run `complete` with a JSON Schema enforced via `structured`, then
|
|
@@ -28504,6 +30368,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28504
30368
|
let lastResponse = null;
|
|
28505
30369
|
let reason = "done";
|
|
28506
30370
|
let errorMsg;
|
|
30371
|
+
let caughtError;
|
|
28507
30372
|
let guardrailTripReason;
|
|
28508
30373
|
try {
|
|
28509
30374
|
while (true) {
|
|
@@ -28565,7 +30430,14 @@ var AgentLoop = class _AgentLoop {
|
|
|
28565
30430
|
finalText = state.stepText;
|
|
28566
30431
|
lastResponse = stepResponse;
|
|
28567
30432
|
this._history.append(
|
|
28568
|
-
{
|
|
30433
|
+
{
|
|
30434
|
+
...buildAssistantMessage(lastResponse, {
|
|
30435
|
+
provider: this.client.provider,
|
|
30436
|
+
model: this.client.model,
|
|
30437
|
+
api: this.client.api
|
|
30438
|
+
}),
|
|
30439
|
+
content
|
|
30440
|
+
},
|
|
28569
30441
|
{ model: this.client.model, usage: state.stepUsage, latencyMs: stepLatency }
|
|
28570
30442
|
);
|
|
28571
30443
|
const hasToolCalls = state.stepToolCalls.length > 0;
|
|
@@ -28627,6 +30499,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28627
30499
|
} catch (e) {
|
|
28628
30500
|
reason = "error";
|
|
28629
30501
|
errorMsg = e instanceof Error ? e.message : String(e);
|
|
30502
|
+
caughtError = e;
|
|
28630
30503
|
await this.hooks.emit("onRunError", {
|
|
28631
30504
|
runId,
|
|
28632
30505
|
agentId: this.id,
|
|
@@ -28675,6 +30548,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28675
30548
|
totalToolTimeMs,
|
|
28676
30549
|
runTrace
|
|
28677
30550
|
});
|
|
30551
|
+
if (reason === "error") throw caughtError ?? new Error(errorMsg ?? "agent run failed");
|
|
28678
30552
|
yield { type: "done", response: finalResponse };
|
|
28679
30553
|
}
|
|
28680
30554
|
/** Yield tool_call_start events for all tool calls in this step. */
|
|
@@ -37056,6 +38930,7 @@ var CAP_KEYS = {
|
|
|
37056
38930
|
var BUILTIN_TOOL_KEYS = {
|
|
37057
38931
|
search: "web_search",
|
|
37058
38932
|
web_search: "web_search",
|
|
38933
|
+
web_fetch: "web_fetch",
|
|
37059
38934
|
code_interpreter: "code_interpreter"
|
|
37060
38935
|
};
|
|
37061
38936
|
var KNOWN_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -38605,6 +40480,7 @@ function createRetrieval(backend, config) {
|
|
|
38605
40480
|
export {
|
|
38606
40481
|
AgentBus,
|
|
38607
40482
|
AgentLoop,
|
|
40483
|
+
AgentRunError,
|
|
38608
40484
|
AnthropicAdapter,
|
|
38609
40485
|
AnthropicBatchAdapter,
|
|
38610
40486
|
AnthropicCountApi,
|
|
@@ -38660,6 +40536,7 @@ export {
|
|
|
38660
40536
|
INPUT_SIZE_BUCKET_LABELS,
|
|
38661
40537
|
InMemoryVectorStore,
|
|
38662
40538
|
InternalToolRunner,
|
|
40539
|
+
InvalidFinalOutputError,
|
|
38663
40540
|
JSON_API_SYSTEM_PROMPT,
|
|
38664
40541
|
LAYER_AGENTLOOP_CONTEXT,
|
|
38665
40542
|
LAYER_AGENTLOOP_SYSTEM,
|