@opengeni/config 0.22.5 → 0.23.2-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +707 -20
- package/dist/index.js +995 -125
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1268 -156
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Entitlements, LatencyMode, ReasoningEffort, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, type TurnExecutionLatencyModeSourceV1, type TurnExecutionModelSourceV1, type TurnExecutionReasoningSourceV1, type VideoGenerationResolution, type FirstPartyMcpToolName as FirstPartyMcpToolNameType } from "@opengeni/contracts";
|
|
2
2
|
export { XAI_SUBSCRIPTION_MODEL_ID_PREFIX } from "@opengeni/xai-subscription";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
export declare const DEFAULT_OPENROUTER_MODEL_ID: "openrouter/nvidia/nemotron-3-super-120b-a12b:free";
|
|
5
|
+
export declare const DEFAULT_MODEL_COST_POLICY_JSON: string;
|
|
4
6
|
export declare const SANDBOX_ARCHIVE_CAPTURE_MAX_TIMEOUT_MS: number;
|
|
5
7
|
export declare const SANDBOX_ARCHIVE_CAPTURE_SETTLEMENT_GRACE_MS = 10000;
|
|
6
8
|
export declare const SANDBOX_SNAPSHOT_MAX_TIMEOUT_MS: number;
|
|
@@ -57,6 +59,7 @@ export declare const McpServerConnectionRefSchema: z.ZodObject<{
|
|
|
57
59
|
id: z.ZodString;
|
|
58
60
|
kind: z.ZodLiteral<"repository">;
|
|
59
61
|
}, z.core.$strict>>>;
|
|
62
|
+
authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
|
|
60
63
|
subjectScope: z.ZodOptional<z.ZodEnum<{
|
|
61
64
|
subject: "subject";
|
|
62
65
|
workspace: "workspace";
|
|
@@ -472,6 +475,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
472
475
|
goalIdleBackoffMs: z.ZodDefault<z.ZodPreprocess<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>>;
|
|
473
476
|
goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
474
477
|
childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
478
|
+
hostMcpAuthoritySourceAdmissionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
475
479
|
slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
476
480
|
agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
477
481
|
contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -530,6 +534,15 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
530
534
|
voiceInputAzureAdToken: z.ZodOptional<z.ZodString>;
|
|
531
535
|
voiceInputCodexExperimentalEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
532
536
|
modelPricingJson: z.ZodDefault<z.ZodString>;
|
|
537
|
+
modelCatalogSource: z.ZodDefault<z.ZodEnum<{
|
|
538
|
+
code: "code";
|
|
539
|
+
database: "database";
|
|
540
|
+
}>>;
|
|
541
|
+
modelCostPolicyJson: z.ZodDefault<z.ZodString>;
|
|
542
|
+
modelNotesJson: z.ZodDefault<z.ZodString>;
|
|
543
|
+
openrouterApiKey: z.ZodOptional<z.ZodString>;
|
|
544
|
+
resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
|
|
545
|
+
resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
|
|
533
546
|
modelProvidersJson: z.ZodDefault<z.ZodString>;
|
|
534
547
|
codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
535
548
|
supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
@@ -699,6 +712,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
699
712
|
sandboxIdleGraceMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
700
713
|
sandboxSnapshotIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
701
714
|
sandboxSnapshotTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
715
|
+
sandboxDrainSnapshotTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
702
716
|
sandboxRotationLeadMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
703
717
|
sandboxRotationBatchSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
704
718
|
sandboxLeaseTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -818,6 +832,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
818
832
|
id: z.ZodString;
|
|
819
833
|
kind: z.ZodLiteral<"repository">;
|
|
820
834
|
}, z.core.$strict>>>;
|
|
835
|
+
authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
|
|
821
836
|
subjectScope: z.ZodOptional<z.ZodEnum<{
|
|
822
837
|
subject: "subject";
|
|
823
838
|
workspace: "workspace";
|
|
@@ -909,6 +924,7 @@ export type TemporalConnectionOptions = {
|
|
|
909
924
|
export type ModelPricing = {
|
|
910
925
|
inputMicrosPerMillionTokens: number;
|
|
911
926
|
cachedInputMicrosPerMillionTokens?: number | undefined;
|
|
927
|
+
cacheWriteMicrosPerMillionTokens?: number | undefined;
|
|
912
928
|
outputMicrosPerMillionTokens: number;
|
|
913
929
|
marginBps?: number | undefined;
|
|
914
930
|
};
|
|
@@ -1112,9 +1128,12 @@ export type CredentialSourceV1 = {
|
|
|
1112
1128
|
} | {
|
|
1113
1129
|
kind: "workspace_connection";
|
|
1114
1130
|
mechanism: "api_key";
|
|
1131
|
+
} | {
|
|
1132
|
+
kind: "organization_connection";
|
|
1133
|
+
mechanism: "api_key";
|
|
1115
1134
|
};
|
|
1116
1135
|
export type BillingAttributionV1 = {
|
|
1117
|
-
upstreamPayer: "deployment" | "workspace" | "connected_subscription";
|
|
1136
|
+
upstreamPayer: "deployment" | "workspace" | "organization" | "connected_subscription";
|
|
1118
1137
|
metering: "opengeni_credits" | "external";
|
|
1119
1138
|
};
|
|
1120
1139
|
/**
|
|
@@ -1149,7 +1168,10 @@ export declare const RegistryProviderKind: z.ZodEnum<{
|
|
|
1149
1168
|
anonymous: "anonymous";
|
|
1150
1169
|
"api-key": "api-key";
|
|
1151
1170
|
"codex-subscription": "codex-subscription";
|
|
1171
|
+
"openrouter-organization": "openrouter-organization";
|
|
1172
|
+
"openrouter-workspace": "openrouter-workspace";
|
|
1152
1173
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1174
|
+
"vercel-gateway-organization": "vercel-gateway-organization";
|
|
1153
1175
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
1154
1176
|
"xai-subscription": "xai-subscription";
|
|
1155
1177
|
}>;
|
|
@@ -1160,7 +1182,10 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1160
1182
|
anonymous: "anonymous";
|
|
1161
1183
|
"api-key": "api-key";
|
|
1162
1184
|
"codex-subscription": "codex-subscription";
|
|
1185
|
+
"openrouter-organization": "openrouter-organization";
|
|
1186
|
+
"openrouter-workspace": "openrouter-workspace";
|
|
1163
1187
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1188
|
+
"vercel-gateway-organization": "vercel-gateway-organization";
|
|
1164
1189
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
1165
1190
|
"xai-subscription": "xai-subscription";
|
|
1166
1191
|
}>>;
|
|
@@ -1341,12 +1366,14 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1341
1366
|
pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1342
1367
|
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1343
1368
|
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1369
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1344
1370
|
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1345
1371
|
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1346
1372
|
}, z.core.$strip>, z.ZodObject<{
|
|
1347
1373
|
default: z.ZodObject<{
|
|
1348
1374
|
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1349
1375
|
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1376
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1350
1377
|
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1351
1378
|
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1352
1379
|
}, z.core.$strip>;
|
|
@@ -1355,6 +1382,7 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1355
1382
|
pricing: z.ZodObject<{
|
|
1356
1383
|
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1357
1384
|
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1385
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1358
1386
|
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1359
1387
|
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1360
1388
|
}, z.core.$strip>;
|
|
@@ -1365,6 +1393,608 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1365
1393
|
}, z.core.$strip>>;
|
|
1366
1394
|
}, z.core.$strip>;
|
|
1367
1395
|
export type RegistryProvider = z.infer<typeof RegistryProviderSchema>;
|
|
1396
|
+
export declare const OPENGENI_GATEWAY_PROVIDER_ID: "opengeni-gateway";
|
|
1397
|
+
export declare const WORKSPACE_GATEWAY_PROVIDER_ID: "workspace-gateway";
|
|
1398
|
+
export declare const WORKSPACE_GATEWAY_MODEL_ID_PREFIX: "workspace-gateway/";
|
|
1399
|
+
export declare const ORGANIZATION_GATEWAY_PROVIDER_ID: "organization-gateway";
|
|
1400
|
+
export declare const ORGANIZATION_GATEWAY_MODEL_ID_PREFIX: "organization-gateway/";
|
|
1401
|
+
export declare const OPENROUTER_PROVIDER_ID: "openrouter";
|
|
1402
|
+
export declare const OPENROUTER_MODEL_ID_PREFIX: "openrouter/";
|
|
1403
|
+
export declare const WORKSPACE_OPENROUTER_PROVIDER_ID: "workspace-openrouter";
|
|
1404
|
+
export declare const WORKSPACE_OPENROUTER_MODEL_ID_PREFIX: "workspace-openrouter/";
|
|
1405
|
+
export declare const ORGANIZATION_OPENROUTER_PROVIDER_ID: "organization-openrouter";
|
|
1406
|
+
export declare const ORGANIZATION_OPENROUTER_MODEL_ID_PREFIX: "organization-openrouter/";
|
|
1407
|
+
export declare const OPENROUTER_BASE_URL: "https://openrouter.ai/api/v1";
|
|
1408
|
+
export declare const ModelCostClass: z.ZodEnum<{
|
|
1409
|
+
credits: "credits";
|
|
1410
|
+
free: "free";
|
|
1411
|
+
}>;
|
|
1412
|
+
export type ModelCostClass = z.infer<typeof ModelCostClass>;
|
|
1413
|
+
export declare const ConfiguredModelCostClass: z.ZodEnum<{
|
|
1414
|
+
credits: "credits";
|
|
1415
|
+
free: "free";
|
|
1416
|
+
organization: "organization";
|
|
1417
|
+
subscription: "subscription";
|
|
1418
|
+
workspace: "workspace";
|
|
1419
|
+
}>;
|
|
1420
|
+
export type ConfiguredModelCostClass = z.infer<typeof ConfiguredModelCostClass>;
|
|
1421
|
+
export declare function parseModelCostPolicyJson(raw: string): Record<string, ModelCostClass>;
|
|
1422
|
+
export declare function parseModelNotesJson(raw: string): Record<string, string>;
|
|
1423
|
+
export declare function configuredModelNotes(settings: Pick<Settings, "modelNotesJson">): Record<string, string>;
|
|
1424
|
+
export declare const GatewayCatalogModel: z.ZodObject<{
|
|
1425
|
+
productId: z.ZodString;
|
|
1426
|
+
workspaceProductId: z.ZodString;
|
|
1427
|
+
upstreamModelId: z.ZodString;
|
|
1428
|
+
label: z.ZodString;
|
|
1429
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1430
|
+
providers: z.ZodArray<z.ZodString>;
|
|
1431
|
+
implicitCaching: z.ZodDefault<z.ZodBoolean>;
|
|
1432
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
1433
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1434
|
+
contextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1435
|
+
effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1436
|
+
autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
|
|
1437
|
+
pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1438
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1439
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1440
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1441
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1442
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1443
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1444
|
+
default: z.ZodObject<{
|
|
1445
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1446
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1447
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1448
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1449
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1450
|
+
}, z.core.$strip>;
|
|
1451
|
+
inputTokenTiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1452
|
+
minimumInputTokens: z.ZodNumber;
|
|
1453
|
+
pricing: z.ZodObject<{
|
|
1454
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1455
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1456
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1457
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1458
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1459
|
+
}, z.core.$strip>;
|
|
1460
|
+
}, z.core.$strip>>>;
|
|
1461
|
+
}, z.core.$strip>]>>;
|
|
1462
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1463
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1464
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1465
|
+
}, z.core.$strict>;
|
|
1466
|
+
export type GatewayCatalogModel = z.infer<typeof GatewayCatalogModel>;
|
|
1467
|
+
export declare const OpenRouterCatalogModel: z.ZodObject<{
|
|
1468
|
+
upstreamModelId: z.ZodString;
|
|
1469
|
+
label: z.ZodString;
|
|
1470
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1471
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1472
|
+
capabilities: z.ZodObject<{
|
|
1473
|
+
reasoning: z.ZodObject<{
|
|
1474
|
+
upstream: z.ZodEnum<{
|
|
1475
|
+
supported: "supported";
|
|
1476
|
+
unknown: "unknown";
|
|
1477
|
+
unsupported: "unsupported";
|
|
1478
|
+
}>;
|
|
1479
|
+
runnable: z.ZodBoolean;
|
|
1480
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1481
|
+
high: "high";
|
|
1482
|
+
low: "low";
|
|
1483
|
+
max: "max";
|
|
1484
|
+
medium: "medium";
|
|
1485
|
+
minimal: "minimal";
|
|
1486
|
+
none: "none";
|
|
1487
|
+
xhigh: "xhigh";
|
|
1488
|
+
}>>;
|
|
1489
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1490
|
+
high: "high";
|
|
1491
|
+
low: "low";
|
|
1492
|
+
max: "max";
|
|
1493
|
+
medium: "medium";
|
|
1494
|
+
minimal: "minimal";
|
|
1495
|
+
none: "none";
|
|
1496
|
+
xhigh: "xhigh";
|
|
1497
|
+
}>>;
|
|
1498
|
+
required: z.ZodBoolean;
|
|
1499
|
+
}, z.core.$strip>;
|
|
1500
|
+
functionCalling: z.ZodObject<{
|
|
1501
|
+
upstream: z.ZodEnum<{
|
|
1502
|
+
supported: "supported";
|
|
1503
|
+
unknown: "unknown";
|
|
1504
|
+
unsupported: "unsupported";
|
|
1505
|
+
}>;
|
|
1506
|
+
runnable: z.ZodBoolean;
|
|
1507
|
+
}, z.core.$strip>;
|
|
1508
|
+
structuredOutput: z.ZodObject<{
|
|
1509
|
+
upstream: z.ZodEnum<{
|
|
1510
|
+
supported: "supported";
|
|
1511
|
+
unknown: "unknown";
|
|
1512
|
+
unsupported: "unsupported";
|
|
1513
|
+
}>;
|
|
1514
|
+
runnable: z.ZodBoolean;
|
|
1515
|
+
}, z.core.$strip>;
|
|
1516
|
+
hostedTools: z.ZodObject<{
|
|
1517
|
+
webSearch: z.ZodObject<{
|
|
1518
|
+
upstream: z.ZodEnum<{
|
|
1519
|
+
supported: "supported";
|
|
1520
|
+
unknown: "unknown";
|
|
1521
|
+
unsupported: "unsupported";
|
|
1522
|
+
}>;
|
|
1523
|
+
runnable: z.ZodBoolean;
|
|
1524
|
+
}, z.core.$strip>;
|
|
1525
|
+
xSearch: z.ZodObject<{
|
|
1526
|
+
upstream: z.ZodEnum<{
|
|
1527
|
+
supported: "supported";
|
|
1528
|
+
unknown: "unknown";
|
|
1529
|
+
unsupported: "unsupported";
|
|
1530
|
+
}>;
|
|
1531
|
+
runnable: z.ZodBoolean;
|
|
1532
|
+
}, z.core.$strip>;
|
|
1533
|
+
codeExecution: z.ZodObject<{
|
|
1534
|
+
upstream: z.ZodEnum<{
|
|
1535
|
+
supported: "supported";
|
|
1536
|
+
unknown: "unknown";
|
|
1537
|
+
unsupported: "unsupported";
|
|
1538
|
+
}>;
|
|
1539
|
+
runnable: z.ZodBoolean;
|
|
1540
|
+
}, z.core.$strip>;
|
|
1541
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
1542
|
+
upstream: z.ZodEnum<{
|
|
1543
|
+
supported: "supported";
|
|
1544
|
+
unknown: "unknown";
|
|
1545
|
+
unsupported: "unsupported";
|
|
1546
|
+
}>;
|
|
1547
|
+
runnable: z.ZodBoolean;
|
|
1548
|
+
}, z.core.$strip>>;
|
|
1549
|
+
}, z.core.$strip>;
|
|
1550
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1551
|
+
audio: "audio";
|
|
1552
|
+
image: "image";
|
|
1553
|
+
text: "text";
|
|
1554
|
+
}>>;
|
|
1555
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1556
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1557
|
+
audio: "audio";
|
|
1558
|
+
image: "image";
|
|
1559
|
+
text: "text";
|
|
1560
|
+
}>>;
|
|
1561
|
+
transports: z.ZodObject<{
|
|
1562
|
+
sse: z.ZodObject<{
|
|
1563
|
+
upstream: z.ZodEnum<{
|
|
1564
|
+
supported: "supported";
|
|
1565
|
+
unknown: "unknown";
|
|
1566
|
+
unsupported: "unsupported";
|
|
1567
|
+
}>;
|
|
1568
|
+
runnable: z.ZodBoolean;
|
|
1569
|
+
}, z.core.$strip>;
|
|
1570
|
+
responsesWebSocket: z.ZodObject<{
|
|
1571
|
+
upstream: z.ZodEnum<{
|
|
1572
|
+
supported: "supported";
|
|
1573
|
+
unknown: "unknown";
|
|
1574
|
+
unsupported: "unsupported";
|
|
1575
|
+
}>;
|
|
1576
|
+
runnable: z.ZodBoolean;
|
|
1577
|
+
}, z.core.$strip>;
|
|
1578
|
+
realtimeAudio: z.ZodObject<{
|
|
1579
|
+
upstream: z.ZodEnum<{
|
|
1580
|
+
supported: "supported";
|
|
1581
|
+
unknown: "unknown";
|
|
1582
|
+
unsupported: "unsupported";
|
|
1583
|
+
}>;
|
|
1584
|
+
runnable: z.ZodBoolean;
|
|
1585
|
+
}, z.core.$strip>;
|
|
1586
|
+
}, z.core.$strip>;
|
|
1587
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1588
|
+
upstream: z.ZodEnum<{
|
|
1589
|
+
supported: "supported";
|
|
1590
|
+
unknown: "unknown";
|
|
1591
|
+
unsupported: "unsupported";
|
|
1592
|
+
}>;
|
|
1593
|
+
runnable: z.ZodBoolean;
|
|
1594
|
+
mode: z.ZodEnum<{
|
|
1595
|
+
automatic: "automatic";
|
|
1596
|
+
implicit: "implicit";
|
|
1597
|
+
none: "none";
|
|
1598
|
+
}>;
|
|
1599
|
+
}, z.core.$strip>>;
|
|
1600
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1601
|
+
id: z.ZodEnum<{
|
|
1602
|
+
fast: "fast";
|
|
1603
|
+
priority: "priority";
|
|
1604
|
+
standard: "standard";
|
|
1605
|
+
}>;
|
|
1606
|
+
upstream: z.ZodEnum<{
|
|
1607
|
+
supported: "supported";
|
|
1608
|
+
unknown: "unknown";
|
|
1609
|
+
unsupported: "unsupported";
|
|
1610
|
+
}>;
|
|
1611
|
+
runnable: z.ZodBoolean;
|
|
1612
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1613
|
+
}, z.core.$strip>>;
|
|
1614
|
+
}, z.core.$strip>;
|
|
1615
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1616
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1617
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1618
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1619
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1620
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1621
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1622
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1623
|
+
}, z.core.$strict>;
|
|
1624
|
+
export type OpenRouterCatalogModel = z.infer<typeof OpenRouterCatalogModel>;
|
|
1625
|
+
export declare const ModelCatalogDocument: z.ZodObject<{
|
|
1626
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
1627
|
+
defaultModel: z.ZodOptional<z.ZodString>;
|
|
1628
|
+
builtInModels: z.ZodArray<z.ZodString>;
|
|
1629
|
+
registryProviders: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1630
|
+
id: z.ZodString;
|
|
1631
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1632
|
+
api: z.ZodDefault<z.ZodEnum<{
|
|
1633
|
+
chat: "chat";
|
|
1634
|
+
responses: "responses";
|
|
1635
|
+
}>>;
|
|
1636
|
+
wireProfile: z.ZodDefault<z.ZodEnum<{
|
|
1637
|
+
"azure-openai": "azure-openai";
|
|
1638
|
+
openai: "openai";
|
|
1639
|
+
}>>;
|
|
1640
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1641
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1642
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
1643
|
+
anonymous: "anonymous";
|
|
1644
|
+
"api-key": "api-key";
|
|
1645
|
+
}>>;
|
|
1646
|
+
baseUrl: z.ZodString;
|
|
1647
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1648
|
+
id: z.ZodString;
|
|
1649
|
+
upstreamModelId: z.ZodOptional<z.ZodString>;
|
|
1650
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1651
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1652
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1653
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1654
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1655
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1656
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1657
|
+
reasoningEffort: z.ZodOptional<z.ZodBoolean>;
|
|
1658
|
+
hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
|
|
1659
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
1660
|
+
reasoning: z.ZodObject<{
|
|
1661
|
+
upstream: z.ZodEnum<{
|
|
1662
|
+
supported: "supported";
|
|
1663
|
+
unknown: "unknown";
|
|
1664
|
+
unsupported: "unsupported";
|
|
1665
|
+
}>;
|
|
1666
|
+
runnable: z.ZodBoolean;
|
|
1667
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1668
|
+
high: "high";
|
|
1669
|
+
low: "low";
|
|
1670
|
+
max: "max";
|
|
1671
|
+
medium: "medium";
|
|
1672
|
+
minimal: "minimal";
|
|
1673
|
+
none: "none";
|
|
1674
|
+
xhigh: "xhigh";
|
|
1675
|
+
}>>;
|
|
1676
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1677
|
+
high: "high";
|
|
1678
|
+
low: "low";
|
|
1679
|
+
max: "max";
|
|
1680
|
+
medium: "medium";
|
|
1681
|
+
minimal: "minimal";
|
|
1682
|
+
none: "none";
|
|
1683
|
+
xhigh: "xhigh";
|
|
1684
|
+
}>>;
|
|
1685
|
+
required: z.ZodBoolean;
|
|
1686
|
+
}, z.core.$strip>;
|
|
1687
|
+
functionCalling: z.ZodObject<{
|
|
1688
|
+
upstream: z.ZodEnum<{
|
|
1689
|
+
supported: "supported";
|
|
1690
|
+
unknown: "unknown";
|
|
1691
|
+
unsupported: "unsupported";
|
|
1692
|
+
}>;
|
|
1693
|
+
runnable: z.ZodBoolean;
|
|
1694
|
+
}, z.core.$strip>;
|
|
1695
|
+
structuredOutput: z.ZodObject<{
|
|
1696
|
+
upstream: z.ZodEnum<{
|
|
1697
|
+
supported: "supported";
|
|
1698
|
+
unknown: "unknown";
|
|
1699
|
+
unsupported: "unsupported";
|
|
1700
|
+
}>;
|
|
1701
|
+
runnable: z.ZodBoolean;
|
|
1702
|
+
}, z.core.$strip>;
|
|
1703
|
+
hostedTools: z.ZodObject<{
|
|
1704
|
+
webSearch: z.ZodObject<{
|
|
1705
|
+
upstream: z.ZodEnum<{
|
|
1706
|
+
supported: "supported";
|
|
1707
|
+
unknown: "unknown";
|
|
1708
|
+
unsupported: "unsupported";
|
|
1709
|
+
}>;
|
|
1710
|
+
runnable: z.ZodBoolean;
|
|
1711
|
+
}, z.core.$strip>;
|
|
1712
|
+
xSearch: z.ZodObject<{
|
|
1713
|
+
upstream: z.ZodEnum<{
|
|
1714
|
+
supported: "supported";
|
|
1715
|
+
unknown: "unknown";
|
|
1716
|
+
unsupported: "unsupported";
|
|
1717
|
+
}>;
|
|
1718
|
+
runnable: z.ZodBoolean;
|
|
1719
|
+
}, z.core.$strip>;
|
|
1720
|
+
codeExecution: z.ZodObject<{
|
|
1721
|
+
upstream: z.ZodEnum<{
|
|
1722
|
+
supported: "supported";
|
|
1723
|
+
unknown: "unknown";
|
|
1724
|
+
unsupported: "unsupported";
|
|
1725
|
+
}>;
|
|
1726
|
+
runnable: z.ZodBoolean;
|
|
1727
|
+
}, z.core.$strip>;
|
|
1728
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
1729
|
+
upstream: z.ZodEnum<{
|
|
1730
|
+
supported: "supported";
|
|
1731
|
+
unknown: "unknown";
|
|
1732
|
+
unsupported: "unsupported";
|
|
1733
|
+
}>;
|
|
1734
|
+
runnable: z.ZodBoolean;
|
|
1735
|
+
}, z.core.$strip>>;
|
|
1736
|
+
}, z.core.$strip>;
|
|
1737
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1738
|
+
audio: "audio";
|
|
1739
|
+
image: "image";
|
|
1740
|
+
text: "text";
|
|
1741
|
+
}>>;
|
|
1742
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1743
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1744
|
+
audio: "audio";
|
|
1745
|
+
image: "image";
|
|
1746
|
+
text: "text";
|
|
1747
|
+
}>>;
|
|
1748
|
+
transports: z.ZodObject<{
|
|
1749
|
+
sse: z.ZodObject<{
|
|
1750
|
+
upstream: z.ZodEnum<{
|
|
1751
|
+
supported: "supported";
|
|
1752
|
+
unknown: "unknown";
|
|
1753
|
+
unsupported: "unsupported";
|
|
1754
|
+
}>;
|
|
1755
|
+
runnable: z.ZodBoolean;
|
|
1756
|
+
}, z.core.$strip>;
|
|
1757
|
+
responsesWebSocket: z.ZodObject<{
|
|
1758
|
+
upstream: z.ZodEnum<{
|
|
1759
|
+
supported: "supported";
|
|
1760
|
+
unknown: "unknown";
|
|
1761
|
+
unsupported: "unsupported";
|
|
1762
|
+
}>;
|
|
1763
|
+
runnable: z.ZodBoolean;
|
|
1764
|
+
}, z.core.$strip>;
|
|
1765
|
+
realtimeAudio: z.ZodObject<{
|
|
1766
|
+
upstream: z.ZodEnum<{
|
|
1767
|
+
supported: "supported";
|
|
1768
|
+
unknown: "unknown";
|
|
1769
|
+
unsupported: "unsupported";
|
|
1770
|
+
}>;
|
|
1771
|
+
runnable: z.ZodBoolean;
|
|
1772
|
+
}, z.core.$strip>;
|
|
1773
|
+
}, z.core.$strip>;
|
|
1774
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1775
|
+
upstream: z.ZodEnum<{
|
|
1776
|
+
supported: "supported";
|
|
1777
|
+
unknown: "unknown";
|
|
1778
|
+
unsupported: "unsupported";
|
|
1779
|
+
}>;
|
|
1780
|
+
runnable: z.ZodBoolean;
|
|
1781
|
+
mode: z.ZodEnum<{
|
|
1782
|
+
automatic: "automatic";
|
|
1783
|
+
implicit: "implicit";
|
|
1784
|
+
none: "none";
|
|
1785
|
+
}>;
|
|
1786
|
+
}, z.core.$strip>>;
|
|
1787
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1788
|
+
id: z.ZodEnum<{
|
|
1789
|
+
fast: "fast";
|
|
1790
|
+
priority: "priority";
|
|
1791
|
+
standard: "standard";
|
|
1792
|
+
}>;
|
|
1793
|
+
upstream: z.ZodEnum<{
|
|
1794
|
+
supported: "supported";
|
|
1795
|
+
unknown: "unknown";
|
|
1796
|
+
unsupported: "unsupported";
|
|
1797
|
+
}>;
|
|
1798
|
+
runnable: z.ZodBoolean;
|
|
1799
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1800
|
+
}, z.core.$strip>>;
|
|
1801
|
+
}, z.core.$strip>>;
|
|
1802
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1803
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1804
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1805
|
+
}, z.core.$strict>>;
|
|
1806
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1807
|
+
apiKeyEnv: z.ZodOptional<z.ZodNever>;
|
|
1808
|
+
defaultHeaders: z.ZodOptional<z.ZodNever>;
|
|
1809
|
+
defaultQuery: z.ZodOptional<z.ZodNever>;
|
|
1810
|
+
publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
|
|
1811
|
+
publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
|
|
1812
|
+
}, z.core.$strict>>>;
|
|
1813
|
+
gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1814
|
+
productId: z.ZodString;
|
|
1815
|
+
workspaceProductId: z.ZodString;
|
|
1816
|
+
upstreamModelId: z.ZodString;
|
|
1817
|
+
label: z.ZodString;
|
|
1818
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1819
|
+
providers: z.ZodArray<z.ZodString>;
|
|
1820
|
+
implicitCaching: z.ZodDefault<z.ZodBoolean>;
|
|
1821
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
1822
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1823
|
+
contextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1824
|
+
effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1825
|
+
autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
|
|
1826
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1827
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1828
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1829
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1830
|
+
}, z.core.$strict>>>;
|
|
1831
|
+
openrouterModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1832
|
+
upstreamModelId: z.ZodString;
|
|
1833
|
+
label: z.ZodString;
|
|
1834
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1835
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1836
|
+
capabilities: z.ZodObject<{
|
|
1837
|
+
reasoning: z.ZodObject<{
|
|
1838
|
+
upstream: z.ZodEnum<{
|
|
1839
|
+
supported: "supported";
|
|
1840
|
+
unknown: "unknown";
|
|
1841
|
+
unsupported: "unsupported";
|
|
1842
|
+
}>;
|
|
1843
|
+
runnable: z.ZodBoolean;
|
|
1844
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1845
|
+
high: "high";
|
|
1846
|
+
low: "low";
|
|
1847
|
+
max: "max";
|
|
1848
|
+
medium: "medium";
|
|
1849
|
+
minimal: "minimal";
|
|
1850
|
+
none: "none";
|
|
1851
|
+
xhigh: "xhigh";
|
|
1852
|
+
}>>;
|
|
1853
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1854
|
+
high: "high";
|
|
1855
|
+
low: "low";
|
|
1856
|
+
max: "max";
|
|
1857
|
+
medium: "medium";
|
|
1858
|
+
minimal: "minimal";
|
|
1859
|
+
none: "none";
|
|
1860
|
+
xhigh: "xhigh";
|
|
1861
|
+
}>>;
|
|
1862
|
+
required: z.ZodBoolean;
|
|
1863
|
+
}, z.core.$strip>;
|
|
1864
|
+
functionCalling: z.ZodObject<{
|
|
1865
|
+
upstream: z.ZodEnum<{
|
|
1866
|
+
supported: "supported";
|
|
1867
|
+
unknown: "unknown";
|
|
1868
|
+
unsupported: "unsupported";
|
|
1869
|
+
}>;
|
|
1870
|
+
runnable: z.ZodBoolean;
|
|
1871
|
+
}, z.core.$strip>;
|
|
1872
|
+
structuredOutput: z.ZodObject<{
|
|
1873
|
+
upstream: z.ZodEnum<{
|
|
1874
|
+
supported: "supported";
|
|
1875
|
+
unknown: "unknown";
|
|
1876
|
+
unsupported: "unsupported";
|
|
1877
|
+
}>;
|
|
1878
|
+
runnable: z.ZodBoolean;
|
|
1879
|
+
}, z.core.$strip>;
|
|
1880
|
+
hostedTools: z.ZodObject<{
|
|
1881
|
+
webSearch: z.ZodObject<{
|
|
1882
|
+
upstream: z.ZodEnum<{
|
|
1883
|
+
supported: "supported";
|
|
1884
|
+
unknown: "unknown";
|
|
1885
|
+
unsupported: "unsupported";
|
|
1886
|
+
}>;
|
|
1887
|
+
runnable: z.ZodBoolean;
|
|
1888
|
+
}, z.core.$strip>;
|
|
1889
|
+
xSearch: z.ZodObject<{
|
|
1890
|
+
upstream: z.ZodEnum<{
|
|
1891
|
+
supported: "supported";
|
|
1892
|
+
unknown: "unknown";
|
|
1893
|
+
unsupported: "unsupported";
|
|
1894
|
+
}>;
|
|
1895
|
+
runnable: z.ZodBoolean;
|
|
1896
|
+
}, z.core.$strip>;
|
|
1897
|
+
codeExecution: z.ZodObject<{
|
|
1898
|
+
upstream: z.ZodEnum<{
|
|
1899
|
+
supported: "supported";
|
|
1900
|
+
unknown: "unknown";
|
|
1901
|
+
unsupported: "unsupported";
|
|
1902
|
+
}>;
|
|
1903
|
+
runnable: z.ZodBoolean;
|
|
1904
|
+
}, z.core.$strip>;
|
|
1905
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
1906
|
+
upstream: z.ZodEnum<{
|
|
1907
|
+
supported: "supported";
|
|
1908
|
+
unknown: "unknown";
|
|
1909
|
+
unsupported: "unsupported";
|
|
1910
|
+
}>;
|
|
1911
|
+
runnable: z.ZodBoolean;
|
|
1912
|
+
}, z.core.$strip>>;
|
|
1913
|
+
}, z.core.$strip>;
|
|
1914
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1915
|
+
audio: "audio";
|
|
1916
|
+
image: "image";
|
|
1917
|
+
text: "text";
|
|
1918
|
+
}>>;
|
|
1919
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1920
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1921
|
+
audio: "audio";
|
|
1922
|
+
image: "image";
|
|
1923
|
+
text: "text";
|
|
1924
|
+
}>>;
|
|
1925
|
+
transports: z.ZodObject<{
|
|
1926
|
+
sse: z.ZodObject<{
|
|
1927
|
+
upstream: z.ZodEnum<{
|
|
1928
|
+
supported: "supported";
|
|
1929
|
+
unknown: "unknown";
|
|
1930
|
+
unsupported: "unsupported";
|
|
1931
|
+
}>;
|
|
1932
|
+
runnable: z.ZodBoolean;
|
|
1933
|
+
}, z.core.$strip>;
|
|
1934
|
+
responsesWebSocket: z.ZodObject<{
|
|
1935
|
+
upstream: z.ZodEnum<{
|
|
1936
|
+
supported: "supported";
|
|
1937
|
+
unknown: "unknown";
|
|
1938
|
+
unsupported: "unsupported";
|
|
1939
|
+
}>;
|
|
1940
|
+
runnable: z.ZodBoolean;
|
|
1941
|
+
}, z.core.$strip>;
|
|
1942
|
+
realtimeAudio: z.ZodObject<{
|
|
1943
|
+
upstream: z.ZodEnum<{
|
|
1944
|
+
supported: "supported";
|
|
1945
|
+
unknown: "unknown";
|
|
1946
|
+
unsupported: "unsupported";
|
|
1947
|
+
}>;
|
|
1948
|
+
runnable: z.ZodBoolean;
|
|
1949
|
+
}, z.core.$strip>;
|
|
1950
|
+
}, z.core.$strip>;
|
|
1951
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1952
|
+
upstream: z.ZodEnum<{
|
|
1953
|
+
supported: "supported";
|
|
1954
|
+
unknown: "unknown";
|
|
1955
|
+
unsupported: "unsupported";
|
|
1956
|
+
}>;
|
|
1957
|
+
runnable: z.ZodBoolean;
|
|
1958
|
+
mode: z.ZodEnum<{
|
|
1959
|
+
automatic: "automatic";
|
|
1960
|
+
implicit: "implicit";
|
|
1961
|
+
none: "none";
|
|
1962
|
+
}>;
|
|
1963
|
+
}, z.core.$strip>>;
|
|
1964
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1965
|
+
id: z.ZodEnum<{
|
|
1966
|
+
fast: "fast";
|
|
1967
|
+
priority: "priority";
|
|
1968
|
+
standard: "standard";
|
|
1969
|
+
}>;
|
|
1970
|
+
upstream: z.ZodEnum<{
|
|
1971
|
+
supported: "supported";
|
|
1972
|
+
unknown: "unknown";
|
|
1973
|
+
unsupported: "unsupported";
|
|
1974
|
+
}>;
|
|
1975
|
+
runnable: z.ZodBoolean;
|
|
1976
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1977
|
+
}, z.core.$strip>>;
|
|
1978
|
+
}, z.core.$strip>;
|
|
1979
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1980
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1981
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1982
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1983
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1984
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1985
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1986
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1987
|
+
}, z.core.$strict>>>;
|
|
1988
|
+
modelNotes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1989
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1990
|
+
enabled: z.ZodOptional<z.ZodNever>;
|
|
1991
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1992
|
+
bands: z.ZodOptional<z.ZodNever>;
|
|
1993
|
+
}, z.core.$strict>;
|
|
1994
|
+
export type ModelCatalogDocument = z.infer<typeof ModelCatalogDocument>;
|
|
1995
|
+
export declare function parseModelCatalogDocument(value: unknown): ModelCatalogDocument;
|
|
1996
|
+
/** Pure secret-free database catalog overlay. getSettings remains env-only. */
|
|
1997
|
+
export declare function applyModelCatalogDocument(settings: Settings, rawDocument: unknown): Settings;
|
|
1368
1998
|
export declare const IntegrationOAuthClientConfigSchema: z.ZodObject<{
|
|
1369
1999
|
clientId: z.ZodString;
|
|
1370
2000
|
clientSecret: z.ZodOptional<z.ZodString>;
|
|
@@ -1385,7 +2015,7 @@ export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClient
|
|
|
1385
2015
|
export interface ResolvedModelProvider {
|
|
1386
2016
|
id: string;
|
|
1387
2017
|
label: string;
|
|
1388
|
-
kind: RegistryProviderKind;
|
|
2018
|
+
kind: RegistryProviderKind | "openrouter-managed";
|
|
1389
2019
|
api: ModelProviderApi;
|
|
1390
2020
|
wireProfile: ModelProviderWireProfile;
|
|
1391
2021
|
builtin: boolean;
|
|
@@ -1414,6 +2044,8 @@ export interface ConfiguredModel {
|
|
|
1414
2044
|
executionLimits: ModelExecutionLimitsV1;
|
|
1415
2045
|
credentialSource: CredentialSourceV1;
|
|
1416
2046
|
billing: BillingAttributionV1;
|
|
2047
|
+
/** Workspace-facing funding policy, independent of upstream settlement. */
|
|
2048
|
+
cost: ConfiguredModelCostClass;
|
|
1417
2049
|
capabilities: ModelCapabilitiesV1;
|
|
1418
2050
|
requestPolicy?: {
|
|
1419
2051
|
gateway: {
|
|
@@ -1432,11 +2064,10 @@ export interface ConfiguredModel {
|
|
|
1432
2064
|
}
|
|
1433
2065
|
export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
|
|
1434
2066
|
export declare const VERCEL_AI_GATEWAY_AI_SDK_BASE_URL: "https://ai-gateway.vercel.sh/v4/ai";
|
|
1435
|
-
export declare const OPENGENI_GATEWAY_PROVIDER_ID: "opengeni-gateway";
|
|
1436
|
-
export declare const WORKSPACE_GATEWAY_PROVIDER_ID: "workspace-gateway";
|
|
1437
|
-
export declare const WORKSPACE_GATEWAY_MODEL_ID_PREFIX: "workspace-gateway/";
|
|
1438
2067
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
|
|
1439
2068
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_ROLE: "vercel_ai_gateway";
|
|
2069
|
+
export declare const WORKSPACE_OPENROUTER_CONNECTION_DOMAIN: "openrouter.ai";
|
|
2070
|
+
export declare const WORKSPACE_OPENROUTER_CONNECTION_ROLE: "openrouter";
|
|
1440
2071
|
export declare const CODEX_REALTIME_MODEL_ID: "gpt-live-1-boulder-alpha";
|
|
1441
2072
|
export declare const SUPERGROK_REALTIME_MODEL_ID: "supergrok/grok-voice-think-fast-2.0";
|
|
1442
2073
|
export declare const OPENGENI_REALTIME_MODEL_ID_PREFIX: "opengeni-gateway/";
|
|
@@ -1490,16 +2121,25 @@ export declare const OPENGENI_GATEWAY_MODELS: {
|
|
|
1490
2121
|
readonly implicitCaching: true;
|
|
1491
2122
|
};
|
|
1492
2123
|
};
|
|
2124
|
+
export declare const OPENGENI_OPENROUTER_MODELS: readonly OpenRouterCatalogModel[];
|
|
2125
|
+
export declare function configuredGatewayUpstreamModelIds(settings: Settings): string[];
|
|
2126
|
+
export declare function configuredGatewayWorkspaceProductModelIds(settings: Settings): string[];
|
|
2127
|
+
export declare function configuredGatewayOrganizationProductModelIds(settings: Settings): string[];
|
|
2128
|
+
export declare function configuredModelInputIdentities(settings: Settings): string[];
|
|
2129
|
+
export declare function configuredOpenRouterUpstreamModelIds(settings: Settings): string[];
|
|
2130
|
+
export declare function configuredOpenRouterWorkspaceProductModelIds(settings: Settings): string[];
|
|
2131
|
+
export declare function configuredOpenRouterOrganizationProductModelIds(settings: Settings): string[];
|
|
1493
2132
|
/**
|
|
1494
2133
|
* Built-in OpenGeni credit pricing schedules.
|
|
1495
2134
|
*
|
|
1496
2135
|
* Rates are provider list prices in USD micros per 1M tokens. Debit applies
|
|
1497
|
-
* `marginBps` (
|
|
2136
|
+
* `marginBps` (500 = +5%) on top. Long-context tiers follow OpenAI's
|
|
1498
2137
|
* ">272K input tokens" rule (threshold exclusive of 272_000).
|
|
1499
2138
|
*
|
|
1500
2139
|
* GPT-5.4 and older families are intentionally omitted — they are no longer
|
|
1501
|
-
* offered. Codex / connected-subscription turns use `metering: external
|
|
1502
|
-
* never
|
|
2140
|
+
* offered. Codex / connected-subscription turns use `metering: external`, so
|
|
2141
|
+
* this map never debits them, but it does provide their equivalent OpenGeni
|
|
2142
|
+
* credit price when a matching product model is configured.
|
|
1503
2143
|
*
|
|
1504
2144
|
* When adding or changing a billed model, run `bun run check:model-pricing`
|
|
1505
2145
|
* (see docs/model-providers.md § Price audit). That compares this map to
|
|
@@ -1513,7 +2153,7 @@ export type SandboxRequiredEnv = {
|
|
|
1513
2153
|
export declare const SANDBOX_REQUIRED_ENV: Record<z.infer<typeof SandboxBackend>, readonly SandboxRequiredEnv[]>;
|
|
1514
2154
|
/** The required OPENGENI_* env var names for a backend (for the deployment manifest). */
|
|
1515
2155
|
export declare function requiredSandboxEnvForBackend(backend: z.infer<typeof SandboxBackend>): string[];
|
|
1516
|
-
export declare function getSettings(): Settings;
|
|
2156
|
+
export declare function getSettings(source?: NodeJS.ProcessEnv): Settings;
|
|
1517
2157
|
/**
|
|
1518
2158
|
* First-party session tools need a shared HMAC identity even in the unauthenticated
|
|
1519
2159
|
* local product mode. A fixed local-only value is no broader than that mode's
|
|
@@ -1561,7 +2201,10 @@ export declare function effectiveSandboxLifecycle(settings: Settings, backend?:
|
|
|
1561
2201
|
* consumers at one hour.
|
|
1562
2202
|
*/
|
|
1563
2203
|
export declare function sandboxArchiveCaptureTimeoutMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs">): number;
|
|
1564
|
-
|
|
2204
|
+
/** Provider operation budget used only by zero-holder drain/rotation capture.
|
|
2205
|
+
* Unset preserves the historical shared snapshot budget exactly. */
|
|
2206
|
+
export declare function effectiveSandboxDrainSnapshotTimeoutMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs" | "sandboxDrainSnapshotTimeoutMs">): number;
|
|
2207
|
+
export declare function sandboxLifecycleTransitionWaitMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs" | "sandboxDrainSnapshotTimeoutMs" | "sandboxLeaseReaperPeriodMs">): number;
|
|
1565
2208
|
export declare function collectSandboxEnvironment(settings: Settings, source?: NodeJS.ProcessEnv): Record<string, string>;
|
|
1566
2209
|
/**
|
|
1567
2210
|
* Resolved API key for a registry provider: the inline `apiKey` when present,
|
|
@@ -1571,11 +2214,45 @@ export declare function collectSandboxEnvironment(settings: Settings, source?: N
|
|
|
1571
2214
|
* explicit environment in tests.
|
|
1572
2215
|
*/
|
|
1573
2216
|
export declare function resolveProviderApiKey(provider: Pick<RegistryProvider, "apiKey" | "apiKeyEnv">, source?: NodeJS.ProcessEnv): string | undefined;
|
|
1574
|
-
export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string): ConfiguredModel["requestPolicy"];
|
|
2217
|
+
export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string, models?: readonly GatewayCatalogModel[]): ConfiguredModel["requestPolicy"];
|
|
1575
2218
|
/** Static catalog overlay; it contains no concrete workspace credential. */
|
|
1576
|
-
export declare function withWorkspaceGatewayCatalogProvider(settings: Settings
|
|
2219
|
+
export declare function withWorkspaceGatewayCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2220
|
+
upstreamModelId: string;
|
|
2221
|
+
label?: string | null;
|
|
2222
|
+
}[]): Settings;
|
|
1577
2223
|
/** Runtime overlay after the worker resolves the workspace's encrypted key. */
|
|
1578
|
-
export declare function withWorkspaceGatewayCredential(settings: Settings, apiKey: string
|
|
2224
|
+
export declare function withWorkspaceGatewayCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2225
|
+
upstreamModelId: string;
|
|
2226
|
+
label?: string | null;
|
|
2227
|
+
}[]): Settings;
|
|
2228
|
+
/** Static OpenRouter catalog overlay; it contains no concrete workspace credential. */
|
|
2229
|
+
export declare function withWorkspaceOpenRouterCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2230
|
+
upstreamModelId: string;
|
|
2231
|
+
label?: string | null;
|
|
2232
|
+
}[]): Settings;
|
|
2233
|
+
/** Runtime overlay after the worker resolves the workspace's encrypted OpenRouter key. */
|
|
2234
|
+
export declare function withWorkspaceOpenRouterCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2235
|
+
upstreamModelId: string;
|
|
2236
|
+
label?: string | null;
|
|
2237
|
+
}[]): Settings;
|
|
2238
|
+
/** Secret-free organization Vercel AI Gateway catalog overlay. */
|
|
2239
|
+
export declare function withOrganizationGatewayCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2240
|
+
upstreamModelId: string;
|
|
2241
|
+
label?: string | null;
|
|
2242
|
+
}[]): Settings;
|
|
2243
|
+
export declare function withOrganizationGatewayCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2244
|
+
upstreamModelId: string;
|
|
2245
|
+
label?: string | null;
|
|
2246
|
+
}[]): Settings;
|
|
2247
|
+
/** Secret-free organization OpenRouter catalog overlay. */
|
|
2248
|
+
export declare function withOrganizationOpenRouterCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2249
|
+
upstreamModelId: string;
|
|
2250
|
+
label?: string | null;
|
|
2251
|
+
}[]): Settings;
|
|
2252
|
+
export declare function withOrganizationOpenRouterCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2253
|
+
upstreamModelId: string;
|
|
2254
|
+
label?: string | null;
|
|
2255
|
+
}[]): Settings;
|
|
1579
2256
|
/**
|
|
1580
2257
|
* Product display label for catalog/picker UI.
|
|
1581
2258
|
* Same string for OpenAI and Codex copies of a slug (`gpt-5.6-luna` and
|
|
@@ -1599,6 +2276,7 @@ export declare function serviceTierForLatencyMode(providerId: string, latencyMod
|
|
|
1599
2276
|
/** True when the response tier fulfills a non-standard Fast/priority request. */
|
|
1600
2277
|
export declare function responseSatisfiesLatencyMode(requested: LatencyMode, responseServiceTier: string | null | undefined): boolean;
|
|
1601
2278
|
export declare function runnableLatencyModesForModel(settings: Settings, modelId: string): LatencyMode[];
|
|
2279
|
+
export declare function modelCostClassForConfiguredModel(_settings: Settings, model: Pick<ConfiguredModel, "cost">): ConfiguredModelCostClass;
|
|
1602
2280
|
/**
|
|
1603
2281
|
* The built-in provider's stable id: "openai" on the OpenAI platform, "azure"
|
|
1604
2282
|
* on Azure. Exported because the workspace model-policy gate must attribute
|
|
@@ -1615,7 +2293,7 @@ export declare function builtinProviderId(settings: Pick<Settings, "openaiProvid
|
|
|
1615
2293
|
* registry entry for the rest. Registry ids may not collide with the built-in
|
|
1616
2294
|
* id — validateSettings rejects that at boot.
|
|
1617
2295
|
*/
|
|
1618
|
-
export declare function configuredProviders(settings: Settings): ResolvedModelProvider[];
|
|
2296
|
+
export declare function configuredProviders(settings: Settings, source?: NodeJS.ProcessEnv): ResolvedModelProvider[];
|
|
1619
2297
|
/**
|
|
1620
2298
|
* Pure catalog overlay for a workspace whose existing Codex connection seam
|
|
1621
2299
|
* reports ready. This describes product/provider identity only; it does not
|
|
@@ -1651,7 +2329,7 @@ export declare function policyProviderIdForModel(settings: Settings, modelId: st
|
|
|
1651
2329
|
* default false). De-duplicated by id (first wins) so the default model stays
|
|
1652
2330
|
* first and the built-in allow-list takes precedence over registry entries.
|
|
1653
2331
|
*/
|
|
1654
|
-
export declare function configuredModels(settings: Settings): ConfiguredModel[];
|
|
2332
|
+
export declare function configuredModels(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
|
|
1655
2333
|
/** Resolve a known canonical id or alias. Unknown strings are returned unchanged. */
|
|
1656
2334
|
export declare function canonicalizeConfiguredModelId(settings: Settings, modelId: string): string;
|
|
1657
2335
|
/**
|
|
@@ -1683,6 +2361,12 @@ export type ResolveTurnExecutionPolicyV1Input = {
|
|
|
1683
2361
|
latencyMode?: LatencyMode;
|
|
1684
2362
|
latencyModeSource?: TurnExecutionLatencyModeSourceV1;
|
|
1685
2363
|
};
|
|
2364
|
+
/**
|
|
2365
|
+
* Resolve the static catalog identity used by an accepted turn. Subscription
|
|
2366
|
+
* overlays contain no account or bearer and do not prove connection readiness;
|
|
2367
|
+
* callers must keep their live credential/readiness gate authoritative.
|
|
2368
|
+
*/
|
|
2369
|
+
export declare function resolveModelProviderForTurn(settings: Settings, modelId: string): ReturnType<typeof resolveModelProvider>;
|
|
1686
2370
|
/**
|
|
1687
2371
|
* Build a trusted, secret-safe execution policy from the normalized catalog.
|
|
1688
2372
|
* The Codex overlay here contains static product/provider identity only; it
|
|
@@ -1705,10 +2389,9 @@ export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Setti
|
|
|
1705
2389
|
};
|
|
1706
2390
|
/**
|
|
1707
2391
|
* Effective per-model pricing schedules. Merge order (later wins): built-in
|
|
1708
|
-
* flat defaults → registry model flat/scheduled pricing → explicit
|
|
1709
|
-
* OPENGENI_MODEL_PRICING_JSON.
|
|
1710
|
-
*
|
|
1711
|
-
* exact.
|
|
2392
|
+
* flat defaults → registry model flat/scheduled pricing → explicit
|
|
2393
|
+
* OPENGENI_MODEL_PRICING_JSON. Explicit entries may be legacy flat prices or a
|
|
2394
|
+
* complete schedule, and always replace the lower-precedence schedule.
|
|
1712
2395
|
*/
|
|
1713
2396
|
export declare function configuredModelPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
|
|
1714
2397
|
/** Legacy flat projection: returns the default/below-threshold price. */
|
|
@@ -1742,6 +2425,8 @@ export declare function calculateModelUsageCostBreakdown(settings: Settings, mod
|
|
|
1742
2425
|
export declare function calculateGatewayReportedCostMicros(settings: Settings, model: string, inferenceCostUsd: string, options?: {
|
|
1743
2426
|
inputTokens?: number;
|
|
1744
2427
|
}): number;
|
|
2428
|
+
/** Exact provider-reported Gateway cost without requiring an OpenGeni price schedule. */
|
|
2429
|
+
export declare function calculateGatewayReportedProviderCostMicros(inferenceCostUsd: string): number;
|
|
1745
2430
|
export declare function calculateGatewayReportedCostBreakdown(settings: Settings, model: string, inferenceCostUsd: string, options?: {
|
|
1746
2431
|
inputTokens?: number;
|
|
1747
2432
|
}): ModelUsageCostBreakdown;
|
|
@@ -1876,7 +2561,7 @@ export declare function sandboxEnvironmentVariableNames(settings: Settings): str
|
|
|
1876
2561
|
export declare function sandboxLifecycleHookIds(settings: Settings): string[];
|
|
1877
2562
|
export declare function parseExposedPorts(raw: string): number[];
|
|
1878
2563
|
export declare function parseMcpServers(raw: string | undefined): unknown[] | undefined;
|
|
1879
|
-
export declare function parseModelPricingJson(raw: string): Record<string, ModelPricing>;
|
|
2564
|
+
export declare function parseModelPricingJson(raw: string): Record<string, ModelPricing | ModelPricingScheduleV1>;
|
|
1880
2565
|
export declare function parseSandboxWarmRateJson(raw: string): Record<string, number>;
|
|
1881
2566
|
export declare function sandboxWarmRateMicrosPerSecond(settings: Settings, backend: string): number;
|
|
1882
2567
|
/**
|
|
@@ -1919,6 +2604,8 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
|
|
|
1919
2604
|
export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
1920
2605
|
export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
1921
2606
|
export declare function codemodeWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
2607
|
+
/** Validate one fully resolved, secret-bearing executable catalog. */
|
|
2608
|
+
export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
|
|
1922
2609
|
/**
|
|
1923
2610
|
* Resolve the secret used to sign/verify scoped stream tokens (sandbox contract
|
|
1924
2611
|
* §C.3). Falls back to `delegationSecret` (the same HMAC envelope family —
|