@opengeni/config 0.22.0 → 0.22.5-canary.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/dist/index.d.ts +657 -12
- package/dist/index.js +862 -113
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1056 -130
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;
|
|
@@ -530,6 +532,15 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
530
532
|
voiceInputAzureAdToken: z.ZodOptional<z.ZodString>;
|
|
531
533
|
voiceInputCodexExperimentalEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
532
534
|
modelPricingJson: z.ZodDefault<z.ZodString>;
|
|
535
|
+
modelCatalogSource: z.ZodDefault<z.ZodEnum<{
|
|
536
|
+
code: "code";
|
|
537
|
+
database: "database";
|
|
538
|
+
}>>;
|
|
539
|
+
modelCostPolicyJson: z.ZodDefault<z.ZodString>;
|
|
540
|
+
modelNotesJson: z.ZodDefault<z.ZodString>;
|
|
541
|
+
openrouterApiKey: z.ZodOptional<z.ZodString>;
|
|
542
|
+
resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
|
|
543
|
+
resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
|
|
533
544
|
modelProvidersJson: z.ZodDefault<z.ZodString>;
|
|
534
545
|
codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
535
546
|
supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
@@ -594,6 +605,8 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
594
605
|
modalImageId: z.ZodOptional<z.ZodString>;
|
|
595
606
|
modalImageRegistrySecret: z.ZodOptional<z.ZodString>;
|
|
596
607
|
modalTimeoutSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
608
|
+
modalSandboxCpu: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
609
|
+
modalSandboxMemoryMiB: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
597
610
|
modalTokenId: z.ZodOptional<z.ZodString>;
|
|
598
611
|
modalTokenSecret: z.ZodOptional<z.ZodString>;
|
|
599
612
|
modalEnvironment: z.ZodOptional<z.ZodString>;
|
|
@@ -608,8 +621,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
608
621
|
sandboxTerminalEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
609
622
|
streamResolutionWidth: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
610
623
|
streamResolutionHeight: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
611
|
-
computerUseEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
612
|
-
computerUseReadOnly: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
613
624
|
recordingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
614
625
|
recordingDefaultCodec: z.ZodDefault<z.ZodEnum<{
|
|
615
626
|
"h264-mp4": "h264-mp4";
|
|
@@ -778,6 +789,10 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
778
789
|
betterAuthAllowedHosts: z.ZodDefault<z.ZodString>;
|
|
779
790
|
betterAuthCookieDomain: z.ZodOptional<z.ZodString>;
|
|
780
791
|
betterAuthTrustedOrigins: z.ZodDefault<z.ZodString>;
|
|
792
|
+
managedAuthGoogleClientId: z.ZodOptional<z.ZodString>;
|
|
793
|
+
managedAuthGoogleClientSecret: z.ZodOptional<z.ZodString>;
|
|
794
|
+
managedAuthGithubClientId: z.ZodOptional<z.ZodString>;
|
|
795
|
+
managedAuthGithubClientSecret: z.ZodOptional<z.ZodString>;
|
|
781
796
|
managedAuthSessionSetMode: z.ZodDefault<z.ZodEnum<{
|
|
782
797
|
broker: "broker";
|
|
783
798
|
dual: "dual";
|
|
@@ -1145,6 +1160,7 @@ export declare const RegistryProviderKind: z.ZodEnum<{
|
|
|
1145
1160
|
anonymous: "anonymous";
|
|
1146
1161
|
"api-key": "api-key";
|
|
1147
1162
|
"codex-subscription": "codex-subscription";
|
|
1163
|
+
"openrouter-workspace": "openrouter-workspace";
|
|
1148
1164
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1149
1165
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
1150
1166
|
"xai-subscription": "xai-subscription";
|
|
@@ -1156,6 +1172,7 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1156
1172
|
anonymous: "anonymous";
|
|
1157
1173
|
"api-key": "api-key";
|
|
1158
1174
|
"codex-subscription": "codex-subscription";
|
|
1175
|
+
"openrouter-workspace": "openrouter-workspace";
|
|
1159
1176
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1160
1177
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
1161
1178
|
"xai-subscription": "xai-subscription";
|
|
@@ -1361,6 +1378,600 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1361
1378
|
}, z.core.$strip>>;
|
|
1362
1379
|
}, z.core.$strip>;
|
|
1363
1380
|
export type RegistryProvider = z.infer<typeof RegistryProviderSchema>;
|
|
1381
|
+
export declare const OPENGENI_GATEWAY_PROVIDER_ID: "opengeni-gateway";
|
|
1382
|
+
export declare const WORKSPACE_GATEWAY_PROVIDER_ID: "workspace-gateway";
|
|
1383
|
+
export declare const WORKSPACE_GATEWAY_MODEL_ID_PREFIX: "workspace-gateway/";
|
|
1384
|
+
export declare const OPENROUTER_PROVIDER_ID: "openrouter";
|
|
1385
|
+
export declare const OPENROUTER_MODEL_ID_PREFIX: "openrouter/";
|
|
1386
|
+
export declare const WORKSPACE_OPENROUTER_PROVIDER_ID: "workspace-openrouter";
|
|
1387
|
+
export declare const WORKSPACE_OPENROUTER_MODEL_ID_PREFIX: "workspace-openrouter/";
|
|
1388
|
+
export declare const OPENROUTER_BASE_URL: "https://openrouter.ai/api/v1";
|
|
1389
|
+
export declare const ModelCostClass: z.ZodEnum<{
|
|
1390
|
+
credits: "credits";
|
|
1391
|
+
free: "free";
|
|
1392
|
+
}>;
|
|
1393
|
+
export type ModelCostClass = z.infer<typeof ModelCostClass>;
|
|
1394
|
+
export declare const ConfiguredModelCostClass: z.ZodEnum<{
|
|
1395
|
+
credits: "credits";
|
|
1396
|
+
free: "free";
|
|
1397
|
+
subscription: "subscription";
|
|
1398
|
+
workspace: "workspace";
|
|
1399
|
+
}>;
|
|
1400
|
+
export type ConfiguredModelCostClass = z.infer<typeof ConfiguredModelCostClass>;
|
|
1401
|
+
export declare function parseModelCostPolicyJson(raw: string): Record<string, ModelCostClass>;
|
|
1402
|
+
export declare function parseModelNotesJson(raw: string): Record<string, string>;
|
|
1403
|
+
export declare function configuredModelNotes(settings: Pick<Settings, "modelNotesJson">): Record<string, string>;
|
|
1404
|
+
export declare const GatewayCatalogModel: z.ZodObject<{
|
|
1405
|
+
productId: z.ZodString;
|
|
1406
|
+
workspaceProductId: z.ZodString;
|
|
1407
|
+
upstreamModelId: z.ZodString;
|
|
1408
|
+
label: z.ZodString;
|
|
1409
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1410
|
+
providers: z.ZodArray<z.ZodString>;
|
|
1411
|
+
implicitCaching: z.ZodDefault<z.ZodBoolean>;
|
|
1412
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
1413
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1414
|
+
contextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1415
|
+
effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1416
|
+
autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
|
|
1417
|
+
pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1418
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1419
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1420
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1421
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1422
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1423
|
+
default: z.ZodObject<{
|
|
1424
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1425
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1426
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1427
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1428
|
+
}, z.core.$strip>;
|
|
1429
|
+
inputTokenTiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1430
|
+
minimumInputTokens: z.ZodNumber;
|
|
1431
|
+
pricing: z.ZodObject<{
|
|
1432
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1433
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1434
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1435
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1436
|
+
}, z.core.$strip>;
|
|
1437
|
+
}, z.core.$strip>>>;
|
|
1438
|
+
}, z.core.$strip>]>>;
|
|
1439
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1440
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1441
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1442
|
+
}, z.core.$strict>;
|
|
1443
|
+
export type GatewayCatalogModel = z.infer<typeof GatewayCatalogModel>;
|
|
1444
|
+
export declare const OpenRouterCatalogModel: z.ZodObject<{
|
|
1445
|
+
upstreamModelId: z.ZodString;
|
|
1446
|
+
label: z.ZodString;
|
|
1447
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1448
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1449
|
+
capabilities: z.ZodObject<{
|
|
1450
|
+
reasoning: z.ZodObject<{
|
|
1451
|
+
upstream: z.ZodEnum<{
|
|
1452
|
+
supported: "supported";
|
|
1453
|
+
unknown: "unknown";
|
|
1454
|
+
unsupported: "unsupported";
|
|
1455
|
+
}>;
|
|
1456
|
+
runnable: z.ZodBoolean;
|
|
1457
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1458
|
+
high: "high";
|
|
1459
|
+
low: "low";
|
|
1460
|
+
max: "max";
|
|
1461
|
+
medium: "medium";
|
|
1462
|
+
minimal: "minimal";
|
|
1463
|
+
none: "none";
|
|
1464
|
+
xhigh: "xhigh";
|
|
1465
|
+
}>>;
|
|
1466
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1467
|
+
high: "high";
|
|
1468
|
+
low: "low";
|
|
1469
|
+
max: "max";
|
|
1470
|
+
medium: "medium";
|
|
1471
|
+
minimal: "minimal";
|
|
1472
|
+
none: "none";
|
|
1473
|
+
xhigh: "xhigh";
|
|
1474
|
+
}>>;
|
|
1475
|
+
required: z.ZodBoolean;
|
|
1476
|
+
}, z.core.$strip>;
|
|
1477
|
+
functionCalling: z.ZodObject<{
|
|
1478
|
+
upstream: z.ZodEnum<{
|
|
1479
|
+
supported: "supported";
|
|
1480
|
+
unknown: "unknown";
|
|
1481
|
+
unsupported: "unsupported";
|
|
1482
|
+
}>;
|
|
1483
|
+
runnable: z.ZodBoolean;
|
|
1484
|
+
}, z.core.$strip>;
|
|
1485
|
+
structuredOutput: z.ZodObject<{
|
|
1486
|
+
upstream: z.ZodEnum<{
|
|
1487
|
+
supported: "supported";
|
|
1488
|
+
unknown: "unknown";
|
|
1489
|
+
unsupported: "unsupported";
|
|
1490
|
+
}>;
|
|
1491
|
+
runnable: z.ZodBoolean;
|
|
1492
|
+
}, z.core.$strip>;
|
|
1493
|
+
hostedTools: z.ZodObject<{
|
|
1494
|
+
webSearch: z.ZodObject<{
|
|
1495
|
+
upstream: z.ZodEnum<{
|
|
1496
|
+
supported: "supported";
|
|
1497
|
+
unknown: "unknown";
|
|
1498
|
+
unsupported: "unsupported";
|
|
1499
|
+
}>;
|
|
1500
|
+
runnable: z.ZodBoolean;
|
|
1501
|
+
}, z.core.$strip>;
|
|
1502
|
+
xSearch: z.ZodObject<{
|
|
1503
|
+
upstream: z.ZodEnum<{
|
|
1504
|
+
supported: "supported";
|
|
1505
|
+
unknown: "unknown";
|
|
1506
|
+
unsupported: "unsupported";
|
|
1507
|
+
}>;
|
|
1508
|
+
runnable: z.ZodBoolean;
|
|
1509
|
+
}, z.core.$strip>;
|
|
1510
|
+
codeExecution: z.ZodObject<{
|
|
1511
|
+
upstream: z.ZodEnum<{
|
|
1512
|
+
supported: "supported";
|
|
1513
|
+
unknown: "unknown";
|
|
1514
|
+
unsupported: "unsupported";
|
|
1515
|
+
}>;
|
|
1516
|
+
runnable: z.ZodBoolean;
|
|
1517
|
+
}, z.core.$strip>;
|
|
1518
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
1519
|
+
upstream: z.ZodEnum<{
|
|
1520
|
+
supported: "supported";
|
|
1521
|
+
unknown: "unknown";
|
|
1522
|
+
unsupported: "unsupported";
|
|
1523
|
+
}>;
|
|
1524
|
+
runnable: z.ZodBoolean;
|
|
1525
|
+
}, z.core.$strip>>;
|
|
1526
|
+
}, z.core.$strip>;
|
|
1527
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1528
|
+
audio: "audio";
|
|
1529
|
+
image: "image";
|
|
1530
|
+
text: "text";
|
|
1531
|
+
}>>;
|
|
1532
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1533
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1534
|
+
audio: "audio";
|
|
1535
|
+
image: "image";
|
|
1536
|
+
text: "text";
|
|
1537
|
+
}>>;
|
|
1538
|
+
transports: z.ZodObject<{
|
|
1539
|
+
sse: z.ZodObject<{
|
|
1540
|
+
upstream: z.ZodEnum<{
|
|
1541
|
+
supported: "supported";
|
|
1542
|
+
unknown: "unknown";
|
|
1543
|
+
unsupported: "unsupported";
|
|
1544
|
+
}>;
|
|
1545
|
+
runnable: z.ZodBoolean;
|
|
1546
|
+
}, z.core.$strip>;
|
|
1547
|
+
responsesWebSocket: z.ZodObject<{
|
|
1548
|
+
upstream: z.ZodEnum<{
|
|
1549
|
+
supported: "supported";
|
|
1550
|
+
unknown: "unknown";
|
|
1551
|
+
unsupported: "unsupported";
|
|
1552
|
+
}>;
|
|
1553
|
+
runnable: z.ZodBoolean;
|
|
1554
|
+
}, z.core.$strip>;
|
|
1555
|
+
realtimeAudio: z.ZodObject<{
|
|
1556
|
+
upstream: z.ZodEnum<{
|
|
1557
|
+
supported: "supported";
|
|
1558
|
+
unknown: "unknown";
|
|
1559
|
+
unsupported: "unsupported";
|
|
1560
|
+
}>;
|
|
1561
|
+
runnable: z.ZodBoolean;
|
|
1562
|
+
}, z.core.$strip>;
|
|
1563
|
+
}, z.core.$strip>;
|
|
1564
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1565
|
+
upstream: z.ZodEnum<{
|
|
1566
|
+
supported: "supported";
|
|
1567
|
+
unknown: "unknown";
|
|
1568
|
+
unsupported: "unsupported";
|
|
1569
|
+
}>;
|
|
1570
|
+
runnable: z.ZodBoolean;
|
|
1571
|
+
mode: z.ZodEnum<{
|
|
1572
|
+
automatic: "automatic";
|
|
1573
|
+
implicit: "implicit";
|
|
1574
|
+
none: "none";
|
|
1575
|
+
}>;
|
|
1576
|
+
}, z.core.$strip>>;
|
|
1577
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1578
|
+
id: z.ZodEnum<{
|
|
1579
|
+
fast: "fast";
|
|
1580
|
+
priority: "priority";
|
|
1581
|
+
standard: "standard";
|
|
1582
|
+
}>;
|
|
1583
|
+
upstream: z.ZodEnum<{
|
|
1584
|
+
supported: "supported";
|
|
1585
|
+
unknown: "unknown";
|
|
1586
|
+
unsupported: "unsupported";
|
|
1587
|
+
}>;
|
|
1588
|
+
runnable: z.ZodBoolean;
|
|
1589
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1590
|
+
}, z.core.$strip>>;
|
|
1591
|
+
}, z.core.$strip>;
|
|
1592
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1593
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1594
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1595
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1596
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1597
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1598
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1599
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1600
|
+
}, z.core.$strict>;
|
|
1601
|
+
export type OpenRouterCatalogModel = z.infer<typeof OpenRouterCatalogModel>;
|
|
1602
|
+
export declare const ModelCatalogDocument: z.ZodObject<{
|
|
1603
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
1604
|
+
defaultModel: z.ZodOptional<z.ZodString>;
|
|
1605
|
+
builtInModels: z.ZodArray<z.ZodString>;
|
|
1606
|
+
registryProviders: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1607
|
+
id: z.ZodString;
|
|
1608
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1609
|
+
api: z.ZodDefault<z.ZodEnum<{
|
|
1610
|
+
chat: "chat";
|
|
1611
|
+
responses: "responses";
|
|
1612
|
+
}>>;
|
|
1613
|
+
wireProfile: z.ZodDefault<z.ZodEnum<{
|
|
1614
|
+
"azure-openai": "azure-openai";
|
|
1615
|
+
openai: "openai";
|
|
1616
|
+
}>>;
|
|
1617
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1618
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1619
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
1620
|
+
anonymous: "anonymous";
|
|
1621
|
+
"api-key": "api-key";
|
|
1622
|
+
}>>;
|
|
1623
|
+
baseUrl: z.ZodString;
|
|
1624
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1625
|
+
id: z.ZodString;
|
|
1626
|
+
upstreamModelId: z.ZodOptional<z.ZodString>;
|
|
1627
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1628
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1629
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1630
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1631
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1632
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1633
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1634
|
+
reasoningEffort: z.ZodOptional<z.ZodBoolean>;
|
|
1635
|
+
hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
|
|
1636
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
1637
|
+
reasoning: z.ZodObject<{
|
|
1638
|
+
upstream: z.ZodEnum<{
|
|
1639
|
+
supported: "supported";
|
|
1640
|
+
unknown: "unknown";
|
|
1641
|
+
unsupported: "unsupported";
|
|
1642
|
+
}>;
|
|
1643
|
+
runnable: z.ZodBoolean;
|
|
1644
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1645
|
+
high: "high";
|
|
1646
|
+
low: "low";
|
|
1647
|
+
max: "max";
|
|
1648
|
+
medium: "medium";
|
|
1649
|
+
minimal: "minimal";
|
|
1650
|
+
none: "none";
|
|
1651
|
+
xhigh: "xhigh";
|
|
1652
|
+
}>>;
|
|
1653
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1654
|
+
high: "high";
|
|
1655
|
+
low: "low";
|
|
1656
|
+
max: "max";
|
|
1657
|
+
medium: "medium";
|
|
1658
|
+
minimal: "minimal";
|
|
1659
|
+
none: "none";
|
|
1660
|
+
xhigh: "xhigh";
|
|
1661
|
+
}>>;
|
|
1662
|
+
required: z.ZodBoolean;
|
|
1663
|
+
}, z.core.$strip>;
|
|
1664
|
+
functionCalling: z.ZodObject<{
|
|
1665
|
+
upstream: z.ZodEnum<{
|
|
1666
|
+
supported: "supported";
|
|
1667
|
+
unknown: "unknown";
|
|
1668
|
+
unsupported: "unsupported";
|
|
1669
|
+
}>;
|
|
1670
|
+
runnable: z.ZodBoolean;
|
|
1671
|
+
}, z.core.$strip>;
|
|
1672
|
+
structuredOutput: z.ZodObject<{
|
|
1673
|
+
upstream: z.ZodEnum<{
|
|
1674
|
+
supported: "supported";
|
|
1675
|
+
unknown: "unknown";
|
|
1676
|
+
unsupported: "unsupported";
|
|
1677
|
+
}>;
|
|
1678
|
+
runnable: z.ZodBoolean;
|
|
1679
|
+
}, z.core.$strip>;
|
|
1680
|
+
hostedTools: z.ZodObject<{
|
|
1681
|
+
webSearch: z.ZodObject<{
|
|
1682
|
+
upstream: z.ZodEnum<{
|
|
1683
|
+
supported: "supported";
|
|
1684
|
+
unknown: "unknown";
|
|
1685
|
+
unsupported: "unsupported";
|
|
1686
|
+
}>;
|
|
1687
|
+
runnable: z.ZodBoolean;
|
|
1688
|
+
}, z.core.$strip>;
|
|
1689
|
+
xSearch: z.ZodObject<{
|
|
1690
|
+
upstream: z.ZodEnum<{
|
|
1691
|
+
supported: "supported";
|
|
1692
|
+
unknown: "unknown";
|
|
1693
|
+
unsupported: "unsupported";
|
|
1694
|
+
}>;
|
|
1695
|
+
runnable: z.ZodBoolean;
|
|
1696
|
+
}, z.core.$strip>;
|
|
1697
|
+
codeExecution: z.ZodObject<{
|
|
1698
|
+
upstream: z.ZodEnum<{
|
|
1699
|
+
supported: "supported";
|
|
1700
|
+
unknown: "unknown";
|
|
1701
|
+
unsupported: "unsupported";
|
|
1702
|
+
}>;
|
|
1703
|
+
runnable: z.ZodBoolean;
|
|
1704
|
+
}, z.core.$strip>;
|
|
1705
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
1706
|
+
upstream: z.ZodEnum<{
|
|
1707
|
+
supported: "supported";
|
|
1708
|
+
unknown: "unknown";
|
|
1709
|
+
unsupported: "unsupported";
|
|
1710
|
+
}>;
|
|
1711
|
+
runnable: z.ZodBoolean;
|
|
1712
|
+
}, z.core.$strip>>;
|
|
1713
|
+
}, z.core.$strip>;
|
|
1714
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1715
|
+
audio: "audio";
|
|
1716
|
+
image: "image";
|
|
1717
|
+
text: "text";
|
|
1718
|
+
}>>;
|
|
1719
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1720
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1721
|
+
audio: "audio";
|
|
1722
|
+
image: "image";
|
|
1723
|
+
text: "text";
|
|
1724
|
+
}>>;
|
|
1725
|
+
transports: z.ZodObject<{
|
|
1726
|
+
sse: z.ZodObject<{
|
|
1727
|
+
upstream: z.ZodEnum<{
|
|
1728
|
+
supported: "supported";
|
|
1729
|
+
unknown: "unknown";
|
|
1730
|
+
unsupported: "unsupported";
|
|
1731
|
+
}>;
|
|
1732
|
+
runnable: z.ZodBoolean;
|
|
1733
|
+
}, z.core.$strip>;
|
|
1734
|
+
responsesWebSocket: z.ZodObject<{
|
|
1735
|
+
upstream: z.ZodEnum<{
|
|
1736
|
+
supported: "supported";
|
|
1737
|
+
unknown: "unknown";
|
|
1738
|
+
unsupported: "unsupported";
|
|
1739
|
+
}>;
|
|
1740
|
+
runnable: z.ZodBoolean;
|
|
1741
|
+
}, z.core.$strip>;
|
|
1742
|
+
realtimeAudio: z.ZodObject<{
|
|
1743
|
+
upstream: z.ZodEnum<{
|
|
1744
|
+
supported: "supported";
|
|
1745
|
+
unknown: "unknown";
|
|
1746
|
+
unsupported: "unsupported";
|
|
1747
|
+
}>;
|
|
1748
|
+
runnable: z.ZodBoolean;
|
|
1749
|
+
}, z.core.$strip>;
|
|
1750
|
+
}, z.core.$strip>;
|
|
1751
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1752
|
+
upstream: z.ZodEnum<{
|
|
1753
|
+
supported: "supported";
|
|
1754
|
+
unknown: "unknown";
|
|
1755
|
+
unsupported: "unsupported";
|
|
1756
|
+
}>;
|
|
1757
|
+
runnable: z.ZodBoolean;
|
|
1758
|
+
mode: z.ZodEnum<{
|
|
1759
|
+
automatic: "automatic";
|
|
1760
|
+
implicit: "implicit";
|
|
1761
|
+
none: "none";
|
|
1762
|
+
}>;
|
|
1763
|
+
}, z.core.$strip>>;
|
|
1764
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1765
|
+
id: z.ZodEnum<{
|
|
1766
|
+
fast: "fast";
|
|
1767
|
+
priority: "priority";
|
|
1768
|
+
standard: "standard";
|
|
1769
|
+
}>;
|
|
1770
|
+
upstream: z.ZodEnum<{
|
|
1771
|
+
supported: "supported";
|
|
1772
|
+
unknown: "unknown";
|
|
1773
|
+
unsupported: "unsupported";
|
|
1774
|
+
}>;
|
|
1775
|
+
runnable: z.ZodBoolean;
|
|
1776
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1777
|
+
}, z.core.$strip>>;
|
|
1778
|
+
}, z.core.$strip>>;
|
|
1779
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1780
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1781
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1782
|
+
}, z.core.$strict>>;
|
|
1783
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1784
|
+
apiKeyEnv: z.ZodOptional<z.ZodNever>;
|
|
1785
|
+
defaultHeaders: z.ZodOptional<z.ZodNever>;
|
|
1786
|
+
defaultQuery: z.ZodOptional<z.ZodNever>;
|
|
1787
|
+
publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
|
|
1788
|
+
publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
|
|
1789
|
+
}, z.core.$strict>>>;
|
|
1790
|
+
gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1791
|
+
productId: z.ZodString;
|
|
1792
|
+
workspaceProductId: z.ZodString;
|
|
1793
|
+
upstreamModelId: z.ZodString;
|
|
1794
|
+
label: z.ZodString;
|
|
1795
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1796
|
+
providers: z.ZodArray<z.ZodString>;
|
|
1797
|
+
implicitCaching: z.ZodDefault<z.ZodBoolean>;
|
|
1798
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
1799
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1800
|
+
contextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1801
|
+
effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1802
|
+
autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
|
|
1803
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1804
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1805
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1806
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1807
|
+
}, z.core.$strict>>>;
|
|
1808
|
+
openrouterModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1809
|
+
upstreamModelId: z.ZodString;
|
|
1810
|
+
label: z.ZodString;
|
|
1811
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1812
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1813
|
+
capabilities: z.ZodObject<{
|
|
1814
|
+
reasoning: z.ZodObject<{
|
|
1815
|
+
upstream: z.ZodEnum<{
|
|
1816
|
+
supported: "supported";
|
|
1817
|
+
unknown: "unknown";
|
|
1818
|
+
unsupported: "unsupported";
|
|
1819
|
+
}>;
|
|
1820
|
+
runnable: z.ZodBoolean;
|
|
1821
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1822
|
+
high: "high";
|
|
1823
|
+
low: "low";
|
|
1824
|
+
max: "max";
|
|
1825
|
+
medium: "medium";
|
|
1826
|
+
minimal: "minimal";
|
|
1827
|
+
none: "none";
|
|
1828
|
+
xhigh: "xhigh";
|
|
1829
|
+
}>>;
|
|
1830
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1831
|
+
high: "high";
|
|
1832
|
+
low: "low";
|
|
1833
|
+
max: "max";
|
|
1834
|
+
medium: "medium";
|
|
1835
|
+
minimal: "minimal";
|
|
1836
|
+
none: "none";
|
|
1837
|
+
xhigh: "xhigh";
|
|
1838
|
+
}>>;
|
|
1839
|
+
required: z.ZodBoolean;
|
|
1840
|
+
}, z.core.$strip>;
|
|
1841
|
+
functionCalling: z.ZodObject<{
|
|
1842
|
+
upstream: z.ZodEnum<{
|
|
1843
|
+
supported: "supported";
|
|
1844
|
+
unknown: "unknown";
|
|
1845
|
+
unsupported: "unsupported";
|
|
1846
|
+
}>;
|
|
1847
|
+
runnable: z.ZodBoolean;
|
|
1848
|
+
}, z.core.$strip>;
|
|
1849
|
+
structuredOutput: z.ZodObject<{
|
|
1850
|
+
upstream: z.ZodEnum<{
|
|
1851
|
+
supported: "supported";
|
|
1852
|
+
unknown: "unknown";
|
|
1853
|
+
unsupported: "unsupported";
|
|
1854
|
+
}>;
|
|
1855
|
+
runnable: z.ZodBoolean;
|
|
1856
|
+
}, z.core.$strip>;
|
|
1857
|
+
hostedTools: z.ZodObject<{
|
|
1858
|
+
webSearch: z.ZodObject<{
|
|
1859
|
+
upstream: z.ZodEnum<{
|
|
1860
|
+
supported: "supported";
|
|
1861
|
+
unknown: "unknown";
|
|
1862
|
+
unsupported: "unsupported";
|
|
1863
|
+
}>;
|
|
1864
|
+
runnable: z.ZodBoolean;
|
|
1865
|
+
}, z.core.$strip>;
|
|
1866
|
+
xSearch: z.ZodObject<{
|
|
1867
|
+
upstream: z.ZodEnum<{
|
|
1868
|
+
supported: "supported";
|
|
1869
|
+
unknown: "unknown";
|
|
1870
|
+
unsupported: "unsupported";
|
|
1871
|
+
}>;
|
|
1872
|
+
runnable: z.ZodBoolean;
|
|
1873
|
+
}, z.core.$strip>;
|
|
1874
|
+
codeExecution: z.ZodObject<{
|
|
1875
|
+
upstream: z.ZodEnum<{
|
|
1876
|
+
supported: "supported";
|
|
1877
|
+
unknown: "unknown";
|
|
1878
|
+
unsupported: "unsupported";
|
|
1879
|
+
}>;
|
|
1880
|
+
runnable: z.ZodBoolean;
|
|
1881
|
+
}, z.core.$strip>;
|
|
1882
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
1883
|
+
upstream: z.ZodEnum<{
|
|
1884
|
+
supported: "supported";
|
|
1885
|
+
unknown: "unknown";
|
|
1886
|
+
unsupported: "unsupported";
|
|
1887
|
+
}>;
|
|
1888
|
+
runnable: z.ZodBoolean;
|
|
1889
|
+
}, z.core.$strip>>;
|
|
1890
|
+
}, z.core.$strip>;
|
|
1891
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1892
|
+
audio: "audio";
|
|
1893
|
+
image: "image";
|
|
1894
|
+
text: "text";
|
|
1895
|
+
}>>;
|
|
1896
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1897
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1898
|
+
audio: "audio";
|
|
1899
|
+
image: "image";
|
|
1900
|
+
text: "text";
|
|
1901
|
+
}>>;
|
|
1902
|
+
transports: z.ZodObject<{
|
|
1903
|
+
sse: z.ZodObject<{
|
|
1904
|
+
upstream: z.ZodEnum<{
|
|
1905
|
+
supported: "supported";
|
|
1906
|
+
unknown: "unknown";
|
|
1907
|
+
unsupported: "unsupported";
|
|
1908
|
+
}>;
|
|
1909
|
+
runnable: z.ZodBoolean;
|
|
1910
|
+
}, z.core.$strip>;
|
|
1911
|
+
responsesWebSocket: z.ZodObject<{
|
|
1912
|
+
upstream: z.ZodEnum<{
|
|
1913
|
+
supported: "supported";
|
|
1914
|
+
unknown: "unknown";
|
|
1915
|
+
unsupported: "unsupported";
|
|
1916
|
+
}>;
|
|
1917
|
+
runnable: z.ZodBoolean;
|
|
1918
|
+
}, z.core.$strip>;
|
|
1919
|
+
realtimeAudio: z.ZodObject<{
|
|
1920
|
+
upstream: z.ZodEnum<{
|
|
1921
|
+
supported: "supported";
|
|
1922
|
+
unknown: "unknown";
|
|
1923
|
+
unsupported: "unsupported";
|
|
1924
|
+
}>;
|
|
1925
|
+
runnable: z.ZodBoolean;
|
|
1926
|
+
}, z.core.$strip>;
|
|
1927
|
+
}, z.core.$strip>;
|
|
1928
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1929
|
+
upstream: z.ZodEnum<{
|
|
1930
|
+
supported: "supported";
|
|
1931
|
+
unknown: "unknown";
|
|
1932
|
+
unsupported: "unsupported";
|
|
1933
|
+
}>;
|
|
1934
|
+
runnable: z.ZodBoolean;
|
|
1935
|
+
mode: z.ZodEnum<{
|
|
1936
|
+
automatic: "automatic";
|
|
1937
|
+
implicit: "implicit";
|
|
1938
|
+
none: "none";
|
|
1939
|
+
}>;
|
|
1940
|
+
}, z.core.$strip>>;
|
|
1941
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1942
|
+
id: z.ZodEnum<{
|
|
1943
|
+
fast: "fast";
|
|
1944
|
+
priority: "priority";
|
|
1945
|
+
standard: "standard";
|
|
1946
|
+
}>;
|
|
1947
|
+
upstream: z.ZodEnum<{
|
|
1948
|
+
supported: "supported";
|
|
1949
|
+
unknown: "unknown";
|
|
1950
|
+
unsupported: "unsupported";
|
|
1951
|
+
}>;
|
|
1952
|
+
runnable: z.ZodBoolean;
|
|
1953
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1954
|
+
}, z.core.$strip>>;
|
|
1955
|
+
}, z.core.$strip>;
|
|
1956
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1957
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1958
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1959
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1960
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1961
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1962
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1963
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1964
|
+
}, z.core.$strict>>>;
|
|
1965
|
+
modelNotes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1966
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1967
|
+
enabled: z.ZodOptional<z.ZodNever>;
|
|
1968
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1969
|
+
bands: z.ZodOptional<z.ZodNever>;
|
|
1970
|
+
}, z.core.$strict>;
|
|
1971
|
+
export type ModelCatalogDocument = z.infer<typeof ModelCatalogDocument>;
|
|
1972
|
+
export declare function parseModelCatalogDocument(value: unknown): ModelCatalogDocument;
|
|
1973
|
+
/** Pure secret-free database catalog overlay. getSettings remains env-only. */
|
|
1974
|
+
export declare function applyModelCatalogDocument(settings: Settings, rawDocument: unknown): Settings;
|
|
1364
1975
|
export declare const IntegrationOAuthClientConfigSchema: z.ZodObject<{
|
|
1365
1976
|
clientId: z.ZodString;
|
|
1366
1977
|
clientSecret: z.ZodOptional<z.ZodString>;
|
|
@@ -1381,7 +1992,7 @@ export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClient
|
|
|
1381
1992
|
export interface ResolvedModelProvider {
|
|
1382
1993
|
id: string;
|
|
1383
1994
|
label: string;
|
|
1384
|
-
kind: RegistryProviderKind;
|
|
1995
|
+
kind: RegistryProviderKind | "openrouter-managed";
|
|
1385
1996
|
api: ModelProviderApi;
|
|
1386
1997
|
wireProfile: ModelProviderWireProfile;
|
|
1387
1998
|
builtin: boolean;
|
|
@@ -1410,6 +2021,8 @@ export interface ConfiguredModel {
|
|
|
1410
2021
|
executionLimits: ModelExecutionLimitsV1;
|
|
1411
2022
|
credentialSource: CredentialSourceV1;
|
|
1412
2023
|
billing: BillingAttributionV1;
|
|
2024
|
+
/** Workspace-facing funding policy, independent of upstream settlement. */
|
|
2025
|
+
cost: ConfiguredModelCostClass;
|
|
1413
2026
|
capabilities: ModelCapabilitiesV1;
|
|
1414
2027
|
requestPolicy?: {
|
|
1415
2028
|
gateway: {
|
|
@@ -1428,11 +2041,10 @@ export interface ConfiguredModel {
|
|
|
1428
2041
|
}
|
|
1429
2042
|
export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
|
|
1430
2043
|
export declare const VERCEL_AI_GATEWAY_AI_SDK_BASE_URL: "https://ai-gateway.vercel.sh/v4/ai";
|
|
1431
|
-
export declare const OPENGENI_GATEWAY_PROVIDER_ID: "opengeni-gateway";
|
|
1432
|
-
export declare const WORKSPACE_GATEWAY_PROVIDER_ID: "workspace-gateway";
|
|
1433
|
-
export declare const WORKSPACE_GATEWAY_MODEL_ID_PREFIX: "workspace-gateway/";
|
|
1434
2044
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
|
|
1435
2045
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_ROLE: "vercel_ai_gateway";
|
|
2046
|
+
export declare const WORKSPACE_OPENROUTER_CONNECTION_DOMAIN: "openrouter.ai";
|
|
2047
|
+
export declare const WORKSPACE_OPENROUTER_CONNECTION_ROLE: "openrouter";
|
|
1436
2048
|
export declare const CODEX_REALTIME_MODEL_ID: "gpt-live-1-boulder-alpha";
|
|
1437
2049
|
export declare const SUPERGROK_REALTIME_MODEL_ID: "supergrok/grok-voice-think-fast-2.0";
|
|
1438
2050
|
export declare const OPENGENI_REALTIME_MODEL_ID_PREFIX: "opengeni-gateway/";
|
|
@@ -1486,6 +2098,12 @@ export declare const OPENGENI_GATEWAY_MODELS: {
|
|
|
1486
2098
|
readonly implicitCaching: true;
|
|
1487
2099
|
};
|
|
1488
2100
|
};
|
|
2101
|
+
export declare const OPENGENI_OPENROUTER_MODELS: readonly OpenRouterCatalogModel[];
|
|
2102
|
+
export declare function configuredGatewayUpstreamModelIds(settings: Settings): string[];
|
|
2103
|
+
export declare function configuredGatewayWorkspaceProductModelIds(settings: Settings): string[];
|
|
2104
|
+
export declare function configuredModelInputIdentities(settings: Settings): string[];
|
|
2105
|
+
export declare function configuredOpenRouterUpstreamModelIds(settings: Settings): string[];
|
|
2106
|
+
export declare function configuredOpenRouterWorkspaceProductModelIds(settings: Settings): string[];
|
|
1489
2107
|
/**
|
|
1490
2108
|
* Built-in OpenGeni credit pricing schedules.
|
|
1491
2109
|
*
|
|
@@ -1509,7 +2127,7 @@ export type SandboxRequiredEnv = {
|
|
|
1509
2127
|
export declare const SANDBOX_REQUIRED_ENV: Record<z.infer<typeof SandboxBackend>, readonly SandboxRequiredEnv[]>;
|
|
1510
2128
|
/** The required OPENGENI_* env var names for a backend (for the deployment manifest). */
|
|
1511
2129
|
export declare function requiredSandboxEnvForBackend(backend: z.infer<typeof SandboxBackend>): string[];
|
|
1512
|
-
export declare function getSettings(): Settings;
|
|
2130
|
+
export declare function getSettings(source?: NodeJS.ProcessEnv): Settings;
|
|
1513
2131
|
/**
|
|
1514
2132
|
* First-party session tools need a shared HMAC identity even in the unauthenticated
|
|
1515
2133
|
* local product mode. A fixed local-only value is no broader than that mode's
|
|
@@ -1567,11 +2185,27 @@ export declare function collectSandboxEnvironment(settings: Settings, source?: N
|
|
|
1567
2185
|
* explicit environment in tests.
|
|
1568
2186
|
*/
|
|
1569
2187
|
export declare function resolveProviderApiKey(provider: Pick<RegistryProvider, "apiKey" | "apiKeyEnv">, source?: NodeJS.ProcessEnv): string | undefined;
|
|
1570
|
-
export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string): ConfiguredModel["requestPolicy"];
|
|
2188
|
+
export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string, models?: readonly GatewayCatalogModel[]): ConfiguredModel["requestPolicy"];
|
|
1571
2189
|
/** Static catalog overlay; it contains no concrete workspace credential. */
|
|
1572
|
-
export declare function withWorkspaceGatewayCatalogProvider(settings: Settings
|
|
2190
|
+
export declare function withWorkspaceGatewayCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2191
|
+
upstreamModelId: string;
|
|
2192
|
+
label?: string | null;
|
|
2193
|
+
}[]): Settings;
|
|
1573
2194
|
/** Runtime overlay after the worker resolves the workspace's encrypted key. */
|
|
1574
|
-
export declare function withWorkspaceGatewayCredential(settings: Settings, apiKey: string
|
|
2195
|
+
export declare function withWorkspaceGatewayCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2196
|
+
upstreamModelId: string;
|
|
2197
|
+
label?: string | null;
|
|
2198
|
+
}[]): Settings;
|
|
2199
|
+
/** Static OpenRouter catalog overlay; it contains no concrete workspace credential. */
|
|
2200
|
+
export declare function withWorkspaceOpenRouterCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2201
|
+
upstreamModelId: string;
|
|
2202
|
+
label?: string | null;
|
|
2203
|
+
}[]): Settings;
|
|
2204
|
+
/** Runtime overlay after the worker resolves the workspace's encrypted OpenRouter key. */
|
|
2205
|
+
export declare function withWorkspaceOpenRouterCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2206
|
+
upstreamModelId: string;
|
|
2207
|
+
label?: string | null;
|
|
2208
|
+
}[]): Settings;
|
|
1575
2209
|
/**
|
|
1576
2210
|
* Product display label for catalog/picker UI.
|
|
1577
2211
|
* Same string for OpenAI and Codex copies of a slug (`gpt-5.6-luna` and
|
|
@@ -1595,6 +2229,7 @@ export declare function serviceTierForLatencyMode(providerId: string, latencyMod
|
|
|
1595
2229
|
/** True when the response tier fulfills a non-standard Fast/priority request. */
|
|
1596
2230
|
export declare function responseSatisfiesLatencyMode(requested: LatencyMode, responseServiceTier: string | null | undefined): boolean;
|
|
1597
2231
|
export declare function runnableLatencyModesForModel(settings: Settings, modelId: string): LatencyMode[];
|
|
2232
|
+
export declare function modelCostClassForConfiguredModel(_settings: Settings, model: Pick<ConfiguredModel, "cost">): ConfiguredModelCostClass;
|
|
1598
2233
|
/**
|
|
1599
2234
|
* The built-in provider's stable id: "openai" on the OpenAI platform, "azure"
|
|
1600
2235
|
* on Azure. Exported because the workspace model-policy gate must attribute
|
|
@@ -1611,7 +2246,7 @@ export declare function builtinProviderId(settings: Pick<Settings, "openaiProvid
|
|
|
1611
2246
|
* registry entry for the rest. Registry ids may not collide with the built-in
|
|
1612
2247
|
* id — validateSettings rejects that at boot.
|
|
1613
2248
|
*/
|
|
1614
|
-
export declare function configuredProviders(settings: Settings): ResolvedModelProvider[];
|
|
2249
|
+
export declare function configuredProviders(settings: Settings, source?: NodeJS.ProcessEnv): ResolvedModelProvider[];
|
|
1615
2250
|
/**
|
|
1616
2251
|
* Pure catalog overlay for a workspace whose existing Codex connection seam
|
|
1617
2252
|
* reports ready. This describes product/provider identity only; it does not
|
|
@@ -1647,7 +2282,7 @@ export declare function policyProviderIdForModel(settings: Settings, modelId: st
|
|
|
1647
2282
|
* default false). De-duplicated by id (first wins) so the default model stays
|
|
1648
2283
|
* first and the built-in allow-list takes precedence over registry entries.
|
|
1649
2284
|
*/
|
|
1650
|
-
export declare function configuredModels(settings: Settings): ConfiguredModel[];
|
|
2285
|
+
export declare function configuredModels(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
|
|
1651
2286
|
/** Resolve a known canonical id or alias. Unknown strings are returned unchanged. */
|
|
1652
2287
|
export declare function canonicalizeConfiguredModelId(settings: Settings, modelId: string): string;
|
|
1653
2288
|
/**
|
|
@@ -1679,6 +2314,12 @@ export type ResolveTurnExecutionPolicyV1Input = {
|
|
|
1679
2314
|
latencyMode?: LatencyMode;
|
|
1680
2315
|
latencyModeSource?: TurnExecutionLatencyModeSourceV1;
|
|
1681
2316
|
};
|
|
2317
|
+
/**
|
|
2318
|
+
* Resolve the static catalog identity used by an accepted turn. Subscription
|
|
2319
|
+
* overlays contain no account or bearer and do not prove connection readiness;
|
|
2320
|
+
* callers must keep their live credential/readiness gate authoritative.
|
|
2321
|
+
*/
|
|
2322
|
+
export declare function resolveModelProviderForTurn(settings: Settings, modelId: string): ReturnType<typeof resolveModelProvider>;
|
|
1682
2323
|
/**
|
|
1683
2324
|
* Build a trusted, secret-safe execution policy from the normalized catalog.
|
|
1684
2325
|
* The Codex overlay here contains static product/provider identity only; it
|
|
@@ -1738,6 +2379,8 @@ export declare function calculateModelUsageCostBreakdown(settings: Settings, mod
|
|
|
1738
2379
|
export declare function calculateGatewayReportedCostMicros(settings: Settings, model: string, inferenceCostUsd: string, options?: {
|
|
1739
2380
|
inputTokens?: number;
|
|
1740
2381
|
}): number;
|
|
2382
|
+
/** Exact provider-reported Gateway cost without requiring an OpenGeni price schedule. */
|
|
2383
|
+
export declare function calculateGatewayReportedProviderCostMicros(inferenceCostUsd: string): number;
|
|
1741
2384
|
export declare function calculateGatewayReportedCostBreakdown(settings: Settings, model: string, inferenceCostUsd: string, options?: {
|
|
1742
2385
|
inputTokens?: number;
|
|
1743
2386
|
}): ModelUsageCostBreakdown;
|
|
@@ -1915,6 +2558,8 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
|
|
|
1915
2558
|
export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
1916
2559
|
export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
1917
2560
|
export declare function codemodeWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
2561
|
+
/** Validate one fully resolved, secret-bearing executable catalog. */
|
|
2562
|
+
export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
|
|
1918
2563
|
/**
|
|
1919
2564
|
* Resolve the secret used to sign/verify scoped stream tokens (sandbox contract
|
|
1920
2565
|
* §C.3). Falls back to `delegationSecret` (the same HMAC envelope family —
|