@combycode/llm-sdk 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +114 -5
- package/dist/index.browser.js +2794 -922
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2794 -922
- 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.js
CHANGED
|
@@ -1829,6 +1829,31 @@ function parseRetryAfter(headers) {
|
|
|
1829
1829
|
return void 0;
|
|
1830
1830
|
}
|
|
1831
1831
|
|
|
1832
|
+
// src/llm/output-errors.ts
|
|
1833
|
+
var AgentRunError = class extends Error {
|
|
1834
|
+
/** Machine-readable failure reason (e.g. `'invalid_final_output'`). */
|
|
1835
|
+
reason;
|
|
1836
|
+
constructor(reason, message, options) {
|
|
1837
|
+
super(message, options);
|
|
1838
|
+
this.name = "AgentRunError";
|
|
1839
|
+
this.reason = reason;
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
var InvalidFinalOutputError = class extends AgentRunError {
|
|
1843
|
+
reason = "invalid_final_output";
|
|
1844
|
+
/** The raw model output that failed to parse. */
|
|
1845
|
+
rawText;
|
|
1846
|
+
constructor(rawText, options) {
|
|
1847
|
+
super(
|
|
1848
|
+
"invalid_final_output",
|
|
1849
|
+
`Model final output did not match the requested schema: ${options?.cause instanceof Error ? options.cause.message : "parse failed"}`,
|
|
1850
|
+
options
|
|
1851
|
+
);
|
|
1852
|
+
this.name = "InvalidFinalOutputError";
|
|
1853
|
+
this.rawText = rawText;
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
|
|
1832
1857
|
// src/network/semaphore.ts
|
|
1833
1858
|
var Semaphore = class {
|
|
1834
1859
|
constructor(max) {
|
|
@@ -2843,7 +2868,7 @@ var catalog_default = {
|
|
|
2843
2868
|
family: "claude-opus",
|
|
2844
2869
|
version: "4",
|
|
2845
2870
|
status: "legacy",
|
|
2846
|
-
active:
|
|
2871
|
+
active: false,
|
|
2847
2872
|
deprecation: {
|
|
2848
2873
|
date: "2026-05-14",
|
|
2849
2874
|
source: "litellm"
|
|
@@ -3187,7 +3212,7 @@ var catalog_default = {
|
|
|
3187
3212
|
family: "claude-sonnet",
|
|
3188
3213
|
version: "4",
|
|
3189
3214
|
status: "legacy",
|
|
3190
|
-
active:
|
|
3215
|
+
active: false,
|
|
3191
3216
|
deprecation: {
|
|
3192
3217
|
date: "2026-05-14",
|
|
3193
3218
|
source: "litellm"
|
|
@@ -3354,50 +3379,35 @@ var catalog_default = {
|
|
|
3354
3379
|
version: "4.5",
|
|
3355
3380
|
status: "stable",
|
|
3356
3381
|
active: true
|
|
3357
|
-
}
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
// src/llm/providers/google/catalog.json
|
|
3361
|
-
var catalog_default2 = {
|
|
3362
|
-
"google/gemini-2.5-pro": {
|
|
3363
|
-
providerModelName: "gemini-2.5-pro",
|
|
3382
|
+
},
|
|
3383
|
+
"anthropic/claude-fable-5": {
|
|
3384
|
+
providerModelName: "claude-fable-5",
|
|
3364
3385
|
aliases: [
|
|
3365
|
-
"
|
|
3386
|
+
"claude-fable-5"
|
|
3366
3387
|
],
|
|
3367
3388
|
pricing: {
|
|
3368
|
-
inputPerMTok:
|
|
3369
|
-
outputPerMTok:
|
|
3370
|
-
cacheReadPerMTok:
|
|
3389
|
+
inputPerMTok: 10,
|
|
3390
|
+
outputPerMTok: 50,
|
|
3391
|
+
cacheReadPerMTok: 1,
|
|
3371
3392
|
tiers: {
|
|
3372
3393
|
batch: {
|
|
3373
|
-
inputPerMTok:
|
|
3374
|
-
outputPerMTok:
|
|
3375
|
-
cacheReadPerMTok: 0.125
|
|
3376
|
-
},
|
|
3377
|
-
flex: {
|
|
3378
|
-
inputPerMTok: 0.625,
|
|
3379
|
-
outputPerMTok: 5,
|
|
3380
|
-
cacheReadPerMTok: 0.125
|
|
3381
|
-
},
|
|
3382
|
-
priority: {
|
|
3383
|
-
inputPerMTok: 2.25,
|
|
3384
|
-
outputPerMTok: 18,
|
|
3385
|
-
cacheReadPerMTok: 0.225
|
|
3394
|
+
inputPerMTok: 5,
|
|
3395
|
+
outputPerMTok: 25
|
|
3386
3396
|
}
|
|
3387
3397
|
}
|
|
3388
3398
|
},
|
|
3389
|
-
preferredApi: "
|
|
3399
|
+
preferredApi: "messages",
|
|
3390
3400
|
supportedApis: [
|
|
3391
|
-
"
|
|
3401
|
+
"messages"
|
|
3392
3402
|
],
|
|
3393
|
-
contextWindow:
|
|
3394
|
-
maxOutput:
|
|
3403
|
+
contextWindow: 1e6,
|
|
3404
|
+
maxOutput: 128e3,
|
|
3395
3405
|
capabilities: {
|
|
3396
3406
|
toolUse: true,
|
|
3397
3407
|
streaming: true,
|
|
3398
3408
|
structuredOutput: true,
|
|
3399
3409
|
vision: true,
|
|
3400
|
-
audio:
|
|
3410
|
+
audio: false,
|
|
3401
3411
|
video: false,
|
|
3402
3412
|
imageGeneration: false,
|
|
3403
3413
|
audioGeneration: false,
|
|
@@ -3414,103 +3424,44 @@ var catalog_default2 = {
|
|
|
3414
3424
|
inputModalities: [
|
|
3415
3425
|
"text",
|
|
3416
3426
|
"image",
|
|
3417
|
-
"
|
|
3427
|
+
"pdf"
|
|
3418
3428
|
],
|
|
3419
3429
|
outputModalities: [
|
|
3420
3430
|
"text"
|
|
3421
3431
|
],
|
|
3422
|
-
family: "
|
|
3423
|
-
version: "
|
|
3432
|
+
family: "claude-fable",
|
|
3433
|
+
version: "5",
|
|
3424
3434
|
status: "stable",
|
|
3425
3435
|
active: true
|
|
3426
3436
|
},
|
|
3427
|
-
"
|
|
3428
|
-
providerModelName: "
|
|
3437
|
+
"anthropic/claude-sonnet-5": {
|
|
3438
|
+
providerModelName: "claude-sonnet-5",
|
|
3429
3439
|
aliases: [
|
|
3430
|
-
"
|
|
3440
|
+
"claude-sonnet-5"
|
|
3431
3441
|
],
|
|
3432
3442
|
pricing: {
|
|
3433
3443
|
inputPerMTok: 2,
|
|
3434
|
-
outputPerMTok:
|
|
3444
|
+
outputPerMTok: 10,
|
|
3435
3445
|
cacheReadPerMTok: 0.2,
|
|
3436
3446
|
tiers: {
|
|
3437
3447
|
batch: {
|
|
3438
3448
|
inputPerMTok: 1,
|
|
3439
|
-
outputPerMTok:
|
|
3440
|
-
cacheReadPerMTok: 0.2
|
|
3441
|
-
},
|
|
3442
|
-
flex: {
|
|
3443
|
-
inputPerMTok: 1,
|
|
3444
|
-
outputPerMTok: 6,
|
|
3445
|
-
cacheReadPerMTok: 0.2
|
|
3446
|
-
},
|
|
3447
|
-
priority: {
|
|
3448
|
-
inputPerMTok: 3.6,
|
|
3449
|
-
outputPerMTok: 21.6,
|
|
3450
|
-
cacheReadPerMTok: 0.36
|
|
3449
|
+
outputPerMTok: 5
|
|
3451
3450
|
}
|
|
3452
3451
|
}
|
|
3453
3452
|
},
|
|
3454
|
-
preferredApi: "
|
|
3455
|
-
supportedApis: [
|
|
3456
|
-
"generate"
|
|
3457
|
-
],
|
|
3458
|
-
contextWindow: 1048576,
|
|
3459
|
-
maxOutput: 65536,
|
|
3460
|
-
capabilities: {
|
|
3461
|
-
toolUse: true,
|
|
3462
|
-
streaming: true,
|
|
3463
|
-
structuredOutput: true,
|
|
3464
|
-
vision: true,
|
|
3465
|
-
audio: true,
|
|
3466
|
-
video: false,
|
|
3467
|
-
imageGeneration: false,
|
|
3468
|
-
audioGeneration: false,
|
|
3469
|
-
videoGeneration: false
|
|
3470
|
-
},
|
|
3471
|
-
reasoning: {
|
|
3472
|
-
supported: true,
|
|
3473
|
-
automatic: false,
|
|
3474
|
-
effortControl: false,
|
|
3475
|
-
encryptedContent: false,
|
|
3476
|
-
summaryAvailable: false
|
|
3477
|
-
},
|
|
3478
|
-
type: "chat",
|
|
3479
|
-
inputModalities: [
|
|
3480
|
-
"text",
|
|
3481
|
-
"image",
|
|
3482
|
-
"audio"
|
|
3483
|
-
],
|
|
3484
|
-
outputModalities: [
|
|
3485
|
-
"text"
|
|
3486
|
-
],
|
|
3487
|
-
family: "gemini-pro",
|
|
3488
|
-
version: "3.1",
|
|
3489
|
-
status: "preview",
|
|
3490
|
-
active: true
|
|
3491
|
-
},
|
|
3492
|
-
"google/gemini-3.1-pro-customtools": {
|
|
3493
|
-
providerModelName: "gemini-3.1-pro-preview-customtools",
|
|
3494
|
-
aliases: [
|
|
3495
|
-
"gemini-3.1-pro-preview-customtools"
|
|
3496
|
-
],
|
|
3497
|
-
pricing: {
|
|
3498
|
-
inputPerMTok: 2,
|
|
3499
|
-
outputPerMTok: 12,
|
|
3500
|
-
cacheReadPerMTok: 0.2
|
|
3501
|
-
},
|
|
3502
|
-
preferredApi: "generate",
|
|
3453
|
+
preferredApi: "messages",
|
|
3503
3454
|
supportedApis: [
|
|
3504
|
-
"
|
|
3455
|
+
"messages"
|
|
3505
3456
|
],
|
|
3506
|
-
contextWindow:
|
|
3507
|
-
maxOutput:
|
|
3457
|
+
contextWindow: 1e6,
|
|
3458
|
+
maxOutput: 128e3,
|
|
3508
3459
|
capabilities: {
|
|
3509
3460
|
toolUse: true,
|
|
3510
3461
|
streaming: true,
|
|
3511
3462
|
structuredOutput: true,
|
|
3512
3463
|
vision: true,
|
|
3513
|
-
audio:
|
|
3464
|
+
audio: false,
|
|
3514
3465
|
video: false,
|
|
3515
3466
|
imageGeneration: false,
|
|
3516
3467
|
audioGeneration: false,
|
|
@@ -3527,66 +3478,49 @@ var catalog_default2 = {
|
|
|
3527
3478
|
inputModalities: [
|
|
3528
3479
|
"text",
|
|
3529
3480
|
"image",
|
|
3530
|
-
"
|
|
3481
|
+
"pdf"
|
|
3531
3482
|
],
|
|
3532
3483
|
outputModalities: [
|
|
3533
3484
|
"text"
|
|
3534
3485
|
],
|
|
3535
|
-
family: "
|
|
3536
|
-
version: "
|
|
3537
|
-
status: "
|
|
3486
|
+
family: "claude-sonnet",
|
|
3487
|
+
version: "5",
|
|
3488
|
+
status: "stable",
|
|
3538
3489
|
active: true
|
|
3539
3490
|
},
|
|
3540
|
-
"
|
|
3541
|
-
providerModelName: "
|
|
3491
|
+
"anthropic/claude-mythos-5": {
|
|
3492
|
+
providerModelName: "claude-mythos-5",
|
|
3542
3493
|
aliases: [
|
|
3543
|
-
"
|
|
3494
|
+
"claude-mythos-5"
|
|
3544
3495
|
],
|
|
3545
3496
|
pricing: {
|
|
3546
|
-
inputPerMTok:
|
|
3547
|
-
outputPerMTok:
|
|
3548
|
-
cacheReadPerMTok:
|
|
3549
|
-
audioInputPerMTok: 1,
|
|
3497
|
+
inputPerMTok: 10,
|
|
3498
|
+
outputPerMTok: 50,
|
|
3499
|
+
cacheReadPerMTok: 1,
|
|
3550
3500
|
tiers: {
|
|
3551
3501
|
batch: {
|
|
3552
|
-
inputPerMTok:
|
|
3553
|
-
outputPerMTok:
|
|
3554
|
-
cacheReadPerMTok: 0.03,
|
|
3555
|
-
audioInputPerMTok: 0.5
|
|
3556
|
-
},
|
|
3557
|
-
flex: {
|
|
3558
|
-
inputPerMTok: 0.15,
|
|
3559
|
-
outputPerMTok: 1.25,
|
|
3560
|
-
cacheReadPerMTok: 0.03,
|
|
3561
|
-
audioInputPerMTok: 0.5
|
|
3562
|
-
},
|
|
3563
|
-
priority: {
|
|
3564
|
-
inputPerMTok: 0.54,
|
|
3565
|
-
outputPerMTok: 4.5,
|
|
3566
|
-
cacheReadPerMTok: 0.054,
|
|
3567
|
-
audioInputPerMTok: 1.8
|
|
3502
|
+
inputPerMTok: 5,
|
|
3503
|
+
outputPerMTok: 25
|
|
3568
3504
|
}
|
|
3569
3505
|
}
|
|
3570
3506
|
},
|
|
3571
|
-
preferredApi: "
|
|
3507
|
+
preferredApi: "messages",
|
|
3572
3508
|
supportedApis: [
|
|
3573
|
-
"
|
|
3509
|
+
"messages"
|
|
3574
3510
|
],
|
|
3575
|
-
contextWindow: 1048576,
|
|
3576
|
-
maxOutput: 65536,
|
|
3577
3511
|
capabilities: {
|
|
3578
3512
|
toolUse: true,
|
|
3579
3513
|
streaming: true,
|
|
3580
3514
|
structuredOutput: true,
|
|
3581
|
-
vision:
|
|
3582
|
-
audio:
|
|
3515
|
+
vision: false,
|
|
3516
|
+
audio: false,
|
|
3583
3517
|
video: false,
|
|
3584
3518
|
imageGeneration: false,
|
|
3585
3519
|
audioGeneration: false,
|
|
3586
3520
|
videoGeneration: false
|
|
3587
3521
|
},
|
|
3588
3522
|
reasoning: {
|
|
3589
|
-
supported:
|
|
3523
|
+
supported: false,
|
|
3590
3524
|
automatic: false,
|
|
3591
3525
|
effortControl: false,
|
|
3592
3526
|
encryptedContent: false,
|
|
@@ -3594,46 +3528,45 @@ var catalog_default2 = {
|
|
|
3594
3528
|
},
|
|
3595
3529
|
type: "chat",
|
|
3596
3530
|
inputModalities: [
|
|
3597
|
-
"text"
|
|
3598
|
-
"image",
|
|
3599
|
-
"audio"
|
|
3531
|
+
"text"
|
|
3600
3532
|
],
|
|
3601
3533
|
outputModalities: [
|
|
3602
3534
|
"text"
|
|
3603
3535
|
],
|
|
3604
|
-
family: "
|
|
3605
|
-
version: "
|
|
3536
|
+
family: "claude-mythos",
|
|
3537
|
+
version: "5",
|
|
3606
3538
|
status: "stable",
|
|
3607
|
-
active: true
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3539
|
+
active: true,
|
|
3540
|
+
availability: "limited"
|
|
3541
|
+
}
|
|
3542
|
+
};
|
|
3543
|
+
|
|
3544
|
+
// src/llm/providers/google/catalog.json
|
|
3545
|
+
var catalog_default2 = {
|
|
3546
|
+
"google/gemini-2.5-pro": {
|
|
3547
|
+
providerModelName: "gemini-2.5-pro",
|
|
3611
3548
|
aliases: [
|
|
3612
|
-
"gemini-
|
|
3549
|
+
"gemini-2.5-pro"
|
|
3613
3550
|
],
|
|
3614
3551
|
pricing: {
|
|
3615
|
-
inputPerMTok:
|
|
3616
|
-
outputPerMTok:
|
|
3617
|
-
cacheReadPerMTok: 0.
|
|
3618
|
-
audioInputPerMTok: 1,
|
|
3552
|
+
inputPerMTok: 1.25,
|
|
3553
|
+
outputPerMTok: 10,
|
|
3554
|
+
cacheReadPerMTok: 0.125,
|
|
3619
3555
|
tiers: {
|
|
3620
3556
|
batch: {
|
|
3621
|
-
inputPerMTok: 0.
|
|
3622
|
-
outputPerMTok:
|
|
3623
|
-
cacheReadPerMTok: 0.
|
|
3624
|
-
audioInputPerMTok: 0.5
|
|
3557
|
+
inputPerMTok: 0.625,
|
|
3558
|
+
outputPerMTok: 5,
|
|
3559
|
+
cacheReadPerMTok: 0.125
|
|
3625
3560
|
},
|
|
3626
3561
|
flex: {
|
|
3627
|
-
inputPerMTok: 0.
|
|
3628
|
-
outputPerMTok:
|
|
3629
|
-
cacheReadPerMTok: 0.
|
|
3630
|
-
audioInputPerMTok: 0.5
|
|
3562
|
+
inputPerMTok: 0.625,
|
|
3563
|
+
outputPerMTok: 5,
|
|
3564
|
+
cacheReadPerMTok: 0.125
|
|
3631
3565
|
},
|
|
3632
3566
|
priority: {
|
|
3633
|
-
inputPerMTok:
|
|
3634
|
-
outputPerMTok:
|
|
3635
|
-
cacheReadPerMTok: 0.
|
|
3636
|
-
audioInputPerMTok: 1.8
|
|
3567
|
+
inputPerMTok: 2.25,
|
|
3568
|
+
outputPerMTok: 18,
|
|
3569
|
+
cacheReadPerMTok: 0.225
|
|
3637
3570
|
}
|
|
3638
3571
|
}
|
|
3639
3572
|
},
|
|
@@ -3670,35 +3603,286 @@ var catalog_default2 = {
|
|
|
3670
3603
|
outputModalities: [
|
|
3671
3604
|
"text"
|
|
3672
3605
|
],
|
|
3673
|
-
family: "gemini-
|
|
3674
|
-
version: "
|
|
3675
|
-
status: "
|
|
3606
|
+
family: "gemini-pro",
|
|
3607
|
+
version: "2.5",
|
|
3608
|
+
status: "stable",
|
|
3676
3609
|
active: true
|
|
3677
3610
|
},
|
|
3678
|
-
"google/gemini-3.
|
|
3679
|
-
providerModelName: "gemini-3.
|
|
3611
|
+
"google/gemini-3.1-pro": {
|
|
3612
|
+
providerModelName: "gemini-3.1-pro-preview",
|
|
3680
3613
|
aliases: [
|
|
3681
|
-
"gemini-3.
|
|
3614
|
+
"gemini-3.1-pro-preview"
|
|
3682
3615
|
],
|
|
3683
3616
|
pricing: {
|
|
3684
|
-
inputPerMTok:
|
|
3685
|
-
outputPerMTok:
|
|
3686
|
-
cacheReadPerMTok: 0.
|
|
3617
|
+
inputPerMTok: 2,
|
|
3618
|
+
outputPerMTok: 12,
|
|
3619
|
+
cacheReadPerMTok: 0.2,
|
|
3687
3620
|
tiers: {
|
|
3688
3621
|
batch: {
|
|
3689
|
-
inputPerMTok:
|
|
3690
|
-
outputPerMTok:
|
|
3691
|
-
cacheReadPerMTok: 0.
|
|
3622
|
+
inputPerMTok: 1,
|
|
3623
|
+
outputPerMTok: 6,
|
|
3624
|
+
cacheReadPerMTok: 0.2
|
|
3692
3625
|
},
|
|
3693
3626
|
flex: {
|
|
3694
|
-
inputPerMTok:
|
|
3695
|
-
outputPerMTok:
|
|
3696
|
-
cacheReadPerMTok: 0.
|
|
3627
|
+
inputPerMTok: 1,
|
|
3628
|
+
outputPerMTok: 6,
|
|
3629
|
+
cacheReadPerMTok: 0.2
|
|
3697
3630
|
},
|
|
3698
3631
|
priority: {
|
|
3699
|
-
inputPerMTok:
|
|
3700
|
-
outputPerMTok:
|
|
3701
|
-
cacheReadPerMTok: 0.
|
|
3632
|
+
inputPerMTok: 3.6,
|
|
3633
|
+
outputPerMTok: 21.6,
|
|
3634
|
+
cacheReadPerMTok: 0.36
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
},
|
|
3638
|
+
preferredApi: "generate",
|
|
3639
|
+
supportedApis: [
|
|
3640
|
+
"generate"
|
|
3641
|
+
],
|
|
3642
|
+
contextWindow: 1048576,
|
|
3643
|
+
maxOutput: 65536,
|
|
3644
|
+
capabilities: {
|
|
3645
|
+
toolUse: true,
|
|
3646
|
+
streaming: true,
|
|
3647
|
+
structuredOutput: true,
|
|
3648
|
+
vision: true,
|
|
3649
|
+
audio: true,
|
|
3650
|
+
video: false,
|
|
3651
|
+
imageGeneration: false,
|
|
3652
|
+
audioGeneration: false,
|
|
3653
|
+
videoGeneration: false
|
|
3654
|
+
},
|
|
3655
|
+
reasoning: {
|
|
3656
|
+
supported: true,
|
|
3657
|
+
automatic: false,
|
|
3658
|
+
effortControl: false,
|
|
3659
|
+
encryptedContent: false,
|
|
3660
|
+
summaryAvailable: false
|
|
3661
|
+
},
|
|
3662
|
+
type: "chat",
|
|
3663
|
+
inputModalities: [
|
|
3664
|
+
"text",
|
|
3665
|
+
"image",
|
|
3666
|
+
"audio"
|
|
3667
|
+
],
|
|
3668
|
+
outputModalities: [
|
|
3669
|
+
"text"
|
|
3670
|
+
],
|
|
3671
|
+
family: "gemini-pro",
|
|
3672
|
+
version: "3.1",
|
|
3673
|
+
status: "preview",
|
|
3674
|
+
active: true
|
|
3675
|
+
},
|
|
3676
|
+
"google/gemini-3.1-pro-customtools": {
|
|
3677
|
+
providerModelName: "gemini-3.1-pro-preview-customtools",
|
|
3678
|
+
aliases: [
|
|
3679
|
+
"gemini-3.1-pro-preview-customtools"
|
|
3680
|
+
],
|
|
3681
|
+
pricing: {
|
|
3682
|
+
inputPerMTok: 2,
|
|
3683
|
+
outputPerMTok: 12,
|
|
3684
|
+
cacheReadPerMTok: 0.2
|
|
3685
|
+
},
|
|
3686
|
+
preferredApi: "generate",
|
|
3687
|
+
supportedApis: [
|
|
3688
|
+
"generate"
|
|
3689
|
+
],
|
|
3690
|
+
contextWindow: 1048576,
|
|
3691
|
+
maxOutput: 65536,
|
|
3692
|
+
capabilities: {
|
|
3693
|
+
toolUse: true,
|
|
3694
|
+
streaming: true,
|
|
3695
|
+
structuredOutput: true,
|
|
3696
|
+
vision: true,
|
|
3697
|
+
audio: true,
|
|
3698
|
+
video: false,
|
|
3699
|
+
imageGeneration: false,
|
|
3700
|
+
audioGeneration: false,
|
|
3701
|
+
videoGeneration: false
|
|
3702
|
+
},
|
|
3703
|
+
reasoning: {
|
|
3704
|
+
supported: true,
|
|
3705
|
+
automatic: false,
|
|
3706
|
+
effortControl: false,
|
|
3707
|
+
encryptedContent: false,
|
|
3708
|
+
summaryAvailable: false
|
|
3709
|
+
},
|
|
3710
|
+
type: "chat",
|
|
3711
|
+
inputModalities: [
|
|
3712
|
+
"text",
|
|
3713
|
+
"image",
|
|
3714
|
+
"audio"
|
|
3715
|
+
],
|
|
3716
|
+
outputModalities: [
|
|
3717
|
+
"text"
|
|
3718
|
+
],
|
|
3719
|
+
family: "gemini-pro",
|
|
3720
|
+
version: "3.1",
|
|
3721
|
+
status: "preview",
|
|
3722
|
+
active: true
|
|
3723
|
+
},
|
|
3724
|
+
"google/gemini-2.5-flash": {
|
|
3725
|
+
providerModelName: "gemini-2.5-flash",
|
|
3726
|
+
aliases: [
|
|
3727
|
+
"gemini-2.5-flash"
|
|
3728
|
+
],
|
|
3729
|
+
pricing: {
|
|
3730
|
+
inputPerMTok: 0.3,
|
|
3731
|
+
outputPerMTok: 2.5,
|
|
3732
|
+
cacheReadPerMTok: 0.03,
|
|
3733
|
+
audioInputPerMTok: 1,
|
|
3734
|
+
tiers: {
|
|
3735
|
+
batch: {
|
|
3736
|
+
inputPerMTok: 0.15,
|
|
3737
|
+
outputPerMTok: 1.25,
|
|
3738
|
+
cacheReadPerMTok: 0.03,
|
|
3739
|
+
audioInputPerMTok: 0.5
|
|
3740
|
+
},
|
|
3741
|
+
flex: {
|
|
3742
|
+
inputPerMTok: 0.15,
|
|
3743
|
+
outputPerMTok: 1.25,
|
|
3744
|
+
cacheReadPerMTok: 0.03,
|
|
3745
|
+
audioInputPerMTok: 0.5
|
|
3746
|
+
},
|
|
3747
|
+
priority: {
|
|
3748
|
+
inputPerMTok: 0.54,
|
|
3749
|
+
outputPerMTok: 4.5,
|
|
3750
|
+
cacheReadPerMTok: 0.054,
|
|
3751
|
+
audioInputPerMTok: 1.8
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3754
|
+
},
|
|
3755
|
+
preferredApi: "generate",
|
|
3756
|
+
supportedApis: [
|
|
3757
|
+
"generate"
|
|
3758
|
+
],
|
|
3759
|
+
contextWindow: 1048576,
|
|
3760
|
+
maxOutput: 65536,
|
|
3761
|
+
capabilities: {
|
|
3762
|
+
toolUse: true,
|
|
3763
|
+
streaming: true,
|
|
3764
|
+
structuredOutput: true,
|
|
3765
|
+
vision: true,
|
|
3766
|
+
audio: true,
|
|
3767
|
+
video: false,
|
|
3768
|
+
imageGeneration: false,
|
|
3769
|
+
audioGeneration: false,
|
|
3770
|
+
videoGeneration: false
|
|
3771
|
+
},
|
|
3772
|
+
reasoning: {
|
|
3773
|
+
supported: true,
|
|
3774
|
+
automatic: false,
|
|
3775
|
+
effortControl: false,
|
|
3776
|
+
encryptedContent: false,
|
|
3777
|
+
summaryAvailable: false
|
|
3778
|
+
},
|
|
3779
|
+
type: "chat",
|
|
3780
|
+
inputModalities: [
|
|
3781
|
+
"text",
|
|
3782
|
+
"image",
|
|
3783
|
+
"audio"
|
|
3784
|
+
],
|
|
3785
|
+
outputModalities: [
|
|
3786
|
+
"text"
|
|
3787
|
+
],
|
|
3788
|
+
family: "gemini-flash",
|
|
3789
|
+
version: "2.5",
|
|
3790
|
+
status: "stable",
|
|
3791
|
+
active: true
|
|
3792
|
+
},
|
|
3793
|
+
"google/gemini-3-flash": {
|
|
3794
|
+
providerModelName: "gemini-3-flash-preview",
|
|
3795
|
+
aliases: [
|
|
3796
|
+
"gemini-3-flash-preview"
|
|
3797
|
+
],
|
|
3798
|
+
pricing: {
|
|
3799
|
+
inputPerMTok: 0.5,
|
|
3800
|
+
outputPerMTok: 3,
|
|
3801
|
+
cacheReadPerMTok: 0.05,
|
|
3802
|
+
audioInputPerMTok: 1,
|
|
3803
|
+
tiers: {
|
|
3804
|
+
batch: {
|
|
3805
|
+
inputPerMTok: 0.25,
|
|
3806
|
+
outputPerMTok: 1.5,
|
|
3807
|
+
cacheReadPerMTok: 0.05,
|
|
3808
|
+
audioInputPerMTok: 0.5
|
|
3809
|
+
},
|
|
3810
|
+
flex: {
|
|
3811
|
+
inputPerMTok: 0.25,
|
|
3812
|
+
outputPerMTok: 1.5,
|
|
3813
|
+
cacheReadPerMTok: 0.05,
|
|
3814
|
+
audioInputPerMTok: 0.5
|
|
3815
|
+
},
|
|
3816
|
+
priority: {
|
|
3817
|
+
inputPerMTok: 0.9,
|
|
3818
|
+
outputPerMTok: 5.4,
|
|
3819
|
+
cacheReadPerMTok: 0.09,
|
|
3820
|
+
audioInputPerMTok: 1.8
|
|
3821
|
+
}
|
|
3822
|
+
}
|
|
3823
|
+
},
|
|
3824
|
+
preferredApi: "generate",
|
|
3825
|
+
supportedApis: [
|
|
3826
|
+
"generate"
|
|
3827
|
+
],
|
|
3828
|
+
contextWindow: 1048576,
|
|
3829
|
+
maxOutput: 65536,
|
|
3830
|
+
capabilities: {
|
|
3831
|
+
toolUse: true,
|
|
3832
|
+
streaming: true,
|
|
3833
|
+
structuredOutput: true,
|
|
3834
|
+
vision: true,
|
|
3835
|
+
audio: true,
|
|
3836
|
+
video: false,
|
|
3837
|
+
imageGeneration: false,
|
|
3838
|
+
audioGeneration: false,
|
|
3839
|
+
videoGeneration: false
|
|
3840
|
+
},
|
|
3841
|
+
reasoning: {
|
|
3842
|
+
supported: true,
|
|
3843
|
+
automatic: false,
|
|
3844
|
+
effortControl: false,
|
|
3845
|
+
encryptedContent: false,
|
|
3846
|
+
summaryAvailable: false
|
|
3847
|
+
},
|
|
3848
|
+
type: "chat",
|
|
3849
|
+
inputModalities: [
|
|
3850
|
+
"text",
|
|
3851
|
+
"image",
|
|
3852
|
+
"audio"
|
|
3853
|
+
],
|
|
3854
|
+
outputModalities: [
|
|
3855
|
+
"text"
|
|
3856
|
+
],
|
|
3857
|
+
family: "gemini-flash",
|
|
3858
|
+
version: "3",
|
|
3859
|
+
status: "preview",
|
|
3860
|
+
active: true
|
|
3861
|
+
},
|
|
3862
|
+
"google/gemini-3.5-flash": {
|
|
3863
|
+
providerModelName: "gemini-3.5-flash",
|
|
3864
|
+
aliases: [
|
|
3865
|
+
"gemini-3.5-flash"
|
|
3866
|
+
],
|
|
3867
|
+
pricing: {
|
|
3868
|
+
inputPerMTok: 1.5,
|
|
3869
|
+
outputPerMTok: 9,
|
|
3870
|
+
cacheReadPerMTok: 0.15,
|
|
3871
|
+
tiers: {
|
|
3872
|
+
batch: {
|
|
3873
|
+
inputPerMTok: 0.75,
|
|
3874
|
+
outputPerMTok: 4.5,
|
|
3875
|
+
cacheReadPerMTok: 0.075
|
|
3876
|
+
},
|
|
3877
|
+
flex: {
|
|
3878
|
+
inputPerMTok: 0.75,
|
|
3879
|
+
outputPerMTok: 4.5,
|
|
3880
|
+
cacheReadPerMTok: 0.08
|
|
3881
|
+
},
|
|
3882
|
+
priority: {
|
|
3883
|
+
inputPerMTok: 2.7,
|
|
3884
|
+
outputPerMTok: 16.2,
|
|
3885
|
+
cacheReadPerMTok: 0.27
|
|
3702
3886
|
}
|
|
3703
3887
|
}
|
|
3704
3888
|
},
|
|
@@ -4049,7 +4233,6 @@ var catalog_default2 = {
|
|
|
4049
4233
|
},
|
|
4050
4234
|
imageSize: {
|
|
4051
4235
|
values: [
|
|
4052
|
-
"512",
|
|
4053
4236
|
"1K",
|
|
4054
4237
|
"2K",
|
|
4055
4238
|
"4K"
|
|
@@ -4214,7 +4397,6 @@ var catalog_default2 = {
|
|
|
4214
4397
|
},
|
|
4215
4398
|
imageSize: {
|
|
4216
4399
|
values: [
|
|
4217
|
-
"512",
|
|
4218
4400
|
"1K",
|
|
4219
4401
|
"2K",
|
|
4220
4402
|
"4K"
|
|
@@ -4549,7 +4731,8 @@ var catalog_default2 = {
|
|
|
4549
4731
|
outputPerMTok: 4.5,
|
|
4550
4732
|
audioInputPerMTok: 3,
|
|
4551
4733
|
audioOutputPerMTok: 12,
|
|
4552
|
-
perMinute: 5e-3
|
|
4734
|
+
perMinute: 5e-3,
|
|
4735
|
+
perSecond: 2e-3
|
|
4553
4736
|
},
|
|
4554
4737
|
preferredApi: "generate",
|
|
4555
4738
|
supportedApis: [
|
|
@@ -4598,7 +4781,9 @@ var catalog_default2 = {
|
|
|
4598
4781
|
pricing: {
|
|
4599
4782
|
inputPerMTok: 3.5,
|
|
4600
4783
|
outputPerMTok: 21,
|
|
4601
|
-
perMinute: 53e-4
|
|
4784
|
+
perMinute: 53e-4,
|
|
4785
|
+
audioInputPerMTok: 53e-4,
|
|
4786
|
+
audioOutputPerMTok: 0.0315
|
|
4602
4787
|
},
|
|
4603
4788
|
preferredApi: "generate",
|
|
4604
4789
|
supportedApis: [
|
|
@@ -5172,7 +5357,8 @@ var catalog_default2 = {
|
|
|
5172
5357
|
"720p": 0.1,
|
|
5173
5358
|
"1080p": 0.12,
|
|
5174
5359
|
"4k": 0.3
|
|
5175
|
-
}
|
|
5360
|
+
},
|
|
5361
|
+
perSecond: 0.1
|
|
5176
5362
|
},
|
|
5177
5363
|
preferredApi: "generate",
|
|
5178
5364
|
supportedApis: [
|
|
@@ -5319,7 +5505,8 @@ var catalog_default2 = {
|
|
|
5319
5505
|
"720p": 0.1,
|
|
5320
5506
|
"1080p": 0.12,
|
|
5321
5507
|
"4k": 0.3
|
|
5322
|
-
}
|
|
5508
|
+
},
|
|
5509
|
+
perSecond: 0.1
|
|
5323
5510
|
},
|
|
5324
5511
|
preferredApi: "generate",
|
|
5325
5512
|
supportedApis: [
|
|
@@ -5390,8 +5577,10 @@ var catalog_default2 = {
|
|
|
5390
5577
|
pricing: {
|
|
5391
5578
|
perUnit: {
|
|
5392
5579
|
"720p": 0.05,
|
|
5393
|
-
"1080p": 0.08
|
|
5394
|
-
|
|
5580
|
+
"1080p": 0.08,
|
|
5581
|
+
"4k": 0
|
|
5582
|
+
},
|
|
5583
|
+
perSecond: 0.05
|
|
5395
5584
|
},
|
|
5396
5585
|
preferredApi: "generate",
|
|
5397
5586
|
supportedApis: [
|
|
@@ -5692,6 +5881,126 @@ var catalog_default2 = {
|
|
|
5692
5881
|
version: "1.6",
|
|
5693
5882
|
status: "preview",
|
|
5694
5883
|
active: true
|
|
5884
|
+
},
|
|
5885
|
+
"google/gemini-3.1-flash-lite-image": {
|
|
5886
|
+
providerModelName: "gemini-3.1-flash-lite-image",
|
|
5887
|
+
aliases: [
|
|
5888
|
+
"gemini-3.1-flash-lite-image"
|
|
5889
|
+
],
|
|
5890
|
+
pricing: {
|
|
5891
|
+
inputPerMTok: 0.25,
|
|
5892
|
+
outputPerMTok: 1.5,
|
|
5893
|
+
perUnit: {
|
|
5894
|
+
"1k": 0.0336
|
|
5895
|
+
}
|
|
5896
|
+
},
|
|
5897
|
+
preferredApi: "generate",
|
|
5898
|
+
supportedApis: [
|
|
5899
|
+
"generate"
|
|
5900
|
+
],
|
|
5901
|
+
contextWindow: 65536,
|
|
5902
|
+
maxOutput: 65536,
|
|
5903
|
+
capabilities: {
|
|
5904
|
+
toolUse: false,
|
|
5905
|
+
streaming: true,
|
|
5906
|
+
structuredOutput: false,
|
|
5907
|
+
vision: true,
|
|
5908
|
+
audio: false,
|
|
5909
|
+
video: false,
|
|
5910
|
+
imageGeneration: true,
|
|
5911
|
+
audioGeneration: false,
|
|
5912
|
+
videoGeneration: false
|
|
5913
|
+
},
|
|
5914
|
+
reasoning: {
|
|
5915
|
+
supported: true,
|
|
5916
|
+
automatic: false,
|
|
5917
|
+
effortControl: false,
|
|
5918
|
+
encryptedContent: false,
|
|
5919
|
+
summaryAvailable: false
|
|
5920
|
+
},
|
|
5921
|
+
type: "image",
|
|
5922
|
+
inputModalities: [
|
|
5923
|
+
"text",
|
|
5924
|
+
"image"
|
|
5925
|
+
],
|
|
5926
|
+
outputModalities: [
|
|
5927
|
+
"image"
|
|
5928
|
+
],
|
|
5929
|
+
family: "gemini-image",
|
|
5930
|
+
version: "3.1",
|
|
5931
|
+
status: "stable",
|
|
5932
|
+
active: true,
|
|
5933
|
+
mediaParams: {
|
|
5934
|
+
aspectRatio: {
|
|
5935
|
+
values: [
|
|
5936
|
+
"1:1",
|
|
5937
|
+
"1:4",
|
|
5938
|
+
"1:8",
|
|
5939
|
+
"2:3",
|
|
5940
|
+
"3:2",
|
|
5941
|
+
"3:4",
|
|
5942
|
+
"4:1",
|
|
5943
|
+
"4:3",
|
|
5944
|
+
"4:5",
|
|
5945
|
+
"5:4",
|
|
5946
|
+
"9:16",
|
|
5947
|
+
"16:9",
|
|
5948
|
+
"21:9"
|
|
5949
|
+
],
|
|
5950
|
+
default: "1:1"
|
|
5951
|
+
},
|
|
5952
|
+
imageSize: {
|
|
5953
|
+
values: [
|
|
5954
|
+
"1K"
|
|
5955
|
+
],
|
|
5956
|
+
default: "1K"
|
|
5957
|
+
}
|
|
5958
|
+
}
|
|
5959
|
+
},
|
|
5960
|
+
"google/gemini-omni-flash": {
|
|
5961
|
+
providerModelName: "gemini-omni-flash-preview",
|
|
5962
|
+
aliases: [
|
|
5963
|
+
"gemini-omni-flash-preview"
|
|
5964
|
+
],
|
|
5965
|
+
pricing: {
|
|
5966
|
+
inputPerMTok: 1.5
|
|
5967
|
+
},
|
|
5968
|
+
preferredApi: "generate",
|
|
5969
|
+
supportedApis: [
|
|
5970
|
+
"generate"
|
|
5971
|
+
],
|
|
5972
|
+
contextWindow: 131072,
|
|
5973
|
+
maxOutput: 65536,
|
|
5974
|
+
capabilities: {
|
|
5975
|
+
toolUse: true,
|
|
5976
|
+
streaming: true,
|
|
5977
|
+
structuredOutput: true,
|
|
5978
|
+
vision: false,
|
|
5979
|
+
audio: true,
|
|
5980
|
+
video: false,
|
|
5981
|
+
imageGeneration: false,
|
|
5982
|
+
audioGeneration: false,
|
|
5983
|
+
videoGeneration: false
|
|
5984
|
+
},
|
|
5985
|
+
reasoning: {
|
|
5986
|
+
supported: false,
|
|
5987
|
+
automatic: false,
|
|
5988
|
+
effortControl: false,
|
|
5989
|
+
encryptedContent: false,
|
|
5990
|
+
summaryAvailable: false
|
|
5991
|
+
},
|
|
5992
|
+
type: "audio-chat",
|
|
5993
|
+
inputModalities: [
|
|
5994
|
+
"text",
|
|
5995
|
+
"audio"
|
|
5996
|
+
],
|
|
5997
|
+
outputModalities: [
|
|
5998
|
+
"text"
|
|
5999
|
+
],
|
|
6000
|
+
family: "gemini-audio",
|
|
6001
|
+
version: "1",
|
|
6002
|
+
status: "preview",
|
|
6003
|
+
active: true
|
|
5695
6004
|
}
|
|
5696
6005
|
};
|
|
5697
6006
|
|
|
@@ -7291,9 +7600,10 @@ var catalog_default3 = {
|
|
|
7291
7600
|
"gpt-4o-mini-2024-07-18"
|
|
7292
7601
|
],
|
|
7293
7602
|
pricing: {
|
|
7294
|
-
inputPerMTok:
|
|
7295
|
-
outputPerMTok:
|
|
7296
|
-
perMinute: 3e-3
|
|
7603
|
+
inputPerMTok: 0.15,
|
|
7604
|
+
outputPerMTok: 0.6,
|
|
7605
|
+
perMinute: 3e-3,
|
|
7606
|
+
cacheReadPerMTok: 0.075
|
|
7297
7607
|
},
|
|
7298
7608
|
preferredApi: "responses",
|
|
7299
7609
|
supportedApis: [
|
|
@@ -7946,8 +8256,8 @@ var catalog_default3 = {
|
|
|
7946
8256
|
"gpt-realtime-2025-08-28"
|
|
7947
8257
|
],
|
|
7948
8258
|
pricing: {
|
|
7949
|
-
inputPerMTok:
|
|
7950
|
-
outputPerMTok:
|
|
8259
|
+
inputPerMTok: 32,
|
|
8260
|
+
outputPerMTok: 64,
|
|
7951
8261
|
cacheReadPerMTok: 0.4,
|
|
7952
8262
|
audioInputPerMTok: 32,
|
|
7953
8263
|
audioOutputPerMTok: 64
|
|
@@ -8046,8 +8356,8 @@ var catalog_default3 = {
|
|
|
8046
8356
|
"gpt-realtime-2"
|
|
8047
8357
|
],
|
|
8048
8358
|
pricing: {
|
|
8049
|
-
inputPerMTok:
|
|
8050
|
-
outputPerMTok:
|
|
8359
|
+
inputPerMTok: 32,
|
|
8360
|
+
outputPerMTok: 64,
|
|
8051
8361
|
cacheReadPerMTok: 0.4,
|
|
8052
8362
|
audioInputPerMTok: 32,
|
|
8053
8363
|
audioOutputPerMTok: 64
|
|
@@ -8182,7 +8492,8 @@ var catalog_default3 = {
|
|
|
8182
8492
|
family: "gpt-realtime",
|
|
8183
8493
|
version: "1",
|
|
8184
8494
|
status: "stable",
|
|
8185
|
-
active: true
|
|
8495
|
+
active: true,
|
|
8496
|
+
contextWindow: 128e3
|
|
8186
8497
|
},
|
|
8187
8498
|
"openai/gpt-realtime-whisper": {
|
|
8188
8499
|
providerModelName: "gpt-realtime-whisper",
|
|
@@ -8225,7 +8536,8 @@ var catalog_default3 = {
|
|
|
8225
8536
|
family: "gpt-realtime",
|
|
8226
8537
|
version: "1",
|
|
8227
8538
|
status: "stable",
|
|
8228
|
-
active: true
|
|
8539
|
+
active: true,
|
|
8540
|
+
contextWindow: 128e3
|
|
8229
8541
|
},
|
|
8230
8542
|
"openai/o1": {
|
|
8231
8543
|
providerModelName: "o1",
|
|
@@ -8334,7 +8646,8 @@ var catalog_default3 = {
|
|
|
8334
8646
|
},
|
|
8335
8647
|
preferredApi: "responses",
|
|
8336
8648
|
supportedApis: [
|
|
8337
|
-
"responses"
|
|
8649
|
+
"responses",
|
|
8650
|
+
"completions"
|
|
8338
8651
|
],
|
|
8339
8652
|
contextWindow: 2e5,
|
|
8340
8653
|
maxOutput: 1e5,
|
|
@@ -8468,9 +8781,9 @@ var catalog_default3 = {
|
|
|
8468
8781
|
"o4-mini-2025-04-16"
|
|
8469
8782
|
],
|
|
8470
8783
|
pricing: {
|
|
8471
|
-
inputPerMTok:
|
|
8472
|
-
outputPerMTok:
|
|
8473
|
-
cacheReadPerMTok:
|
|
8784
|
+
inputPerMTok: 1.1,
|
|
8785
|
+
outputPerMTok: 4.4,
|
|
8786
|
+
cacheReadPerMTok: 0.275,
|
|
8474
8787
|
tiers: {
|
|
8475
8788
|
batch: {
|
|
8476
8789
|
inputPerMTok: 2,
|
|
@@ -8807,167 +9120,171 @@ var catalog_default3 = {
|
|
|
8807
9120
|
"tts-1",
|
|
8808
9121
|
"tts-1-1106"
|
|
8809
9122
|
],
|
|
8810
|
-
pricing: { perMChars: 15 },
|
|
8811
|
-
preferredApi: "responses",
|
|
8812
|
-
supportedApis: [
|
|
8813
|
-
"responses",
|
|
8814
|
-
"completions"
|
|
8815
|
-
],
|
|
8816
|
-
capabilities: {
|
|
8817
|
-
toolUse: false,
|
|
8818
|
-
streaming: true,
|
|
8819
|
-
structuredOutput: false,
|
|
8820
|
-
vision: false,
|
|
8821
|
-
audio: false,
|
|
8822
|
-
video: false,
|
|
8823
|
-
imageGeneration: false,
|
|
8824
|
-
audioGeneration: true,
|
|
8825
|
-
videoGeneration: false
|
|
8826
|
-
},
|
|
8827
|
-
reasoning: {
|
|
8828
|
-
supported: false,
|
|
8829
|
-
automatic: false,
|
|
8830
|
-
effortControl: false,
|
|
8831
|
-
encryptedContent: false,
|
|
8832
|
-
summaryAvailable: false
|
|
8833
|
-
},
|
|
8834
|
-
type: "tts",
|
|
8835
|
-
inputModalities: [
|
|
8836
|
-
"text"
|
|
8837
|
-
],
|
|
8838
|
-
outputModalities: [
|
|
8839
|
-
"audio"
|
|
8840
|
-
],
|
|
8841
|
-
family: "tts",
|
|
8842
|
-
version: "1",
|
|
8843
|
-
status: "legacy",
|
|
8844
|
-
active: true,
|
|
8845
|
-
mediaParams: {
|
|
8846
|
-
voice: {
|
|
8847
|
-
values: [
|
|
8848
|
-
"alloy",
|
|
8849
|
-
"ash",
|
|
8850
|
-
"ballad",
|
|
8851
|
-
"coral",
|
|
8852
|
-
"echo",
|
|
8853
|
-
"fable",
|
|
8854
|
-
"onyx",
|
|
8855
|
-
"nova",
|
|
8856
|
-
"sage",
|
|
8857
|
-
"shimmer",
|
|
8858
|
-
"verse",
|
|
8859
|
-
"marin",
|
|
8860
|
-
"cedar"
|
|
8861
|
-
],
|
|
8862
|
-
default: "alloy"
|
|
8863
|
-
},
|
|
8864
|
-
format: {
|
|
8865
|
-
values: [
|
|
8866
|
-
"mp3",
|
|
8867
|
-
"opus",
|
|
8868
|
-
"aac",
|
|
8869
|
-
"flac",
|
|
8870
|
-
"wav",
|
|
8871
|
-
"pcm"
|
|
8872
|
-
],
|
|
8873
|
-
default: "mp3"
|
|
8874
|
-
},
|
|
8875
|
-
speed: {
|
|
8876
|
-
min: 0.25,
|
|
8877
|
-
max: 4,
|
|
8878
|
-
default: 1
|
|
8879
|
-
}
|
|
8880
|
-
}
|
|
8881
|
-
},
|
|
8882
|
-
"openai/tts-1-hd": {
|
|
8883
|
-
providerModelName: "tts-1-hd",
|
|
8884
|
-
aliases: [
|
|
8885
|
-
"tts-1-hd",
|
|
8886
|
-
"tts-1-hd-1106"
|
|
8887
|
-
],
|
|
8888
|
-
pricing: { perMChars: 30 },
|
|
8889
|
-
preferredApi: "responses",
|
|
8890
|
-
supportedApis: [
|
|
8891
|
-
"responses",
|
|
8892
|
-
"completions"
|
|
8893
|
-
],
|
|
8894
|
-
capabilities: {
|
|
8895
|
-
toolUse: false,
|
|
8896
|
-
streaming: true,
|
|
8897
|
-
structuredOutput: false,
|
|
8898
|
-
vision: false,
|
|
8899
|
-
audio: false,
|
|
8900
|
-
video: false,
|
|
8901
|
-
imageGeneration: false,
|
|
8902
|
-
audioGeneration: true,
|
|
8903
|
-
videoGeneration: false
|
|
8904
|
-
},
|
|
8905
|
-
reasoning: {
|
|
8906
|
-
supported: false,
|
|
8907
|
-
automatic: false,
|
|
8908
|
-
effortControl: false,
|
|
8909
|
-
encryptedContent: false,
|
|
8910
|
-
summaryAvailable: false
|
|
8911
|
-
},
|
|
8912
|
-
type: "tts",
|
|
8913
|
-
inputModalities: [
|
|
8914
|
-
"text"
|
|
8915
|
-
],
|
|
8916
|
-
outputModalities: [
|
|
8917
|
-
"audio"
|
|
8918
|
-
],
|
|
8919
|
-
family: "tts",
|
|
8920
|
-
version: "1",
|
|
8921
|
-
status: "legacy",
|
|
8922
|
-
active: true,
|
|
8923
|
-
mediaParams: {
|
|
8924
|
-
voice: {
|
|
8925
|
-
values: [
|
|
8926
|
-
"alloy",
|
|
8927
|
-
"ash",
|
|
8928
|
-
"ballad",
|
|
8929
|
-
"coral",
|
|
8930
|
-
"echo",
|
|
8931
|
-
"fable",
|
|
8932
|
-
"onyx",
|
|
8933
|
-
"nova",
|
|
8934
|
-
"sage",
|
|
8935
|
-
"shimmer",
|
|
8936
|
-
"verse",
|
|
8937
|
-
"marin",
|
|
8938
|
-
"cedar"
|
|
8939
|
-
],
|
|
8940
|
-
default: "alloy"
|
|
8941
|
-
},
|
|
8942
|
-
format: {
|
|
8943
|
-
values: [
|
|
8944
|
-
"mp3",
|
|
8945
|
-
"opus",
|
|
8946
|
-
"aac",
|
|
8947
|
-
"flac",
|
|
8948
|
-
"wav",
|
|
8949
|
-
"pcm"
|
|
8950
|
-
],
|
|
8951
|
-
default: "mp3"
|
|
8952
|
-
},
|
|
8953
|
-
speed: {
|
|
8954
|
-
min: 0.25,
|
|
8955
|
-
max: 4,
|
|
8956
|
-
default: 1
|
|
8957
|
-
}
|
|
8958
|
-
}
|
|
8959
|
-
},
|
|
8960
|
-
"openai/gpt-4o-mini-tts": {
|
|
8961
|
-
providerModelName: "gpt-4o-mini-tts",
|
|
8962
|
-
aliases: [
|
|
8963
|
-
"gpt-4o-mini-tts",
|
|
8964
|
-
"gpt-4o-mini-tts-2025-03-20",
|
|
8965
|
-
"gpt-4o-mini-tts-2025-12-15"
|
|
8966
|
-
],
|
|
8967
9123
|
pricing: {
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
9124
|
+
perMChars: 15
|
|
9125
|
+
},
|
|
9126
|
+
preferredApi: "responses",
|
|
9127
|
+
supportedApis: [
|
|
9128
|
+
"responses",
|
|
9129
|
+
"completions"
|
|
9130
|
+
],
|
|
9131
|
+
capabilities: {
|
|
9132
|
+
toolUse: false,
|
|
9133
|
+
streaming: true,
|
|
9134
|
+
structuredOutput: false,
|
|
9135
|
+
vision: false,
|
|
9136
|
+
audio: false,
|
|
9137
|
+
video: false,
|
|
9138
|
+
imageGeneration: false,
|
|
9139
|
+
audioGeneration: true,
|
|
9140
|
+
videoGeneration: false
|
|
9141
|
+
},
|
|
9142
|
+
reasoning: {
|
|
9143
|
+
supported: false,
|
|
9144
|
+
automatic: false,
|
|
9145
|
+
effortControl: false,
|
|
9146
|
+
encryptedContent: false,
|
|
9147
|
+
summaryAvailable: false
|
|
9148
|
+
},
|
|
9149
|
+
type: "tts",
|
|
9150
|
+
inputModalities: [
|
|
9151
|
+
"text"
|
|
9152
|
+
],
|
|
9153
|
+
outputModalities: [
|
|
9154
|
+
"audio"
|
|
9155
|
+
],
|
|
9156
|
+
family: "tts",
|
|
9157
|
+
version: "1",
|
|
9158
|
+
status: "legacy",
|
|
9159
|
+
active: true,
|
|
9160
|
+
mediaParams: {
|
|
9161
|
+
voice: {
|
|
9162
|
+
values: [
|
|
9163
|
+
"alloy",
|
|
9164
|
+
"ash",
|
|
9165
|
+
"ballad",
|
|
9166
|
+
"coral",
|
|
9167
|
+
"echo",
|
|
9168
|
+
"fable",
|
|
9169
|
+
"onyx",
|
|
9170
|
+
"nova",
|
|
9171
|
+
"sage",
|
|
9172
|
+
"shimmer",
|
|
9173
|
+
"verse",
|
|
9174
|
+
"marin",
|
|
9175
|
+
"cedar"
|
|
9176
|
+
],
|
|
9177
|
+
default: "alloy"
|
|
9178
|
+
},
|
|
9179
|
+
format: {
|
|
9180
|
+
values: [
|
|
9181
|
+
"mp3",
|
|
9182
|
+
"opus",
|
|
9183
|
+
"aac",
|
|
9184
|
+
"flac",
|
|
9185
|
+
"wav",
|
|
9186
|
+
"pcm"
|
|
9187
|
+
],
|
|
9188
|
+
default: "mp3"
|
|
9189
|
+
},
|
|
9190
|
+
speed: {
|
|
9191
|
+
min: 0.25,
|
|
9192
|
+
max: 4,
|
|
9193
|
+
default: 1
|
|
9194
|
+
}
|
|
9195
|
+
}
|
|
9196
|
+
},
|
|
9197
|
+
"openai/tts-1-hd": {
|
|
9198
|
+
providerModelName: "tts-1-hd",
|
|
9199
|
+
aliases: [
|
|
9200
|
+
"tts-1-hd",
|
|
9201
|
+
"tts-1-hd-1106"
|
|
9202
|
+
],
|
|
9203
|
+
pricing: {
|
|
9204
|
+
perMChars: 30
|
|
9205
|
+
},
|
|
9206
|
+
preferredApi: "responses",
|
|
9207
|
+
supportedApis: [
|
|
9208
|
+
"responses",
|
|
9209
|
+
"completions"
|
|
9210
|
+
],
|
|
9211
|
+
capabilities: {
|
|
9212
|
+
toolUse: false,
|
|
9213
|
+
streaming: true,
|
|
9214
|
+
structuredOutput: false,
|
|
9215
|
+
vision: false,
|
|
9216
|
+
audio: false,
|
|
9217
|
+
video: false,
|
|
9218
|
+
imageGeneration: false,
|
|
9219
|
+
audioGeneration: true,
|
|
9220
|
+
videoGeneration: false
|
|
9221
|
+
},
|
|
9222
|
+
reasoning: {
|
|
9223
|
+
supported: false,
|
|
9224
|
+
automatic: false,
|
|
9225
|
+
effortControl: false,
|
|
9226
|
+
encryptedContent: false,
|
|
9227
|
+
summaryAvailable: false
|
|
9228
|
+
},
|
|
9229
|
+
type: "tts",
|
|
9230
|
+
inputModalities: [
|
|
9231
|
+
"text"
|
|
9232
|
+
],
|
|
9233
|
+
outputModalities: [
|
|
9234
|
+
"audio"
|
|
9235
|
+
],
|
|
9236
|
+
family: "tts",
|
|
9237
|
+
version: "1",
|
|
9238
|
+
status: "legacy",
|
|
9239
|
+
active: true,
|
|
9240
|
+
mediaParams: {
|
|
9241
|
+
voice: {
|
|
9242
|
+
values: [
|
|
9243
|
+
"alloy",
|
|
9244
|
+
"ash",
|
|
9245
|
+
"ballad",
|
|
9246
|
+
"coral",
|
|
9247
|
+
"echo",
|
|
9248
|
+
"fable",
|
|
9249
|
+
"onyx",
|
|
9250
|
+
"nova",
|
|
9251
|
+
"sage",
|
|
9252
|
+
"shimmer",
|
|
9253
|
+
"verse",
|
|
9254
|
+
"marin",
|
|
9255
|
+
"cedar"
|
|
9256
|
+
],
|
|
9257
|
+
default: "alloy"
|
|
9258
|
+
},
|
|
9259
|
+
format: {
|
|
9260
|
+
values: [
|
|
9261
|
+
"mp3",
|
|
9262
|
+
"opus",
|
|
9263
|
+
"aac",
|
|
9264
|
+
"flac",
|
|
9265
|
+
"wav",
|
|
9266
|
+
"pcm"
|
|
9267
|
+
],
|
|
9268
|
+
default: "mp3"
|
|
9269
|
+
},
|
|
9270
|
+
speed: {
|
|
9271
|
+
min: 0.25,
|
|
9272
|
+
max: 4,
|
|
9273
|
+
default: 1
|
|
9274
|
+
}
|
|
9275
|
+
}
|
|
9276
|
+
},
|
|
9277
|
+
"openai/gpt-4o-mini-tts": {
|
|
9278
|
+
providerModelName: "gpt-4o-mini-tts",
|
|
9279
|
+
aliases: [
|
|
9280
|
+
"gpt-4o-mini-tts",
|
|
9281
|
+
"gpt-4o-mini-tts-2025-03-20",
|
|
9282
|
+
"gpt-4o-mini-tts-2025-12-15"
|
|
9283
|
+
],
|
|
9284
|
+
pricing: {
|
|
9285
|
+
inputPerMTok: 2.5,
|
|
9286
|
+
outputPerMTok: 10,
|
|
9287
|
+
audioOutputPerMTok: 12
|
|
8971
9288
|
},
|
|
8972
9289
|
preferredApi: "responses",
|
|
8973
9290
|
supportedApis: [
|
|
@@ -9045,7 +9362,9 @@ var catalog_default3 = {
|
|
|
9045
9362
|
aliases: [
|
|
9046
9363
|
"whisper-1"
|
|
9047
9364
|
],
|
|
9048
|
-
pricing: {
|
|
9365
|
+
pricing: {
|
|
9366
|
+
perMinute: 6e-3
|
|
9367
|
+
},
|
|
9049
9368
|
preferredApi: "responses",
|
|
9050
9369
|
supportedApis: [
|
|
9051
9370
|
"responses",
|
|
@@ -9079,7 +9398,8 @@ var catalog_default3 = {
|
|
|
9079
9398
|
family: "whisper",
|
|
9080
9399
|
version: "1",
|
|
9081
9400
|
status: "legacy",
|
|
9082
|
-
active: true
|
|
9401
|
+
active: true,
|
|
9402
|
+
contextWindow: 16e3
|
|
9083
9403
|
},
|
|
9084
9404
|
"openai/gpt-4o-transcribe": {
|
|
9085
9405
|
providerModelName: "gpt-4o-transcribe",
|
|
@@ -9271,6 +9591,300 @@ var catalog_default3 = {
|
|
|
9271
9591
|
version: "1",
|
|
9272
9592
|
status: "stable",
|
|
9273
9593
|
active: true
|
|
9594
|
+
},
|
|
9595
|
+
"openai/gpt-realtime-2.1-mini": {
|
|
9596
|
+
providerModelName: "gpt-realtime-2.1-mini",
|
|
9597
|
+
aliases: [
|
|
9598
|
+
"gpt-realtime-2.1-mini"
|
|
9599
|
+
],
|
|
9600
|
+
pricing: {
|
|
9601
|
+
inputPerMTok: 10,
|
|
9602
|
+
cacheReadPerMTok: 0.3,
|
|
9603
|
+
outputPerMTok: 20
|
|
9604
|
+
},
|
|
9605
|
+
preferredApi: "responses",
|
|
9606
|
+
supportedApis: [
|
|
9607
|
+
"responses",
|
|
9608
|
+
"completions"
|
|
9609
|
+
],
|
|
9610
|
+
contextWindow: 128e3,
|
|
9611
|
+
maxOutput: 4096,
|
|
9612
|
+
capabilities: {
|
|
9613
|
+
toolUse: true,
|
|
9614
|
+
streaming: true,
|
|
9615
|
+
structuredOutput: false,
|
|
9616
|
+
vision: false,
|
|
9617
|
+
audio: true,
|
|
9618
|
+
video: false,
|
|
9619
|
+
imageGeneration: false,
|
|
9620
|
+
audioGeneration: false,
|
|
9621
|
+
videoGeneration: false
|
|
9622
|
+
},
|
|
9623
|
+
reasoning: {
|
|
9624
|
+
supported: false,
|
|
9625
|
+
automatic: false,
|
|
9626
|
+
effortControl: false,
|
|
9627
|
+
encryptedContent: false,
|
|
9628
|
+
summaryAvailable: false
|
|
9629
|
+
},
|
|
9630
|
+
type: "realtime",
|
|
9631
|
+
inputModalities: [
|
|
9632
|
+
"text",
|
|
9633
|
+
"audio"
|
|
9634
|
+
],
|
|
9635
|
+
outputModalities: [
|
|
9636
|
+
"text"
|
|
9637
|
+
],
|
|
9638
|
+
family: "gpt-realtime",
|
|
9639
|
+
version: "2.1",
|
|
9640
|
+
status: "stable",
|
|
9641
|
+
active: true
|
|
9642
|
+
},
|
|
9643
|
+
"openai/gpt-realtime-2.1": {
|
|
9644
|
+
providerModelName: "gpt-realtime-2.1",
|
|
9645
|
+
aliases: [
|
|
9646
|
+
"gpt-realtime-2.1"
|
|
9647
|
+
],
|
|
9648
|
+
pricing: {
|
|
9649
|
+
inputPerMTok: 32,
|
|
9650
|
+
cacheReadPerMTok: 0.4,
|
|
9651
|
+
outputPerMTok: 64
|
|
9652
|
+
},
|
|
9653
|
+
preferredApi: "responses",
|
|
9654
|
+
supportedApis: [
|
|
9655
|
+
"responses",
|
|
9656
|
+
"completions"
|
|
9657
|
+
],
|
|
9658
|
+
contextWindow: 128e3,
|
|
9659
|
+
maxOutput: 32e3,
|
|
9660
|
+
capabilities: {
|
|
9661
|
+
toolUse: true,
|
|
9662
|
+
streaming: true,
|
|
9663
|
+
structuredOutput: false,
|
|
9664
|
+
vision: false,
|
|
9665
|
+
audio: true,
|
|
9666
|
+
video: false,
|
|
9667
|
+
imageGeneration: false,
|
|
9668
|
+
audioGeneration: false,
|
|
9669
|
+
videoGeneration: false
|
|
9670
|
+
},
|
|
9671
|
+
reasoning: {
|
|
9672
|
+
supported: false,
|
|
9673
|
+
automatic: false,
|
|
9674
|
+
effortControl: false,
|
|
9675
|
+
encryptedContent: false,
|
|
9676
|
+
summaryAvailable: false
|
|
9677
|
+
},
|
|
9678
|
+
type: "realtime",
|
|
9679
|
+
inputModalities: [
|
|
9680
|
+
"text",
|
|
9681
|
+
"audio"
|
|
9682
|
+
],
|
|
9683
|
+
outputModalities: [
|
|
9684
|
+
"text"
|
|
9685
|
+
],
|
|
9686
|
+
family: "gpt-realtime",
|
|
9687
|
+
version: "2.1",
|
|
9688
|
+
status: "stable",
|
|
9689
|
+
active: true
|
|
9690
|
+
},
|
|
9691
|
+
"openai/gpt-5.6-sol": {
|
|
9692
|
+
providerModelName: "gpt-5.6-sol",
|
|
9693
|
+
aliases: [
|
|
9694
|
+
"gpt-5.6-sol"
|
|
9695
|
+
],
|
|
9696
|
+
pricing: {
|
|
9697
|
+
inputPerMTok: 5,
|
|
9698
|
+
outputPerMTok: 30,
|
|
9699
|
+
cacheReadPerMTok: 0.5,
|
|
9700
|
+
tiers: {
|
|
9701
|
+
batch: {
|
|
9702
|
+
inputPerMTok: 2.5,
|
|
9703
|
+
outputPerMTok: 15,
|
|
9704
|
+
cacheReadPerMTok: 0.25
|
|
9705
|
+
},
|
|
9706
|
+
flex: {
|
|
9707
|
+
inputPerMTok: 2.5,
|
|
9708
|
+
outputPerMTok: 15,
|
|
9709
|
+
cacheReadPerMTok: 0.25
|
|
9710
|
+
},
|
|
9711
|
+
priority: {
|
|
9712
|
+
inputPerMTok: 10,
|
|
9713
|
+
outputPerMTok: 60,
|
|
9714
|
+
cacheReadPerMTok: 1
|
|
9715
|
+
}
|
|
9716
|
+
}
|
|
9717
|
+
},
|
|
9718
|
+
preferredApi: "responses",
|
|
9719
|
+
supportedApis: [
|
|
9720
|
+
"responses",
|
|
9721
|
+
"completions"
|
|
9722
|
+
],
|
|
9723
|
+
contextWindow: 105e4,
|
|
9724
|
+
maxOutput: 128e3,
|
|
9725
|
+
capabilities: {
|
|
9726
|
+
toolUse: true,
|
|
9727
|
+
streaming: true,
|
|
9728
|
+
structuredOutput: true,
|
|
9729
|
+
vision: true,
|
|
9730
|
+
audio: false,
|
|
9731
|
+
video: false,
|
|
9732
|
+
imageGeneration: false,
|
|
9733
|
+
audioGeneration: false,
|
|
9734
|
+
videoGeneration: false,
|
|
9735
|
+
webSearch: true
|
|
9736
|
+
},
|
|
9737
|
+
reasoning: {
|
|
9738
|
+
supported: true,
|
|
9739
|
+
automatic: false,
|
|
9740
|
+
effortControl: false,
|
|
9741
|
+
encryptedContent: false,
|
|
9742
|
+
summaryAvailable: false
|
|
9743
|
+
},
|
|
9744
|
+
type: "chat",
|
|
9745
|
+
inputModalities: [
|
|
9746
|
+
"text",
|
|
9747
|
+
"image"
|
|
9748
|
+
],
|
|
9749
|
+
outputModalities: [
|
|
9750
|
+
"text"
|
|
9751
|
+
],
|
|
9752
|
+
family: "gpt-sol",
|
|
9753
|
+
version: "5.6",
|
|
9754
|
+
status: "stable",
|
|
9755
|
+
active: true
|
|
9756
|
+
},
|
|
9757
|
+
"openai/gpt-5.6-terra": {
|
|
9758
|
+
providerModelName: "gpt-5.6-terra",
|
|
9759
|
+
aliases: [
|
|
9760
|
+
"gpt-5.6-terra"
|
|
9761
|
+
],
|
|
9762
|
+
pricing: {
|
|
9763
|
+
inputPerMTok: 2.5,
|
|
9764
|
+
outputPerMTok: 15,
|
|
9765
|
+
cacheReadPerMTok: 0.25,
|
|
9766
|
+
tiers: {
|
|
9767
|
+
batch: {
|
|
9768
|
+
inputPerMTok: 1.25,
|
|
9769
|
+
outputPerMTok: 7.5,
|
|
9770
|
+
cacheReadPerMTok: 0.125
|
|
9771
|
+
},
|
|
9772
|
+
flex: {
|
|
9773
|
+
inputPerMTok: 1.25,
|
|
9774
|
+
outputPerMTok: 7.5,
|
|
9775
|
+
cacheReadPerMTok: 0.125
|
|
9776
|
+
},
|
|
9777
|
+
priority: {
|
|
9778
|
+
inputPerMTok: 5,
|
|
9779
|
+
outputPerMTok: 30,
|
|
9780
|
+
cacheReadPerMTok: 0.5
|
|
9781
|
+
}
|
|
9782
|
+
}
|
|
9783
|
+
},
|
|
9784
|
+
preferredApi: "responses",
|
|
9785
|
+
supportedApis: [
|
|
9786
|
+
"responses",
|
|
9787
|
+
"completions"
|
|
9788
|
+
],
|
|
9789
|
+
contextWindow: 105e4,
|
|
9790
|
+
maxOutput: 128e3,
|
|
9791
|
+
capabilities: {
|
|
9792
|
+
toolUse: true,
|
|
9793
|
+
streaming: true,
|
|
9794
|
+
structuredOutput: true,
|
|
9795
|
+
vision: true,
|
|
9796
|
+
audio: false,
|
|
9797
|
+
video: false,
|
|
9798
|
+
imageGeneration: false,
|
|
9799
|
+
audioGeneration: false,
|
|
9800
|
+
videoGeneration: false,
|
|
9801
|
+
webSearch: true
|
|
9802
|
+
},
|
|
9803
|
+
reasoning: {
|
|
9804
|
+
supported: true,
|
|
9805
|
+
automatic: false,
|
|
9806
|
+
effortControl: false,
|
|
9807
|
+
encryptedContent: false,
|
|
9808
|
+
summaryAvailable: false
|
|
9809
|
+
},
|
|
9810
|
+
type: "chat",
|
|
9811
|
+
inputModalities: [
|
|
9812
|
+
"text",
|
|
9813
|
+
"image"
|
|
9814
|
+
],
|
|
9815
|
+
outputModalities: [
|
|
9816
|
+
"text"
|
|
9817
|
+
],
|
|
9818
|
+
family: "gpt-terra",
|
|
9819
|
+
version: "5.6",
|
|
9820
|
+
status: "stable",
|
|
9821
|
+
active: true
|
|
9822
|
+
},
|
|
9823
|
+
"openai/gpt-5.6-luna": {
|
|
9824
|
+
providerModelName: "gpt-5.6-luna",
|
|
9825
|
+
aliases: [
|
|
9826
|
+
"gpt-5.6-luna"
|
|
9827
|
+
],
|
|
9828
|
+
pricing: {
|
|
9829
|
+
inputPerMTok: 1,
|
|
9830
|
+
outputPerMTok: 6,
|
|
9831
|
+
cacheReadPerMTok: 0.1,
|
|
9832
|
+
tiers: {
|
|
9833
|
+
batch: {
|
|
9834
|
+
inputPerMTok: 0.5,
|
|
9835
|
+
outputPerMTok: 3,
|
|
9836
|
+
cacheReadPerMTok: 0.05
|
|
9837
|
+
},
|
|
9838
|
+
flex: {
|
|
9839
|
+
inputPerMTok: 0.5,
|
|
9840
|
+
outputPerMTok: 3,
|
|
9841
|
+
cacheReadPerMTok: 0.05
|
|
9842
|
+
},
|
|
9843
|
+
priority: {
|
|
9844
|
+
inputPerMTok: 2,
|
|
9845
|
+
outputPerMTok: 12,
|
|
9846
|
+
cacheReadPerMTok: 0.2
|
|
9847
|
+
}
|
|
9848
|
+
}
|
|
9849
|
+
},
|
|
9850
|
+
preferredApi: "responses",
|
|
9851
|
+
supportedApis: [
|
|
9852
|
+
"responses",
|
|
9853
|
+
"completions"
|
|
9854
|
+
],
|
|
9855
|
+
contextWindow: 105e4,
|
|
9856
|
+
maxOutput: 128e3,
|
|
9857
|
+
capabilities: {
|
|
9858
|
+
toolUse: true,
|
|
9859
|
+
streaming: true,
|
|
9860
|
+
structuredOutput: true,
|
|
9861
|
+
vision: true,
|
|
9862
|
+
audio: false,
|
|
9863
|
+
video: false,
|
|
9864
|
+
imageGeneration: false,
|
|
9865
|
+
audioGeneration: false,
|
|
9866
|
+
videoGeneration: false,
|
|
9867
|
+
webSearch: true
|
|
9868
|
+
},
|
|
9869
|
+
reasoning: {
|
|
9870
|
+
supported: true,
|
|
9871
|
+
automatic: false,
|
|
9872
|
+
effortControl: false,
|
|
9873
|
+
encryptedContent: false,
|
|
9874
|
+
summaryAvailable: false
|
|
9875
|
+
},
|
|
9876
|
+
type: "chat",
|
|
9877
|
+
inputModalities: [
|
|
9878
|
+
"text",
|
|
9879
|
+
"image"
|
|
9880
|
+
],
|
|
9881
|
+
outputModalities: [
|
|
9882
|
+
"text"
|
|
9883
|
+
],
|
|
9884
|
+
family: "gpt-luna",
|
|
9885
|
+
version: "5.6",
|
|
9886
|
+
status: "stable",
|
|
9887
|
+
active: true
|
|
9274
9888
|
}
|
|
9275
9889
|
};
|
|
9276
9890
|
|
|
@@ -9378,7 +9992,7 @@ var catalog_default4 = {
|
|
|
9378
9992
|
supportedApis: [
|
|
9379
9993
|
"completions"
|
|
9380
9994
|
],
|
|
9381
|
-
contextWindow:
|
|
9995
|
+
contextWindow: 1e6,
|
|
9382
9996
|
capabilities: {
|
|
9383
9997
|
toolUse: false,
|
|
9384
9998
|
streaming: true,
|
|
@@ -9737,7 +10351,7 @@ var catalog_default4 = {
|
|
|
9737
10351
|
capabilities: {
|
|
9738
10352
|
toolUse: false,
|
|
9739
10353
|
streaming: true,
|
|
9740
|
-
structuredOutput:
|
|
10354
|
+
structuredOutput: true,
|
|
9741
10355
|
vision: false,
|
|
9742
10356
|
audio: false,
|
|
9743
10357
|
video: false,
|
|
@@ -12337,7 +12951,7 @@ var catalog_default4 = {
|
|
|
12337
12951
|
"openai/gpt-oss-120b:free"
|
|
12338
12952
|
],
|
|
12339
12953
|
pricing: {
|
|
12340
|
-
inputPerMTok: 0.
|
|
12954
|
+
inputPerMTok: 0.036,
|
|
12341
12955
|
outputPerMTok: 0.18
|
|
12342
12956
|
},
|
|
12343
12957
|
preferredApi: "completions",
|
|
@@ -13388,7 +14002,8 @@ var catalog_default4 = {
|
|
|
13388
14002
|
"openrouter/gemini-3-pro-image": {
|
|
13389
14003
|
providerModelName: "google/gemini-3-pro-image-preview",
|
|
13390
14004
|
aliases: [
|
|
13391
|
-
"google/gemini-3-pro-image-preview"
|
|
14005
|
+
"google/gemini-3-pro-image-preview",
|
|
14006
|
+
"google/gemini-3-pro-image"
|
|
13392
14007
|
],
|
|
13393
14008
|
pricing: {
|
|
13394
14009
|
inputPerMTok: 2,
|
|
@@ -13460,7 +14075,8 @@ var catalog_default4 = {
|
|
|
13460
14075
|
"openrouter/gemini-3.1-flash-image": {
|
|
13461
14076
|
providerModelName: "google/gemini-3.1-flash-image-preview",
|
|
13462
14077
|
aliases: [
|
|
13463
|
-
"google/gemini-3.1-flash-image-preview"
|
|
14078
|
+
"google/gemini-3.1-flash-image-preview",
|
|
14079
|
+
"google/gemini-3.1-flash-image"
|
|
13464
14080
|
],
|
|
13465
14081
|
pricing: {
|
|
13466
14082
|
inputPerMTok: 0.5,
|
|
@@ -13993,8 +14609,8 @@ var catalog_default4 = {
|
|
|
13993
14609
|
"x-ai/grok-4.20-multi-agent"
|
|
13994
14610
|
],
|
|
13995
14611
|
pricing: {
|
|
13996
|
-
inputPerMTok:
|
|
13997
|
-
outputPerMTok:
|
|
14612
|
+
inputPerMTok: 1.25,
|
|
14613
|
+
outputPerMTok: 2.5,
|
|
13998
14614
|
cacheReadPerMTok: 0.2
|
|
13999
14615
|
},
|
|
14000
14616
|
preferredApi: "completions",
|
|
@@ -14176,8 +14792,8 @@ var catalog_default4 = {
|
|
|
14176
14792
|
"deepseek/deepseek-chat-v3-0324"
|
|
14177
14793
|
],
|
|
14178
14794
|
pricing: {
|
|
14179
|
-
inputPerMTok: 0.
|
|
14180
|
-
outputPerMTok: 0.
|
|
14795
|
+
inputPerMTok: 0.24,
|
|
14796
|
+
outputPerMTok: 0.9,
|
|
14181
14797
|
cacheReadPerMTok: 0.135
|
|
14182
14798
|
},
|
|
14183
14799
|
preferredApi: "completions",
|
|
@@ -14270,8 +14886,9 @@ var catalog_default4 = {
|
|
|
14270
14886
|
"deepseek/deepseek-v3.2-exp"
|
|
14271
14887
|
],
|
|
14272
14888
|
pricing: {
|
|
14273
|
-
inputPerMTok: 0.
|
|
14274
|
-
outputPerMTok: 0.
|
|
14889
|
+
inputPerMTok: 0.2145,
|
|
14890
|
+
outputPerMTok: 0.32175,
|
|
14891
|
+
cacheReadPerMTok: 0.02145
|
|
14275
14892
|
},
|
|
14276
14893
|
preferredApi: "completions",
|
|
14277
14894
|
supportedApis: [
|
|
@@ -14315,9 +14932,9 @@ var catalog_default4 = {
|
|
|
14315
14932
|
"deepseek/deepseek-v4-flash"
|
|
14316
14933
|
],
|
|
14317
14934
|
pricing: {
|
|
14318
|
-
inputPerMTok: 0.
|
|
14319
|
-
outputPerMTok: 0.
|
|
14320
|
-
cacheReadPerMTok: 0.
|
|
14935
|
+
inputPerMTok: 0.077,
|
|
14936
|
+
outputPerMTok: 0.154,
|
|
14937
|
+
cacheReadPerMTok: 0.0154
|
|
14321
14938
|
},
|
|
14322
14939
|
preferredApi: "completions",
|
|
14323
14940
|
supportedApis: [
|
|
@@ -14679,8 +15296,8 @@ var catalog_default4 = {
|
|
|
14679
15296
|
"qwen/qwen3-8b"
|
|
14680
15297
|
],
|
|
14681
15298
|
pricing: {
|
|
14682
|
-
inputPerMTok: 0.
|
|
14683
|
-
outputPerMTok: 0.
|
|
15299
|
+
inputPerMTok: 0.117,
|
|
15300
|
+
outputPerMTok: 0.455,
|
|
14684
15301
|
cacheReadPerMTok: 0.05
|
|
14685
15302
|
},
|
|
14686
15303
|
preferredApi: "completions",
|
|
@@ -15141,14 +15758,15 @@ var catalog_default4 = {
|
|
|
15141
15758
|
"qwen/qwen3.5-397b-a17b"
|
|
15142
15759
|
],
|
|
15143
15760
|
pricing: {
|
|
15144
|
-
inputPerMTok: 0.
|
|
15145
|
-
outputPerMTok: 2.
|
|
15761
|
+
inputPerMTok: 0.385,
|
|
15762
|
+
outputPerMTok: 2.45,
|
|
15763
|
+
cacheReadPerMTok: 0.111
|
|
15146
15764
|
},
|
|
15147
15765
|
preferredApi: "completions",
|
|
15148
15766
|
supportedApis: [
|
|
15149
15767
|
"completions"
|
|
15150
15768
|
],
|
|
15151
|
-
contextWindow:
|
|
15769
|
+
contextWindow: 256e3,
|
|
15152
15770
|
maxOutput: 65536,
|
|
15153
15771
|
capabilities: {
|
|
15154
15772
|
toolUse: true,
|
|
@@ -15187,8 +15805,9 @@ var catalog_default4 = {
|
|
|
15187
15805
|
"qwen/qwen3.6-27b"
|
|
15188
15806
|
],
|
|
15189
15807
|
pricing: {
|
|
15190
|
-
inputPerMTok: 0.
|
|
15191
|
-
outputPerMTok:
|
|
15808
|
+
inputPerMTok: 0.285,
|
|
15809
|
+
outputPerMTok: 2.4,
|
|
15810
|
+
cacheReadPerMTok: 0.15
|
|
15192
15811
|
},
|
|
15193
15812
|
preferredApi: "completions",
|
|
15194
15813
|
supportedApis: [
|
|
@@ -15233,7 +15852,7 @@ var catalog_default4 = {
|
|
|
15233
15852
|
"qwen/qwen3.6-35b-a3b"
|
|
15234
15853
|
],
|
|
15235
15854
|
pricing: {
|
|
15236
|
-
inputPerMTok: 0.
|
|
15855
|
+
inputPerMTok: 0.14,
|
|
15237
15856
|
outputPerMTok: 1,
|
|
15238
15857
|
cacheReadPerMTok: 0.05
|
|
15239
15858
|
},
|
|
@@ -15838,8 +16457,8 @@ var catalog_default4 = {
|
|
|
15838
16457
|
"qwen/qwen3-vl-8b-thinking"
|
|
15839
16458
|
],
|
|
15840
16459
|
pricing: {
|
|
15841
|
-
inputPerMTok: 0.
|
|
15842
|
-
outputPerMTok: 0.
|
|
16460
|
+
inputPerMTok: 0.117,
|
|
16461
|
+
outputPerMTok: 0.455
|
|
15843
16462
|
},
|
|
15844
16463
|
preferredApi: "completions",
|
|
15845
16464
|
supportedApis: [
|
|
@@ -16254,8 +16873,8 @@ var catalog_default4 = {
|
|
|
16254
16873
|
"meta-llama/llama-3.2-3b-instruct:free"
|
|
16255
16874
|
],
|
|
16256
16875
|
pricing: {
|
|
16257
|
-
inputPerMTok: 0.
|
|
16258
|
-
outputPerMTok: 0.
|
|
16876
|
+
inputPerMTok: 0.05,
|
|
16877
|
+
outputPerMTok: 0.33
|
|
16259
16878
|
},
|
|
16260
16879
|
preferredApi: "completions",
|
|
16261
16880
|
supportedApis: [
|
|
@@ -16337,7 +16956,11 @@ var catalog_default4 = {
|
|
|
16337
16956
|
family: "llama",
|
|
16338
16957
|
version: "3.2",
|
|
16339
16958
|
status: "legacy",
|
|
16340
|
-
active: true
|
|
16959
|
+
active: true,
|
|
16960
|
+
deprecation: {
|
|
16961
|
+
shutdownDate: "2026-07-17",
|
|
16962
|
+
source: "openrouter"
|
|
16963
|
+
}
|
|
16341
16964
|
},
|
|
16342
16965
|
"openrouter/llama-3.3-70b": {
|
|
16343
16966
|
providerModelName: "meta-llama/llama-3.3-70b-instruct",
|
|
@@ -16515,7 +17138,8 @@ var catalog_default4 = {
|
|
|
16515
17138
|
family: "llama-guard",
|
|
16516
17139
|
version: "3",
|
|
16517
17140
|
status: "stable",
|
|
16518
|
-
active: true
|
|
17141
|
+
active: true,
|
|
17142
|
+
contextWindow: 163840
|
|
16519
17143
|
},
|
|
16520
17144
|
"openrouter/llama-guard-4-12b": {
|
|
16521
17145
|
providerModelName: "meta-llama/llama-guard-4-12b",
|
|
@@ -17219,9 +17843,9 @@ var catalog_default4 = {
|
|
|
17219
17843
|
"moonshotai/kimi-k2.6"
|
|
17220
17844
|
],
|
|
17221
17845
|
pricing: {
|
|
17222
|
-
inputPerMTok: 0.
|
|
17846
|
+
inputPerMTok: 0.66,
|
|
17223
17847
|
outputPerMTok: 3.41,
|
|
17224
|
-
cacheReadPerMTok: 0.
|
|
17848
|
+
cacheReadPerMTok: 0.15
|
|
17225
17849
|
},
|
|
17226
17850
|
preferredApi: "completions",
|
|
17227
17851
|
supportedApis: [
|
|
@@ -17308,7 +17932,7 @@ var catalog_default4 = {
|
|
|
17308
17932
|
status: "legacy",
|
|
17309
17933
|
active: true,
|
|
17310
17934
|
deprecation: {
|
|
17311
|
-
shutdownDate: "2026-
|
|
17935
|
+
shutdownDate: "2026-12-31",
|
|
17312
17936
|
source: "openrouter"
|
|
17313
17937
|
}
|
|
17314
17938
|
},
|
|
@@ -17459,9 +18083,9 @@ var catalog_default4 = {
|
|
|
17459
18083
|
"z-ai/glm-5.1"
|
|
17460
18084
|
],
|
|
17461
18085
|
pricing: {
|
|
17462
|
-
inputPerMTok: 0.
|
|
17463
|
-
outputPerMTok: 3.
|
|
17464
|
-
cacheReadPerMTok: 0.
|
|
18086
|
+
inputPerMTok: 0.966,
|
|
18087
|
+
outputPerMTok: 3.036,
|
|
18088
|
+
cacheReadPerMTok: 0.1794
|
|
17465
18089
|
},
|
|
17466
18090
|
preferredApi: "completions",
|
|
17467
18091
|
supportedApis: [
|
|
@@ -17598,7 +18222,7 @@ var catalog_default4 = {
|
|
|
17598
18222
|
],
|
|
17599
18223
|
pricing: {
|
|
17600
18224
|
inputPerMTok: 0.255,
|
|
17601
|
-
outputPerMTok: 1,
|
|
18225
|
+
outputPerMTok: 1.02,
|
|
17602
18226
|
cacheReadPerMTok: 0.03
|
|
17603
18227
|
},
|
|
17604
18228
|
preferredApi: "completions",
|
|
@@ -17689,8 +18313,8 @@ var catalog_default4 = {
|
|
|
17689
18313
|
"minimax/minimax-m2.7"
|
|
17690
18314
|
],
|
|
17691
18315
|
pricing: {
|
|
17692
|
-
inputPerMTok: 0.
|
|
17693
|
-
outputPerMTok:
|
|
18316
|
+
inputPerMTok: 0.24,
|
|
18317
|
+
outputPerMTok: 0.96,
|
|
17694
18318
|
cacheReadPerMTok: 0.05
|
|
17695
18319
|
},
|
|
17696
18320
|
preferredApi: "completions",
|
|
@@ -17909,7 +18533,11 @@ var catalog_default4 = {
|
|
|
17909
18533
|
family: "nemotron",
|
|
17910
18534
|
version: "1.5",
|
|
17911
18535
|
status: "stable",
|
|
17912
|
-
active: true
|
|
18536
|
+
active: true,
|
|
18537
|
+
deprecation: {
|
|
18538
|
+
shutdownDate: "2026-07-17",
|
|
18539
|
+
source: "openrouter"
|
|
18540
|
+
}
|
|
17913
18541
|
},
|
|
17914
18542
|
"openrouter/nemotron-3-nano-30b-a3b": {
|
|
17915
18543
|
providerModelName: "nvidia/nemotron-3-nano-30b-a3b",
|
|
@@ -17965,7 +18593,7 @@ var catalog_default4 = {
|
|
|
17965
18593
|
"nvidia/nemotron-3-super-120b-a12b:free"
|
|
17966
18594
|
],
|
|
17967
18595
|
pricing: {
|
|
17968
|
-
inputPerMTok: 0.
|
|
18596
|
+
inputPerMTok: 0.08,
|
|
17969
18597
|
outputPerMTok: 0.45
|
|
17970
18598
|
},
|
|
17971
18599
|
preferredApi: "completions",
|
|
@@ -18011,8 +18639,8 @@ var catalog_default4 = {
|
|
|
18011
18639
|
],
|
|
18012
18640
|
pricing: {
|
|
18013
18641
|
inputPerMTok: 0.5,
|
|
18014
|
-
outputPerMTok: 2.
|
|
18015
|
-
cacheReadPerMTok: 0.
|
|
18642
|
+
outputPerMTok: 2.2,
|
|
18643
|
+
cacheReadPerMTok: 0.1
|
|
18016
18644
|
},
|
|
18017
18645
|
preferredApi: "completions",
|
|
18018
18646
|
supportedApis: [
|
|
@@ -18512,7 +19140,7 @@ var catalog_default4 = {
|
|
|
18512
19140
|
"microsoft/phi-4"
|
|
18513
19141
|
],
|
|
18514
19142
|
pricing: {
|
|
18515
|
-
inputPerMTok: 0.
|
|
19143
|
+
inputPerMTok: 0.07,
|
|
18516
19144
|
outputPerMTok: 0.14
|
|
18517
19145
|
},
|
|
18518
19146
|
preferredApi: "completions",
|
|
@@ -19379,8 +20007,8 @@ var catalog_default4 = {
|
|
|
19379
20007
|
"arcee-ai/trinity-large-thinking"
|
|
19380
20008
|
],
|
|
19381
20009
|
pricing: {
|
|
19382
|
-
inputPerMTok: 0.
|
|
19383
|
-
outputPerMTok: 0.
|
|
20010
|
+
inputPerMTok: 0.25,
|
|
20011
|
+
outputPerMTok: 0.8,
|
|
19384
20012
|
cacheReadPerMTok: 0.06
|
|
19385
20013
|
},
|
|
19386
20014
|
preferredApi: "completions",
|
|
@@ -20329,7 +20957,7 @@ var catalog_default4 = {
|
|
|
20329
20957
|
"stepfun/step-3.5-flash"
|
|
20330
20958
|
],
|
|
20331
20959
|
pricing: {
|
|
20332
|
-
inputPerMTok: 0.
|
|
20960
|
+
inputPerMTok: 0.1,
|
|
20333
20961
|
outputPerMTok: 0.3,
|
|
20334
20962
|
cacheReadPerMTok: 0.02
|
|
20335
20963
|
},
|
|
@@ -20464,7 +21092,9 @@ var catalog_default4 = {
|
|
|
20464
21092
|
"openrouter/hunyuan-hy3": {
|
|
20465
21093
|
providerModelName: "tencent/hy3-preview",
|
|
20466
21094
|
aliases: [
|
|
20467
|
-
"tencent/hy3-preview"
|
|
21095
|
+
"tencent/hy3-preview",
|
|
21096
|
+
"tencent/hy3",
|
|
21097
|
+
"tencent/hy3:free"
|
|
20468
21098
|
],
|
|
20469
21099
|
pricing: {
|
|
20470
21100
|
inputPerMTok: 0.063,
|
|
@@ -20648,9 +21278,9 @@ var catalog_default4 = {
|
|
|
20648
21278
|
"xiaomi/mimo-v2.5"
|
|
20649
21279
|
],
|
|
20650
21280
|
pricing: {
|
|
20651
|
-
inputPerMTok: 0.
|
|
21281
|
+
inputPerMTok: 0.105,
|
|
20652
21282
|
outputPerMTok: 0.28,
|
|
20653
|
-
cacheReadPerMTok:
|
|
21283
|
+
cacheReadPerMTok: 0.028
|
|
20654
21284
|
},
|
|
20655
21285
|
preferredApi: "completions",
|
|
20656
21286
|
supportedApis: [
|
|
@@ -20739,11 +21369,13 @@ var catalog_default4 = {
|
|
|
20739
21369
|
"openrouter/nex-n2-pro": {
|
|
20740
21370
|
providerModelName: "nex-agi/nex-n2-pro:free",
|
|
20741
21371
|
aliases: [
|
|
20742
|
-
"nex-agi/nex-n2-pro:free"
|
|
21372
|
+
"nex-agi/nex-n2-pro:free",
|
|
21373
|
+
"nex-agi/nex-n2-pro"
|
|
20743
21374
|
],
|
|
20744
21375
|
pricing: {
|
|
20745
|
-
inputPerMTok: 0,
|
|
20746
|
-
outputPerMTok:
|
|
21376
|
+
inputPerMTok: 0.25,
|
|
21377
|
+
outputPerMTok: 1,
|
|
21378
|
+
cacheReadPerMTok: 0.025
|
|
20747
21379
|
},
|
|
20748
21380
|
preferredApi: "completions",
|
|
20749
21381
|
supportedApis: [
|
|
@@ -20831,7 +21463,8 @@ var catalog_default4 = {
|
|
|
20831
21463
|
"openrouter/laguna-m.1": {
|
|
20832
21464
|
providerModelName: "poolside/laguna-m.1:free",
|
|
20833
21465
|
aliases: [
|
|
20834
|
-
"poolside/laguna-m.1:free"
|
|
21466
|
+
"poolside/laguna-m.1:free",
|
|
21467
|
+
"poolside/laguna-m.1"
|
|
20835
21468
|
],
|
|
20836
21469
|
pricing: {
|
|
20837
21470
|
inputPerMTok: 0,
|
|
@@ -21011,7 +21644,8 @@ var catalog_default4 = {
|
|
|
21011
21644
|
"openrouter/dolphin-mistral-24b-venice": {
|
|
21012
21645
|
providerModelName: "cognitivecomputations/dolphin-mistral-24b-venice-edition:free",
|
|
21013
21646
|
aliases: [
|
|
21014
|
-
"cognitivecomputations/dolphin-mistral-24b-venice-edition:free"
|
|
21647
|
+
"cognitivecomputations/dolphin-mistral-24b-venice-edition:free",
|
|
21648
|
+
"cognitivecomputations/dolphin-mistral-24b-venice-edition"
|
|
21015
21649
|
],
|
|
21016
21650
|
pricing: {
|
|
21017
21651
|
inputPerMTok: 0,
|
|
@@ -21050,7 +21684,11 @@ var catalog_default4 = {
|
|
|
21050
21684
|
family: "roleplay-finetunes",
|
|
21051
21685
|
version: "1",
|
|
21052
21686
|
status: "stable",
|
|
21053
|
-
active: true
|
|
21687
|
+
active: true,
|
|
21688
|
+
deprecation: {
|
|
21689
|
+
shutdownDate: "2026-07-19",
|
|
21690
|
+
source: "openrouter"
|
|
21691
|
+
}
|
|
21054
21692
|
},
|
|
21055
21693
|
"openrouter/mythomax-l2-13b": {
|
|
21056
21694
|
providerModelName: "gryphe/mythomax-l2-13b",
|
|
@@ -21286,15 +21924,15 @@ var catalog_default4 = {
|
|
|
21286
21924
|
"thedrummer/rocinante-12b"
|
|
21287
21925
|
],
|
|
21288
21926
|
pricing: {
|
|
21289
|
-
inputPerMTok: 0.
|
|
21290
|
-
outputPerMTok: 0.
|
|
21927
|
+
inputPerMTok: 0.25,
|
|
21928
|
+
outputPerMTok: 0.5
|
|
21291
21929
|
},
|
|
21292
21930
|
preferredApi: "completions",
|
|
21293
21931
|
supportedApis: [
|
|
21294
21932
|
"completions"
|
|
21295
21933
|
],
|
|
21296
|
-
contextWindow:
|
|
21297
|
-
maxOutput:
|
|
21934
|
+
contextWindow: 65536,
|
|
21935
|
+
maxOutput: 65536,
|
|
21298
21936
|
capabilities: {
|
|
21299
21937
|
toolUse: true,
|
|
21300
21938
|
streaming: true,
|
|
@@ -21460,35 +22098,23 @@ var catalog_default4 = {
|
|
|
21460
22098
|
version: "2",
|
|
21461
22099
|
status: "legacy",
|
|
21462
22100
|
active: true
|
|
21463
|
-
}
|
|
21464
|
-
|
|
21465
|
-
|
|
21466
|
-
// src/llm/providers/xai/catalog.json
|
|
21467
|
-
var catalog_default5 = {
|
|
21468
|
-
"xai/grok-4.20": {
|
|
21469
|
-
providerModelName: "grok-4.20-0309-reasoning",
|
|
22101
|
+
},
|
|
22102
|
+
"openrouter/claude-sonnet-5": {
|
|
22103
|
+
providerModelName: "anthropic/claude-sonnet-5",
|
|
21470
22104
|
aliases: [
|
|
21471
|
-
"
|
|
22105
|
+
"anthropic/claude-sonnet-5"
|
|
21472
22106
|
],
|
|
21473
22107
|
pricing: {
|
|
21474
|
-
inputPerMTok:
|
|
21475
|
-
outputPerMTok:
|
|
21476
|
-
cacheReadPerMTok: 0.2
|
|
21477
|
-
tiers: {
|
|
21478
|
-
"long-context": {
|
|
21479
|
-
inputPerMTok: 2.5,
|
|
21480
|
-
outputPerMTok: 5,
|
|
21481
|
-
cacheReadPerMTok: 0.4
|
|
21482
|
-
}
|
|
21483
|
-
}
|
|
22108
|
+
inputPerMTok: 2,
|
|
22109
|
+
outputPerMTok: 10,
|
|
22110
|
+
cacheReadPerMTok: 0.2
|
|
21484
22111
|
},
|
|
21485
|
-
preferredApi: "
|
|
22112
|
+
preferredApi: "completions",
|
|
21486
22113
|
supportedApis: [
|
|
21487
|
-
"responses",
|
|
21488
22114
|
"completions"
|
|
21489
22115
|
],
|
|
21490
|
-
contextWindow:
|
|
21491
|
-
maxOutput:
|
|
22116
|
+
contextWindow: 1e6,
|
|
22117
|
+
maxOutput: 128e3,
|
|
21492
22118
|
capabilities: {
|
|
21493
22119
|
toolUse: true,
|
|
21494
22120
|
streaming: true,
|
|
@@ -21501,7 +22127,7 @@ var catalog_default5 = {
|
|
|
21501
22127
|
videoGeneration: false
|
|
21502
22128
|
},
|
|
21503
22129
|
reasoning: {
|
|
21504
|
-
supported:
|
|
22130
|
+
supported: true,
|
|
21505
22131
|
automatic: false,
|
|
21506
22132
|
effortControl: false,
|
|
21507
22133
|
encryptedContent: false,
|
|
@@ -21515,33 +22141,27 @@ var catalog_default5 = {
|
|
|
21515
22141
|
outputModalities: [
|
|
21516
22142
|
"text"
|
|
21517
22143
|
],
|
|
21518
|
-
family: "
|
|
21519
|
-
version: "
|
|
22144
|
+
family: "claude-sonnet",
|
|
22145
|
+
version: "5",
|
|
21520
22146
|
status: "stable",
|
|
21521
22147
|
active: true
|
|
21522
22148
|
},
|
|
21523
|
-
"
|
|
21524
|
-
providerModelName: "
|
|
22149
|
+
"openrouter/gpt-5.6-luna": {
|
|
22150
|
+
providerModelName: "openai/gpt-5.6-luna",
|
|
21525
22151
|
aliases: [
|
|
21526
|
-
"
|
|
22152
|
+
"openai/gpt-5.6-luna"
|
|
21527
22153
|
],
|
|
21528
22154
|
pricing: {
|
|
21529
|
-
inputPerMTok: 1
|
|
21530
|
-
outputPerMTok:
|
|
21531
|
-
cacheReadPerMTok: 0.
|
|
21532
|
-
tiers: {
|
|
21533
|
-
"long-context": {
|
|
21534
|
-
inputPerMTok: 2.5,
|
|
21535
|
-
outputPerMTok: 5,
|
|
21536
|
-
cacheReadPerMTok: 0.4
|
|
21537
|
-
}
|
|
21538
|
-
}
|
|
22155
|
+
inputPerMTok: 1,
|
|
22156
|
+
outputPerMTok: 6,
|
|
22157
|
+
cacheReadPerMTok: 0.1
|
|
21539
22158
|
},
|
|
21540
|
-
preferredApi: "
|
|
22159
|
+
preferredApi: "completions",
|
|
21541
22160
|
supportedApis: [
|
|
21542
|
-
"responses",
|
|
21543
22161
|
"completions"
|
|
21544
22162
|
],
|
|
22163
|
+
contextWindow: 105e4,
|
|
22164
|
+
maxOutput: 128e3,
|
|
21545
22165
|
capabilities: {
|
|
21546
22166
|
toolUse: true,
|
|
21547
22167
|
streaming: true,
|
|
@@ -21554,7 +22174,7 @@ var catalog_default5 = {
|
|
|
21554
22174
|
videoGeneration: false
|
|
21555
22175
|
},
|
|
21556
22176
|
reasoning: {
|
|
21557
|
-
supported:
|
|
22177
|
+
supported: true,
|
|
21558
22178
|
automatic: false,
|
|
21559
22179
|
effortControl: false,
|
|
21560
22180
|
encryptedContent: false,
|
|
@@ -21568,33 +22188,332 @@ var catalog_default5 = {
|
|
|
21568
22188
|
outputModalities: [
|
|
21569
22189
|
"text"
|
|
21570
22190
|
],
|
|
21571
|
-
family: "
|
|
21572
|
-
version: "
|
|
22191
|
+
family: "gpt",
|
|
22192
|
+
version: "5.6",
|
|
21573
22193
|
status: "stable",
|
|
21574
22194
|
active: true
|
|
21575
22195
|
},
|
|
21576
|
-
"
|
|
21577
|
-
providerModelName: "
|
|
22196
|
+
"openrouter/gpt-5.6-terra": {
|
|
22197
|
+
providerModelName: "openai/gpt-5.6-terra",
|
|
21578
22198
|
aliases: [
|
|
21579
|
-
"
|
|
22199
|
+
"openai/gpt-5.6-terra"
|
|
21580
22200
|
],
|
|
21581
22201
|
pricing: {
|
|
21582
|
-
inputPerMTok:
|
|
21583
|
-
outputPerMTok:
|
|
21584
|
-
cacheReadPerMTok: 0.
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
|
|
21588
|
-
|
|
21589
|
-
|
|
21590
|
-
|
|
22202
|
+
inputPerMTok: 2.5,
|
|
22203
|
+
outputPerMTok: 15,
|
|
22204
|
+
cacheReadPerMTok: 0.25
|
|
22205
|
+
},
|
|
22206
|
+
preferredApi: "completions",
|
|
22207
|
+
supportedApis: [
|
|
22208
|
+
"completions"
|
|
22209
|
+
],
|
|
22210
|
+
contextWindow: 105e4,
|
|
22211
|
+
maxOutput: 128e3,
|
|
22212
|
+
capabilities: {
|
|
22213
|
+
toolUse: true,
|
|
22214
|
+
streaming: true,
|
|
22215
|
+
structuredOutput: true,
|
|
22216
|
+
vision: true,
|
|
22217
|
+
audio: false,
|
|
22218
|
+
video: false,
|
|
22219
|
+
imageGeneration: false,
|
|
22220
|
+
audioGeneration: false,
|
|
22221
|
+
videoGeneration: false
|
|
22222
|
+
},
|
|
22223
|
+
reasoning: {
|
|
22224
|
+
supported: true,
|
|
22225
|
+
automatic: false,
|
|
22226
|
+
effortControl: false,
|
|
22227
|
+
encryptedContent: false,
|
|
22228
|
+
summaryAvailable: false
|
|
22229
|
+
},
|
|
22230
|
+
type: "chat",
|
|
22231
|
+
inputModalities: [
|
|
22232
|
+
"text",
|
|
22233
|
+
"image"
|
|
22234
|
+
],
|
|
22235
|
+
outputModalities: [
|
|
22236
|
+
"text"
|
|
22237
|
+
],
|
|
22238
|
+
family: "gpt",
|
|
22239
|
+
version: "5.6",
|
|
22240
|
+
status: "stable",
|
|
22241
|
+
active: true
|
|
22242
|
+
},
|
|
22243
|
+
"openrouter/gpt-5.6-sol": {
|
|
22244
|
+
providerModelName: "openai/gpt-5.6-sol",
|
|
22245
|
+
aliases: [
|
|
22246
|
+
"openai/gpt-5.6-sol"
|
|
22247
|
+
],
|
|
22248
|
+
pricing: {
|
|
22249
|
+
inputPerMTok: 5,
|
|
22250
|
+
outputPerMTok: 30,
|
|
22251
|
+
cacheReadPerMTok: 0.5
|
|
22252
|
+
},
|
|
22253
|
+
preferredApi: "completions",
|
|
22254
|
+
supportedApis: [
|
|
22255
|
+
"completions"
|
|
22256
|
+
],
|
|
22257
|
+
contextWindow: 105e4,
|
|
22258
|
+
maxOutput: 128e3,
|
|
22259
|
+
capabilities: {
|
|
22260
|
+
toolUse: true,
|
|
22261
|
+
streaming: true,
|
|
22262
|
+
structuredOutput: true,
|
|
22263
|
+
vision: true,
|
|
22264
|
+
audio: false,
|
|
22265
|
+
video: false,
|
|
22266
|
+
imageGeneration: false,
|
|
22267
|
+
audioGeneration: false,
|
|
22268
|
+
videoGeneration: false
|
|
22269
|
+
},
|
|
22270
|
+
reasoning: {
|
|
22271
|
+
supported: true,
|
|
22272
|
+
automatic: false,
|
|
22273
|
+
effortControl: false,
|
|
22274
|
+
encryptedContent: false,
|
|
22275
|
+
summaryAvailable: false
|
|
22276
|
+
},
|
|
22277
|
+
type: "chat",
|
|
22278
|
+
inputModalities: [
|
|
22279
|
+
"text",
|
|
22280
|
+
"image"
|
|
22281
|
+
],
|
|
22282
|
+
outputModalities: [
|
|
22283
|
+
"text"
|
|
22284
|
+
],
|
|
22285
|
+
family: "gpt",
|
|
22286
|
+
version: "5.6",
|
|
22287
|
+
status: "stable",
|
|
22288
|
+
active: true
|
|
22289
|
+
},
|
|
22290
|
+
"openrouter/gpt-5.6-luna-pro": {
|
|
22291
|
+
providerModelName: "openai/gpt-5.6-luna-pro",
|
|
22292
|
+
aliases: [
|
|
22293
|
+
"openai/gpt-5.6-luna-pro"
|
|
22294
|
+
],
|
|
22295
|
+
pricing: {
|
|
22296
|
+
inputPerMTok: 1,
|
|
22297
|
+
outputPerMTok: 6,
|
|
22298
|
+
cacheReadPerMTok: 0.1
|
|
22299
|
+
},
|
|
22300
|
+
preferredApi: "completions",
|
|
22301
|
+
supportedApis: [
|
|
22302
|
+
"completions"
|
|
22303
|
+
],
|
|
22304
|
+
contextWindow: 105e4,
|
|
22305
|
+
maxOutput: 128e3,
|
|
22306
|
+
capabilities: {
|
|
22307
|
+
toolUse: true,
|
|
22308
|
+
streaming: true,
|
|
22309
|
+
structuredOutput: true,
|
|
22310
|
+
vision: true,
|
|
22311
|
+
audio: false,
|
|
22312
|
+
video: false,
|
|
22313
|
+
imageGeneration: false,
|
|
22314
|
+
audioGeneration: false,
|
|
22315
|
+
videoGeneration: false
|
|
22316
|
+
},
|
|
22317
|
+
reasoning: {
|
|
22318
|
+
supported: true,
|
|
22319
|
+
automatic: false,
|
|
22320
|
+
effortControl: false,
|
|
22321
|
+
encryptedContent: false,
|
|
22322
|
+
summaryAvailable: false
|
|
22323
|
+
},
|
|
22324
|
+
type: "chat",
|
|
22325
|
+
inputModalities: [
|
|
22326
|
+
"text",
|
|
22327
|
+
"image"
|
|
22328
|
+
],
|
|
22329
|
+
outputModalities: [
|
|
22330
|
+
"text"
|
|
22331
|
+
],
|
|
22332
|
+
family: "gpt-pro",
|
|
22333
|
+
version: "5.6",
|
|
22334
|
+
status: "stable",
|
|
22335
|
+
active: true
|
|
22336
|
+
},
|
|
22337
|
+
"openrouter/gpt-5.6-terra-pro": {
|
|
22338
|
+
providerModelName: "openai/gpt-5.6-terra-pro",
|
|
22339
|
+
aliases: [
|
|
22340
|
+
"openai/gpt-5.6-terra-pro"
|
|
22341
|
+
],
|
|
22342
|
+
pricing: {
|
|
22343
|
+
inputPerMTok: 2.5,
|
|
22344
|
+
outputPerMTok: 15,
|
|
22345
|
+
cacheReadPerMTok: 0.25
|
|
22346
|
+
},
|
|
22347
|
+
preferredApi: "completions",
|
|
22348
|
+
supportedApis: [
|
|
22349
|
+
"completions"
|
|
22350
|
+
],
|
|
22351
|
+
contextWindow: 105e4,
|
|
22352
|
+
maxOutput: 128e3,
|
|
22353
|
+
capabilities: {
|
|
22354
|
+
toolUse: true,
|
|
22355
|
+
streaming: true,
|
|
22356
|
+
structuredOutput: true,
|
|
22357
|
+
vision: true,
|
|
22358
|
+
audio: false,
|
|
22359
|
+
video: false,
|
|
22360
|
+
imageGeneration: false,
|
|
22361
|
+
audioGeneration: false,
|
|
22362
|
+
videoGeneration: false
|
|
22363
|
+
},
|
|
22364
|
+
reasoning: {
|
|
22365
|
+
supported: true,
|
|
22366
|
+
automatic: false,
|
|
22367
|
+
effortControl: false,
|
|
22368
|
+
encryptedContent: false,
|
|
22369
|
+
summaryAvailable: false
|
|
22370
|
+
},
|
|
22371
|
+
type: "chat",
|
|
22372
|
+
inputModalities: [
|
|
22373
|
+
"text",
|
|
22374
|
+
"image"
|
|
22375
|
+
],
|
|
22376
|
+
outputModalities: [
|
|
22377
|
+
"text"
|
|
22378
|
+
],
|
|
22379
|
+
family: "gpt-pro",
|
|
22380
|
+
version: "5.6",
|
|
22381
|
+
status: "stable",
|
|
22382
|
+
active: true
|
|
22383
|
+
},
|
|
22384
|
+
"openrouter/gpt-5.6-sol-pro": {
|
|
22385
|
+
providerModelName: "openai/gpt-5.6-sol-pro",
|
|
22386
|
+
aliases: [
|
|
22387
|
+
"openai/gpt-5.6-sol-pro"
|
|
22388
|
+
],
|
|
22389
|
+
pricing: {
|
|
22390
|
+
inputPerMTok: 5,
|
|
22391
|
+
outputPerMTok: 30,
|
|
22392
|
+
cacheReadPerMTok: 0.5
|
|
22393
|
+
},
|
|
22394
|
+
preferredApi: "completions",
|
|
22395
|
+
supportedApis: [
|
|
22396
|
+
"completions"
|
|
22397
|
+
],
|
|
22398
|
+
contextWindow: 105e4,
|
|
22399
|
+
maxOutput: 128e3,
|
|
22400
|
+
capabilities: {
|
|
22401
|
+
toolUse: true,
|
|
22402
|
+
streaming: true,
|
|
22403
|
+
structuredOutput: true,
|
|
22404
|
+
vision: true,
|
|
22405
|
+
audio: false,
|
|
22406
|
+
video: false,
|
|
22407
|
+
imageGeneration: false,
|
|
22408
|
+
audioGeneration: false,
|
|
22409
|
+
videoGeneration: false
|
|
22410
|
+
},
|
|
22411
|
+
reasoning: {
|
|
22412
|
+
supported: true,
|
|
22413
|
+
automatic: false,
|
|
22414
|
+
effortControl: false,
|
|
22415
|
+
encryptedContent: false,
|
|
22416
|
+
summaryAvailable: false
|
|
22417
|
+
},
|
|
22418
|
+
type: "chat",
|
|
22419
|
+
inputModalities: [
|
|
22420
|
+
"text",
|
|
22421
|
+
"image"
|
|
22422
|
+
],
|
|
22423
|
+
outputModalities: [
|
|
22424
|
+
"text"
|
|
22425
|
+
],
|
|
22426
|
+
family: "gpt-pro",
|
|
22427
|
+
version: "5.6",
|
|
22428
|
+
status: "stable",
|
|
22429
|
+
active: true
|
|
22430
|
+
},
|
|
22431
|
+
"openrouter/gemini-3.1-flash-lite-image": {
|
|
22432
|
+
providerModelName: "google/gemini-3.1-flash-lite-image",
|
|
22433
|
+
aliases: [
|
|
22434
|
+
"google/gemini-3.1-flash-lite-image"
|
|
22435
|
+
],
|
|
22436
|
+
pricing: {
|
|
22437
|
+
inputPerMTok: 0.25,
|
|
22438
|
+
outputPerMTok: 1.5
|
|
22439
|
+
},
|
|
22440
|
+
preferredApi: "completions",
|
|
22441
|
+
supportedApis: [
|
|
22442
|
+
"completions"
|
|
22443
|
+
],
|
|
22444
|
+
contextWindow: 65536,
|
|
22445
|
+
maxOutput: 66e3,
|
|
22446
|
+
capabilities: {
|
|
22447
|
+
toolUse: false,
|
|
22448
|
+
streaming: true,
|
|
22449
|
+
structuredOutput: false,
|
|
22450
|
+
vision: true,
|
|
22451
|
+
audio: false,
|
|
22452
|
+
video: false,
|
|
22453
|
+
imageGeneration: true,
|
|
22454
|
+
audioGeneration: false,
|
|
22455
|
+
videoGeneration: false
|
|
22456
|
+
},
|
|
22457
|
+
reasoning: {
|
|
22458
|
+
supported: true,
|
|
22459
|
+
automatic: false,
|
|
22460
|
+
effortControl: false,
|
|
22461
|
+
encryptedContent: false,
|
|
22462
|
+
summaryAvailable: false
|
|
22463
|
+
},
|
|
22464
|
+
type: "image",
|
|
22465
|
+
inputModalities: [
|
|
22466
|
+
"text",
|
|
22467
|
+
"image"
|
|
22468
|
+
],
|
|
22469
|
+
outputModalities: [
|
|
22470
|
+
"image"
|
|
22471
|
+
],
|
|
22472
|
+
family: "gemini-image",
|
|
22473
|
+
version: "3.1",
|
|
22474
|
+
status: "stable",
|
|
22475
|
+
active: true,
|
|
22476
|
+
mediaParams: {
|
|
22477
|
+
aspectRatio: {
|
|
22478
|
+
values: [
|
|
22479
|
+
"1:1",
|
|
22480
|
+
"2:3",
|
|
22481
|
+
"3:2",
|
|
22482
|
+
"3:4",
|
|
22483
|
+
"4:3",
|
|
22484
|
+
"4:5",
|
|
22485
|
+
"5:4",
|
|
22486
|
+
"9:16",
|
|
22487
|
+
"16:9",
|
|
22488
|
+
"21:9"
|
|
22489
|
+
]
|
|
22490
|
+
},
|
|
22491
|
+
imageSize: {
|
|
22492
|
+
values: [
|
|
22493
|
+
"0.5K",
|
|
22494
|
+
"1K",
|
|
22495
|
+
"2K",
|
|
22496
|
+
"4K"
|
|
22497
|
+
],
|
|
22498
|
+
default: "1K"
|
|
21591
22499
|
}
|
|
22500
|
+
}
|
|
22501
|
+
},
|
|
22502
|
+
"openrouter/grok-4.5": {
|
|
22503
|
+
providerModelName: "x-ai/grok-4.5",
|
|
22504
|
+
aliases: [
|
|
22505
|
+
"x-ai/grok-4.5"
|
|
22506
|
+
],
|
|
22507
|
+
pricing: {
|
|
22508
|
+
inputPerMTok: 2,
|
|
22509
|
+
outputPerMTok: 6,
|
|
22510
|
+
cacheReadPerMTok: 0.5
|
|
21592
22511
|
},
|
|
21593
|
-
preferredApi: "
|
|
22512
|
+
preferredApi: "completions",
|
|
21594
22513
|
supportedApis: [
|
|
21595
|
-
"
|
|
22514
|
+
"completions"
|
|
21596
22515
|
],
|
|
21597
|
-
contextWindow:
|
|
22516
|
+
contextWindow: 5e5,
|
|
21598
22517
|
capabilities: {
|
|
21599
22518
|
toolUse: true,
|
|
21600
22519
|
streaming: true,
|
|
@@ -21607,7 +22526,7 @@ var catalog_default5 = {
|
|
|
21607
22526
|
videoGeneration: false
|
|
21608
22527
|
},
|
|
21609
22528
|
reasoning: {
|
|
21610
|
-
supported:
|
|
22529
|
+
supported: true,
|
|
21611
22530
|
automatic: false,
|
|
21612
22531
|
effortControl: false,
|
|
21613
22532
|
encryptedContent: false,
|
|
@@ -21622,34 +22541,1030 @@ var catalog_default5 = {
|
|
|
21622
22541
|
"text"
|
|
21623
22542
|
],
|
|
21624
22543
|
family: "grok",
|
|
21625
|
-
version: "4.
|
|
22544
|
+
version: "4.5",
|
|
21626
22545
|
status: "stable",
|
|
21627
22546
|
active: true
|
|
21628
22547
|
},
|
|
21629
|
-
"
|
|
21630
|
-
providerModelName: "
|
|
22548
|
+
"openrouter/glm-5.2": {
|
|
22549
|
+
providerModelName: "z-ai/glm-5.2",
|
|
21631
22550
|
aliases: [
|
|
21632
|
-
"
|
|
22551
|
+
"z-ai/glm-5.2"
|
|
21633
22552
|
],
|
|
21634
22553
|
pricing: {
|
|
21635
|
-
inputPerMTok:
|
|
21636
|
-
outputPerMTok:
|
|
21637
|
-
cacheReadPerMTok: 0.
|
|
21638
|
-
tiers: {
|
|
21639
|
-
"long-context": {
|
|
21640
|
-
inputPerMTok: 2.5,
|
|
21641
|
-
outputPerMTok: 5,
|
|
21642
|
-
cacheReadPerMTok: 0.4
|
|
21643
|
-
}
|
|
21644
|
-
}
|
|
22554
|
+
inputPerMTok: 0.35,
|
|
22555
|
+
outputPerMTok: 1.1,
|
|
22556
|
+
cacheReadPerMTok: 0.065
|
|
21645
22557
|
},
|
|
21646
|
-
preferredApi: "
|
|
22558
|
+
preferredApi: "completions",
|
|
21647
22559
|
supportedApis: [
|
|
21648
|
-
"responses",
|
|
21649
22560
|
"completions"
|
|
21650
22561
|
],
|
|
21651
|
-
contextWindow:
|
|
21652
|
-
maxOutput:
|
|
22562
|
+
contextWindow: 1048576,
|
|
22563
|
+
maxOutput: 128e3,
|
|
22564
|
+
capabilities: {
|
|
22565
|
+
toolUse: true,
|
|
22566
|
+
streaming: true,
|
|
22567
|
+
structuredOutput: true,
|
|
22568
|
+
vision: false,
|
|
22569
|
+
audio: false,
|
|
22570
|
+
video: false,
|
|
22571
|
+
imageGeneration: false,
|
|
22572
|
+
audioGeneration: false,
|
|
22573
|
+
videoGeneration: false
|
|
22574
|
+
},
|
|
22575
|
+
reasoning: {
|
|
22576
|
+
supported: true,
|
|
22577
|
+
automatic: false,
|
|
22578
|
+
effortControl: false,
|
|
22579
|
+
encryptedContent: false,
|
|
22580
|
+
summaryAvailable: false
|
|
22581
|
+
},
|
|
22582
|
+
type: "chat",
|
|
22583
|
+
inputModalities: [
|
|
22584
|
+
"text"
|
|
22585
|
+
],
|
|
22586
|
+
outputModalities: [
|
|
22587
|
+
"text"
|
|
22588
|
+
],
|
|
22589
|
+
family: "glm",
|
|
22590
|
+
version: "5.2",
|
|
22591
|
+
status: "stable",
|
|
22592
|
+
active: true
|
|
22593
|
+
},
|
|
22594
|
+
"openrouter/glm-5v-turbo": {
|
|
22595
|
+
providerModelName: "z-ai/glm-5v-turbo",
|
|
22596
|
+
aliases: [
|
|
22597
|
+
"z-ai/glm-5v-turbo"
|
|
22598
|
+
],
|
|
22599
|
+
pricing: {
|
|
22600
|
+
inputPerMTok: 1.2,
|
|
22601
|
+
outputPerMTok: 4,
|
|
22602
|
+
cacheReadPerMTok: 0.24
|
|
22603
|
+
},
|
|
22604
|
+
preferredApi: "completions",
|
|
22605
|
+
supportedApis: [
|
|
22606
|
+
"completions"
|
|
22607
|
+
],
|
|
22608
|
+
contextWindow: 202752,
|
|
22609
|
+
maxOutput: 131072,
|
|
22610
|
+
capabilities: {
|
|
22611
|
+
toolUse: true,
|
|
22612
|
+
streaming: true,
|
|
22613
|
+
structuredOutput: true,
|
|
22614
|
+
vision: true,
|
|
22615
|
+
audio: false,
|
|
22616
|
+
video: false,
|
|
22617
|
+
imageGeneration: false,
|
|
22618
|
+
audioGeneration: false,
|
|
22619
|
+
videoGeneration: false
|
|
22620
|
+
},
|
|
22621
|
+
reasoning: {
|
|
22622
|
+
supported: true,
|
|
22623
|
+
automatic: false,
|
|
22624
|
+
effortControl: false,
|
|
22625
|
+
encryptedContent: false,
|
|
22626
|
+
summaryAvailable: false
|
|
22627
|
+
},
|
|
22628
|
+
type: "vision",
|
|
22629
|
+
inputModalities: [
|
|
22630
|
+
"text",
|
|
22631
|
+
"image"
|
|
22632
|
+
],
|
|
22633
|
+
outputModalities: [
|
|
22634
|
+
"text"
|
|
22635
|
+
],
|
|
22636
|
+
family: "glm",
|
|
22637
|
+
version: "5",
|
|
22638
|
+
status: "stable",
|
|
22639
|
+
active: true,
|
|
22640
|
+
deprecation: {
|
|
22641
|
+
shutdownDate: "2098-12-31",
|
|
22642
|
+
source: "openrouter"
|
|
22643
|
+
}
|
|
22644
|
+
},
|
|
22645
|
+
"openrouter/aion-3.0-mini": {
|
|
22646
|
+
providerModelName: "aion-labs/aion-3.0-mini",
|
|
22647
|
+
aliases: [
|
|
22648
|
+
"aion-labs/aion-3.0-mini"
|
|
22649
|
+
],
|
|
22650
|
+
pricing: {
|
|
22651
|
+
inputPerMTok: 0.7,
|
|
22652
|
+
outputPerMTok: 1.4,
|
|
22653
|
+
cacheReadPerMTok: 0.18
|
|
22654
|
+
},
|
|
22655
|
+
preferredApi: "completions",
|
|
22656
|
+
supportedApis: [
|
|
22657
|
+
"completions"
|
|
22658
|
+
],
|
|
22659
|
+
contextWindow: 131072,
|
|
22660
|
+
maxOutput: 32768,
|
|
22661
|
+
capabilities: {
|
|
22662
|
+
toolUse: true,
|
|
22663
|
+
streaming: true,
|
|
22664
|
+
structuredOutput: true,
|
|
22665
|
+
vision: false,
|
|
22666
|
+
audio: false,
|
|
22667
|
+
video: false,
|
|
22668
|
+
imageGeneration: false,
|
|
22669
|
+
audioGeneration: false,
|
|
22670
|
+
videoGeneration: false
|
|
22671
|
+
},
|
|
22672
|
+
reasoning: {
|
|
22673
|
+
supported: true,
|
|
22674
|
+
automatic: false,
|
|
22675
|
+
effortControl: false,
|
|
22676
|
+
encryptedContent: false,
|
|
22677
|
+
summaryAvailable: false
|
|
22678
|
+
},
|
|
22679
|
+
type: "chat",
|
|
22680
|
+
inputModalities: [
|
|
22681
|
+
"text"
|
|
22682
|
+
],
|
|
22683
|
+
outputModalities: [
|
|
22684
|
+
"text"
|
|
22685
|
+
],
|
|
22686
|
+
family: "aion",
|
|
22687
|
+
version: "3.0",
|
|
22688
|
+
status: "stable",
|
|
22689
|
+
active: true
|
|
22690
|
+
},
|
|
22691
|
+
"openrouter/aion-3.0": {
|
|
22692
|
+
providerModelName: "aion-labs/aion-3.0",
|
|
22693
|
+
aliases: [
|
|
22694
|
+
"aion-labs/aion-3.0"
|
|
22695
|
+
],
|
|
22696
|
+
pricing: {
|
|
22697
|
+
inputPerMTok: 3,
|
|
22698
|
+
outputPerMTok: 6,
|
|
22699
|
+
cacheReadPerMTok: 0.75
|
|
22700
|
+
},
|
|
22701
|
+
preferredApi: "completions",
|
|
22702
|
+
supportedApis: [
|
|
22703
|
+
"completions"
|
|
22704
|
+
],
|
|
22705
|
+
contextWindow: 131072,
|
|
22706
|
+
maxOutput: 32768,
|
|
22707
|
+
capabilities: {
|
|
22708
|
+
toolUse: true,
|
|
22709
|
+
streaming: true,
|
|
22710
|
+
structuredOutput: true,
|
|
22711
|
+
vision: false,
|
|
22712
|
+
audio: false,
|
|
22713
|
+
video: false,
|
|
22714
|
+
imageGeneration: false,
|
|
22715
|
+
audioGeneration: false,
|
|
22716
|
+
videoGeneration: false
|
|
22717
|
+
},
|
|
22718
|
+
reasoning: {
|
|
22719
|
+
supported: true,
|
|
22720
|
+
automatic: false,
|
|
22721
|
+
effortControl: false,
|
|
22722
|
+
encryptedContent: false,
|
|
22723
|
+
summaryAvailable: false
|
|
22724
|
+
},
|
|
22725
|
+
type: "chat",
|
|
22726
|
+
inputModalities: [
|
|
22727
|
+
"text"
|
|
22728
|
+
],
|
|
22729
|
+
outputModalities: [
|
|
22730
|
+
"text"
|
|
22731
|
+
],
|
|
22732
|
+
family: "aion",
|
|
22733
|
+
version: "3.0",
|
|
22734
|
+
status: "stable",
|
|
22735
|
+
active: true
|
|
22736
|
+
},
|
|
22737
|
+
"openrouter/nex-n2-mini": {
|
|
22738
|
+
providerModelName: "nex-agi/nex-n2-mini",
|
|
22739
|
+
aliases: [
|
|
22740
|
+
"nex-agi/nex-n2-mini"
|
|
22741
|
+
],
|
|
22742
|
+
pricing: {
|
|
22743
|
+
inputPerMTok: 0.025,
|
|
22744
|
+
outputPerMTok: 0.1,
|
|
22745
|
+
cacheReadPerMTok: 25e-4
|
|
22746
|
+
},
|
|
22747
|
+
preferredApi: "completions",
|
|
22748
|
+
supportedApis: [
|
|
22749
|
+
"completions"
|
|
22750
|
+
],
|
|
22751
|
+
contextWindow: 262144,
|
|
22752
|
+
maxOutput: 262144,
|
|
22753
|
+
capabilities: {
|
|
22754
|
+
toolUse: true,
|
|
22755
|
+
streaming: true,
|
|
22756
|
+
structuredOutput: true,
|
|
22757
|
+
vision: true,
|
|
22758
|
+
audio: false,
|
|
22759
|
+
video: false,
|
|
22760
|
+
imageGeneration: false,
|
|
22761
|
+
audioGeneration: false,
|
|
22762
|
+
videoGeneration: false
|
|
22763
|
+
},
|
|
22764
|
+
reasoning: {
|
|
22765
|
+
supported: true,
|
|
22766
|
+
automatic: false,
|
|
22767
|
+
effortControl: false,
|
|
22768
|
+
encryptedContent: false,
|
|
22769
|
+
summaryAvailable: false
|
|
22770
|
+
},
|
|
22771
|
+
type: "chat",
|
|
22772
|
+
inputModalities: [
|
|
22773
|
+
"text",
|
|
22774
|
+
"image"
|
|
22775
|
+
],
|
|
22776
|
+
outputModalities: [
|
|
22777
|
+
"text"
|
|
22778
|
+
],
|
|
22779
|
+
family: "nex",
|
|
22780
|
+
version: "2",
|
|
22781
|
+
status: "stable",
|
|
22782
|
+
active: true
|
|
22783
|
+
},
|
|
22784
|
+
"openrouter/laguna-xs.2.1": {
|
|
22785
|
+
providerModelName: "poolside/laguna-xs-2.1",
|
|
22786
|
+
aliases: [
|
|
22787
|
+
"poolside/laguna-xs-2.1",
|
|
22788
|
+
"poolside/laguna-xs-2.1:free"
|
|
22789
|
+
],
|
|
22790
|
+
pricing: {
|
|
22791
|
+
inputPerMTok: 0.06,
|
|
22792
|
+
outputPerMTok: 0.12,
|
|
22793
|
+
cacheReadPerMTok: 0.03
|
|
22794
|
+
},
|
|
22795
|
+
preferredApi: "completions",
|
|
22796
|
+
supportedApis: [
|
|
22797
|
+
"completions"
|
|
22798
|
+
],
|
|
22799
|
+
contextWindow: 262144,
|
|
22800
|
+
maxOutput: 32768,
|
|
22801
|
+
capabilities: {
|
|
22802
|
+
toolUse: true,
|
|
22803
|
+
streaming: true,
|
|
22804
|
+
structuredOutput: true,
|
|
22805
|
+
vision: false,
|
|
22806
|
+
audio: false,
|
|
22807
|
+
video: false,
|
|
22808
|
+
imageGeneration: false,
|
|
22809
|
+
audioGeneration: false,
|
|
22810
|
+
videoGeneration: false
|
|
22811
|
+
},
|
|
22812
|
+
reasoning: {
|
|
22813
|
+
supported: true,
|
|
22814
|
+
automatic: false,
|
|
22815
|
+
effortControl: false,
|
|
22816
|
+
encryptedContent: false,
|
|
22817
|
+
summaryAvailable: false
|
|
22818
|
+
},
|
|
22819
|
+
type: "code",
|
|
22820
|
+
inputModalities: [
|
|
22821
|
+
"text"
|
|
22822
|
+
],
|
|
22823
|
+
outputModalities: [
|
|
22824
|
+
"text"
|
|
22825
|
+
],
|
|
22826
|
+
family: "laguna",
|
|
22827
|
+
version: "2.1",
|
|
22828
|
+
status: "preview",
|
|
22829
|
+
active: true
|
|
22830
|
+
},
|
|
22831
|
+
"openrouter/fugu-ultra": {
|
|
22832
|
+
providerModelName: "sakana/fugu-ultra",
|
|
22833
|
+
aliases: [
|
|
22834
|
+
"sakana/fugu-ultra"
|
|
22835
|
+
],
|
|
22836
|
+
pricing: {
|
|
22837
|
+
inputPerMTok: 5,
|
|
22838
|
+
outputPerMTok: 30,
|
|
22839
|
+
cacheReadPerMTok: 0.5
|
|
22840
|
+
},
|
|
22841
|
+
preferredApi: "completions",
|
|
22842
|
+
supportedApis: [
|
|
22843
|
+
"completions"
|
|
22844
|
+
],
|
|
22845
|
+
contextWindow: 1e6,
|
|
22846
|
+
maxOutput: 128e3,
|
|
22847
|
+
capabilities: {
|
|
22848
|
+
toolUse: true,
|
|
22849
|
+
streaming: true,
|
|
22850
|
+
structuredOutput: true,
|
|
22851
|
+
vision: true,
|
|
22852
|
+
audio: false,
|
|
22853
|
+
video: false,
|
|
22854
|
+
imageGeneration: false,
|
|
22855
|
+
audioGeneration: false,
|
|
22856
|
+
videoGeneration: false,
|
|
22857
|
+
webSearch: true
|
|
22858
|
+
},
|
|
22859
|
+
reasoning: {
|
|
22860
|
+
supported: true,
|
|
22861
|
+
automatic: false,
|
|
22862
|
+
effortControl: false,
|
|
22863
|
+
encryptedContent: false,
|
|
22864
|
+
summaryAvailable: false
|
|
22865
|
+
},
|
|
22866
|
+
type: "chat",
|
|
22867
|
+
inputModalities: [
|
|
22868
|
+
"text",
|
|
22869
|
+
"image"
|
|
22870
|
+
],
|
|
22871
|
+
outputModalities: [
|
|
22872
|
+
"text"
|
|
22873
|
+
],
|
|
22874
|
+
family: "fugu",
|
|
22875
|
+
version: "1",
|
|
22876
|
+
status: "stable",
|
|
22877
|
+
active: true
|
|
22878
|
+
},
|
|
22879
|
+
"openrouter/north-mini-code": {
|
|
22880
|
+
providerModelName: "cohere/north-mini-code:free",
|
|
22881
|
+
aliases: [
|
|
22882
|
+
"cohere/north-mini-code:free"
|
|
22883
|
+
],
|
|
22884
|
+
pricing: {
|
|
22885
|
+
inputPerMTok: 0,
|
|
22886
|
+
outputPerMTok: 0
|
|
22887
|
+
},
|
|
22888
|
+
preferredApi: "completions",
|
|
22889
|
+
supportedApis: [
|
|
22890
|
+
"completions"
|
|
22891
|
+
],
|
|
22892
|
+
contextWindow: 256e3,
|
|
22893
|
+
maxOutput: 64e3,
|
|
22894
|
+
capabilities: {
|
|
22895
|
+
toolUse: true,
|
|
22896
|
+
streaming: true,
|
|
22897
|
+
structuredOutput: true,
|
|
22898
|
+
vision: false,
|
|
22899
|
+
audio: false,
|
|
22900
|
+
video: false,
|
|
22901
|
+
imageGeneration: false,
|
|
22902
|
+
audioGeneration: false,
|
|
22903
|
+
videoGeneration: false
|
|
22904
|
+
},
|
|
22905
|
+
reasoning: {
|
|
22906
|
+
supported: true,
|
|
22907
|
+
automatic: false,
|
|
22908
|
+
effortControl: false,
|
|
22909
|
+
encryptedContent: false,
|
|
22910
|
+
summaryAvailable: false
|
|
22911
|
+
},
|
|
22912
|
+
type: "code",
|
|
22913
|
+
inputModalities: [
|
|
22914
|
+
"text"
|
|
22915
|
+
],
|
|
22916
|
+
outputModalities: [
|
|
22917
|
+
"text"
|
|
22918
|
+
],
|
|
22919
|
+
family: "north-code",
|
|
22920
|
+
version: "1",
|
|
22921
|
+
status: "stable",
|
|
22922
|
+
active: true
|
|
22923
|
+
},
|
|
22924
|
+
"openrouter/kimi-k2.7-code": {
|
|
22925
|
+
providerModelName: "moonshotai/kimi-k2.7-code",
|
|
22926
|
+
aliases: [
|
|
22927
|
+
"moonshotai/kimi-k2.7-code"
|
|
22928
|
+
],
|
|
22929
|
+
pricing: {
|
|
22930
|
+
inputPerMTok: 0.72,
|
|
22931
|
+
outputPerMTok: 3.49,
|
|
22932
|
+
cacheReadPerMTok: 0.159
|
|
22933
|
+
},
|
|
22934
|
+
preferredApi: "completions",
|
|
22935
|
+
supportedApis: [
|
|
22936
|
+
"completions"
|
|
22937
|
+
],
|
|
22938
|
+
contextWindow: 262144,
|
|
22939
|
+
maxOutput: 262144,
|
|
22940
|
+
capabilities: {
|
|
22941
|
+
toolUse: true,
|
|
22942
|
+
streaming: true,
|
|
22943
|
+
structuredOutput: true,
|
|
22944
|
+
vision: true,
|
|
22945
|
+
audio: false,
|
|
22946
|
+
video: false,
|
|
22947
|
+
imageGeneration: false,
|
|
22948
|
+
audioGeneration: false,
|
|
22949
|
+
videoGeneration: false
|
|
22950
|
+
},
|
|
22951
|
+
reasoning: {
|
|
22952
|
+
supported: true,
|
|
22953
|
+
automatic: false,
|
|
22954
|
+
effortControl: false,
|
|
22955
|
+
encryptedContent: false,
|
|
22956
|
+
summaryAvailable: false
|
|
22957
|
+
},
|
|
22958
|
+
type: "code",
|
|
22959
|
+
inputModalities: [
|
|
22960
|
+
"text",
|
|
22961
|
+
"image"
|
|
22962
|
+
],
|
|
22963
|
+
outputModalities: [
|
|
22964
|
+
"text"
|
|
22965
|
+
],
|
|
22966
|
+
family: "kimi-code",
|
|
22967
|
+
version: "2.7",
|
|
22968
|
+
status: "stable",
|
|
22969
|
+
active: true
|
|
22970
|
+
}
|
|
22971
|
+
};
|
|
22972
|
+
|
|
22973
|
+
// src/llm/providers/xai/catalog.json
|
|
22974
|
+
var catalog_default5 = {
|
|
22975
|
+
"xai/grok-4.20": {
|
|
22976
|
+
providerModelName: "grok-4.20-0309-reasoning",
|
|
22977
|
+
aliases: [
|
|
22978
|
+
"grok-4.20-0309-reasoning"
|
|
22979
|
+
],
|
|
22980
|
+
pricing: {
|
|
22981
|
+
inputPerMTok: 1.25,
|
|
22982
|
+
outputPerMTok: 2.5,
|
|
22983
|
+
cacheReadPerMTok: 0.2,
|
|
22984
|
+
tiers: {
|
|
22985
|
+
"long-context": {
|
|
22986
|
+
inputPerMTok: 2.5,
|
|
22987
|
+
outputPerMTok: 5,
|
|
22988
|
+
cacheReadPerMTok: 0.4
|
|
22989
|
+
}
|
|
22990
|
+
}
|
|
22991
|
+
},
|
|
22992
|
+
preferredApi: "responses",
|
|
22993
|
+
supportedApis: [
|
|
22994
|
+
"responses",
|
|
22995
|
+
"completions"
|
|
22996
|
+
],
|
|
22997
|
+
contextWindow: 2e6,
|
|
22998
|
+
maxOutput: 2e6,
|
|
22999
|
+
capabilities: {
|
|
23000
|
+
toolUse: true,
|
|
23001
|
+
streaming: true,
|
|
23002
|
+
structuredOutput: true,
|
|
23003
|
+
vision: true,
|
|
23004
|
+
audio: false,
|
|
23005
|
+
video: false,
|
|
23006
|
+
imageGeneration: false,
|
|
23007
|
+
audioGeneration: false,
|
|
23008
|
+
videoGeneration: false
|
|
23009
|
+
},
|
|
23010
|
+
reasoning: {
|
|
23011
|
+
supported: false,
|
|
23012
|
+
automatic: false,
|
|
23013
|
+
effortControl: false,
|
|
23014
|
+
encryptedContent: false,
|
|
23015
|
+
summaryAvailable: false
|
|
23016
|
+
},
|
|
23017
|
+
type: "chat",
|
|
23018
|
+
inputModalities: [
|
|
23019
|
+
"text",
|
|
23020
|
+
"image"
|
|
23021
|
+
],
|
|
23022
|
+
outputModalities: [
|
|
23023
|
+
"text"
|
|
23024
|
+
],
|
|
23025
|
+
family: "grok",
|
|
23026
|
+
version: "4.20",
|
|
23027
|
+
status: "stable",
|
|
23028
|
+
active: true
|
|
23029
|
+
},
|
|
23030
|
+
"xai/grok-4.20-non-reasoning": {
|
|
23031
|
+
providerModelName: "grok-4.20-0309-non-reasoning",
|
|
23032
|
+
aliases: [
|
|
23033
|
+
"grok-4.20-0309-non-reasoning"
|
|
23034
|
+
],
|
|
23035
|
+
pricing: {
|
|
23036
|
+
inputPerMTok: 1.25,
|
|
23037
|
+
outputPerMTok: 2.5,
|
|
23038
|
+
cacheReadPerMTok: 0.2,
|
|
23039
|
+
tiers: {
|
|
23040
|
+
"long-context": {
|
|
23041
|
+
inputPerMTok: 2.5,
|
|
23042
|
+
outputPerMTok: 5,
|
|
23043
|
+
cacheReadPerMTok: 0.4
|
|
23044
|
+
}
|
|
23045
|
+
}
|
|
23046
|
+
},
|
|
23047
|
+
preferredApi: "responses",
|
|
23048
|
+
supportedApis: [
|
|
23049
|
+
"responses",
|
|
23050
|
+
"completions"
|
|
23051
|
+
],
|
|
23052
|
+
capabilities: {
|
|
23053
|
+
toolUse: true,
|
|
23054
|
+
streaming: true,
|
|
23055
|
+
structuredOutput: true,
|
|
23056
|
+
vision: true,
|
|
23057
|
+
audio: false,
|
|
23058
|
+
video: false,
|
|
23059
|
+
imageGeneration: false,
|
|
23060
|
+
audioGeneration: false,
|
|
23061
|
+
videoGeneration: false
|
|
23062
|
+
},
|
|
23063
|
+
reasoning: {
|
|
23064
|
+
supported: false,
|
|
23065
|
+
automatic: false,
|
|
23066
|
+
effortControl: false,
|
|
23067
|
+
encryptedContent: false,
|
|
23068
|
+
summaryAvailable: false
|
|
23069
|
+
},
|
|
23070
|
+
type: "chat",
|
|
23071
|
+
inputModalities: [
|
|
23072
|
+
"text",
|
|
23073
|
+
"image"
|
|
23074
|
+
],
|
|
23075
|
+
outputModalities: [
|
|
23076
|
+
"text"
|
|
23077
|
+
],
|
|
23078
|
+
family: "grok",
|
|
23079
|
+
version: "4.20",
|
|
23080
|
+
status: "stable",
|
|
23081
|
+
active: true,
|
|
23082
|
+
contextWindow: 2e6
|
|
23083
|
+
},
|
|
23084
|
+
"xai/grok-4.20-multi-agent": {
|
|
23085
|
+
providerModelName: "grok-4.20-multi-agent-0309",
|
|
23086
|
+
aliases: [
|
|
23087
|
+
"grok-4.20-multi-agent-0309"
|
|
23088
|
+
],
|
|
23089
|
+
pricing: {
|
|
23090
|
+
inputPerMTok: 1.25,
|
|
23091
|
+
outputPerMTok: 2.5,
|
|
23092
|
+
cacheReadPerMTok: 0.2,
|
|
23093
|
+
tiers: {
|
|
23094
|
+
"long-context": {
|
|
23095
|
+
inputPerMTok: 2.5,
|
|
23096
|
+
outputPerMTok: 5,
|
|
23097
|
+
cacheReadPerMTok: 0.4
|
|
23098
|
+
}
|
|
23099
|
+
}
|
|
23100
|
+
},
|
|
23101
|
+
preferredApi: "responses",
|
|
23102
|
+
supportedApis: [
|
|
23103
|
+
"responses"
|
|
23104
|
+
],
|
|
23105
|
+
contextWindow: 2e6,
|
|
23106
|
+
capabilities: {
|
|
23107
|
+
toolUse: true,
|
|
23108
|
+
streaming: true,
|
|
23109
|
+
structuredOutput: true,
|
|
23110
|
+
vision: true,
|
|
23111
|
+
audio: false,
|
|
23112
|
+
video: false,
|
|
23113
|
+
imageGeneration: false,
|
|
23114
|
+
audioGeneration: false,
|
|
23115
|
+
videoGeneration: false
|
|
23116
|
+
},
|
|
23117
|
+
reasoning: {
|
|
23118
|
+
supported: false,
|
|
23119
|
+
automatic: false,
|
|
23120
|
+
effortControl: false,
|
|
23121
|
+
encryptedContent: false,
|
|
23122
|
+
summaryAvailable: false
|
|
23123
|
+
},
|
|
23124
|
+
type: "chat",
|
|
23125
|
+
inputModalities: [
|
|
23126
|
+
"text",
|
|
23127
|
+
"image"
|
|
23128
|
+
],
|
|
23129
|
+
outputModalities: [
|
|
23130
|
+
"text"
|
|
23131
|
+
],
|
|
23132
|
+
family: "grok",
|
|
23133
|
+
version: "4.20",
|
|
23134
|
+
status: "stable",
|
|
23135
|
+
active: true
|
|
23136
|
+
},
|
|
23137
|
+
"xai/grok-4.3": {
|
|
23138
|
+
providerModelName: "grok-4.3",
|
|
23139
|
+
aliases: [
|
|
23140
|
+
"grok-4.3"
|
|
23141
|
+
],
|
|
23142
|
+
pricing: {
|
|
23143
|
+
inputPerMTok: 1.25,
|
|
23144
|
+
outputPerMTok: 2.5,
|
|
23145
|
+
cacheReadPerMTok: 0.2,
|
|
23146
|
+
tiers: {
|
|
23147
|
+
"long-context": {
|
|
23148
|
+
inputPerMTok: 2.5,
|
|
23149
|
+
outputPerMTok: 5,
|
|
23150
|
+
cacheReadPerMTok: 0.4
|
|
23151
|
+
}
|
|
23152
|
+
}
|
|
23153
|
+
},
|
|
23154
|
+
preferredApi: "responses",
|
|
23155
|
+
supportedApis: [
|
|
23156
|
+
"responses",
|
|
23157
|
+
"completions"
|
|
23158
|
+
],
|
|
23159
|
+
contextWindow: 1e6,
|
|
23160
|
+
maxOutput: 1e6,
|
|
23161
|
+
capabilities: {
|
|
23162
|
+
toolUse: true,
|
|
23163
|
+
streaming: true,
|
|
23164
|
+
structuredOutput: true,
|
|
23165
|
+
vision: true,
|
|
23166
|
+
audio: false,
|
|
23167
|
+
video: false,
|
|
23168
|
+
imageGeneration: false,
|
|
23169
|
+
audioGeneration: false,
|
|
23170
|
+
videoGeneration: false
|
|
23171
|
+
},
|
|
23172
|
+
reasoning: {
|
|
23173
|
+
supported: false,
|
|
23174
|
+
automatic: false,
|
|
23175
|
+
effortControl: false,
|
|
23176
|
+
encryptedContent: false,
|
|
23177
|
+
summaryAvailable: false
|
|
23178
|
+
},
|
|
23179
|
+
type: "chat",
|
|
23180
|
+
inputModalities: [
|
|
23181
|
+
"text",
|
|
23182
|
+
"image"
|
|
23183
|
+
],
|
|
23184
|
+
outputModalities: [
|
|
23185
|
+
"text"
|
|
23186
|
+
],
|
|
23187
|
+
family: "grok",
|
|
23188
|
+
version: "4.3",
|
|
23189
|
+
status: "stable",
|
|
23190
|
+
active: true
|
|
23191
|
+
},
|
|
23192
|
+
"xai/grok-build-0.1": {
|
|
23193
|
+
providerModelName: "grok-build-0.1",
|
|
23194
|
+
aliases: [
|
|
23195
|
+
"grok-build-0.1"
|
|
23196
|
+
],
|
|
23197
|
+
pricing: {
|
|
23198
|
+
inputPerMTok: 1,
|
|
23199
|
+
outputPerMTok: 2,
|
|
23200
|
+
cacheReadPerMTok: 0.2,
|
|
23201
|
+
tiers: {
|
|
23202
|
+
"long-context": {
|
|
23203
|
+
inputPerMTok: 2,
|
|
23204
|
+
outputPerMTok: 4,
|
|
23205
|
+
cacheReadPerMTok: 0.4
|
|
23206
|
+
}
|
|
23207
|
+
}
|
|
23208
|
+
},
|
|
23209
|
+
preferredApi: "responses",
|
|
23210
|
+
supportedApis: [
|
|
23211
|
+
"responses",
|
|
23212
|
+
"completions"
|
|
23213
|
+
],
|
|
23214
|
+
contextWindow: 256e3,
|
|
23215
|
+
capabilities: {
|
|
23216
|
+
toolUse: true,
|
|
23217
|
+
streaming: true,
|
|
23218
|
+
structuredOutput: true,
|
|
23219
|
+
vision: true,
|
|
23220
|
+
audio: false,
|
|
23221
|
+
video: false,
|
|
23222
|
+
imageGeneration: false,
|
|
23223
|
+
audioGeneration: false,
|
|
23224
|
+
videoGeneration: false
|
|
23225
|
+
},
|
|
23226
|
+
reasoning: {
|
|
23227
|
+
supported: false,
|
|
23228
|
+
automatic: false,
|
|
23229
|
+
effortControl: false,
|
|
23230
|
+
encryptedContent: false,
|
|
23231
|
+
summaryAvailable: false
|
|
23232
|
+
},
|
|
23233
|
+
type: "code",
|
|
23234
|
+
inputModalities: [
|
|
23235
|
+
"text",
|
|
23236
|
+
"image"
|
|
23237
|
+
],
|
|
23238
|
+
outputModalities: [
|
|
23239
|
+
"text"
|
|
23240
|
+
],
|
|
23241
|
+
family: "grok",
|
|
23242
|
+
version: "0.1",
|
|
23243
|
+
status: "preview",
|
|
23244
|
+
active: true
|
|
23245
|
+
},
|
|
23246
|
+
"xai/grok-imagine-image": {
|
|
23247
|
+
providerModelName: "grok-imagine-image",
|
|
23248
|
+
aliases: [
|
|
23249
|
+
"grok-imagine-image"
|
|
23250
|
+
],
|
|
23251
|
+
pricing: {
|
|
23252
|
+
perUnit: {
|
|
23253
|
+
"1k": 0.02,
|
|
23254
|
+
"2k": 0.02
|
|
23255
|
+
},
|
|
23256
|
+
perImage: 0.02
|
|
23257
|
+
},
|
|
23258
|
+
preferredApi: "responses",
|
|
23259
|
+
supportedApis: [
|
|
23260
|
+
"responses",
|
|
23261
|
+
"completions"
|
|
23262
|
+
],
|
|
23263
|
+
capabilities: {
|
|
23264
|
+
toolUse: false,
|
|
23265
|
+
streaming: true,
|
|
23266
|
+
structuredOutput: false,
|
|
23267
|
+
vision: true,
|
|
23268
|
+
audio: false,
|
|
23269
|
+
video: false,
|
|
23270
|
+
imageGeneration: true,
|
|
23271
|
+
audioGeneration: false,
|
|
23272
|
+
videoGeneration: false
|
|
23273
|
+
},
|
|
23274
|
+
reasoning: {
|
|
23275
|
+
supported: false,
|
|
23276
|
+
automatic: false,
|
|
23277
|
+
effortControl: false,
|
|
23278
|
+
encryptedContent: false,
|
|
23279
|
+
summaryAvailable: false
|
|
23280
|
+
},
|
|
23281
|
+
type: "image",
|
|
23282
|
+
inputModalities: [
|
|
23283
|
+
"text",
|
|
23284
|
+
"image"
|
|
23285
|
+
],
|
|
23286
|
+
outputModalities: [
|
|
23287
|
+
"image"
|
|
23288
|
+
],
|
|
23289
|
+
family: "grok-imagine-image",
|
|
23290
|
+
version: "1",
|
|
23291
|
+
status: "stable",
|
|
23292
|
+
active: true,
|
|
23293
|
+
mediaParams: {
|
|
23294
|
+
aspectRatio: {
|
|
23295
|
+
values: [
|
|
23296
|
+
"1:1",
|
|
23297
|
+
"3:4",
|
|
23298
|
+
"4:3",
|
|
23299
|
+
"9:16",
|
|
23300
|
+
"16:9",
|
|
23301
|
+
"2:3",
|
|
23302
|
+
"3:2",
|
|
23303
|
+
"9:19.5",
|
|
23304
|
+
"19.5:9",
|
|
23305
|
+
"9:20",
|
|
23306
|
+
"20:9",
|
|
23307
|
+
"1:2",
|
|
23308
|
+
"2:1",
|
|
23309
|
+
"auto"
|
|
23310
|
+
]
|
|
23311
|
+
},
|
|
23312
|
+
resolution: {
|
|
23313
|
+
values: [
|
|
23314
|
+
"1k",
|
|
23315
|
+
"2k"
|
|
23316
|
+
]
|
|
23317
|
+
}
|
|
23318
|
+
}
|
|
23319
|
+
},
|
|
23320
|
+
"xai/grok-imagine-image-quality": {
|
|
23321
|
+
providerModelName: "grok-imagine-image-quality",
|
|
23322
|
+
aliases: [
|
|
23323
|
+
"grok-imagine-image-quality"
|
|
23324
|
+
],
|
|
23325
|
+
pricing: {
|
|
23326
|
+
perUnit: {
|
|
23327
|
+
"1k": 0.05,
|
|
23328
|
+
"2k": 0.07
|
|
23329
|
+
},
|
|
23330
|
+
perImage: 0.05
|
|
23331
|
+
},
|
|
23332
|
+
preferredApi: "responses",
|
|
23333
|
+
supportedApis: [
|
|
23334
|
+
"responses",
|
|
23335
|
+
"completions"
|
|
23336
|
+
],
|
|
23337
|
+
capabilities: {
|
|
23338
|
+
toolUse: false,
|
|
23339
|
+
streaming: true,
|
|
23340
|
+
structuredOutput: false,
|
|
23341
|
+
vision: true,
|
|
23342
|
+
audio: false,
|
|
23343
|
+
video: false,
|
|
23344
|
+
imageGeneration: true,
|
|
23345
|
+
audioGeneration: false,
|
|
23346
|
+
videoGeneration: false
|
|
23347
|
+
},
|
|
23348
|
+
reasoning: {
|
|
23349
|
+
supported: false,
|
|
23350
|
+
automatic: false,
|
|
23351
|
+
effortControl: false,
|
|
23352
|
+
encryptedContent: false,
|
|
23353
|
+
summaryAvailable: false
|
|
23354
|
+
},
|
|
23355
|
+
type: "image",
|
|
23356
|
+
inputModalities: [
|
|
23357
|
+
"text",
|
|
23358
|
+
"image"
|
|
23359
|
+
],
|
|
23360
|
+
outputModalities: [
|
|
23361
|
+
"image"
|
|
23362
|
+
],
|
|
23363
|
+
family: "grok-imagine-image",
|
|
23364
|
+
version: "1",
|
|
23365
|
+
status: "stable",
|
|
23366
|
+
active: true,
|
|
23367
|
+
mediaParams: {
|
|
23368
|
+
aspectRatio: {
|
|
23369
|
+
values: [
|
|
23370
|
+
"1:1",
|
|
23371
|
+
"3:4",
|
|
23372
|
+
"4:3",
|
|
23373
|
+
"9:16",
|
|
23374
|
+
"16:9",
|
|
23375
|
+
"2:3",
|
|
23376
|
+
"3:2",
|
|
23377
|
+
"9:19.5",
|
|
23378
|
+
"19.5:9",
|
|
23379
|
+
"9:20",
|
|
23380
|
+
"20:9",
|
|
23381
|
+
"1:2",
|
|
23382
|
+
"2:1",
|
|
23383
|
+
"auto"
|
|
23384
|
+
]
|
|
23385
|
+
},
|
|
23386
|
+
resolution: {
|
|
23387
|
+
values: [
|
|
23388
|
+
"1k",
|
|
23389
|
+
"2k"
|
|
23390
|
+
]
|
|
23391
|
+
}
|
|
23392
|
+
}
|
|
23393
|
+
},
|
|
23394
|
+
"xai/grok-imagine-video": {
|
|
23395
|
+
providerModelName: "grok-imagine-video",
|
|
23396
|
+
aliases: [
|
|
23397
|
+
"grok-imagine-video"
|
|
23398
|
+
],
|
|
23399
|
+
pricing: {
|
|
23400
|
+
perSecond: 0.01,
|
|
23401
|
+
perUnit: {
|
|
23402
|
+
"480p": 0.05,
|
|
23403
|
+
"720p": 0.07
|
|
23404
|
+
},
|
|
23405
|
+
perImage: 2e-3
|
|
23406
|
+
},
|
|
23407
|
+
preferredApi: "responses",
|
|
23408
|
+
supportedApis: [
|
|
23409
|
+
"responses",
|
|
23410
|
+
"completions"
|
|
23411
|
+
],
|
|
23412
|
+
capabilities: {
|
|
23413
|
+
toolUse: false,
|
|
23414
|
+
streaming: true,
|
|
23415
|
+
structuredOutput: false,
|
|
23416
|
+
vision: true,
|
|
23417
|
+
audio: false,
|
|
23418
|
+
video: false,
|
|
23419
|
+
imageGeneration: false,
|
|
23420
|
+
audioGeneration: false,
|
|
23421
|
+
videoGeneration: true
|
|
23422
|
+
},
|
|
23423
|
+
reasoning: {
|
|
23424
|
+
supported: false,
|
|
23425
|
+
automatic: false,
|
|
23426
|
+
effortControl: false,
|
|
23427
|
+
encryptedContent: false,
|
|
23428
|
+
summaryAvailable: false
|
|
23429
|
+
},
|
|
23430
|
+
type: "video",
|
|
23431
|
+
inputModalities: [
|
|
23432
|
+
"text",
|
|
23433
|
+
"image"
|
|
23434
|
+
],
|
|
23435
|
+
outputModalities: [
|
|
23436
|
+
"video"
|
|
23437
|
+
],
|
|
23438
|
+
family: "grok-imagine-video",
|
|
23439
|
+
version: "1",
|
|
23440
|
+
status: "stable",
|
|
23441
|
+
active: true,
|
|
23442
|
+
mediaParams: {
|
|
23443
|
+
duration: {
|
|
23444
|
+
min: 1,
|
|
23445
|
+
max: 15,
|
|
23446
|
+
default: 8
|
|
23447
|
+
},
|
|
23448
|
+
aspectRatio: {
|
|
23449
|
+
values: [
|
|
23450
|
+
"1:1",
|
|
23451
|
+
"16:9",
|
|
23452
|
+
"9:16",
|
|
23453
|
+
"4:3",
|
|
23454
|
+
"3:4",
|
|
23455
|
+
"3:2",
|
|
23456
|
+
"2:3"
|
|
23457
|
+
]
|
|
23458
|
+
},
|
|
23459
|
+
resolution: {
|
|
23460
|
+
values: [
|
|
23461
|
+
"480p",
|
|
23462
|
+
"720p",
|
|
23463
|
+
"1080p"
|
|
23464
|
+
]
|
|
23465
|
+
}
|
|
23466
|
+
}
|
|
23467
|
+
},
|
|
23468
|
+
"xai/grok-imagine-video-1.5": {
|
|
23469
|
+
providerModelName: "grok-imagine-video-1.5-preview",
|
|
23470
|
+
aliases: [
|
|
23471
|
+
"grok-imagine-video-1.5-preview",
|
|
23472
|
+
"grok-imagine-video-1.5"
|
|
23473
|
+
],
|
|
23474
|
+
pricing: {
|
|
23475
|
+
perSecond: 0.01,
|
|
23476
|
+
perUnit: {
|
|
23477
|
+
"480p": 0.08,
|
|
23478
|
+
"720p": 0.14,
|
|
23479
|
+
"1080p": 0.25
|
|
23480
|
+
},
|
|
23481
|
+
perImage: 0.01
|
|
23482
|
+
},
|
|
23483
|
+
preferredApi: "responses",
|
|
23484
|
+
supportedApis: [
|
|
23485
|
+
"responses",
|
|
23486
|
+
"completions"
|
|
23487
|
+
],
|
|
23488
|
+
capabilities: {
|
|
23489
|
+
toolUse: false,
|
|
23490
|
+
streaming: true,
|
|
23491
|
+
structuredOutput: false,
|
|
23492
|
+
vision: true,
|
|
23493
|
+
audio: false,
|
|
23494
|
+
video: false,
|
|
23495
|
+
imageGeneration: false,
|
|
23496
|
+
audioGeneration: false,
|
|
23497
|
+
videoGeneration: true
|
|
23498
|
+
},
|
|
23499
|
+
reasoning: {
|
|
23500
|
+
supported: false,
|
|
23501
|
+
automatic: false,
|
|
23502
|
+
effortControl: false,
|
|
23503
|
+
encryptedContent: false,
|
|
23504
|
+
summaryAvailable: false
|
|
23505
|
+
},
|
|
23506
|
+
type: "video",
|
|
23507
|
+
inputModalities: [
|
|
23508
|
+
"text",
|
|
23509
|
+
"image"
|
|
23510
|
+
],
|
|
23511
|
+
outputModalities: [
|
|
23512
|
+
"video"
|
|
23513
|
+
],
|
|
23514
|
+
family: "grok-imagine-video",
|
|
23515
|
+
version: "1.5",
|
|
23516
|
+
status: "preview",
|
|
23517
|
+
active: true,
|
|
23518
|
+
mediaParams: {
|
|
23519
|
+
duration: {
|
|
23520
|
+
min: 1,
|
|
23521
|
+
max: 15,
|
|
23522
|
+
default: 8
|
|
23523
|
+
},
|
|
23524
|
+
aspectRatio: {
|
|
23525
|
+
values: [
|
|
23526
|
+
"1:1",
|
|
23527
|
+
"16:9",
|
|
23528
|
+
"9:16",
|
|
23529
|
+
"4:3",
|
|
23530
|
+
"3:4",
|
|
23531
|
+
"3:2",
|
|
23532
|
+
"2:3"
|
|
23533
|
+
]
|
|
23534
|
+
},
|
|
23535
|
+
resolution: {
|
|
23536
|
+
values: [
|
|
23537
|
+
"480p",
|
|
23538
|
+
"720p",
|
|
23539
|
+
"1080p"
|
|
23540
|
+
]
|
|
23541
|
+
}
|
|
23542
|
+
}
|
|
23543
|
+
},
|
|
23544
|
+
"xai/grok-4.5": {
|
|
23545
|
+
providerModelName: "grok-4.5",
|
|
23546
|
+
aliases: [
|
|
23547
|
+
"grok-4.5"
|
|
23548
|
+
],
|
|
23549
|
+
pricing: {
|
|
23550
|
+
inputPerMTok: 2,
|
|
23551
|
+
outputPerMTok: 6,
|
|
23552
|
+
cacheReadPerMTok: 0.5,
|
|
23553
|
+
tiers: {
|
|
23554
|
+
"long-context": {
|
|
23555
|
+
inputPerMTok: 4,
|
|
23556
|
+
outputPerMTok: 12,
|
|
23557
|
+
cacheReadPerMTok: 1
|
|
23558
|
+
}
|
|
23559
|
+
}
|
|
23560
|
+
},
|
|
23561
|
+
preferredApi: "responses",
|
|
23562
|
+
supportedApis: [
|
|
23563
|
+
"responses",
|
|
23564
|
+
"completions"
|
|
23565
|
+
],
|
|
23566
|
+
contextWindow: 5e5,
|
|
23567
|
+
maxOutput: 5e5,
|
|
21653
23568
|
capabilities: {
|
|
21654
23569
|
toolUse: true,
|
|
21655
23570
|
streaming: true,
|
|
@@ -21677,366 +23592,17 @@ var catalog_default5 = {
|
|
|
21677
23592
|
"text"
|
|
21678
23593
|
],
|
|
21679
23594
|
family: "grok",
|
|
21680
|
-
version: "4.
|
|
23595
|
+
version: "4.5",
|
|
21681
23596
|
status: "stable",
|
|
21682
23597
|
active: true
|
|
21683
|
-
},
|
|
21684
|
-
"xai/grok-build-0.1": {
|
|
21685
|
-
providerModelName: "grok-build-0.1",
|
|
21686
|
-
aliases: [
|
|
21687
|
-
"grok-build-0.1"
|
|
21688
|
-
],
|
|
21689
|
-
pricing: {
|
|
21690
|
-
inputPerMTok: 1,
|
|
21691
|
-
outputPerMTok: 2,
|
|
21692
|
-
cacheReadPerMTok: 0.2,
|
|
21693
|
-
tiers: {
|
|
21694
|
-
"long-context": {
|
|
21695
|
-
inputPerMTok: 2,
|
|
21696
|
-
outputPerMTok: 4,
|
|
21697
|
-
cacheReadPerMTok: 0.4
|
|
21698
|
-
}
|
|
21699
|
-
}
|
|
21700
|
-
},
|
|
21701
|
-
preferredApi: "responses",
|
|
21702
|
-
supportedApis: [
|
|
21703
|
-
"responses",
|
|
21704
|
-
"completions"
|
|
21705
|
-
],
|
|
21706
|
-
contextWindow: 256e3,
|
|
21707
|
-
capabilities: {
|
|
21708
|
-
toolUse: true,
|
|
21709
|
-
streaming: true,
|
|
21710
|
-
structuredOutput: true,
|
|
21711
|
-
vision: true,
|
|
21712
|
-
audio: false,
|
|
21713
|
-
video: false,
|
|
21714
|
-
imageGeneration: false,
|
|
21715
|
-
audioGeneration: false,
|
|
21716
|
-
videoGeneration: false
|
|
21717
|
-
},
|
|
21718
|
-
reasoning: {
|
|
21719
|
-
supported: false,
|
|
21720
|
-
automatic: false,
|
|
21721
|
-
effortControl: false,
|
|
21722
|
-
encryptedContent: false,
|
|
21723
|
-
summaryAvailable: false
|
|
21724
|
-
},
|
|
21725
|
-
type: "code",
|
|
21726
|
-
inputModalities: [
|
|
21727
|
-
"text",
|
|
21728
|
-
"image"
|
|
21729
|
-
],
|
|
21730
|
-
outputModalities: [
|
|
21731
|
-
"text"
|
|
21732
|
-
],
|
|
21733
|
-
family: "grok",
|
|
21734
|
-
version: "0.1",
|
|
21735
|
-
status: "preview",
|
|
21736
|
-
active: true
|
|
21737
|
-
},
|
|
21738
|
-
"xai/grok-imagine-image": {
|
|
21739
|
-
providerModelName: "grok-imagine-image",
|
|
21740
|
-
aliases: [
|
|
21741
|
-
"grok-imagine-image"
|
|
21742
|
-
],
|
|
21743
|
-
pricing: {
|
|
21744
|
-
perUnit: {
|
|
21745
|
-
"1k": 2e-3,
|
|
21746
|
-
"2k": 0.02
|
|
21747
|
-
},
|
|
21748
|
-
perImage: 0.02
|
|
21749
|
-
},
|
|
21750
|
-
preferredApi: "responses",
|
|
21751
|
-
supportedApis: [
|
|
21752
|
-
"responses",
|
|
21753
|
-
"completions"
|
|
21754
|
-
],
|
|
21755
|
-
capabilities: {
|
|
21756
|
-
toolUse: false,
|
|
21757
|
-
streaming: true,
|
|
21758
|
-
structuredOutput: false,
|
|
21759
|
-
vision: true,
|
|
21760
|
-
audio: false,
|
|
21761
|
-
video: false,
|
|
21762
|
-
imageGeneration: true,
|
|
21763
|
-
audioGeneration: false,
|
|
21764
|
-
videoGeneration: false
|
|
21765
|
-
},
|
|
21766
|
-
reasoning: {
|
|
21767
|
-
supported: false,
|
|
21768
|
-
automatic: false,
|
|
21769
|
-
effortControl: false,
|
|
21770
|
-
encryptedContent: false,
|
|
21771
|
-
summaryAvailable: false
|
|
21772
|
-
},
|
|
21773
|
-
type: "image",
|
|
21774
|
-
inputModalities: [
|
|
21775
|
-
"text",
|
|
21776
|
-
"image"
|
|
21777
|
-
],
|
|
21778
|
-
outputModalities: [
|
|
21779
|
-
"image"
|
|
21780
|
-
],
|
|
21781
|
-
family: "grok-imagine-image",
|
|
21782
|
-
version: "1",
|
|
21783
|
-
status: "stable",
|
|
21784
|
-
active: true,
|
|
21785
|
-
mediaParams: {
|
|
21786
|
-
aspectRatio: {
|
|
21787
|
-
values: [
|
|
21788
|
-
"1:1",
|
|
21789
|
-
"3:4",
|
|
21790
|
-
"4:3",
|
|
21791
|
-
"9:16",
|
|
21792
|
-
"16:9",
|
|
21793
|
-
"2:3",
|
|
21794
|
-
"3:2",
|
|
21795
|
-
"9:19.5",
|
|
21796
|
-
"19.5:9",
|
|
21797
|
-
"9:20",
|
|
21798
|
-
"20:9",
|
|
21799
|
-
"1:2",
|
|
21800
|
-
"2:1",
|
|
21801
|
-
"auto"
|
|
21802
|
-
]
|
|
21803
|
-
},
|
|
21804
|
-
resolution: {
|
|
21805
|
-
values: [
|
|
21806
|
-
"1k",
|
|
21807
|
-
"2k"
|
|
21808
|
-
]
|
|
21809
|
-
}
|
|
21810
|
-
}
|
|
21811
|
-
},
|
|
21812
|
-
"xai/grok-imagine-image-quality": {
|
|
21813
|
-
providerModelName: "grok-imagine-image-quality",
|
|
21814
|
-
aliases: [
|
|
21815
|
-
"grok-imagine-image-quality"
|
|
21816
|
-
],
|
|
21817
|
-
pricing: {
|
|
21818
|
-
perUnit: {
|
|
21819
|
-
"1k": 0.01,
|
|
21820
|
-
"2k": 0.05
|
|
21821
|
-
},
|
|
21822
|
-
perImage: 0.04
|
|
21823
|
-
},
|
|
21824
|
-
preferredApi: "responses",
|
|
21825
|
-
supportedApis: [
|
|
21826
|
-
"responses",
|
|
21827
|
-
"completions"
|
|
21828
|
-
],
|
|
21829
|
-
capabilities: {
|
|
21830
|
-
toolUse: false,
|
|
21831
|
-
streaming: true,
|
|
21832
|
-
structuredOutput: false,
|
|
21833
|
-
vision: true,
|
|
21834
|
-
audio: false,
|
|
21835
|
-
video: false,
|
|
21836
|
-
imageGeneration: true,
|
|
21837
|
-
audioGeneration: false,
|
|
21838
|
-
videoGeneration: false
|
|
21839
|
-
},
|
|
21840
|
-
reasoning: {
|
|
21841
|
-
supported: false,
|
|
21842
|
-
automatic: false,
|
|
21843
|
-
effortControl: false,
|
|
21844
|
-
encryptedContent: false,
|
|
21845
|
-
summaryAvailable: false
|
|
21846
|
-
},
|
|
21847
|
-
type: "image",
|
|
21848
|
-
inputModalities: [
|
|
21849
|
-
"text",
|
|
21850
|
-
"image"
|
|
21851
|
-
],
|
|
21852
|
-
outputModalities: [
|
|
21853
|
-
"image"
|
|
21854
|
-
],
|
|
21855
|
-
family: "grok-imagine-image",
|
|
21856
|
-
version: "1",
|
|
21857
|
-
status: "stable",
|
|
21858
|
-
active: true,
|
|
21859
|
-
mediaParams: {
|
|
21860
|
-
aspectRatio: {
|
|
21861
|
-
values: [
|
|
21862
|
-
"1:1",
|
|
21863
|
-
"3:4",
|
|
21864
|
-
"4:3",
|
|
21865
|
-
"9:16",
|
|
21866
|
-
"16:9",
|
|
21867
|
-
"2:3",
|
|
21868
|
-
"3:2",
|
|
21869
|
-
"9:19.5",
|
|
21870
|
-
"19.5:9",
|
|
21871
|
-
"9:20",
|
|
21872
|
-
"20:9",
|
|
21873
|
-
"1:2",
|
|
21874
|
-
"2:1",
|
|
21875
|
-
"auto"
|
|
21876
|
-
]
|
|
21877
|
-
},
|
|
21878
|
-
resolution: {
|
|
21879
|
-
values: [
|
|
21880
|
-
"1k",
|
|
21881
|
-
"2k"
|
|
21882
|
-
]
|
|
21883
|
-
}
|
|
21884
|
-
}
|
|
21885
|
-
},
|
|
21886
|
-
"xai/grok-imagine-video": {
|
|
21887
|
-
providerModelName: "grok-imagine-video",
|
|
21888
|
-
aliases: [
|
|
21889
|
-
"grok-imagine-video"
|
|
21890
|
-
],
|
|
21891
|
-
pricing: {
|
|
21892
|
-
perSecond: 0.01,
|
|
21893
|
-
perUnit: {
|
|
21894
|
-
"480p": 2e-3,
|
|
21895
|
-
"720p": 0.05,
|
|
21896
|
-
"1080p": 0.07
|
|
21897
|
-
}
|
|
21898
|
-
},
|
|
21899
|
-
preferredApi: "responses",
|
|
21900
|
-
supportedApis: [
|
|
21901
|
-
"responses",
|
|
21902
|
-
"completions"
|
|
21903
|
-
],
|
|
21904
|
-
capabilities: {
|
|
21905
|
-
toolUse: false,
|
|
21906
|
-
streaming: true,
|
|
21907
|
-
structuredOutput: false,
|
|
21908
|
-
vision: true,
|
|
21909
|
-
audio: false,
|
|
21910
|
-
video: false,
|
|
21911
|
-
imageGeneration: false,
|
|
21912
|
-
audioGeneration: false,
|
|
21913
|
-
videoGeneration: true
|
|
21914
|
-
},
|
|
21915
|
-
reasoning: {
|
|
21916
|
-
supported: false,
|
|
21917
|
-
automatic: false,
|
|
21918
|
-
effortControl: false,
|
|
21919
|
-
encryptedContent: false,
|
|
21920
|
-
summaryAvailable: false
|
|
21921
|
-
},
|
|
21922
|
-
type: "video",
|
|
21923
|
-
inputModalities: [
|
|
21924
|
-
"text",
|
|
21925
|
-
"image"
|
|
21926
|
-
],
|
|
21927
|
-
outputModalities: [
|
|
21928
|
-
"video"
|
|
21929
|
-
],
|
|
21930
|
-
family: "grok-imagine-video",
|
|
21931
|
-
version: "1",
|
|
21932
|
-
status: "stable",
|
|
21933
|
-
active: true,
|
|
21934
|
-
mediaParams: {
|
|
21935
|
-
duration: {
|
|
21936
|
-
min: 1,
|
|
21937
|
-
max: 15,
|
|
21938
|
-
default: 8
|
|
21939
|
-
},
|
|
21940
|
-
aspectRatio: {
|
|
21941
|
-
values: [
|
|
21942
|
-
"1:1",
|
|
21943
|
-
"16:9",
|
|
21944
|
-
"9:16",
|
|
21945
|
-
"4:3",
|
|
21946
|
-
"3:4",
|
|
21947
|
-
"3:2",
|
|
21948
|
-
"2:3"
|
|
21949
|
-
]
|
|
21950
|
-
},
|
|
21951
|
-
resolution: {
|
|
21952
|
-
values: [
|
|
21953
|
-
"480p",
|
|
21954
|
-
"720p",
|
|
21955
|
-
"1080p"
|
|
21956
|
-
]
|
|
21957
|
-
}
|
|
21958
|
-
}
|
|
21959
|
-
},
|
|
21960
|
-
"xai/grok-imagine-video-1.5": {
|
|
21961
|
-
providerModelName: "grok-imagine-video-1.5-preview",
|
|
21962
|
-
aliases: [
|
|
21963
|
-
"grok-imagine-video-1.5-preview"
|
|
21964
|
-
],
|
|
21965
|
-
pricing: {
|
|
21966
|
-
perSecond: 0.01,
|
|
21967
|
-
perUnit: {
|
|
21968
|
-
"480p": 0.08,
|
|
21969
|
-
"720p": 0.14
|
|
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.5",
|
|
22005
|
-
status: "preview",
|
|
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
23598
|
}
|
|
22033
23599
|
};
|
|
22034
23600
|
|
|
22035
23601
|
// src/llm/providers/builtin-tools.ts
|
|
22036
23602
|
var PROVIDER_BUILTIN_TOOLS = {
|
|
22037
|
-
anthropic: ["web_search", "code_interpreter"],
|
|
23603
|
+
anthropic: ["web_search", "web_fetch", "code_interpreter"],
|
|
22038
23604
|
openai: ["web_search", "code_interpreter"],
|
|
22039
|
-
google: ["web_search", "code_interpreter"],
|
|
23605
|
+
google: ["web_search", "web_fetch", "code_interpreter"],
|
|
22040
23606
|
xai: ["web_search", "code_interpreter"],
|
|
22041
23607
|
openrouter: ["web_search"]
|
|
22042
23608
|
};
|
|
@@ -22591,6 +24157,20 @@ function resolveServerState(args) {
|
|
|
22591
24157
|
// src/llm/client-internal.ts
|
|
22592
24158
|
var PRIORITY_INTERACTIVE = 1;
|
|
22593
24159
|
var PRIORITY_BACKGROUND = 2;
|
|
24160
|
+
function buildAssistantMessage(response, origin) {
|
|
24161
|
+
const stateful = origin.api === "responses" || origin.api === "interactions";
|
|
24162
|
+
return {
|
|
24163
|
+
role: "assistant",
|
|
24164
|
+
content: response.content,
|
|
24165
|
+
id: response.id || crypto.randomUUID(),
|
|
24166
|
+
createdAt: Date.now(),
|
|
24167
|
+
origin: {
|
|
24168
|
+
provider: origin.provider,
|
|
24169
|
+
model: origin.model,
|
|
24170
|
+
...stateful && response.id ? { serverStateId: response.id } : {}
|
|
24171
|
+
}
|
|
24172
|
+
};
|
|
24173
|
+
}
|
|
22594
24174
|
function normalizeInput(input) {
|
|
22595
24175
|
if (typeof input === "string") {
|
|
22596
24176
|
return [{ role: "user", content: input }];
|
|
@@ -22621,7 +24201,11 @@ function contentToText(content) {
|
|
|
22621
24201
|
}
|
|
22622
24202
|
function parseStructured(text) {
|
|
22623
24203
|
const stripped = text.trim().replace(/^```(?:json)?\s*/i, "").replace(/```\s*$/i, "").trim();
|
|
22624
|
-
|
|
24204
|
+
try {
|
|
24205
|
+
return JSON.parse(stripped);
|
|
24206
|
+
} catch (cause) {
|
|
24207
|
+
throw new InvalidFinalOutputError(text, { cause });
|
|
24208
|
+
}
|
|
22625
24209
|
}
|
|
22626
24210
|
function buildContext(client, options) {
|
|
22627
24211
|
const provided = options.ctx ?? {};
|
|
@@ -22742,18 +24326,11 @@ var LLMClient = class {
|
|
|
22742
24326
|
* const r2 = await llm.complete(messages); // sends id + only the new turn
|
|
22743
24327
|
*/
|
|
22744
24328
|
assistantMessage(response) {
|
|
22745
|
-
|
|
22746
|
-
|
|
22747
|
-
|
|
22748
|
-
|
|
22749
|
-
|
|
22750
|
-
createdAt: Date.now(),
|
|
22751
|
-
origin: {
|
|
22752
|
-
provider: this.provider,
|
|
22753
|
-
model: this.model,
|
|
22754
|
-
...stateful && response.id ? { serverStateId: response.id } : {}
|
|
22755
|
-
}
|
|
22756
|
-
};
|
|
24329
|
+
return buildAssistantMessage(response, {
|
|
24330
|
+
provider: this.provider,
|
|
24331
|
+
model: this.model,
|
|
24332
|
+
api: this.api
|
|
24333
|
+
});
|
|
22757
24334
|
}
|
|
22758
24335
|
// ─── Moderation helpers ───────────────────────────────────────────────
|
|
22759
24336
|
/** Resolve the OpenAI key the emulated moderation path needs. Reuses the
|
|
@@ -22818,6 +24395,8 @@ var LLMClient = class {
|
|
|
22818
24395
|
maxTokens: options.maxTokens,
|
|
22819
24396
|
temperature: options.temperature,
|
|
22820
24397
|
topP: options.topP,
|
|
24398
|
+
presencePenalty: options.presencePenalty,
|
|
24399
|
+
frequencyPenalty: options.frequencyPenalty,
|
|
22821
24400
|
stop: options.stop,
|
|
22822
24401
|
tools: options.tools,
|
|
22823
24402
|
toolChoice: options.toolChoice,
|
|
@@ -22944,11 +24523,24 @@ var LLMClient = class {
|
|
|
22944
24523
|
* leading/trailing markdown fences from the model reply, then JSON.parses
|
|
22945
24524
|
* to T. Throws if the parse fails — callers should catch + retry. */
|
|
22946
24525
|
async structuredComplete(input, schema, options = {}) {
|
|
22947
|
-
const
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
24526
|
+
const structured = { ...options.structured ?? {}, schema };
|
|
24527
|
+
const repairAttempts = Math.max(0, structured.repairAttempts ?? 0);
|
|
24528
|
+
const messages = normalizeInput(input);
|
|
24529
|
+
for (let attempt = 0; ; attempt++) {
|
|
24530
|
+
const res = await this.complete(messages, { ...options, structured });
|
|
24531
|
+
try {
|
|
24532
|
+
return parseStructured(res.text);
|
|
24533
|
+
} catch (err) {
|
|
24534
|
+
if (!(err instanceof InvalidFinalOutputError) || attempt >= repairAttempts) throw err;
|
|
24535
|
+
messages.push(
|
|
24536
|
+
{ role: "assistant", content: res.text },
|
|
24537
|
+
{
|
|
24538
|
+
role: "user",
|
|
24539
|
+
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.`
|
|
24540
|
+
}
|
|
24541
|
+
);
|
|
24542
|
+
}
|
|
24543
|
+
}
|
|
22952
24544
|
}
|
|
22953
24545
|
async *stream(input, options = {}) {
|
|
22954
24546
|
if (!this.fetchStreamFn) {
|
|
@@ -22965,6 +24557,8 @@ var LLMClient = class {
|
|
|
22965
24557
|
maxTokens: options.maxTokens,
|
|
22966
24558
|
temperature: options.temperature,
|
|
22967
24559
|
topP: options.topP,
|
|
24560
|
+
presencePenalty: options.presencePenalty,
|
|
24561
|
+
frequencyPenalty: options.frequencyPenalty,
|
|
22968
24562
|
stop: options.stop,
|
|
22969
24563
|
tools: options.tools,
|
|
22970
24564
|
toolChoice: options.toolChoice,
|
|
@@ -23069,8 +24663,15 @@ var LLMClient = class {
|
|
|
23069
24663
|
case "file":
|
|
23070
24664
|
files.push(event.file);
|
|
23071
24665
|
break;
|
|
23072
|
-
case "
|
|
23073
|
-
builtinToolCalls.push({
|
|
24666
|
+
case "builtin_tool_end":
|
|
24667
|
+
builtinToolCalls.push({
|
|
24668
|
+
tool: event.tool,
|
|
24669
|
+
...event.id ? { id: event.id } : {},
|
|
24670
|
+
...event.code ? { code: event.code } : {},
|
|
24671
|
+
...event.output ? { output: event.output } : {},
|
|
24672
|
+
...event.query ? { query: event.query } : {},
|
|
24673
|
+
...event.url ? { url: event.url } : {}
|
|
24674
|
+
});
|
|
23074
24675
|
break;
|
|
23075
24676
|
case "moderation":
|
|
23076
24677
|
moderationReport = this.mergeModeration(
|
|
@@ -23336,10 +24937,12 @@ var NATIVE_TO_UNIFIED = {
|
|
|
23336
24937
|
code_interpreter_call: "code_interpreter",
|
|
23337
24938
|
// Anthropic server_tool_use names
|
|
23338
24939
|
web_search: "web_search",
|
|
24940
|
+
web_fetch: "web_fetch",
|
|
23339
24941
|
code_execution: "code_interpreter",
|
|
23340
24942
|
bash_code_execution: "code_interpreter",
|
|
23341
24943
|
// Anthropic *_tool_result block types
|
|
23342
24944
|
web_search_tool_result: "web_search",
|
|
24945
|
+
web_fetch_tool_result: "web_fetch",
|
|
23343
24946
|
code_execution_tool_result: "code_interpreter",
|
|
23344
24947
|
bash_code_execution_tool_result: "code_interpreter"
|
|
23345
24948
|
};
|
|
@@ -23390,6 +24993,24 @@ function filesFromCodeExecBlock(block) {
|
|
|
23390
24993
|
}
|
|
23391
24994
|
return files;
|
|
23392
24995
|
}
|
|
24996
|
+
function builtinInputPayload(tool, input) {
|
|
24997
|
+
if (!input) return {};
|
|
24998
|
+
if (tool === "code_interpreter") {
|
|
24999
|
+
const code = input.code ?? input.command;
|
|
25000
|
+
return typeof code === "string" ? { code } : {};
|
|
25001
|
+
}
|
|
25002
|
+
if (tool === "web_search") {
|
|
25003
|
+
return typeof input.query === "string" ? { query: input.query } : {};
|
|
25004
|
+
}
|
|
25005
|
+
if (tool === "web_fetch") {
|
|
25006
|
+
return typeof input.url === "string" ? { url: input.url } : {};
|
|
25007
|
+
}
|
|
25008
|
+
return {};
|
|
25009
|
+
}
|
|
25010
|
+
function resultStdout(content) {
|
|
25011
|
+
const c = content;
|
|
25012
|
+
return c && typeof c.stdout === "string" ? c.stdout : void 0;
|
|
25013
|
+
}
|
|
23393
25014
|
var AnthropicAdapter = class {
|
|
23394
25015
|
name = "anthropic";
|
|
23395
25016
|
apiKey;
|
|
@@ -23437,7 +25058,21 @@ var AnthropicAdapter = class {
|
|
|
23437
25058
|
body.tools = req.tools.map((t, i) => {
|
|
23438
25059
|
if (!isFunctionTool(t)) {
|
|
23439
25060
|
if (t.type === "web_search") {
|
|
23440
|
-
return {
|
|
25061
|
+
return {
|
|
25062
|
+
type: "web_search_20260318",
|
|
25063
|
+
name: "web_search",
|
|
25064
|
+
max_uses: 5,
|
|
25065
|
+
allowed_callers: ["direct"],
|
|
25066
|
+
...t.params
|
|
25067
|
+
};
|
|
25068
|
+
}
|
|
25069
|
+
if (t.type === "web_fetch") {
|
|
25070
|
+
return {
|
|
25071
|
+
type: "web_fetch_20260318",
|
|
25072
|
+
name: "web_fetch",
|
|
25073
|
+
allowed_callers: ["direct"],
|
|
25074
|
+
...t.params
|
|
25075
|
+
};
|
|
23441
25076
|
}
|
|
23442
25077
|
if (t.type === "code_interpreter") {
|
|
23443
25078
|
return { type: "code_execution_20260521", name: "code_execution" };
|
|
@@ -23485,6 +25120,10 @@ var AnthropicAdapter = class {
|
|
|
23485
25120
|
});
|
|
23486
25121
|
const headers = {};
|
|
23487
25122
|
if (hasFileRef) headers["anthropic-beta"] = "files-api-2025-04-14";
|
|
25123
|
+
const userProfileId = req.providerOptions?.userProfileId;
|
|
25124
|
+
if (typeof userProfileId === "string" && userProfileId) {
|
|
25125
|
+
headers["anthropic-user-profile-id"] = userProfileId;
|
|
25126
|
+
}
|
|
23488
25127
|
const usesCodeExec = req.tools?.some(
|
|
23489
25128
|
(t) => !isFunctionTool(t) && t.type === "code_interpreter"
|
|
23490
25129
|
);
|
|
@@ -23572,11 +25211,20 @@ var AnthropicAdapter = class {
|
|
|
23572
25211
|
content.push(tc);
|
|
23573
25212
|
toolCalls.push(tc);
|
|
23574
25213
|
} else if (block.type === "server_tool_use") {
|
|
25214
|
+
const tool = unifiedBuiltinTool(block.name);
|
|
23575
25215
|
builtinToolCalls.push({
|
|
23576
|
-
tool
|
|
23577
|
-
...typeof block.id === "string" ? { id: block.id } : {}
|
|
25216
|
+
tool,
|
|
25217
|
+
...typeof block.id === "string" ? { id: block.id } : {},
|
|
25218
|
+
...builtinInputPayload(tool, block.input)
|
|
23578
25219
|
});
|
|
23579
25220
|
} else {
|
|
25221
|
+
if (typeof block.type === "string" && block.type.endsWith("_tool_result")) {
|
|
25222
|
+
const output = resultStdout(block.content);
|
|
25223
|
+
if (output) {
|
|
25224
|
+
const call = builtinToolCalls.find((c) => c.id === block.tool_use_id);
|
|
25225
|
+
if (call) call.output = output;
|
|
25226
|
+
}
|
|
25227
|
+
}
|
|
23580
25228
|
files.push(...filesFromCodeExecBlock(block));
|
|
23581
25229
|
}
|
|
23582
25230
|
}
|
|
@@ -23600,6 +25248,17 @@ var AnthropicAdapter = class {
|
|
|
23600
25248
|
};
|
|
23601
25249
|
}
|
|
23602
25250
|
parseStreamEvent(event) {
|
|
25251
|
+
return this.streamEvents(event, { pending: /* @__PURE__ */ new Map() });
|
|
25252
|
+
}
|
|
25253
|
+
/** Stateful — Anthropic streams `server_tool_use` input via `input_json_delta`
|
|
25254
|
+
* (empty at block start) and returns the result in a separate `*_tool_result`
|
|
25255
|
+
* block. The closure accumulates each call's input (code / query) and attaches it
|
|
25256
|
+
* to the matching `builtin_tool_end`. */
|
|
25257
|
+
createStreamParser() {
|
|
25258
|
+
const state = { pending: /* @__PURE__ */ new Map() };
|
|
25259
|
+
return (event) => this.streamEvents(event, state);
|
|
25260
|
+
}
|
|
25261
|
+
streamEvents(event, state) {
|
|
23603
25262
|
if (event.event === "ping") return [];
|
|
23604
25263
|
const data = JSON.parse(event.data);
|
|
23605
25264
|
const type = data.type;
|
|
@@ -23609,33 +25268,58 @@ var AnthropicAdapter = class {
|
|
|
23609
25268
|
if (delta.type === "thinking_delta")
|
|
23610
25269
|
return [{ type: "thinking", text: delta.thinking }];
|
|
23611
25270
|
if (delta.type === "input_json_delta") {
|
|
25271
|
+
if (state.current) {
|
|
25272
|
+
state.current.json += delta.partial_json ?? "";
|
|
25273
|
+
return [];
|
|
25274
|
+
}
|
|
23612
25275
|
return [{ type: "tool_call_delta", id: "", arguments: delta.partial_json }];
|
|
23613
25276
|
}
|
|
23614
25277
|
}
|
|
23615
25278
|
if (type === "content_block_start") {
|
|
23616
25279
|
const block = data.content_block;
|
|
23617
25280
|
if (block.type === "tool_use") {
|
|
25281
|
+
state.current = void 0;
|
|
23618
25282
|
return [{ type: "tool_call_start", id: block.id, name: block.name }];
|
|
23619
25283
|
}
|
|
23620
25284
|
const events = [];
|
|
23621
25285
|
const blockType = block.type;
|
|
23622
25286
|
if (blockType === "server_tool_use") {
|
|
25287
|
+
const tool = unifiedBuiltinTool(block.name);
|
|
25288
|
+
state.current = { id: block.id ?? "", tool, json: "" };
|
|
23623
25289
|
events.push({
|
|
23624
25290
|
type: "builtin_tool_start",
|
|
23625
|
-
tool
|
|
25291
|
+
tool,
|
|
23626
25292
|
...typeof block.id === "string" ? { id: block.id } : {}
|
|
23627
25293
|
});
|
|
23628
25294
|
} else if (blockType?.endsWith("_tool_result")) {
|
|
25295
|
+
const tool = unifiedBuiltinTool(blockType);
|
|
25296
|
+
const id = typeof block.tool_use_id === "string" ? block.tool_use_id : void 0;
|
|
25297
|
+
const input = id ? state.pending.get(id) : void 0;
|
|
25298
|
+
if (id) state.pending.delete(id);
|
|
25299
|
+
const output = resultStdout(block.content);
|
|
23629
25300
|
events.push({
|
|
23630
25301
|
type: "builtin_tool_end",
|
|
23631
|
-
tool
|
|
23632
|
-
...
|
|
25302
|
+
tool,
|
|
25303
|
+
...id ? { id } : {},
|
|
25304
|
+
...input?.code ? { code: input.code } : {},
|
|
25305
|
+
...input?.query ? { query: input.query } : {},
|
|
25306
|
+
...input?.url ? { url: input.url } : {},
|
|
25307
|
+
...output ? { output } : {}
|
|
23633
25308
|
});
|
|
23634
25309
|
}
|
|
23635
25310
|
for (const file of filesFromCodeExecBlock(block)) events.push({ type: "file", file });
|
|
23636
25311
|
return events;
|
|
23637
25312
|
}
|
|
23638
25313
|
if (type === "content_block_stop") {
|
|
25314
|
+
if (state.current) {
|
|
25315
|
+
let input = {};
|
|
25316
|
+
try {
|
|
25317
|
+
input = JSON.parse(state.current.json || "{}");
|
|
25318
|
+
} catch {
|
|
25319
|
+
}
|
|
25320
|
+
state.pending.set(state.current.id, builtinInputPayload(state.current.tool, input));
|
|
25321
|
+
state.current = void 0;
|
|
25322
|
+
}
|
|
23639
25323
|
}
|
|
23640
25324
|
if (type === "message_delta") {
|
|
23641
25325
|
const delta = data.delta;
|
|
@@ -23657,11 +25341,6 @@ var AnthropicAdapter = class {
|
|
|
23657
25341
|
}
|
|
23658
25342
|
return [];
|
|
23659
25343
|
}
|
|
23660
|
-
/** Stateless — every event is self-contained (code-execution result blocks
|
|
23661
|
-
* arrive complete in a single content_block_start). */
|
|
23662
|
-
createStreamParser() {
|
|
23663
|
-
return (event) => this.parseStreamEvent(event);
|
|
23664
|
-
}
|
|
23665
25344
|
parseUsage(u) {
|
|
23666
25345
|
if (!u) return emptyUsage();
|
|
23667
25346
|
const inputTokens = u.input_tokens ?? 0;
|
|
@@ -23972,6 +25651,8 @@ var GoogleAdapter = class {
|
|
|
23972
25651
|
if (req.maxTokens) config.maxOutputTokens = req.maxTokens;
|
|
23973
25652
|
if (req.temperature !== void 0) config.temperature = req.temperature;
|
|
23974
25653
|
if (req.topP !== void 0) config.topP = req.topP;
|
|
25654
|
+
if (req.presencePenalty !== void 0) config.presencePenalty = req.presencePenalty;
|
|
25655
|
+
if (req.frequencyPenalty !== void 0) config.frequencyPenalty = req.frequencyPenalty;
|
|
23975
25656
|
if (req.stop) config.stopSequences = req.stop;
|
|
23976
25657
|
if (req.outputModalities?.includes("audio")) {
|
|
23977
25658
|
config.responseModalities = ["AUDIO"];
|
|
@@ -24007,6 +25688,9 @@ var GoogleAdapter = class {
|
|
|
24007
25688
|
if (req.tools.some((t) => !isFunctionTool(t) && t.type === "code_interpreter")) {
|
|
24008
25689
|
tools.push({ codeExecution: {} });
|
|
24009
25690
|
}
|
|
25691
|
+
if (req.tools.some((t) => !isFunctionTool(t) && t.type === "web_fetch")) {
|
|
25692
|
+
tools.push({ urlContext: {} });
|
|
25693
|
+
}
|
|
24010
25694
|
if (tools.length) body.tools = tools;
|
|
24011
25695
|
}
|
|
24012
25696
|
if (req.toolChoice) {
|
|
@@ -24170,8 +25854,32 @@ var GoogleAdapter = class {
|
|
|
24170
25854
|
{ MAX_TOKENS: "length", SAFETY: "content_filter" }
|
|
24171
25855
|
);
|
|
24172
25856
|
const builtinToolCalls = [];
|
|
24173
|
-
|
|
24174
|
-
|
|
25857
|
+
const codes = parts.filter((p) => p.executableCode?.code).map((p) => p.executableCode.code);
|
|
25858
|
+
const outputs = parts.filter((p) => p.codeExecutionResult).map((p) => String(p.codeExecutionResult.output ?? ""));
|
|
25859
|
+
if (codes.length) {
|
|
25860
|
+
codes.forEach((code, i) => {
|
|
25861
|
+
builtinToolCalls.push({
|
|
25862
|
+
tool: "code_interpreter",
|
|
25863
|
+
code,
|
|
25864
|
+
...outputs[i] ? { output: outputs[i] } : {}
|
|
25865
|
+
});
|
|
25866
|
+
});
|
|
25867
|
+
} else if (hasCodeExec) {
|
|
25868
|
+
builtinToolCalls.push({ tool: "code_interpreter", ...outputs[0] ? { output: outputs[0] } : {} });
|
|
25869
|
+
}
|
|
25870
|
+
const grounding = candidate.groundingMetadata;
|
|
25871
|
+
if (grounding) {
|
|
25872
|
+
const q = grounding.webSearchQueries?.[0];
|
|
25873
|
+
builtinToolCalls.push({ tool: "web_search", ...typeof q === "string" ? { query: q } : {} });
|
|
25874
|
+
}
|
|
25875
|
+
const urlCtx = candidate.urlContextMetadata;
|
|
25876
|
+
const urlMeta = urlCtx?.urlMetadata;
|
|
25877
|
+
if (Array.isArray(urlMeta)) {
|
|
25878
|
+
for (const m of urlMeta) {
|
|
25879
|
+
const url = m.retrievedUrl;
|
|
25880
|
+
builtinToolCalls.push({ tool: "web_fetch", ...typeof url === "string" ? { url } : {} });
|
|
25881
|
+
}
|
|
25882
|
+
}
|
|
24175
25883
|
return {
|
|
24176
25884
|
id: crypto.randomUUID(),
|
|
24177
25885
|
// Google doesn't return a response ID in generateContent
|
|
@@ -24222,8 +25930,21 @@ var GoogleAdapter = class {
|
|
|
24222
25930
|
if (part.text !== void 0 && !part.thought)
|
|
24223
25931
|
events.push({ type: "text", text: part.text });
|
|
24224
25932
|
if (part.thought && part.text) events.push({ type: "thinking", text: part.text });
|
|
24225
|
-
if (part.executableCode)
|
|
24226
|
-
|
|
25933
|
+
if (part.executableCode) {
|
|
25934
|
+
const code = part.executableCode.code;
|
|
25935
|
+
state.pendingCode = typeof code === "string" ? code : void 0;
|
|
25936
|
+
events.push({ type: "builtin_tool_start", tool: "code_interpreter" });
|
|
25937
|
+
}
|
|
25938
|
+
if (part.codeExecutionResult) {
|
|
25939
|
+
const output = part.codeExecutionResult.output;
|
|
25940
|
+
events.push({
|
|
25941
|
+
type: "builtin_tool_end",
|
|
25942
|
+
tool: "code_interpreter",
|
|
25943
|
+
...state.pendingCode ? { code: state.pendingCode } : {},
|
|
25944
|
+
...typeof output === "string" && output ? { output } : {}
|
|
25945
|
+
});
|
|
25946
|
+
state.pendingCode = void 0;
|
|
25947
|
+
}
|
|
24227
25948
|
if (part.inlineData) {
|
|
24228
25949
|
const inline = part.inlineData;
|
|
24229
25950
|
const mime = inline.mimeType;
|
|
@@ -24256,8 +25977,26 @@ var GoogleAdapter = class {
|
|
|
24256
25977
|
}
|
|
24257
25978
|
if (candidate.groundingMetadata && !state.webSearchEmitted) {
|
|
24258
25979
|
state.webSearchEmitted = true;
|
|
25980
|
+
const q = candidate.groundingMetadata.webSearchQueries?.[0];
|
|
24259
25981
|
events.push({ type: "builtin_tool_start", tool: "web_search" });
|
|
24260
|
-
events.push({
|
|
25982
|
+
events.push({
|
|
25983
|
+
type: "builtin_tool_end",
|
|
25984
|
+
tool: "web_search",
|
|
25985
|
+
...typeof q === "string" ? { query: q } : {}
|
|
25986
|
+
});
|
|
25987
|
+
}
|
|
25988
|
+
const streamUrlMeta = candidate.urlContextMetadata?.urlMetadata;
|
|
25989
|
+
if (Array.isArray(streamUrlMeta) && !state.urlFetchEmitted) {
|
|
25990
|
+
state.urlFetchEmitted = true;
|
|
25991
|
+
for (const m of streamUrlMeta) {
|
|
25992
|
+
const url = m.retrievedUrl;
|
|
25993
|
+
events.push({ type: "builtin_tool_start", tool: "web_fetch" });
|
|
25994
|
+
events.push({
|
|
25995
|
+
type: "builtin_tool_end",
|
|
25996
|
+
tool: "web_fetch",
|
|
25997
|
+
...typeof url === "string" ? { url } : {}
|
|
25998
|
+
});
|
|
25999
|
+
}
|
|
24261
26000
|
}
|
|
24262
26001
|
const fr = candidate.finishReason;
|
|
24263
26002
|
if (fr)
|
|
@@ -24327,6 +26066,8 @@ var GoogleInteractionsAdapter = class {
|
|
|
24327
26066
|
if (req.maxTokens) genConfig.max_output_tokens = req.maxTokens;
|
|
24328
26067
|
if (req.temperature !== void 0) genConfig.temperature = req.temperature;
|
|
24329
26068
|
if (req.topP !== void 0) genConfig.top_p = req.topP;
|
|
26069
|
+
if (req.presencePenalty !== void 0) genConfig.presence_penalty = req.presencePenalty;
|
|
26070
|
+
if (req.frequencyPenalty !== void 0) genConfig.frequency_penalty = req.frequencyPenalty;
|
|
24330
26071
|
if (req.stop) genConfig.stop_sequences = req.stop;
|
|
24331
26072
|
if (req.tools?.length) {
|
|
24332
26073
|
body.tools = req.tools.filter(isFunctionTool).map((t) => ({
|
|
@@ -24342,6 +26083,8 @@ var GoogleInteractionsAdapter = class {
|
|
|
24342
26083
|
};
|
|
24343
26084
|
}
|
|
24344
26085
|
if (Object.keys(genConfig).length > 0) body.generation_config = genConfig;
|
|
26086
|
+
const cachedContent = req.providerOptions?.cachedContent;
|
|
26087
|
+
if (typeof cachedContent === "string" && cachedContent) body.cached_content = cachedContent;
|
|
24345
26088
|
if (req.structured) {
|
|
24346
26089
|
body.response_format = {
|
|
24347
26090
|
type: "text",
|
|
@@ -24499,47 +26242,77 @@ var GoogleInteractionsAdapter = class {
|
|
|
24499
26242
|
raw
|
|
24500
26243
|
};
|
|
24501
26244
|
}
|
|
24502
|
-
|
|
26245
|
+
/** Translate one Interactions SSE event to unified events. The 2.10 wire is a
|
|
26246
|
+
* step machine (verified live): `step.start` opens a typed step (`model_output`,
|
|
26247
|
+
* `function_call`, `thought`…), `step.delta` streams its payload (`{type:'text'}`,
|
|
26248
|
+
* `{type:'arguments_delta'}`, `{type:'thought_summary'}`, internal
|
|
26249
|
+
* `thought_signature`), `step.stop` closes it, and `interaction.completed` /
|
|
26250
|
+
* `interaction.failed` finish the turn (usage under `interaction.usage`). A
|
|
26251
|
+
* function call's `arguments_delta` carries no id, so we correlate it to the
|
|
26252
|
+
* currently-open call id held in `state`. */
|
|
26253
|
+
streamEvents(event, state) {
|
|
24503
26254
|
const data = JSON.parse(event.data);
|
|
24504
26255
|
const type = data.event_type ?? data.type;
|
|
24505
26256
|
const events = [];
|
|
24506
|
-
if (type === "
|
|
24507
|
-
const
|
|
24508
|
-
if (
|
|
24509
|
-
|
|
24510
|
-
|
|
24511
|
-
|
|
24512
|
-
events.push({
|
|
24513
|
-
|
|
24514
|
-
|
|
24515
|
-
|
|
24516
|
-
});
|
|
24517
|
-
if (delta.arguments) {
|
|
24518
|
-
events.push({
|
|
24519
|
-
type: "tool_call_delta",
|
|
24520
|
-
id: delta.id ?? "",
|
|
24521
|
-
arguments: JSON.stringify(delta.arguments)
|
|
24522
|
-
});
|
|
26257
|
+
if (type === "step.start") {
|
|
26258
|
+
const step = data.step ?? {};
|
|
26259
|
+
if (step.type === "function_call") {
|
|
26260
|
+
const id = step.id ?? "";
|
|
26261
|
+
state.callId = id;
|
|
26262
|
+
state.sawToolCall = true;
|
|
26263
|
+
events.push({ type: "tool_call_start", id, name: step.name ?? "" });
|
|
26264
|
+
const args = step.arguments;
|
|
26265
|
+
if (args && Object.keys(args).length > 0) {
|
|
26266
|
+
events.push({ type: "tool_call_delta", id, arguments: JSON.stringify(args) });
|
|
24523
26267
|
}
|
|
24524
|
-
events.push({ type: "tool_call_end", id: delta.id ?? "" });
|
|
24525
26268
|
}
|
|
26269
|
+
return events;
|
|
26270
|
+
}
|
|
26271
|
+
if (type === "step.delta") {
|
|
26272
|
+
const delta = data.delta ?? {};
|
|
26273
|
+
const dtype = delta.type;
|
|
26274
|
+
if (dtype === "text") {
|
|
26275
|
+
events.push({ type: "text", text: delta.text ?? "" });
|
|
26276
|
+
} else if (dtype === "thought_summary") {
|
|
26277
|
+
events.push({ type: "thinking", text: delta.text ?? "" });
|
|
26278
|
+
} else if (dtype === "arguments_delta") {
|
|
26279
|
+
events.push({ type: "tool_call_delta", id: state.callId ?? "", arguments: delta.arguments ?? "" });
|
|
26280
|
+
}
|
|
26281
|
+
return events;
|
|
26282
|
+
}
|
|
26283
|
+
if (type === "step.stop") {
|
|
26284
|
+
if (state.callId) {
|
|
26285
|
+
events.push({ type: "tool_call_end", id: state.callId });
|
|
26286
|
+
state.callId = void 0;
|
|
26287
|
+
}
|
|
26288
|
+
return events;
|
|
24526
26289
|
}
|
|
24527
|
-
if (type === "interaction.
|
|
26290
|
+
if (type === "interaction.completed" || type === "interaction.failed") {
|
|
26291
|
+
if (state.callId) {
|
|
26292
|
+
events.push({ type: "tool_call_end", id: state.callId });
|
|
26293
|
+
state.callId = void 0;
|
|
26294
|
+
}
|
|
24528
26295
|
const interaction = data.interaction ?? {};
|
|
24529
|
-
const usage = interaction.usage;
|
|
26296
|
+
const usage = interaction.usage ?? data.metadata?.total_usage;
|
|
24530
26297
|
if (usage) events.push({ type: "usage", usage: this.parseUsage(usage) });
|
|
24531
26298
|
events.push({
|
|
24532
26299
|
type: "done",
|
|
24533
|
-
finishReason: extractFinishReason(
|
|
26300
|
+
finishReason: extractFinishReason(state.sawToolCall, interaction.status, {
|
|
24534
26301
|
failed: "error"
|
|
24535
26302
|
})
|
|
24536
26303
|
});
|
|
26304
|
+
return events;
|
|
24537
26305
|
}
|
|
24538
26306
|
return events;
|
|
24539
26307
|
}
|
|
24540
|
-
|
|
26308
|
+
parseStreamEvent(event) {
|
|
26309
|
+
return this.streamEvents(event, { sawToolCall: false });
|
|
26310
|
+
}
|
|
26311
|
+
/** Per-stream stateful parser — correlates a function call's streamed arguments
|
|
26312
|
+
* and end to the call opened by its `step.start`. */
|
|
24541
26313
|
createStreamParser() {
|
|
24542
|
-
|
|
26314
|
+
const state = { sawToolCall: false };
|
|
26315
|
+
return (event) => this.streamEvents(event, state);
|
|
24543
26316
|
}
|
|
24544
26317
|
parseUsage(u) {
|
|
24545
26318
|
if (!u) return emptyUsage();
|
|
@@ -24696,7 +26469,7 @@ var GoogleMediaAdapter = class {
|
|
|
24696
26469
|
const image = {};
|
|
24697
26470
|
if (req.params?.aspectRatio) image.aspectRatio = req.params.aspectRatio;
|
|
24698
26471
|
if (req.params?.imageSize) image.imageSize = req.params.imageSize;
|
|
24699
|
-
if (Object.keys(image).length) generationConfig.
|
|
26472
|
+
if (Object.keys(image).length) generationConfig.imageConfig = image;
|
|
24700
26473
|
const { items, usage } = await this.generateContentMedia(
|
|
24701
26474
|
model,
|
|
24702
26475
|
req.prompt,
|
|
@@ -25270,6 +27043,8 @@ var OpenAIAdapter = class {
|
|
|
25270
27043
|
};
|
|
25271
27044
|
if (req.temperature !== void 0) body.temperature = req.temperature;
|
|
25272
27045
|
if (req.topP !== void 0) body.top_p = req.topP;
|
|
27046
|
+
if (req.presencePenalty !== void 0) body.presence_penalty = req.presencePenalty;
|
|
27047
|
+
if (req.frequencyPenalty !== void 0) body.frequency_penalty = req.frequencyPenalty;
|
|
25273
27048
|
if (req.stop) body.stop = req.stop;
|
|
25274
27049
|
const tier = openaiRequestTier(req.serviceTier);
|
|
25275
27050
|
if (tier) body.service_tier = tier;
|
|
@@ -26025,32 +27800,98 @@ function filenameForMime(mimeType) {
|
|
|
26025
27800
|
if (mimeType.startsWith("image/")) return `file.${mimeType.slice("image/".length)}`;
|
|
26026
27801
|
return "file.bin";
|
|
26027
27802
|
}
|
|
27803
|
+
function codeOutputFromResponsesItem(item) {
|
|
27804
|
+
const parts = [];
|
|
27805
|
+
for (const out of item.outputs ?? []) {
|
|
27806
|
+
if (out.type !== "logs" || typeof out.logs !== "string") continue;
|
|
27807
|
+
try {
|
|
27808
|
+
const j = JSON.parse(out.logs);
|
|
27809
|
+
if (typeof j.stdout === "string") {
|
|
27810
|
+
parts.push(j.stdout);
|
|
27811
|
+
continue;
|
|
27812
|
+
}
|
|
27813
|
+
} catch {
|
|
27814
|
+
}
|
|
27815
|
+
parts.push(out.logs);
|
|
27816
|
+
}
|
|
27817
|
+
return parts.length ? parts.join("") : void 0;
|
|
27818
|
+
}
|
|
27819
|
+
function searchActionPayload(item) {
|
|
27820
|
+
const action = item.action;
|
|
27821
|
+
if (!action) return {};
|
|
27822
|
+
const out = {};
|
|
27823
|
+
if (Array.isArray(action.queries) && typeof action.queries[0] === "string")
|
|
27824
|
+
out.query = action.queries[0];
|
|
27825
|
+
else if (typeof action.query === "string") out.query = action.query;
|
|
27826
|
+
if (typeof action.url === "string") out.url = action.url;
|
|
27827
|
+
return out;
|
|
27828
|
+
}
|
|
26028
27829
|
var RESPONSES_BUILTIN_ITEMS = /* @__PURE__ */ new Set(["web_search_call", "code_interpreter_call"]);
|
|
26029
27830
|
function builtinCallFromResponsesItem(item) {
|
|
26030
27831
|
const type = item.type;
|
|
26031
27832
|
if (!RESPONSES_BUILTIN_ITEMS.has(type)) return null;
|
|
27833
|
+
const call = { tool: unifiedBuiltinTool(type) };
|
|
27834
|
+
if (typeof item.id === "string") call.id = item.id;
|
|
27835
|
+
if (type === "code_interpreter_call") {
|
|
27836
|
+
if (typeof item.code === "string") call.code = item.code;
|
|
27837
|
+
const output = codeOutputFromResponsesItem(item);
|
|
27838
|
+
if (output) call.output = output;
|
|
27839
|
+
} else if (type === "web_search_call") {
|
|
27840
|
+
const { query, url } = searchActionPayload(item);
|
|
27841
|
+
if (query) call.query = query;
|
|
27842
|
+
if (url) call.url = url;
|
|
27843
|
+
}
|
|
27844
|
+
return call;
|
|
27845
|
+
}
|
|
27846
|
+
function builtinEndPayload(call) {
|
|
26032
27847
|
return {
|
|
26033
|
-
|
|
26034
|
-
...
|
|
27848
|
+
...call.id ? { id: call.id } : {},
|
|
27849
|
+
...call.code ? { code: call.code } : {},
|
|
27850
|
+
...call.output ? { output: call.output } : {},
|
|
27851
|
+
...call.query ? { query: call.query } : {},
|
|
27852
|
+
...call.url ? { url: call.url } : {}
|
|
26035
27853
|
};
|
|
26036
27854
|
}
|
|
27855
|
+
var IMAGE_EXTS = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"]);
|
|
27856
|
+
function fileExt(name) {
|
|
27857
|
+
const i = name.lastIndexOf(".");
|
|
27858
|
+
return i >= 0 ? name.slice(i + 1).toLowerCase() : "";
|
|
27859
|
+
}
|
|
27860
|
+
function isDisplayArtifact(c) {
|
|
27861
|
+
if (!c.filename) return false;
|
|
27862
|
+
const ext = fileExt(c.filename);
|
|
27863
|
+
return c.filename === `${c.fileId}.${ext}` && IMAGE_EXTS.has(ext) && c.span[0] === c.span[1];
|
|
27864
|
+
}
|
|
26037
27865
|
function filesFromResponsesOutputItem(item) {
|
|
26038
27866
|
const files = [];
|
|
26039
27867
|
const type = item.type;
|
|
26040
27868
|
if (type === "message") {
|
|
27869
|
+
const citations = [];
|
|
26041
27870
|
for (const c of item.content ?? []) {
|
|
26042
27871
|
if (c.type !== "output_text") continue;
|
|
26043
27872
|
for (const a of c.annotations ?? []) {
|
|
26044
27873
|
if (a.type === "container_file_citation" && typeof a.file_id === "string") {
|
|
26045
|
-
|
|
26046
|
-
|
|
26047
|
-
|
|
26048
|
-
|
|
26049
|
-
|
|
27874
|
+
citations.push({
|
|
27875
|
+
fileId: a.file_id,
|
|
27876
|
+
filename: typeof a.filename === "string" ? a.filename : void 0,
|
|
27877
|
+
containerId: typeof a.container_id === "string" ? a.container_id : void 0,
|
|
27878
|
+
span: [Number(a.start_index) || 0, Number(a.end_index) || 0]
|
|
26050
27879
|
});
|
|
26051
27880
|
}
|
|
26052
27881
|
}
|
|
26053
27882
|
}
|
|
27883
|
+
const hasSavedImage = citations.some(
|
|
27884
|
+
(c) => !isDisplayArtifact(c) && IMAGE_EXTS.has(fileExt(c.filename ?? ""))
|
|
27885
|
+
);
|
|
27886
|
+
for (const c of citations) {
|
|
27887
|
+
if (hasSavedImage && isDisplayArtifact(c)) continue;
|
|
27888
|
+
files.push({
|
|
27889
|
+
id: c.fileId,
|
|
27890
|
+
...c.filename ? { name: c.filename } : {},
|
|
27891
|
+
...c.containerId ? { ref: { containerId: c.containerId } } : {},
|
|
27892
|
+
source: "code_execution"
|
|
27893
|
+
});
|
|
27894
|
+
}
|
|
26054
27895
|
}
|
|
26055
27896
|
if (type === "code_interpreter_call") {
|
|
26056
27897
|
for (const out of item.outputs ?? []) {
|
|
@@ -26354,7 +28195,7 @@ var OpenAIResponsesAdapter = class {
|
|
|
26354
28195
|
for (const file of this.filesFromOutputItem(item)) events.push({ type: "file", file });
|
|
26355
28196
|
const builtin = builtinCallFromResponsesItem(item ?? {});
|
|
26356
28197
|
if (builtin) {
|
|
26357
|
-
events.push({ type: "builtin_tool_end", tool: builtin.tool, ...builtin
|
|
28198
|
+
events.push({ type: "builtin_tool_end", tool: builtin.tool, ...builtinEndPayload(builtin) });
|
|
26358
28199
|
}
|
|
26359
28200
|
if (item?.type === "function_call") {
|
|
26360
28201
|
events.push({ type: "tool_call_end", id: item.call_id ?? "" });
|
|
@@ -26992,6 +28833,14 @@ var XAIMediaAdapter = class {
|
|
|
26992
28833
|
}
|
|
26993
28834
|
};
|
|
26994
28835
|
|
|
28836
|
+
// src/llm/providers/xai/tiers.ts
|
|
28837
|
+
function xaiRequestTier(t) {
|
|
28838
|
+
if (!t) return void 0;
|
|
28839
|
+
if (t === "priority") return "priority";
|
|
28840
|
+
if (t === "standard" || t === "default") return "default";
|
|
28841
|
+
return void 0;
|
|
28842
|
+
}
|
|
28843
|
+
|
|
26995
28844
|
// src/llm/providers/xai/responses.ts
|
|
26996
28845
|
function xaiCodeExecFiles(item) {
|
|
26997
28846
|
if (item.type !== "code_interpreter_call") return [];
|
|
@@ -27035,6 +28884,9 @@ var XAIResponsesAdapter = class extends OpenAIResponsesAdapter {
|
|
|
27035
28884
|
if (!req.model.includes("multi-agent")) {
|
|
27036
28885
|
delete body.reasoning;
|
|
27037
28886
|
}
|
|
28887
|
+
const xaiTier = xaiRequestTier(req.serviceTier);
|
|
28888
|
+
if (xaiTier) body.service_tier = xaiTier;
|
|
28889
|
+
else delete body.service_tier;
|
|
27038
28890
|
const usesCodeInterpreter = req.tools?.some(
|
|
27039
28891
|
(t) => !isFunctionTool(t) && t.type === "code_interpreter"
|
|
27040
28892
|
);
|
|
@@ -28253,6 +30105,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28253
30105
|
let lastResponse = null;
|
|
28254
30106
|
let reason = "done";
|
|
28255
30107
|
let errorMsg;
|
|
30108
|
+
let caughtError;
|
|
28256
30109
|
let guardrailTripReason;
|
|
28257
30110
|
try {
|
|
28258
30111
|
while (true) {
|
|
@@ -28301,7 +30154,11 @@ var AgentLoop = class _AgentLoop {
|
|
|
28301
30154
|
totalLlmTimeMs += stepLatency;
|
|
28302
30155
|
addUsage(totalUsage, lastResponse.usage);
|
|
28303
30156
|
this._history.append(
|
|
28304
|
-
|
|
30157
|
+
buildAssistantMessage(lastResponse, {
|
|
30158
|
+
provider: this.client.provider,
|
|
30159
|
+
model: this.client.model,
|
|
30160
|
+
api: this.client.api
|
|
30161
|
+
}),
|
|
28305
30162
|
{ model: this.client.model, usage: lastResponse.usage, latencyMs: stepLatency }
|
|
28306
30163
|
);
|
|
28307
30164
|
const hasToolCalls = lastResponse.finishReason === "tool_use" && lastResponse.toolCalls.length > 0;
|
|
@@ -28355,6 +30212,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28355
30212
|
} catch (e) {
|
|
28356
30213
|
reason = "error";
|
|
28357
30214
|
errorMsg = e instanceof Error ? e.message : String(e);
|
|
30215
|
+
caughtError = e;
|
|
28358
30216
|
await this.hooks.emit("onRunError", {
|
|
28359
30217
|
runId,
|
|
28360
30218
|
agentId: this.id,
|
|
@@ -28405,6 +30263,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28405
30263
|
totalToolTimeMs,
|
|
28406
30264
|
runTrace
|
|
28407
30265
|
});
|
|
30266
|
+
if (reason === "error") throw caughtError ?? new Error(errorMsg ?? "agent run failed");
|
|
28408
30267
|
return finalResponse;
|
|
28409
30268
|
}
|
|
28410
30269
|
/** Run `complete` with a JSON Schema enforced via `structured`, then
|
|
@@ -28431,6 +30290,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28431
30290
|
let lastResponse = null;
|
|
28432
30291
|
let reason = "done";
|
|
28433
30292
|
let errorMsg;
|
|
30293
|
+
let caughtError;
|
|
28434
30294
|
let guardrailTripReason;
|
|
28435
30295
|
try {
|
|
28436
30296
|
while (true) {
|
|
@@ -28492,7 +30352,14 @@ var AgentLoop = class _AgentLoop {
|
|
|
28492
30352
|
finalText = state.stepText;
|
|
28493
30353
|
lastResponse = stepResponse;
|
|
28494
30354
|
this._history.append(
|
|
28495
|
-
{
|
|
30355
|
+
{
|
|
30356
|
+
...buildAssistantMessage(lastResponse, {
|
|
30357
|
+
provider: this.client.provider,
|
|
30358
|
+
model: this.client.model,
|
|
30359
|
+
api: this.client.api
|
|
30360
|
+
}),
|
|
30361
|
+
content
|
|
30362
|
+
},
|
|
28496
30363
|
{ model: this.client.model, usage: state.stepUsage, latencyMs: stepLatency }
|
|
28497
30364
|
);
|
|
28498
30365
|
const hasToolCalls = state.stepToolCalls.length > 0;
|
|
@@ -28554,6 +30421,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28554
30421
|
} catch (e) {
|
|
28555
30422
|
reason = "error";
|
|
28556
30423
|
errorMsg = e instanceof Error ? e.message : String(e);
|
|
30424
|
+
caughtError = e;
|
|
28557
30425
|
await this.hooks.emit("onRunError", {
|
|
28558
30426
|
runId,
|
|
28559
30427
|
agentId: this.id,
|
|
@@ -28602,6 +30470,7 @@ var AgentLoop = class _AgentLoop {
|
|
|
28602
30470
|
totalToolTimeMs,
|
|
28603
30471
|
runTrace
|
|
28604
30472
|
});
|
|
30473
|
+
if (reason === "error") throw caughtError ?? new Error(errorMsg ?? "agent run failed");
|
|
28605
30474
|
yield { type: "done", response: finalResponse };
|
|
28606
30475
|
}
|
|
28607
30476
|
/** Yield tool_call_start events for all tool calls in this step. */
|
|
@@ -36983,6 +38852,7 @@ var CAP_KEYS = {
|
|
|
36983
38852
|
var BUILTIN_TOOL_KEYS = {
|
|
36984
38853
|
search: "web_search",
|
|
36985
38854
|
web_search: "web_search",
|
|
38855
|
+
web_fetch: "web_fetch",
|
|
36986
38856
|
code_interpreter: "code_interpreter"
|
|
36987
38857
|
};
|
|
36988
38858
|
var KNOWN_KEYS = /* @__PURE__ */ new Set([
|
|
@@ -38532,6 +40402,7 @@ function createRetrieval(backend, config) {
|
|
|
38532
40402
|
export {
|
|
38533
40403
|
AgentBus,
|
|
38534
40404
|
AgentLoop,
|
|
40405
|
+
AgentRunError,
|
|
38535
40406
|
AnthropicAdapter,
|
|
38536
40407
|
AnthropicBatchAdapter,
|
|
38537
40408
|
AnthropicCountApi,
|
|
@@ -38587,6 +40458,7 @@ export {
|
|
|
38587
40458
|
INPUT_SIZE_BUCKET_LABELS,
|
|
38588
40459
|
InMemoryVectorStore,
|
|
38589
40460
|
InternalToolRunner,
|
|
40461
|
+
InvalidFinalOutputError,
|
|
38590
40462
|
JSON_API_SYSTEM_PROMPT,
|
|
38591
40463
|
LAYER_AGENTLOOP_CONTEXT,
|
|
38592
40464
|
LAYER_AGENTLOOP_SYSTEM,
|