@opengeni/config 0.22.5 → 1.0.0-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 +724 -23
- package/dist/index.js +1048 -134
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +1330 -165
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,12 +59,15 @@ 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";
|
|
63
66
|
}>>;
|
|
64
67
|
}, z.core.$strict>;
|
|
65
68
|
export type McpServerConnectionRef = z.infer<typeof McpServerConnectionRefSchema>;
|
|
69
|
+
/** Public, digest-pinned desktop image used by Modal unless the operator overrides it. */
|
|
70
|
+
export declare const DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:c3bd17b8841de1bff9bb2777aad422cf8c75de78e2c30f9ac81d0cd6810a1b78";
|
|
66
71
|
declare const SettingsSchema: z.ZodObject<{
|
|
67
72
|
serviceName: z.ZodDefault<z.ZodString>;
|
|
68
73
|
environment: z.ZodDefault<z.ZodString>;
|
|
@@ -109,6 +114,8 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
109
114
|
analyticsPosthogHost: z.ZodOptional<z.ZodString>;
|
|
110
115
|
analyticsGa4MeasurementId: z.ZodOptional<z.ZodString>;
|
|
111
116
|
publicBaseUrl: z.ZodOptional<z.ZodString>;
|
|
117
|
+
mcpOauthEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
118
|
+
mcpOauthTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
112
119
|
webBaseUrl: z.ZodOptional<z.ZodString>;
|
|
113
120
|
agentReleasesBaseUrl: z.ZodDefault<z.ZodString>;
|
|
114
121
|
agentStableVersion: z.ZodDefault<z.ZodString>;
|
|
@@ -137,10 +144,12 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
137
144
|
staticUsageLimitsJson: z.ZodDefault<z.ZodString>;
|
|
138
145
|
delegationSecret: z.ZodOptional<z.ZodString>;
|
|
139
146
|
defaultFirstPartyMcpTools: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
147
|
+
artifacts_archive: "artifacts_archive";
|
|
140
148
|
artifacts_create: "artifacts_create";
|
|
141
149
|
artifacts_get_source: "artifacts_get_source";
|
|
142
150
|
artifacts_list: "artifacts_list";
|
|
143
151
|
artifacts_publish: "artifacts_publish";
|
|
152
|
+
artifacts_restore: "artifacts_restore";
|
|
144
153
|
artifacts_rollback: "artifacts_rollback";
|
|
145
154
|
atlassian_get: "atlassian_get";
|
|
146
155
|
atlassian_search: "atlassian_search";
|
|
@@ -157,6 +166,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
157
166
|
browser_tabs: "browser_tabs";
|
|
158
167
|
capability_authorization_request: "capability_authorization_request";
|
|
159
168
|
capability_catalog_search: "capability_catalog_search";
|
|
169
|
+
command_wait: "command_wait";
|
|
160
170
|
company_profile_confirm: "company_profile_confirm";
|
|
161
171
|
company_profile_propose: "company_profile_propose";
|
|
162
172
|
computer_act: "computer_act";
|
|
@@ -193,7 +203,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
193
203
|
goal_progress: "goal_progress";
|
|
194
204
|
goal_set: "goal_set";
|
|
195
205
|
goal_update: "goal_update";
|
|
196
|
-
goal_wait: "goal_wait";
|
|
197
206
|
instruction_policy_propose: "instruction_policy_propose";
|
|
198
207
|
interaction_discover: "interaction_discover";
|
|
199
208
|
interaction_request_human: "interaction_request_human";
|
|
@@ -273,6 +282,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
273
282
|
variable_set_get_variable: "variable_set_get_variable";
|
|
274
283
|
variable_set_list: "variable_set_list";
|
|
275
284
|
variable_set_set_variable: "variable_set_set_variable";
|
|
285
|
+
wait_for_input: "wait_for_input";
|
|
276
286
|
work_claim_release: "work_claim_release";
|
|
277
287
|
work_claim_upsert: "work_claim_upsert";
|
|
278
288
|
x_accounts_list: "x_accounts_list";
|
|
@@ -283,10 +293,12 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
283
293
|
x_thread_fetch: "x_thread_fetch";
|
|
284
294
|
}>>>>;
|
|
285
295
|
allowedFirstPartyMcpTools: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
296
|
+
artifacts_archive: "artifacts_archive";
|
|
286
297
|
artifacts_create: "artifacts_create";
|
|
287
298
|
artifacts_get_source: "artifacts_get_source";
|
|
288
299
|
artifacts_list: "artifacts_list";
|
|
289
300
|
artifacts_publish: "artifacts_publish";
|
|
301
|
+
artifacts_restore: "artifacts_restore";
|
|
290
302
|
artifacts_rollback: "artifacts_rollback";
|
|
291
303
|
atlassian_get: "atlassian_get";
|
|
292
304
|
atlassian_search: "atlassian_search";
|
|
@@ -303,6 +315,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
303
315
|
browser_tabs: "browser_tabs";
|
|
304
316
|
capability_authorization_request: "capability_authorization_request";
|
|
305
317
|
capability_catalog_search: "capability_catalog_search";
|
|
318
|
+
command_wait: "command_wait";
|
|
306
319
|
company_profile_confirm: "company_profile_confirm";
|
|
307
320
|
company_profile_propose: "company_profile_propose";
|
|
308
321
|
computer_act: "computer_act";
|
|
@@ -339,7 +352,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
339
352
|
goal_progress: "goal_progress";
|
|
340
353
|
goal_set: "goal_set";
|
|
341
354
|
goal_update: "goal_update";
|
|
342
|
-
goal_wait: "goal_wait";
|
|
343
355
|
instruction_policy_propose: "instruction_policy_propose";
|
|
344
356
|
interaction_discover: "interaction_discover";
|
|
345
357
|
interaction_request_human: "interaction_request_human";
|
|
@@ -419,6 +431,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
419
431
|
variable_set_get_variable: "variable_set_get_variable";
|
|
420
432
|
variable_set_list: "variable_set_list";
|
|
421
433
|
variable_set_set_variable: "variable_set_set_variable";
|
|
434
|
+
wait_for_input: "wait_for_input";
|
|
422
435
|
work_claim_release: "work_claim_release";
|
|
423
436
|
work_claim_upsert: "work_claim_upsert";
|
|
424
437
|
x_accounts_list: "x_accounts_list";
|
|
@@ -472,6 +485,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
472
485
|
goalIdleBackoffMs: z.ZodDefault<z.ZodPreprocess<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>>;
|
|
473
486
|
goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
474
487
|
childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
488
|
+
hostMcpAuthoritySourceAdmissionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
475
489
|
slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
476
490
|
agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
477
491
|
contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -530,6 +544,15 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
530
544
|
voiceInputAzureAdToken: z.ZodOptional<z.ZodString>;
|
|
531
545
|
voiceInputCodexExperimentalEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
532
546
|
modelPricingJson: z.ZodDefault<z.ZodString>;
|
|
547
|
+
modelCatalogSource: z.ZodDefault<z.ZodEnum<{
|
|
548
|
+
code: "code";
|
|
549
|
+
database: "database";
|
|
550
|
+
}>>;
|
|
551
|
+
modelCostPolicyJson: z.ZodDefault<z.ZodString>;
|
|
552
|
+
modelNotesJson: z.ZodDefault<z.ZodString>;
|
|
553
|
+
openrouterApiKey: z.ZodOptional<z.ZodString>;
|
|
554
|
+
resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
|
|
555
|
+
resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
|
|
533
556
|
modelProvidersJson: z.ZodDefault<z.ZodString>;
|
|
534
557
|
codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
535
558
|
supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
@@ -538,7 +561,6 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
538
561
|
codexProductSku: z.ZodOptional<z.ZodString>;
|
|
539
562
|
codexToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
540
563
|
lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
541
|
-
codexCredentialLeasingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
542
564
|
codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
543
565
|
codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
544
566
|
openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
|
|
@@ -699,6 +721,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
699
721
|
sandboxIdleGraceMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
700
722
|
sandboxSnapshotIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
701
723
|
sandboxSnapshotTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
724
|
+
sandboxDrainSnapshotTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
702
725
|
sandboxRotationLeadMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
703
726
|
sandboxRotationBatchSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
704
727
|
sandboxLeaseTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -787,6 +810,11 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
787
810
|
dual: "dual";
|
|
788
811
|
legacy: "legacy";
|
|
789
812
|
}>>;
|
|
813
|
+
organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
|
|
814
|
+
fragment: "fragment";
|
|
815
|
+
query: "query";
|
|
816
|
+
}>>;
|
|
817
|
+
organizationUserSetupQueryEdgeSanitizationConfirmed: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
790
818
|
resendApiKey: z.ZodOptional<z.ZodString>;
|
|
791
819
|
emailFrom: z.ZodDefault<z.ZodString>;
|
|
792
820
|
stripeSecretKey: z.ZodOptional<z.ZodString>;
|
|
@@ -818,6 +846,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
818
846
|
id: z.ZodString;
|
|
819
847
|
kind: z.ZodLiteral<"repository">;
|
|
820
848
|
}, z.core.$strict>>>;
|
|
849
|
+
authoritySource: z.ZodOptional<z.ZodLiteral<"host">>;
|
|
821
850
|
subjectScope: z.ZodOptional<z.ZodEnum<{
|
|
822
851
|
subject: "subject";
|
|
823
852
|
workspace: "workspace";
|
|
@@ -909,6 +938,7 @@ export type TemporalConnectionOptions = {
|
|
|
909
938
|
export type ModelPricing = {
|
|
910
939
|
inputMicrosPerMillionTokens: number;
|
|
911
940
|
cachedInputMicrosPerMillionTokens?: number | undefined;
|
|
941
|
+
cacheWriteMicrosPerMillionTokens?: number | undefined;
|
|
912
942
|
outputMicrosPerMillionTokens: number;
|
|
913
943
|
marginBps?: number | undefined;
|
|
914
944
|
};
|
|
@@ -1112,9 +1142,12 @@ export type CredentialSourceV1 = {
|
|
|
1112
1142
|
} | {
|
|
1113
1143
|
kind: "workspace_connection";
|
|
1114
1144
|
mechanism: "api_key";
|
|
1145
|
+
} | {
|
|
1146
|
+
kind: "organization_connection";
|
|
1147
|
+
mechanism: "api_key";
|
|
1115
1148
|
};
|
|
1116
1149
|
export type BillingAttributionV1 = {
|
|
1117
|
-
upstreamPayer: "deployment" | "workspace" | "connected_subscription";
|
|
1150
|
+
upstreamPayer: "deployment" | "workspace" | "organization" | "connected_subscription";
|
|
1118
1151
|
metering: "opengeni_credits" | "external";
|
|
1119
1152
|
};
|
|
1120
1153
|
/**
|
|
@@ -1149,7 +1182,10 @@ export declare const RegistryProviderKind: z.ZodEnum<{
|
|
|
1149
1182
|
anonymous: "anonymous";
|
|
1150
1183
|
"api-key": "api-key";
|
|
1151
1184
|
"codex-subscription": "codex-subscription";
|
|
1185
|
+
"openrouter-organization": "openrouter-organization";
|
|
1186
|
+
"openrouter-workspace": "openrouter-workspace";
|
|
1152
1187
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1188
|
+
"vercel-gateway-organization": "vercel-gateway-organization";
|
|
1153
1189
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
1154
1190
|
"xai-subscription": "xai-subscription";
|
|
1155
1191
|
}>;
|
|
@@ -1160,7 +1196,10 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1160
1196
|
anonymous: "anonymous";
|
|
1161
1197
|
"api-key": "api-key";
|
|
1162
1198
|
"codex-subscription": "codex-subscription";
|
|
1199
|
+
"openrouter-organization": "openrouter-organization";
|
|
1200
|
+
"openrouter-workspace": "openrouter-workspace";
|
|
1163
1201
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1202
|
+
"vercel-gateway-organization": "vercel-gateway-organization";
|
|
1164
1203
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
1165
1204
|
"xai-subscription": "xai-subscription";
|
|
1166
1205
|
}>>;
|
|
@@ -1341,12 +1380,14 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1341
1380
|
pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1342
1381
|
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1343
1382
|
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1383
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1344
1384
|
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1345
1385
|
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1346
1386
|
}, z.core.$strip>, z.ZodObject<{
|
|
1347
1387
|
default: z.ZodObject<{
|
|
1348
1388
|
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1349
1389
|
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1390
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1350
1391
|
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1351
1392
|
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1352
1393
|
}, z.core.$strip>;
|
|
@@ -1355,6 +1396,7 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1355
1396
|
pricing: z.ZodObject<{
|
|
1356
1397
|
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1357
1398
|
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1399
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1358
1400
|
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1359
1401
|
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1360
1402
|
}, z.core.$strip>;
|
|
@@ -1365,6 +1407,608 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1365
1407
|
}, z.core.$strip>>;
|
|
1366
1408
|
}, z.core.$strip>;
|
|
1367
1409
|
export type RegistryProvider = z.infer<typeof RegistryProviderSchema>;
|
|
1410
|
+
export declare const OPENGENI_GATEWAY_PROVIDER_ID: "opengeni-gateway";
|
|
1411
|
+
export declare const WORKSPACE_GATEWAY_PROVIDER_ID: "workspace-gateway";
|
|
1412
|
+
export declare const WORKSPACE_GATEWAY_MODEL_ID_PREFIX: "workspace-gateway/";
|
|
1413
|
+
export declare const ORGANIZATION_GATEWAY_PROVIDER_ID: "organization-gateway";
|
|
1414
|
+
export declare const ORGANIZATION_GATEWAY_MODEL_ID_PREFIX: "organization-gateway/";
|
|
1415
|
+
export declare const OPENROUTER_PROVIDER_ID: "openrouter";
|
|
1416
|
+
export declare const OPENROUTER_MODEL_ID_PREFIX: "openrouter/";
|
|
1417
|
+
export declare const WORKSPACE_OPENROUTER_PROVIDER_ID: "workspace-openrouter";
|
|
1418
|
+
export declare const WORKSPACE_OPENROUTER_MODEL_ID_PREFIX: "workspace-openrouter/";
|
|
1419
|
+
export declare const ORGANIZATION_OPENROUTER_PROVIDER_ID: "organization-openrouter";
|
|
1420
|
+
export declare const ORGANIZATION_OPENROUTER_MODEL_ID_PREFIX: "organization-openrouter/";
|
|
1421
|
+
export declare const OPENROUTER_BASE_URL: "https://openrouter.ai/api/v1";
|
|
1422
|
+
export declare const ModelCostClass: z.ZodEnum<{
|
|
1423
|
+
credits: "credits";
|
|
1424
|
+
free: "free";
|
|
1425
|
+
}>;
|
|
1426
|
+
export type ModelCostClass = z.infer<typeof ModelCostClass>;
|
|
1427
|
+
export declare const ConfiguredModelCostClass: z.ZodEnum<{
|
|
1428
|
+
credits: "credits";
|
|
1429
|
+
free: "free";
|
|
1430
|
+
organization: "organization";
|
|
1431
|
+
subscription: "subscription";
|
|
1432
|
+
workspace: "workspace";
|
|
1433
|
+
}>;
|
|
1434
|
+
export type ConfiguredModelCostClass = z.infer<typeof ConfiguredModelCostClass>;
|
|
1435
|
+
export declare function parseModelCostPolicyJson(raw: string): Record<string, ModelCostClass>;
|
|
1436
|
+
export declare function parseModelNotesJson(raw: string): Record<string, string>;
|
|
1437
|
+
export declare function configuredModelNotes(settings: Pick<Settings, "modelNotesJson">): Record<string, string>;
|
|
1438
|
+
export declare const GatewayCatalogModel: z.ZodObject<{
|
|
1439
|
+
productId: z.ZodString;
|
|
1440
|
+
workspaceProductId: z.ZodString;
|
|
1441
|
+
upstreamModelId: z.ZodString;
|
|
1442
|
+
label: z.ZodString;
|
|
1443
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1444
|
+
providers: z.ZodArray<z.ZodString>;
|
|
1445
|
+
implicitCaching: z.ZodDefault<z.ZodBoolean>;
|
|
1446
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
1447
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1448
|
+
contextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1449
|
+
effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1450
|
+
autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
|
|
1451
|
+
pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
1452
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1453
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1454
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1455
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1456
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1457
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1458
|
+
default: z.ZodObject<{
|
|
1459
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1460
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1461
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1462
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1463
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1464
|
+
}, z.core.$strip>;
|
|
1465
|
+
inputTokenTiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1466
|
+
minimumInputTokens: z.ZodNumber;
|
|
1467
|
+
pricing: z.ZodObject<{
|
|
1468
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
1469
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1470
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
1471
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
1472
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
1473
|
+
}, z.core.$strip>;
|
|
1474
|
+
}, z.core.$strip>>>;
|
|
1475
|
+
}, z.core.$strip>]>>;
|
|
1476
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1477
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1478
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1479
|
+
}, z.core.$strict>;
|
|
1480
|
+
export type GatewayCatalogModel = z.infer<typeof GatewayCatalogModel>;
|
|
1481
|
+
export declare const OpenRouterCatalogModel: z.ZodObject<{
|
|
1482
|
+
upstreamModelId: z.ZodString;
|
|
1483
|
+
label: z.ZodString;
|
|
1484
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1485
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1486
|
+
capabilities: z.ZodObject<{
|
|
1487
|
+
reasoning: z.ZodObject<{
|
|
1488
|
+
upstream: z.ZodEnum<{
|
|
1489
|
+
supported: "supported";
|
|
1490
|
+
unknown: "unknown";
|
|
1491
|
+
unsupported: "unsupported";
|
|
1492
|
+
}>;
|
|
1493
|
+
runnable: z.ZodBoolean;
|
|
1494
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1495
|
+
high: "high";
|
|
1496
|
+
low: "low";
|
|
1497
|
+
max: "max";
|
|
1498
|
+
medium: "medium";
|
|
1499
|
+
minimal: "minimal";
|
|
1500
|
+
none: "none";
|
|
1501
|
+
xhigh: "xhigh";
|
|
1502
|
+
}>>;
|
|
1503
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1504
|
+
high: "high";
|
|
1505
|
+
low: "low";
|
|
1506
|
+
max: "max";
|
|
1507
|
+
medium: "medium";
|
|
1508
|
+
minimal: "minimal";
|
|
1509
|
+
none: "none";
|
|
1510
|
+
xhigh: "xhigh";
|
|
1511
|
+
}>>;
|
|
1512
|
+
required: z.ZodBoolean;
|
|
1513
|
+
}, z.core.$strip>;
|
|
1514
|
+
functionCalling: z.ZodObject<{
|
|
1515
|
+
upstream: z.ZodEnum<{
|
|
1516
|
+
supported: "supported";
|
|
1517
|
+
unknown: "unknown";
|
|
1518
|
+
unsupported: "unsupported";
|
|
1519
|
+
}>;
|
|
1520
|
+
runnable: z.ZodBoolean;
|
|
1521
|
+
}, z.core.$strip>;
|
|
1522
|
+
structuredOutput: z.ZodObject<{
|
|
1523
|
+
upstream: z.ZodEnum<{
|
|
1524
|
+
supported: "supported";
|
|
1525
|
+
unknown: "unknown";
|
|
1526
|
+
unsupported: "unsupported";
|
|
1527
|
+
}>;
|
|
1528
|
+
runnable: z.ZodBoolean;
|
|
1529
|
+
}, z.core.$strip>;
|
|
1530
|
+
hostedTools: z.ZodObject<{
|
|
1531
|
+
webSearch: z.ZodObject<{
|
|
1532
|
+
upstream: z.ZodEnum<{
|
|
1533
|
+
supported: "supported";
|
|
1534
|
+
unknown: "unknown";
|
|
1535
|
+
unsupported: "unsupported";
|
|
1536
|
+
}>;
|
|
1537
|
+
runnable: z.ZodBoolean;
|
|
1538
|
+
}, z.core.$strip>;
|
|
1539
|
+
xSearch: 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
|
+
codeExecution: 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
|
+
imageGeneration: z.ZodDefault<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
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1565
|
+
audio: "audio";
|
|
1566
|
+
image: "image";
|
|
1567
|
+
text: "text";
|
|
1568
|
+
}>>;
|
|
1569
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1570
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1571
|
+
audio: "audio";
|
|
1572
|
+
image: "image";
|
|
1573
|
+
text: "text";
|
|
1574
|
+
}>>;
|
|
1575
|
+
transports: z.ZodObject<{
|
|
1576
|
+
sse: z.ZodObject<{
|
|
1577
|
+
upstream: z.ZodEnum<{
|
|
1578
|
+
supported: "supported";
|
|
1579
|
+
unknown: "unknown";
|
|
1580
|
+
unsupported: "unsupported";
|
|
1581
|
+
}>;
|
|
1582
|
+
runnable: z.ZodBoolean;
|
|
1583
|
+
}, z.core.$strip>;
|
|
1584
|
+
responsesWebSocket: z.ZodObject<{
|
|
1585
|
+
upstream: z.ZodEnum<{
|
|
1586
|
+
supported: "supported";
|
|
1587
|
+
unknown: "unknown";
|
|
1588
|
+
unsupported: "unsupported";
|
|
1589
|
+
}>;
|
|
1590
|
+
runnable: z.ZodBoolean;
|
|
1591
|
+
}, z.core.$strip>;
|
|
1592
|
+
realtimeAudio: z.ZodObject<{
|
|
1593
|
+
upstream: z.ZodEnum<{
|
|
1594
|
+
supported: "supported";
|
|
1595
|
+
unknown: "unknown";
|
|
1596
|
+
unsupported: "unsupported";
|
|
1597
|
+
}>;
|
|
1598
|
+
runnable: z.ZodBoolean;
|
|
1599
|
+
}, z.core.$strip>;
|
|
1600
|
+
}, z.core.$strip>;
|
|
1601
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1602
|
+
upstream: z.ZodEnum<{
|
|
1603
|
+
supported: "supported";
|
|
1604
|
+
unknown: "unknown";
|
|
1605
|
+
unsupported: "unsupported";
|
|
1606
|
+
}>;
|
|
1607
|
+
runnable: z.ZodBoolean;
|
|
1608
|
+
mode: z.ZodEnum<{
|
|
1609
|
+
automatic: "automatic";
|
|
1610
|
+
implicit: "implicit";
|
|
1611
|
+
none: "none";
|
|
1612
|
+
}>;
|
|
1613
|
+
}, z.core.$strip>>;
|
|
1614
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1615
|
+
id: z.ZodEnum<{
|
|
1616
|
+
fast: "fast";
|
|
1617
|
+
priority: "priority";
|
|
1618
|
+
standard: "standard";
|
|
1619
|
+
}>;
|
|
1620
|
+
upstream: z.ZodEnum<{
|
|
1621
|
+
supported: "supported";
|
|
1622
|
+
unknown: "unknown";
|
|
1623
|
+
unsupported: "unsupported";
|
|
1624
|
+
}>;
|
|
1625
|
+
runnable: z.ZodBoolean;
|
|
1626
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1627
|
+
}, z.core.$strip>>;
|
|
1628
|
+
}, z.core.$strip>;
|
|
1629
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1630
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1631
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1632
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1633
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1634
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1635
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1636
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1637
|
+
}, z.core.$strict>;
|
|
1638
|
+
export type OpenRouterCatalogModel = z.infer<typeof OpenRouterCatalogModel>;
|
|
1639
|
+
export declare const ModelCatalogDocument: z.ZodObject<{
|
|
1640
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
1641
|
+
defaultModel: z.ZodOptional<z.ZodString>;
|
|
1642
|
+
builtInModels: z.ZodArray<z.ZodString>;
|
|
1643
|
+
registryProviders: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1644
|
+
id: z.ZodString;
|
|
1645
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1646
|
+
api: z.ZodDefault<z.ZodEnum<{
|
|
1647
|
+
chat: "chat";
|
|
1648
|
+
responses: "responses";
|
|
1649
|
+
}>>;
|
|
1650
|
+
wireProfile: z.ZodDefault<z.ZodEnum<{
|
|
1651
|
+
"azure-openai": "azure-openai";
|
|
1652
|
+
openai: "openai";
|
|
1653
|
+
}>>;
|
|
1654
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1655
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1656
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
1657
|
+
anonymous: "anonymous";
|
|
1658
|
+
"api-key": "api-key";
|
|
1659
|
+
}>>;
|
|
1660
|
+
baseUrl: z.ZodString;
|
|
1661
|
+
models: z.ZodArray<z.ZodObject<{
|
|
1662
|
+
id: z.ZodString;
|
|
1663
|
+
upstreamModelId: z.ZodOptional<z.ZodString>;
|
|
1664
|
+
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1665
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1666
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1667
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1668
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1669
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1670
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1671
|
+
reasoningEffort: z.ZodOptional<z.ZodBoolean>;
|
|
1672
|
+
hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
|
|
1673
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
1674
|
+
reasoning: z.ZodObject<{
|
|
1675
|
+
upstream: z.ZodEnum<{
|
|
1676
|
+
supported: "supported";
|
|
1677
|
+
unknown: "unknown";
|
|
1678
|
+
unsupported: "unsupported";
|
|
1679
|
+
}>;
|
|
1680
|
+
runnable: z.ZodBoolean;
|
|
1681
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1682
|
+
high: "high";
|
|
1683
|
+
low: "low";
|
|
1684
|
+
max: "max";
|
|
1685
|
+
medium: "medium";
|
|
1686
|
+
minimal: "minimal";
|
|
1687
|
+
none: "none";
|
|
1688
|
+
xhigh: "xhigh";
|
|
1689
|
+
}>>;
|
|
1690
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1691
|
+
high: "high";
|
|
1692
|
+
low: "low";
|
|
1693
|
+
max: "max";
|
|
1694
|
+
medium: "medium";
|
|
1695
|
+
minimal: "minimal";
|
|
1696
|
+
none: "none";
|
|
1697
|
+
xhigh: "xhigh";
|
|
1698
|
+
}>>;
|
|
1699
|
+
required: z.ZodBoolean;
|
|
1700
|
+
}, z.core.$strip>;
|
|
1701
|
+
functionCalling: z.ZodObject<{
|
|
1702
|
+
upstream: z.ZodEnum<{
|
|
1703
|
+
supported: "supported";
|
|
1704
|
+
unknown: "unknown";
|
|
1705
|
+
unsupported: "unsupported";
|
|
1706
|
+
}>;
|
|
1707
|
+
runnable: z.ZodBoolean;
|
|
1708
|
+
}, z.core.$strip>;
|
|
1709
|
+
structuredOutput: z.ZodObject<{
|
|
1710
|
+
upstream: z.ZodEnum<{
|
|
1711
|
+
supported: "supported";
|
|
1712
|
+
unknown: "unknown";
|
|
1713
|
+
unsupported: "unsupported";
|
|
1714
|
+
}>;
|
|
1715
|
+
runnable: z.ZodBoolean;
|
|
1716
|
+
}, z.core.$strip>;
|
|
1717
|
+
hostedTools: z.ZodObject<{
|
|
1718
|
+
webSearch: z.ZodObject<{
|
|
1719
|
+
upstream: z.ZodEnum<{
|
|
1720
|
+
supported: "supported";
|
|
1721
|
+
unknown: "unknown";
|
|
1722
|
+
unsupported: "unsupported";
|
|
1723
|
+
}>;
|
|
1724
|
+
runnable: z.ZodBoolean;
|
|
1725
|
+
}, z.core.$strip>;
|
|
1726
|
+
xSearch: 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
|
+
codeExecution: 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
|
+
imageGeneration: z.ZodDefault<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
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1752
|
+
audio: "audio";
|
|
1753
|
+
image: "image";
|
|
1754
|
+
text: "text";
|
|
1755
|
+
}>>;
|
|
1756
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1757
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1758
|
+
audio: "audio";
|
|
1759
|
+
image: "image";
|
|
1760
|
+
text: "text";
|
|
1761
|
+
}>>;
|
|
1762
|
+
transports: z.ZodObject<{
|
|
1763
|
+
sse: z.ZodObject<{
|
|
1764
|
+
upstream: z.ZodEnum<{
|
|
1765
|
+
supported: "supported";
|
|
1766
|
+
unknown: "unknown";
|
|
1767
|
+
unsupported: "unsupported";
|
|
1768
|
+
}>;
|
|
1769
|
+
runnable: z.ZodBoolean;
|
|
1770
|
+
}, z.core.$strip>;
|
|
1771
|
+
responsesWebSocket: z.ZodObject<{
|
|
1772
|
+
upstream: z.ZodEnum<{
|
|
1773
|
+
supported: "supported";
|
|
1774
|
+
unknown: "unknown";
|
|
1775
|
+
unsupported: "unsupported";
|
|
1776
|
+
}>;
|
|
1777
|
+
runnable: z.ZodBoolean;
|
|
1778
|
+
}, z.core.$strip>;
|
|
1779
|
+
realtimeAudio: z.ZodObject<{
|
|
1780
|
+
upstream: z.ZodEnum<{
|
|
1781
|
+
supported: "supported";
|
|
1782
|
+
unknown: "unknown";
|
|
1783
|
+
unsupported: "unsupported";
|
|
1784
|
+
}>;
|
|
1785
|
+
runnable: z.ZodBoolean;
|
|
1786
|
+
}, z.core.$strip>;
|
|
1787
|
+
}, z.core.$strip>;
|
|
1788
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1789
|
+
upstream: z.ZodEnum<{
|
|
1790
|
+
supported: "supported";
|
|
1791
|
+
unknown: "unknown";
|
|
1792
|
+
unsupported: "unsupported";
|
|
1793
|
+
}>;
|
|
1794
|
+
runnable: z.ZodBoolean;
|
|
1795
|
+
mode: z.ZodEnum<{
|
|
1796
|
+
automatic: "automatic";
|
|
1797
|
+
implicit: "implicit";
|
|
1798
|
+
none: "none";
|
|
1799
|
+
}>;
|
|
1800
|
+
}, z.core.$strip>>;
|
|
1801
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1802
|
+
id: z.ZodEnum<{
|
|
1803
|
+
fast: "fast";
|
|
1804
|
+
priority: "priority";
|
|
1805
|
+
standard: "standard";
|
|
1806
|
+
}>;
|
|
1807
|
+
upstream: z.ZodEnum<{
|
|
1808
|
+
supported: "supported";
|
|
1809
|
+
unknown: "unknown";
|
|
1810
|
+
unsupported: "unsupported";
|
|
1811
|
+
}>;
|
|
1812
|
+
runnable: z.ZodBoolean;
|
|
1813
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1814
|
+
}, z.core.$strip>>;
|
|
1815
|
+
}, z.core.$strip>>;
|
|
1816
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1817
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1818
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1819
|
+
}, z.core.$strict>>;
|
|
1820
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1821
|
+
apiKeyEnv: z.ZodOptional<z.ZodNever>;
|
|
1822
|
+
defaultHeaders: z.ZodOptional<z.ZodNever>;
|
|
1823
|
+
defaultQuery: z.ZodOptional<z.ZodNever>;
|
|
1824
|
+
publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
|
|
1825
|
+
publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
|
|
1826
|
+
}, z.core.$strict>>>;
|
|
1827
|
+
gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1828
|
+
productId: z.ZodString;
|
|
1829
|
+
workspaceProductId: z.ZodString;
|
|
1830
|
+
upstreamModelId: z.ZodString;
|
|
1831
|
+
label: z.ZodString;
|
|
1832
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1833
|
+
providers: z.ZodArray<z.ZodString>;
|
|
1834
|
+
implicitCaching: z.ZodDefault<z.ZodBoolean>;
|
|
1835
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
1836
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1837
|
+
contextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1838
|
+
effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
1839
|
+
autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
|
|
1840
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1841
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1842
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
1843
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
1844
|
+
}, z.core.$strict>>>;
|
|
1845
|
+
openrouterModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1846
|
+
upstreamModelId: z.ZodString;
|
|
1847
|
+
label: z.ZodString;
|
|
1848
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
1849
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1850
|
+
capabilities: z.ZodObject<{
|
|
1851
|
+
reasoning: z.ZodObject<{
|
|
1852
|
+
upstream: z.ZodEnum<{
|
|
1853
|
+
supported: "supported";
|
|
1854
|
+
unknown: "unknown";
|
|
1855
|
+
unsupported: "unsupported";
|
|
1856
|
+
}>;
|
|
1857
|
+
runnable: z.ZodBoolean;
|
|
1858
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
1859
|
+
high: "high";
|
|
1860
|
+
low: "low";
|
|
1861
|
+
max: "max";
|
|
1862
|
+
medium: "medium";
|
|
1863
|
+
minimal: "minimal";
|
|
1864
|
+
none: "none";
|
|
1865
|
+
xhigh: "xhigh";
|
|
1866
|
+
}>>;
|
|
1867
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
1868
|
+
high: "high";
|
|
1869
|
+
low: "low";
|
|
1870
|
+
max: "max";
|
|
1871
|
+
medium: "medium";
|
|
1872
|
+
minimal: "minimal";
|
|
1873
|
+
none: "none";
|
|
1874
|
+
xhigh: "xhigh";
|
|
1875
|
+
}>>;
|
|
1876
|
+
required: z.ZodBoolean;
|
|
1877
|
+
}, z.core.$strip>;
|
|
1878
|
+
functionCalling: z.ZodObject<{
|
|
1879
|
+
upstream: z.ZodEnum<{
|
|
1880
|
+
supported: "supported";
|
|
1881
|
+
unknown: "unknown";
|
|
1882
|
+
unsupported: "unsupported";
|
|
1883
|
+
}>;
|
|
1884
|
+
runnable: z.ZodBoolean;
|
|
1885
|
+
}, z.core.$strip>;
|
|
1886
|
+
structuredOutput: z.ZodObject<{
|
|
1887
|
+
upstream: z.ZodEnum<{
|
|
1888
|
+
supported: "supported";
|
|
1889
|
+
unknown: "unknown";
|
|
1890
|
+
unsupported: "unsupported";
|
|
1891
|
+
}>;
|
|
1892
|
+
runnable: z.ZodBoolean;
|
|
1893
|
+
}, z.core.$strip>;
|
|
1894
|
+
hostedTools: z.ZodObject<{
|
|
1895
|
+
webSearch: z.ZodObject<{
|
|
1896
|
+
upstream: z.ZodEnum<{
|
|
1897
|
+
supported: "supported";
|
|
1898
|
+
unknown: "unknown";
|
|
1899
|
+
unsupported: "unsupported";
|
|
1900
|
+
}>;
|
|
1901
|
+
runnable: z.ZodBoolean;
|
|
1902
|
+
}, z.core.$strip>;
|
|
1903
|
+
xSearch: 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
|
+
codeExecution: 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
|
+
imageGeneration: z.ZodDefault<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
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
1929
|
+
audio: "audio";
|
|
1930
|
+
image: "image";
|
|
1931
|
+
text: "text";
|
|
1932
|
+
}>>;
|
|
1933
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1934
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
1935
|
+
audio: "audio";
|
|
1936
|
+
image: "image";
|
|
1937
|
+
text: "text";
|
|
1938
|
+
}>>;
|
|
1939
|
+
transports: z.ZodObject<{
|
|
1940
|
+
sse: z.ZodObject<{
|
|
1941
|
+
upstream: z.ZodEnum<{
|
|
1942
|
+
supported: "supported";
|
|
1943
|
+
unknown: "unknown";
|
|
1944
|
+
unsupported: "unsupported";
|
|
1945
|
+
}>;
|
|
1946
|
+
runnable: z.ZodBoolean;
|
|
1947
|
+
}, z.core.$strip>;
|
|
1948
|
+
responsesWebSocket: z.ZodObject<{
|
|
1949
|
+
upstream: z.ZodEnum<{
|
|
1950
|
+
supported: "supported";
|
|
1951
|
+
unknown: "unknown";
|
|
1952
|
+
unsupported: "unsupported";
|
|
1953
|
+
}>;
|
|
1954
|
+
runnable: z.ZodBoolean;
|
|
1955
|
+
}, z.core.$strip>;
|
|
1956
|
+
realtimeAudio: z.ZodObject<{
|
|
1957
|
+
upstream: z.ZodEnum<{
|
|
1958
|
+
supported: "supported";
|
|
1959
|
+
unknown: "unknown";
|
|
1960
|
+
unsupported: "unsupported";
|
|
1961
|
+
}>;
|
|
1962
|
+
runnable: z.ZodBoolean;
|
|
1963
|
+
}, z.core.$strip>;
|
|
1964
|
+
}, z.core.$strip>;
|
|
1965
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
1966
|
+
upstream: z.ZodEnum<{
|
|
1967
|
+
supported: "supported";
|
|
1968
|
+
unknown: "unknown";
|
|
1969
|
+
unsupported: "unsupported";
|
|
1970
|
+
}>;
|
|
1971
|
+
runnable: z.ZodBoolean;
|
|
1972
|
+
mode: z.ZodEnum<{
|
|
1973
|
+
automatic: "automatic";
|
|
1974
|
+
implicit: "implicit";
|
|
1975
|
+
none: "none";
|
|
1976
|
+
}>;
|
|
1977
|
+
}, z.core.$strip>>;
|
|
1978
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
1979
|
+
id: z.ZodEnum<{
|
|
1980
|
+
fast: "fast";
|
|
1981
|
+
priority: "priority";
|
|
1982
|
+
standard: "standard";
|
|
1983
|
+
}>;
|
|
1984
|
+
upstream: z.ZodEnum<{
|
|
1985
|
+
supported: "supported";
|
|
1986
|
+
unknown: "unknown";
|
|
1987
|
+
unsupported: "unsupported";
|
|
1988
|
+
}>;
|
|
1989
|
+
runnable: z.ZodBoolean;
|
|
1990
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
1991
|
+
}, z.core.$strip>>;
|
|
1992
|
+
}, z.core.$strip>;
|
|
1993
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1994
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
1995
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
1996
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1997
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
1998
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
1999
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
2000
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
2001
|
+
}, z.core.$strict>>>;
|
|
2002
|
+
modelNotes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2003
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
2004
|
+
enabled: z.ZodOptional<z.ZodNever>;
|
|
2005
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
2006
|
+
bands: z.ZodOptional<z.ZodNever>;
|
|
2007
|
+
}, z.core.$strict>;
|
|
2008
|
+
export type ModelCatalogDocument = z.infer<typeof ModelCatalogDocument>;
|
|
2009
|
+
export declare function parseModelCatalogDocument(value: unknown): ModelCatalogDocument;
|
|
2010
|
+
/** Pure secret-free database catalog overlay. getSettings remains env-only. */
|
|
2011
|
+
export declare function applyModelCatalogDocument(settings: Settings, rawDocument: unknown): Settings;
|
|
1368
2012
|
export declare const IntegrationOAuthClientConfigSchema: z.ZodObject<{
|
|
1369
2013
|
clientId: z.ZodString;
|
|
1370
2014
|
clientSecret: z.ZodOptional<z.ZodString>;
|
|
@@ -1385,7 +2029,7 @@ export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClient
|
|
|
1385
2029
|
export interface ResolvedModelProvider {
|
|
1386
2030
|
id: string;
|
|
1387
2031
|
label: string;
|
|
1388
|
-
kind: RegistryProviderKind;
|
|
2032
|
+
kind: RegistryProviderKind | "openrouter-managed";
|
|
1389
2033
|
api: ModelProviderApi;
|
|
1390
2034
|
wireProfile: ModelProviderWireProfile;
|
|
1391
2035
|
builtin: boolean;
|
|
@@ -1414,6 +2058,8 @@ export interface ConfiguredModel {
|
|
|
1414
2058
|
executionLimits: ModelExecutionLimitsV1;
|
|
1415
2059
|
credentialSource: CredentialSourceV1;
|
|
1416
2060
|
billing: BillingAttributionV1;
|
|
2061
|
+
/** Workspace-facing funding policy, independent of upstream settlement. */
|
|
2062
|
+
cost: ConfiguredModelCostClass;
|
|
1417
2063
|
capabilities: ModelCapabilitiesV1;
|
|
1418
2064
|
requestPolicy?: {
|
|
1419
2065
|
gateway: {
|
|
@@ -1432,11 +2078,10 @@ export interface ConfiguredModel {
|
|
|
1432
2078
|
}
|
|
1433
2079
|
export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
|
|
1434
2080
|
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
2081
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
|
|
1439
2082
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_ROLE: "vercel_ai_gateway";
|
|
2083
|
+
export declare const WORKSPACE_OPENROUTER_CONNECTION_DOMAIN: "openrouter.ai";
|
|
2084
|
+
export declare const WORKSPACE_OPENROUTER_CONNECTION_ROLE: "openrouter";
|
|
1440
2085
|
export declare const CODEX_REALTIME_MODEL_ID: "gpt-live-1-boulder-alpha";
|
|
1441
2086
|
export declare const SUPERGROK_REALTIME_MODEL_ID: "supergrok/grok-voice-think-fast-2.0";
|
|
1442
2087
|
export declare const OPENGENI_REALTIME_MODEL_ID_PREFIX: "opengeni-gateway/";
|
|
@@ -1490,16 +2135,25 @@ export declare const OPENGENI_GATEWAY_MODELS: {
|
|
|
1490
2135
|
readonly implicitCaching: true;
|
|
1491
2136
|
};
|
|
1492
2137
|
};
|
|
2138
|
+
export declare const OPENGENI_OPENROUTER_MODELS: readonly OpenRouterCatalogModel[];
|
|
2139
|
+
export declare function configuredGatewayUpstreamModelIds(settings: Settings): string[];
|
|
2140
|
+
export declare function configuredGatewayWorkspaceProductModelIds(settings: Settings): string[];
|
|
2141
|
+
export declare function configuredGatewayOrganizationProductModelIds(settings: Settings): string[];
|
|
2142
|
+
export declare function configuredModelInputIdentities(settings: Settings): string[];
|
|
2143
|
+
export declare function configuredOpenRouterUpstreamModelIds(settings: Settings): string[];
|
|
2144
|
+
export declare function configuredOpenRouterWorkspaceProductModelIds(settings: Settings): string[];
|
|
2145
|
+
export declare function configuredOpenRouterOrganizationProductModelIds(settings: Settings): string[];
|
|
1493
2146
|
/**
|
|
1494
2147
|
* Built-in OpenGeni credit pricing schedules.
|
|
1495
2148
|
*
|
|
1496
2149
|
* Rates are provider list prices in USD micros per 1M tokens. Debit applies
|
|
1497
|
-
* `marginBps` (
|
|
2150
|
+
* `marginBps` (500 = +5%) on top. Long-context tiers follow OpenAI's
|
|
1498
2151
|
* ">272K input tokens" rule (threshold exclusive of 272_000).
|
|
1499
2152
|
*
|
|
1500
2153
|
* GPT-5.4 and older families are intentionally omitted — they are no longer
|
|
1501
|
-
* offered. Codex / connected-subscription turns use `metering: external
|
|
1502
|
-
* never
|
|
2154
|
+
* offered. Codex / connected-subscription turns use `metering: external`, so
|
|
2155
|
+
* this map never debits them, but it does provide their equivalent OpenGeni
|
|
2156
|
+
* credit price when a matching product model is configured.
|
|
1503
2157
|
*
|
|
1504
2158
|
* When adding or changing a billed model, run `bun run check:model-pricing`
|
|
1505
2159
|
* (see docs/model-providers.md § Price audit). That compares this map to
|
|
@@ -1513,7 +2167,7 @@ export type SandboxRequiredEnv = {
|
|
|
1513
2167
|
export declare const SANDBOX_REQUIRED_ENV: Record<z.infer<typeof SandboxBackend>, readonly SandboxRequiredEnv[]>;
|
|
1514
2168
|
/** The required OPENGENI_* env var names for a backend (for the deployment manifest). */
|
|
1515
2169
|
export declare function requiredSandboxEnvForBackend(backend: z.infer<typeof SandboxBackend>): string[];
|
|
1516
|
-
export declare function getSettings(): Settings;
|
|
2170
|
+
export declare function getSettings(source?: NodeJS.ProcessEnv): Settings;
|
|
1517
2171
|
/**
|
|
1518
2172
|
* First-party session tools need a shared HMAC identity even in the unauthenticated
|
|
1519
2173
|
* local product mode. A fixed local-only value is no broader than that mode's
|
|
@@ -1561,7 +2215,10 @@ export declare function effectiveSandboxLifecycle(settings: Settings, backend?:
|
|
|
1561
2215
|
* consumers at one hour.
|
|
1562
2216
|
*/
|
|
1563
2217
|
export declare function sandboxArchiveCaptureTimeoutMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs">): number;
|
|
1564
|
-
|
|
2218
|
+
/** Provider operation budget used only by zero-holder drain/rotation capture.
|
|
2219
|
+
* Unset preserves the historical shared snapshot budget exactly. */
|
|
2220
|
+
export declare function effectiveSandboxDrainSnapshotTimeoutMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs" | "sandboxDrainSnapshotTimeoutMs">): number;
|
|
2221
|
+
export declare function sandboxLifecycleTransitionWaitMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs" | "sandboxDrainSnapshotTimeoutMs" | "sandboxLeaseReaperPeriodMs">): number;
|
|
1565
2222
|
export declare function collectSandboxEnvironment(settings: Settings, source?: NodeJS.ProcessEnv): Record<string, string>;
|
|
1566
2223
|
/**
|
|
1567
2224
|
* Resolved API key for a registry provider: the inline `apiKey` when present,
|
|
@@ -1571,11 +2228,45 @@ export declare function collectSandboxEnvironment(settings: Settings, source?: N
|
|
|
1571
2228
|
* explicit environment in tests.
|
|
1572
2229
|
*/
|
|
1573
2230
|
export declare function resolveProviderApiKey(provider: Pick<RegistryProvider, "apiKey" | "apiKeyEnv">, source?: NodeJS.ProcessEnv): string | undefined;
|
|
1574
|
-
export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string): ConfiguredModel["requestPolicy"];
|
|
2231
|
+
export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string, models?: readonly GatewayCatalogModel[]): ConfiguredModel["requestPolicy"];
|
|
1575
2232
|
/** Static catalog overlay; it contains no concrete workspace credential. */
|
|
1576
|
-
export declare function withWorkspaceGatewayCatalogProvider(settings: Settings
|
|
2233
|
+
export declare function withWorkspaceGatewayCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2234
|
+
upstreamModelId: string;
|
|
2235
|
+
label?: string | null;
|
|
2236
|
+
}[]): Settings;
|
|
1577
2237
|
/** Runtime overlay after the worker resolves the workspace's encrypted key. */
|
|
1578
|
-
export declare function withWorkspaceGatewayCredential(settings: Settings, apiKey: string
|
|
2238
|
+
export declare function withWorkspaceGatewayCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2239
|
+
upstreamModelId: string;
|
|
2240
|
+
label?: string | null;
|
|
2241
|
+
}[]): Settings;
|
|
2242
|
+
/** Static OpenRouter catalog overlay; it contains no concrete workspace credential. */
|
|
2243
|
+
export declare function withWorkspaceOpenRouterCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2244
|
+
upstreamModelId: string;
|
|
2245
|
+
label?: string | null;
|
|
2246
|
+
}[]): Settings;
|
|
2247
|
+
/** Runtime overlay after the worker resolves the workspace's encrypted OpenRouter key. */
|
|
2248
|
+
export declare function withWorkspaceOpenRouterCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2249
|
+
upstreamModelId: string;
|
|
2250
|
+
label?: string | null;
|
|
2251
|
+
}[]): Settings;
|
|
2252
|
+
/** Secret-free organization Vercel AI Gateway catalog overlay. */
|
|
2253
|
+
export declare function withOrganizationGatewayCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2254
|
+
upstreamModelId: string;
|
|
2255
|
+
label?: string | null;
|
|
2256
|
+
}[]): Settings;
|
|
2257
|
+
export declare function withOrganizationGatewayCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2258
|
+
upstreamModelId: string;
|
|
2259
|
+
label?: string | null;
|
|
2260
|
+
}[]): Settings;
|
|
2261
|
+
/** Secret-free organization OpenRouter catalog overlay. */
|
|
2262
|
+
export declare function withOrganizationOpenRouterCatalogProvider(settings: Settings, customModels?: readonly {
|
|
2263
|
+
upstreamModelId: string;
|
|
2264
|
+
label?: string | null;
|
|
2265
|
+
}[]): Settings;
|
|
2266
|
+
export declare function withOrganizationOpenRouterCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
2267
|
+
upstreamModelId: string;
|
|
2268
|
+
label?: string | null;
|
|
2269
|
+
}[]): Settings;
|
|
1579
2270
|
/**
|
|
1580
2271
|
* Product display label for catalog/picker UI.
|
|
1581
2272
|
* Same string for OpenAI and Codex copies of a slug (`gpt-5.6-luna` and
|
|
@@ -1599,6 +2290,7 @@ export declare function serviceTierForLatencyMode(providerId: string, latencyMod
|
|
|
1599
2290
|
/** True when the response tier fulfills a non-standard Fast/priority request. */
|
|
1600
2291
|
export declare function responseSatisfiesLatencyMode(requested: LatencyMode, responseServiceTier: string | null | undefined): boolean;
|
|
1601
2292
|
export declare function runnableLatencyModesForModel(settings: Settings, modelId: string): LatencyMode[];
|
|
2293
|
+
export declare function modelCostClassForConfiguredModel(_settings: Settings, model: Pick<ConfiguredModel, "cost">): ConfiguredModelCostClass;
|
|
1602
2294
|
/**
|
|
1603
2295
|
* The built-in provider's stable id: "openai" on the OpenAI platform, "azure"
|
|
1604
2296
|
* on Azure. Exported because the workspace model-policy gate must attribute
|
|
@@ -1615,7 +2307,7 @@ export declare function builtinProviderId(settings: Pick<Settings, "openaiProvid
|
|
|
1615
2307
|
* registry entry for the rest. Registry ids may not collide with the built-in
|
|
1616
2308
|
* id — validateSettings rejects that at boot.
|
|
1617
2309
|
*/
|
|
1618
|
-
export declare function configuredProviders(settings: Settings): ResolvedModelProvider[];
|
|
2310
|
+
export declare function configuredProviders(settings: Settings, source?: NodeJS.ProcessEnv): ResolvedModelProvider[];
|
|
1619
2311
|
/**
|
|
1620
2312
|
* Pure catalog overlay for a workspace whose existing Codex connection seam
|
|
1621
2313
|
* reports ready. This describes product/provider identity only; it does not
|
|
@@ -1651,7 +2343,7 @@ export declare function policyProviderIdForModel(settings: Settings, modelId: st
|
|
|
1651
2343
|
* default false). De-duplicated by id (first wins) so the default model stays
|
|
1652
2344
|
* first and the built-in allow-list takes precedence over registry entries.
|
|
1653
2345
|
*/
|
|
1654
|
-
export declare function configuredModels(settings: Settings): ConfiguredModel[];
|
|
2346
|
+
export declare function configuredModels(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
|
|
1655
2347
|
/** Resolve a known canonical id or alias. Unknown strings are returned unchanged. */
|
|
1656
2348
|
export declare function canonicalizeConfiguredModelId(settings: Settings, modelId: string): string;
|
|
1657
2349
|
/**
|
|
@@ -1683,6 +2375,12 @@ export type ResolveTurnExecutionPolicyV1Input = {
|
|
|
1683
2375
|
latencyMode?: LatencyMode;
|
|
1684
2376
|
latencyModeSource?: TurnExecutionLatencyModeSourceV1;
|
|
1685
2377
|
};
|
|
2378
|
+
/**
|
|
2379
|
+
* Resolve the static catalog identity used by an accepted turn. Subscription
|
|
2380
|
+
* overlays contain no account or bearer and do not prove connection readiness;
|
|
2381
|
+
* callers must keep their live credential/readiness gate authoritative.
|
|
2382
|
+
*/
|
|
2383
|
+
export declare function resolveModelProviderForTurn(settings: Settings, modelId: string): ReturnType<typeof resolveModelProvider>;
|
|
1686
2384
|
/**
|
|
1687
2385
|
* Build a trusted, secret-safe execution policy from the normalized catalog.
|
|
1688
2386
|
* The Codex overlay here contains static product/provider identity only; it
|
|
@@ -1705,10 +2403,9 @@ export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Setti
|
|
|
1705
2403
|
};
|
|
1706
2404
|
/**
|
|
1707
2405
|
* 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.
|
|
2406
|
+
* flat defaults → registry model flat/scheduled pricing → explicit
|
|
2407
|
+
* OPENGENI_MODEL_PRICING_JSON. Explicit entries may be legacy flat prices or a
|
|
2408
|
+
* complete schedule, and always replace the lower-precedence schedule.
|
|
1712
2409
|
*/
|
|
1713
2410
|
export declare function configuredModelPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
|
|
1714
2411
|
/** Legacy flat projection: returns the default/below-threshold price. */
|
|
@@ -1742,6 +2439,8 @@ export declare function calculateModelUsageCostBreakdown(settings: Settings, mod
|
|
|
1742
2439
|
export declare function calculateGatewayReportedCostMicros(settings: Settings, model: string, inferenceCostUsd: string, options?: {
|
|
1743
2440
|
inputTokens?: number;
|
|
1744
2441
|
}): number;
|
|
2442
|
+
/** Exact provider-reported Gateway cost without requiring an OpenGeni price schedule. */
|
|
2443
|
+
export declare function calculateGatewayReportedProviderCostMicros(inferenceCostUsd: string): number;
|
|
1745
2444
|
export declare function calculateGatewayReportedCostBreakdown(settings: Settings, model: string, inferenceCostUsd: string, options?: {
|
|
1746
2445
|
inputTokens?: number;
|
|
1747
2446
|
}): ModelUsageCostBreakdown;
|
|
@@ -1876,7 +2575,7 @@ export declare function sandboxEnvironmentVariableNames(settings: Settings): str
|
|
|
1876
2575
|
export declare function sandboxLifecycleHookIds(settings: Settings): string[];
|
|
1877
2576
|
export declare function parseExposedPorts(raw: string): number[];
|
|
1878
2577
|
export declare function parseMcpServers(raw: string | undefined): unknown[] | undefined;
|
|
1879
|
-
export declare function parseModelPricingJson(raw: string): Record<string, ModelPricing>;
|
|
2578
|
+
export declare function parseModelPricingJson(raw: string): Record<string, ModelPricing | ModelPricingScheduleV1>;
|
|
1880
2579
|
export declare function parseSandboxWarmRateJson(raw: string): Record<string, number>;
|
|
1881
2580
|
export declare function sandboxWarmRateMicrosPerSecond(settings: Settings, backend: string): number;
|
|
1882
2581
|
/**
|
|
@@ -1919,6 +2618,8 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
|
|
|
1919
2618
|
export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
1920
2619
|
export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
1921
2620
|
export declare function codemodeWorkspaceUrl(settings: Settings, workspaceId: string): string;
|
|
2621
|
+
/** Validate one fully resolved, secret-bearing executable catalog. */
|
|
2622
|
+
export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
|
|
1922
2623
|
/**
|
|
1923
2624
|
* Resolve the secret used to sign/verify scoped stream tokens (sandbox contract
|
|
1924
2625
|
* §C.3). Falls back to `delegationSecret` (the same HMAC envelope family —
|