@opengeni/config 1.4.2 → 1.4.5-canary.37458084490001
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 +875 -70
- package/dist/index.js +514 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +781 -8
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,23 @@ import { type AgentConfigDeploymentLimits, Entitlements, LatencyMode, ReasoningE
|
|
|
6
6
|
import type { CodeSearchDeploymentPolicy } from "@opengeni/contracts/code-search";
|
|
7
7
|
export { XAI_SUBSCRIPTION_MODEL_ID_PREFIX } from "@opengeni/xai-subscription";
|
|
8
8
|
import { z } from "zod";
|
|
9
|
+
/**
|
|
10
|
+
* Default maximum provider silence on a generic OpenAI-compatible model stream
|
|
11
|
+
* while the worker is waiting for the next chunk. Matches the Codex transport
|
|
12
|
+
* and SuperGrok idle defaults (5 minutes): long enough for a reasoning model's
|
|
13
|
+
* silent thinking gaps, short enough that a wedged stream recovers the same
|
|
14
|
+
* turn instead of hanging until a worker roll.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_MODEL_STREAM_IDLE_TIMEOUT_MS = 300000;
|
|
17
|
+
/**
|
|
18
|
+
* Default maximum wait across keepalive-only traffic (SSE comments, `ping` /
|
|
19
|
+
* `keepalive` events, repeated `response.in_progress`) for the next
|
|
20
|
+
* model-progress event on a generic model stream. A provider can keep a
|
|
21
|
+
* connection alive while its generation is wedged; this bounds that case.
|
|
22
|
+
* Ten minutes leaves room for a reasoning model's longest silent thinking
|
|
23
|
+
* window (reasoning summaries stream as progress).
|
|
24
|
+
*/
|
|
25
|
+
export declare const DEFAULT_MODEL_STREAM_PROGRESS_TIMEOUT_MS = 600000;
|
|
9
26
|
export declare const DEFAULT_OPENROUTER_MODEL_ID: "openrouter/nvidia/nemotron-3-super-120b-a12b:free";
|
|
10
27
|
export declare const DEFAULT_MODEL_COST_POLICY_JSON: string;
|
|
11
28
|
export declare const SANDBOX_ARCHIVE_CAPTURE_MAX_TIMEOUT_MS: number;
|
|
@@ -265,6 +282,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
265
282
|
memory_correct: "memory_correct";
|
|
266
283
|
memory_save: "memory_save";
|
|
267
284
|
memory_search: "memory_search";
|
|
285
|
+
notify_user: "notify_user";
|
|
268
286
|
preference_propose: "preference_propose";
|
|
269
287
|
preference_registry_get: "preference_registry_get";
|
|
270
288
|
preference_registry_summary: "preference_registry_summary";
|
|
@@ -444,6 +462,7 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
444
462
|
memory_correct: "memory_correct";
|
|
445
463
|
memory_save: "memory_save";
|
|
446
464
|
memory_search: "memory_search";
|
|
465
|
+
notify_user: "notify_user";
|
|
447
466
|
preference_propose: "preference_propose";
|
|
448
467
|
preference_registry_get: "preference_registry_get";
|
|
449
468
|
preference_registry_summary: "preference_registry_summary";
|
|
@@ -668,14 +687,19 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
668
687
|
modelCostPolicyJson: z.ZodDefault<z.ZodString>;
|
|
669
688
|
modelNotesJson: z.ZodDefault<z.ZodString>;
|
|
670
689
|
openrouterApiKey: z.ZodOptional<z.ZodString>;
|
|
690
|
+
opperApiKey: z.ZodOptional<z.ZodString>;
|
|
691
|
+
managedModelsJson: z.ZodOptional<z.ZodString>;
|
|
671
692
|
resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
|
|
672
693
|
resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
|
|
694
|
+
resolvedOpperModelsJson: z.ZodOptional<z.ZodString>;
|
|
673
695
|
resolvedCodexModelsJson: z.ZodOptional<z.ZodString>;
|
|
674
696
|
modelProvidersJson: z.ZodDefault<z.ZodString>;
|
|
675
697
|
codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
676
698
|
supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
677
699
|
claudeSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
678
700
|
supergrokResponseStreamIdleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
701
|
+
modelStreamIdleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
702
|
+
modelStreamProgressTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
679
703
|
codexConnectedAppsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
680
704
|
codexProductSku: z.ZodOptional<z.ZodString>;
|
|
681
705
|
codexToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
@@ -976,6 +1000,12 @@ declare const SettingsSchema: z.ZodObject<{
|
|
|
976
1000
|
dual: "dual";
|
|
977
1001
|
legacy: "legacy";
|
|
978
1002
|
}>>;
|
|
1003
|
+
nativeAppSchemes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1004
|
+
nativeAppIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
1005
|
+
apnsKeyId: z.ZodOptional<z.ZodString>;
|
|
1006
|
+
apnsTeamId: z.ZodOptional<z.ZodString>;
|
|
1007
|
+
apnsPrivateKey: z.ZodOptional<z.ZodString>;
|
|
1008
|
+
fcmServiceAccountJson: z.ZodOptional<z.ZodString>;
|
|
979
1009
|
managedAuthNewSignupsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
|
|
980
1010
|
organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
|
|
981
1011
|
fragment: "fragment";
|
|
@@ -1580,6 +1610,8 @@ export declare const RegistryProviderKind: z.ZodEnum<{
|
|
|
1580
1610
|
"direct-openai-workspace": "direct-openai-workspace";
|
|
1581
1611
|
"openrouter-organization": "openrouter-organization";
|
|
1582
1612
|
"openrouter-workspace": "openrouter-workspace";
|
|
1613
|
+
"opper-organization": "opper-organization";
|
|
1614
|
+
"opper-workspace": "opper-workspace";
|
|
1583
1615
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1584
1616
|
"vercel-gateway-organization": "vercel-gateway-organization";
|
|
1585
1617
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
@@ -1639,6 +1671,8 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1639
1671
|
"direct-openai-workspace": "direct-openai-workspace";
|
|
1640
1672
|
"openrouter-organization": "openrouter-organization";
|
|
1641
1673
|
"openrouter-workspace": "openrouter-workspace";
|
|
1674
|
+
"opper-organization": "opper-organization";
|
|
1675
|
+
"opper-workspace": "opper-workspace";
|
|
1642
1676
|
"vercel-gateway-managed": "vercel-gateway-managed";
|
|
1643
1677
|
"vercel-gateway-organization": "vercel-gateway-organization";
|
|
1644
1678
|
"vercel-gateway-workspace": "vercel-gateway-workspace";
|
|
@@ -1672,6 +1706,8 @@ declare const RegistryProviderSchema: z.ZodObject<{
|
|
|
1672
1706
|
maxOutputTokens: z.ZodDefault<z.ZodNumber>;
|
|
1673
1707
|
streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
1674
1708
|
}, z.core.$strip>>;
|
|
1709
|
+
streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1710
|
+
streamProgressTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1675
1711
|
wireProfile: z.ZodDefault<z.ZodEnum<{
|
|
1676
1712
|
"azure-openai": "azure-openai";
|
|
1677
1713
|
openai: "openai";
|
|
@@ -1883,6 +1919,14 @@ export declare const WORKSPACE_OPENROUTER_MODEL_ID_PREFIX: "workspace-openrouter
|
|
|
1883
1919
|
export declare const ORGANIZATION_OPENROUTER_PROVIDER_ID: "organization-openrouter";
|
|
1884
1920
|
export declare const ORGANIZATION_OPENROUTER_MODEL_ID_PREFIX: "organization-openrouter/";
|
|
1885
1921
|
export declare const OPENROUTER_BASE_URL: "https://openrouter.ai/api/v1";
|
|
1922
|
+
export declare const OPPER_PROVIDER_ID: "opper";
|
|
1923
|
+
export declare const OPPER_MODEL_ID_PREFIX: "opper/";
|
|
1924
|
+
export declare const WORKSPACE_OPPER_PROVIDER_ID: "workspace-opper";
|
|
1925
|
+
export declare const WORKSPACE_OPPER_MODEL_ID_PREFIX: "workspace-opper/";
|
|
1926
|
+
export declare const ORGANIZATION_OPPER_PROVIDER_ID: "organization-opper";
|
|
1927
|
+
export declare const ORGANIZATION_OPPER_MODEL_ID_PREFIX: "organization-opper/";
|
|
1928
|
+
/** Opper's OpenAI-compatible Chat Completions surface (Bearer key). */
|
|
1929
|
+
export declare const OPPER_BASE_URL: "https://api.opper.ai/v3/compat";
|
|
1886
1930
|
export declare const ModelCostClass: z.ZodEnum<{
|
|
1887
1931
|
credits: "credits";
|
|
1888
1932
|
free: "free";
|
|
@@ -2102,6 +2146,196 @@ export declare const OpenRouterCatalogModel: z.ZodObject<{
|
|
|
2102
2146
|
apiKey: z.ZodOptional<z.ZodNever>;
|
|
2103
2147
|
}, z.core.$strict>;
|
|
2104
2148
|
export type OpenRouterCatalogModel = z.infer<typeof OpenRouterCatalogModel>;
|
|
2149
|
+
/**
|
|
2150
|
+
* One reviewed Opper route. `upstreamModelId` is Opper's exact catalogue id:
|
|
2151
|
+
* a bare upstream name is a pool (Opper picks the serving provider), while a
|
|
2152
|
+
* `provider/model` id pins one route and region. Curated entries pin a route.
|
|
2153
|
+
* Code-defined entries may carry a reviewed price; database documents may not.
|
|
2154
|
+
*/
|
|
2155
|
+
export declare const OpperCatalogModel: z.ZodObject<{
|
|
2156
|
+
upstreamModelId: z.ZodString;
|
|
2157
|
+
label: z.ZodString;
|
|
2158
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
2159
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
2160
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2161
|
+
capabilities: z.ZodObject<{
|
|
2162
|
+
reasoning: z.ZodObject<{
|
|
2163
|
+
upstream: z.ZodEnum<{
|
|
2164
|
+
supported: "supported";
|
|
2165
|
+
unknown: "unknown";
|
|
2166
|
+
unsupported: "unsupported";
|
|
2167
|
+
}>;
|
|
2168
|
+
runnable: z.ZodBoolean;
|
|
2169
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
2170
|
+
high: "high";
|
|
2171
|
+
low: "low";
|
|
2172
|
+
max: "max";
|
|
2173
|
+
medium: "medium";
|
|
2174
|
+
minimal: "minimal";
|
|
2175
|
+
none: "none";
|
|
2176
|
+
xhigh: "xhigh";
|
|
2177
|
+
}>>;
|
|
2178
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
2179
|
+
high: "high";
|
|
2180
|
+
low: "low";
|
|
2181
|
+
max: "max";
|
|
2182
|
+
medium: "medium";
|
|
2183
|
+
minimal: "minimal";
|
|
2184
|
+
none: "none";
|
|
2185
|
+
xhigh: "xhigh";
|
|
2186
|
+
}>>;
|
|
2187
|
+
required: z.ZodBoolean;
|
|
2188
|
+
}, z.core.$strip>;
|
|
2189
|
+
functionCalling: z.ZodObject<{
|
|
2190
|
+
upstream: z.ZodEnum<{
|
|
2191
|
+
supported: "supported";
|
|
2192
|
+
unknown: "unknown";
|
|
2193
|
+
unsupported: "unsupported";
|
|
2194
|
+
}>;
|
|
2195
|
+
runnable: z.ZodBoolean;
|
|
2196
|
+
}, z.core.$strip>;
|
|
2197
|
+
structuredOutput: z.ZodObject<{
|
|
2198
|
+
upstream: z.ZodEnum<{
|
|
2199
|
+
supported: "supported";
|
|
2200
|
+
unknown: "unknown";
|
|
2201
|
+
unsupported: "unsupported";
|
|
2202
|
+
}>;
|
|
2203
|
+
runnable: z.ZodBoolean;
|
|
2204
|
+
}, z.core.$strip>;
|
|
2205
|
+
hostedTools: z.ZodObject<{
|
|
2206
|
+
webSearch: z.ZodObject<{
|
|
2207
|
+
upstream: z.ZodEnum<{
|
|
2208
|
+
supported: "supported";
|
|
2209
|
+
unknown: "unknown";
|
|
2210
|
+
unsupported: "unsupported";
|
|
2211
|
+
}>;
|
|
2212
|
+
runnable: z.ZodBoolean;
|
|
2213
|
+
}, z.core.$strip>;
|
|
2214
|
+
xSearch: z.ZodObject<{
|
|
2215
|
+
upstream: z.ZodEnum<{
|
|
2216
|
+
supported: "supported";
|
|
2217
|
+
unknown: "unknown";
|
|
2218
|
+
unsupported: "unsupported";
|
|
2219
|
+
}>;
|
|
2220
|
+
runnable: z.ZodBoolean;
|
|
2221
|
+
}, z.core.$strip>;
|
|
2222
|
+
codeExecution: z.ZodObject<{
|
|
2223
|
+
upstream: z.ZodEnum<{
|
|
2224
|
+
supported: "supported";
|
|
2225
|
+
unknown: "unknown";
|
|
2226
|
+
unsupported: "unsupported";
|
|
2227
|
+
}>;
|
|
2228
|
+
runnable: z.ZodBoolean;
|
|
2229
|
+
}, z.core.$strip>;
|
|
2230
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
2231
|
+
upstream: z.ZodEnum<{
|
|
2232
|
+
supported: "supported";
|
|
2233
|
+
unknown: "unknown";
|
|
2234
|
+
unsupported: "unsupported";
|
|
2235
|
+
}>;
|
|
2236
|
+
runnable: z.ZodBoolean;
|
|
2237
|
+
}, z.core.$strip>>;
|
|
2238
|
+
}, z.core.$strip>;
|
|
2239
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
2240
|
+
audio: "audio";
|
|
2241
|
+
image: "image";
|
|
2242
|
+
text: "text";
|
|
2243
|
+
}>>;
|
|
2244
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2245
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
2246
|
+
audio: "audio";
|
|
2247
|
+
image: "image";
|
|
2248
|
+
text: "text";
|
|
2249
|
+
}>>;
|
|
2250
|
+
transports: z.ZodObject<{
|
|
2251
|
+
sse: z.ZodObject<{
|
|
2252
|
+
upstream: z.ZodEnum<{
|
|
2253
|
+
supported: "supported";
|
|
2254
|
+
unknown: "unknown";
|
|
2255
|
+
unsupported: "unsupported";
|
|
2256
|
+
}>;
|
|
2257
|
+
runnable: z.ZodBoolean;
|
|
2258
|
+
}, z.core.$strip>;
|
|
2259
|
+
responsesWebSocket: z.ZodObject<{
|
|
2260
|
+
upstream: z.ZodEnum<{
|
|
2261
|
+
supported: "supported";
|
|
2262
|
+
unknown: "unknown";
|
|
2263
|
+
unsupported: "unsupported";
|
|
2264
|
+
}>;
|
|
2265
|
+
runnable: z.ZodBoolean;
|
|
2266
|
+
}, z.core.$strip>;
|
|
2267
|
+
realtimeAudio: z.ZodObject<{
|
|
2268
|
+
upstream: z.ZodEnum<{
|
|
2269
|
+
supported: "supported";
|
|
2270
|
+
unknown: "unknown";
|
|
2271
|
+
unsupported: "unsupported";
|
|
2272
|
+
}>;
|
|
2273
|
+
runnable: z.ZodBoolean;
|
|
2274
|
+
}, z.core.$strip>;
|
|
2275
|
+
}, z.core.$strip>;
|
|
2276
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
2277
|
+
upstream: z.ZodEnum<{
|
|
2278
|
+
supported: "supported";
|
|
2279
|
+
unknown: "unknown";
|
|
2280
|
+
unsupported: "unsupported";
|
|
2281
|
+
}>;
|
|
2282
|
+
runnable: z.ZodBoolean;
|
|
2283
|
+
mode: z.ZodEnum<{
|
|
2284
|
+
automatic: "automatic";
|
|
2285
|
+
implicit: "implicit";
|
|
2286
|
+
none: "none";
|
|
2287
|
+
}>;
|
|
2288
|
+
}, z.core.$strip>>;
|
|
2289
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
2290
|
+
id: z.ZodEnum<{
|
|
2291
|
+
fast: "fast";
|
|
2292
|
+
priority: "priority";
|
|
2293
|
+
standard: "standard";
|
|
2294
|
+
}>;
|
|
2295
|
+
upstream: z.ZodEnum<{
|
|
2296
|
+
supported: "supported";
|
|
2297
|
+
unknown: "unknown";
|
|
2298
|
+
unsupported: "unsupported";
|
|
2299
|
+
}>;
|
|
2300
|
+
runnable: z.ZodBoolean;
|
|
2301
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
2302
|
+
}, z.core.$strip>>;
|
|
2303
|
+
}, z.core.$strip>;
|
|
2304
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
2305
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
2306
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
2307
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
2308
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
2309
|
+
pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
2310
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
2311
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2312
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2313
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
2314
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
2315
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2316
|
+
default: z.ZodObject<{
|
|
2317
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
2318
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2319
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2320
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
2321
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
2322
|
+
}, z.core.$strip>;
|
|
2323
|
+
inputTokenTiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2324
|
+
minimumInputTokens: z.ZodNumber;
|
|
2325
|
+
pricing: z.ZodObject<{
|
|
2326
|
+
inputMicrosPerMillionTokens: z.ZodNumber;
|
|
2327
|
+
cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2328
|
+
cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
|
|
2329
|
+
outputMicrosPerMillionTokens: z.ZodNumber;
|
|
2330
|
+
marginBps: z.ZodOptional<z.ZodNumber>;
|
|
2331
|
+
}, z.core.$strip>;
|
|
2332
|
+
}, z.core.$strip>>>;
|
|
2333
|
+
}, z.core.$strip>]>>;
|
|
2334
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
2335
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
2336
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
2337
|
+
}, z.core.$strict>;
|
|
2338
|
+
export type OpperCatalogModel = z.infer<typeof OpperCatalogModel>;
|
|
2105
2339
|
export declare const ModelCatalogDocument: z.ZodObject<{
|
|
2106
2340
|
schemaVersion: z.ZodLiteral<1>;
|
|
2107
2341
|
defaultModel: z.ZodOptional<z.ZodString>;
|
|
@@ -2135,6 +2369,8 @@ export declare const ModelCatalogDocument: z.ZodObject<{
|
|
|
2135
2369
|
maxOutputTokens: z.ZodDefault<z.ZodNumber>;
|
|
2136
2370
|
streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
2137
2371
|
}, z.core.$strip>>;
|
|
2372
|
+
streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
2373
|
+
streamProgressTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
2138
2374
|
wireProfile: z.ZodDefault<z.ZodEnum<{
|
|
2139
2375
|
"azure-openai": "azure-openai";
|
|
2140
2376
|
openai: "openai";
|
|
@@ -2811,76 +3047,590 @@ export declare const ModelCatalogDocument: z.ZodObject<{
|
|
|
2811
3047
|
pricing: z.ZodOptional<z.ZodNever>;
|
|
2812
3048
|
apiKey: z.ZodOptional<z.ZodNever>;
|
|
2813
3049
|
}, z.core.$strict>>>;
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
3050
|
+
opperModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
3051
|
+
upstreamModelId: z.ZodString;
|
|
3052
|
+
label: z.ZodString;
|
|
3053
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
3054
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
3055
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3056
|
+
capabilities: z.ZodObject<{
|
|
3057
|
+
reasoning: z.ZodObject<{
|
|
3058
|
+
upstream: z.ZodEnum<{
|
|
3059
|
+
supported: "supported";
|
|
3060
|
+
unknown: "unknown";
|
|
3061
|
+
unsupported: "unsupported";
|
|
3062
|
+
}>;
|
|
3063
|
+
runnable: z.ZodBoolean;
|
|
3064
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
3065
|
+
high: "high";
|
|
3066
|
+
low: "low";
|
|
3067
|
+
max: "max";
|
|
3068
|
+
medium: "medium";
|
|
3069
|
+
minimal: "minimal";
|
|
3070
|
+
none: "none";
|
|
3071
|
+
xhigh: "xhigh";
|
|
3072
|
+
}>>;
|
|
3073
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
3074
|
+
high: "high";
|
|
3075
|
+
low: "low";
|
|
3076
|
+
max: "max";
|
|
3077
|
+
medium: "medium";
|
|
3078
|
+
minimal: "minimal";
|
|
3079
|
+
none: "none";
|
|
3080
|
+
xhigh: "xhigh";
|
|
3081
|
+
}>>;
|
|
3082
|
+
required: z.ZodBoolean;
|
|
3083
|
+
}, z.core.$strip>;
|
|
3084
|
+
functionCalling: z.ZodObject<{
|
|
3085
|
+
upstream: z.ZodEnum<{
|
|
3086
|
+
supported: "supported";
|
|
3087
|
+
unknown: "unknown";
|
|
3088
|
+
unsupported: "unsupported";
|
|
3089
|
+
}>;
|
|
3090
|
+
runnable: z.ZodBoolean;
|
|
3091
|
+
}, z.core.$strip>;
|
|
3092
|
+
structuredOutput: z.ZodObject<{
|
|
3093
|
+
upstream: z.ZodEnum<{
|
|
3094
|
+
supported: "supported";
|
|
3095
|
+
unknown: "unknown";
|
|
3096
|
+
unsupported: "unsupported";
|
|
3097
|
+
}>;
|
|
3098
|
+
runnable: z.ZodBoolean;
|
|
3099
|
+
}, z.core.$strip>;
|
|
3100
|
+
hostedTools: z.ZodObject<{
|
|
3101
|
+
webSearch: z.ZodObject<{
|
|
3102
|
+
upstream: z.ZodEnum<{
|
|
3103
|
+
supported: "supported";
|
|
3104
|
+
unknown: "unknown";
|
|
3105
|
+
unsupported: "unsupported";
|
|
3106
|
+
}>;
|
|
3107
|
+
runnable: z.ZodBoolean;
|
|
3108
|
+
}, z.core.$strip>;
|
|
3109
|
+
xSearch: z.ZodObject<{
|
|
3110
|
+
upstream: z.ZodEnum<{
|
|
3111
|
+
supported: "supported";
|
|
3112
|
+
unknown: "unknown";
|
|
3113
|
+
unsupported: "unsupported";
|
|
3114
|
+
}>;
|
|
3115
|
+
runnable: z.ZodBoolean;
|
|
3116
|
+
}, z.core.$strip>;
|
|
3117
|
+
codeExecution: z.ZodObject<{
|
|
3118
|
+
upstream: z.ZodEnum<{
|
|
3119
|
+
supported: "supported";
|
|
3120
|
+
unknown: "unknown";
|
|
3121
|
+
unsupported: "unsupported";
|
|
3122
|
+
}>;
|
|
3123
|
+
runnable: z.ZodBoolean;
|
|
3124
|
+
}, z.core.$strip>;
|
|
3125
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
3126
|
+
upstream: z.ZodEnum<{
|
|
3127
|
+
supported: "supported";
|
|
3128
|
+
unknown: "unknown";
|
|
3129
|
+
unsupported: "unsupported";
|
|
3130
|
+
}>;
|
|
3131
|
+
runnable: z.ZodBoolean;
|
|
3132
|
+
}, z.core.$strip>>;
|
|
3133
|
+
}, z.core.$strip>;
|
|
3134
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
3135
|
+
audio: "audio";
|
|
3136
|
+
image: "image";
|
|
3137
|
+
text: "text";
|
|
3138
|
+
}>>;
|
|
3139
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3140
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
3141
|
+
audio: "audio";
|
|
3142
|
+
image: "image";
|
|
3143
|
+
text: "text";
|
|
3144
|
+
}>>;
|
|
3145
|
+
transports: z.ZodObject<{
|
|
3146
|
+
sse: z.ZodObject<{
|
|
3147
|
+
upstream: z.ZodEnum<{
|
|
3148
|
+
supported: "supported";
|
|
3149
|
+
unknown: "unknown";
|
|
3150
|
+
unsupported: "unsupported";
|
|
3151
|
+
}>;
|
|
3152
|
+
runnable: z.ZodBoolean;
|
|
3153
|
+
}, z.core.$strip>;
|
|
3154
|
+
responsesWebSocket: z.ZodObject<{
|
|
3155
|
+
upstream: z.ZodEnum<{
|
|
3156
|
+
supported: "supported";
|
|
3157
|
+
unknown: "unknown";
|
|
3158
|
+
unsupported: "unsupported";
|
|
3159
|
+
}>;
|
|
3160
|
+
runnable: z.ZodBoolean;
|
|
3161
|
+
}, z.core.$strip>;
|
|
3162
|
+
realtimeAudio: z.ZodObject<{
|
|
3163
|
+
upstream: z.ZodEnum<{
|
|
3164
|
+
supported: "supported";
|
|
3165
|
+
unknown: "unknown";
|
|
3166
|
+
unsupported: "unsupported";
|
|
3167
|
+
}>;
|
|
3168
|
+
runnable: z.ZodBoolean;
|
|
3169
|
+
}, z.core.$strip>;
|
|
3170
|
+
}, z.core.$strip>;
|
|
3171
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
3172
|
+
upstream: z.ZodEnum<{
|
|
3173
|
+
supported: "supported";
|
|
3174
|
+
unknown: "unknown";
|
|
3175
|
+
unsupported: "unsupported";
|
|
3176
|
+
}>;
|
|
3177
|
+
runnable: z.ZodBoolean;
|
|
3178
|
+
mode: z.ZodEnum<{
|
|
3179
|
+
automatic: "automatic";
|
|
3180
|
+
implicit: "implicit";
|
|
3181
|
+
none: "none";
|
|
3182
|
+
}>;
|
|
3183
|
+
}, z.core.$strip>>;
|
|
3184
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
3185
|
+
id: z.ZodEnum<{
|
|
3186
|
+
fast: "fast";
|
|
3187
|
+
priority: "priority";
|
|
3188
|
+
standard: "standard";
|
|
3189
|
+
}>;
|
|
3190
|
+
upstream: z.ZodEnum<{
|
|
3191
|
+
supported: "supported";
|
|
3192
|
+
unknown: "unknown";
|
|
3193
|
+
unsupported: "unsupported";
|
|
3194
|
+
}>;
|
|
3195
|
+
runnable: z.ZodBoolean;
|
|
3196
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
3197
|
+
}, z.core.$strip>>;
|
|
3198
|
+
}, z.core.$strip>;
|
|
3199
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
3200
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
3201
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
3202
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
3203
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
3204
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
3205
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
3206
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
3207
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
3208
|
+
}, z.core.$strict>>>;
|
|
3209
|
+
modelNotes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3210
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
3211
|
+
enabled: z.ZodOptional<z.ZodNever>;
|
|
3212
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
3213
|
+
bands: z.ZodOptional<z.ZodNever>;
|
|
3214
|
+
}, z.core.$strict>;
|
|
3215
|
+
export type ModelCatalogDocument = z.infer<typeof ModelCatalogDocument>;
|
|
3216
|
+
export declare function parseModelCatalogDocument(value: unknown): ModelCatalogDocument;
|
|
3217
|
+
/** Pure secret-free database catalog overlay. getSettings remains env-only. */
|
|
3218
|
+
/**
|
|
3219
|
+
* OPENGENI_MANAGED_MODELS_JSON: the managed-provider slice of a catalog
|
|
3220
|
+
* document for code catalog mode. Each present array uses the database
|
|
3221
|
+
* document's exact strict entry schema (so no entry may carry `pricing`,
|
|
3222
|
+
* credentials, or billing) and replaces that provider's reviewed code table;
|
|
3223
|
+
* an omitted array keeps it. Price authority stays with provider-reported
|
|
3224
|
+
* cost (Gateway/Opper), the reviewed code snapshot, and
|
|
3225
|
+
* OPENGENI_MODEL_PRICING_JSON, which boot validation requires for every
|
|
3226
|
+
* credits-billed product without a reviewed price.
|
|
3227
|
+
*/
|
|
3228
|
+
export declare const ManagedModelsOverride: z.ZodObject<{
|
|
3229
|
+
gatewayModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3230
|
+
productId: z.ZodString;
|
|
3231
|
+
workspaceProductId: z.ZodString;
|
|
3232
|
+
upstreamModelId: z.ZodString;
|
|
3233
|
+
label: z.ZodString;
|
|
3234
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
3235
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
3236
|
+
providers: z.ZodArray<z.ZodString>;
|
|
3237
|
+
implicitCaching: z.ZodDefault<z.ZodBoolean>;
|
|
3238
|
+
vision: z.ZodDefault<z.ZodBoolean>;
|
|
3239
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3240
|
+
contextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
3241
|
+
effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
|
|
3242
|
+
autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
|
|
3243
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
3244
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
3245
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
3246
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
3247
|
+
}, z.core.$strict>>>;
|
|
3248
|
+
openrouterModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3249
|
+
upstreamModelId: z.ZodString;
|
|
3250
|
+
label: z.ZodString;
|
|
3251
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
3252
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
3253
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3254
|
+
capabilities: z.ZodObject<{
|
|
3255
|
+
reasoning: z.ZodObject<{
|
|
3256
|
+
upstream: z.ZodEnum<{
|
|
3257
|
+
supported: "supported";
|
|
3258
|
+
unknown: "unknown";
|
|
3259
|
+
unsupported: "unsupported";
|
|
3260
|
+
}>;
|
|
3261
|
+
runnable: z.ZodBoolean;
|
|
3262
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
3263
|
+
high: "high";
|
|
3264
|
+
low: "low";
|
|
3265
|
+
max: "max";
|
|
3266
|
+
medium: "medium";
|
|
3267
|
+
minimal: "minimal";
|
|
3268
|
+
none: "none";
|
|
3269
|
+
xhigh: "xhigh";
|
|
3270
|
+
}>>;
|
|
3271
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
3272
|
+
high: "high";
|
|
3273
|
+
low: "low";
|
|
3274
|
+
max: "max";
|
|
3275
|
+
medium: "medium";
|
|
3276
|
+
minimal: "minimal";
|
|
3277
|
+
none: "none";
|
|
3278
|
+
xhigh: "xhigh";
|
|
3279
|
+
}>>;
|
|
3280
|
+
required: z.ZodBoolean;
|
|
3281
|
+
}, z.core.$strip>;
|
|
3282
|
+
functionCalling: z.ZodObject<{
|
|
3283
|
+
upstream: z.ZodEnum<{
|
|
3284
|
+
supported: "supported";
|
|
3285
|
+
unknown: "unknown";
|
|
3286
|
+
unsupported: "unsupported";
|
|
3287
|
+
}>;
|
|
3288
|
+
runnable: z.ZodBoolean;
|
|
3289
|
+
}, z.core.$strip>;
|
|
3290
|
+
structuredOutput: z.ZodObject<{
|
|
3291
|
+
upstream: z.ZodEnum<{
|
|
3292
|
+
supported: "supported";
|
|
3293
|
+
unknown: "unknown";
|
|
3294
|
+
unsupported: "unsupported";
|
|
3295
|
+
}>;
|
|
3296
|
+
runnable: z.ZodBoolean;
|
|
3297
|
+
}, z.core.$strip>;
|
|
3298
|
+
hostedTools: z.ZodObject<{
|
|
3299
|
+
webSearch: z.ZodObject<{
|
|
3300
|
+
upstream: z.ZodEnum<{
|
|
3301
|
+
supported: "supported";
|
|
3302
|
+
unknown: "unknown";
|
|
3303
|
+
unsupported: "unsupported";
|
|
3304
|
+
}>;
|
|
3305
|
+
runnable: z.ZodBoolean;
|
|
3306
|
+
}, z.core.$strip>;
|
|
3307
|
+
xSearch: z.ZodObject<{
|
|
3308
|
+
upstream: z.ZodEnum<{
|
|
3309
|
+
supported: "supported";
|
|
3310
|
+
unknown: "unknown";
|
|
3311
|
+
unsupported: "unsupported";
|
|
3312
|
+
}>;
|
|
3313
|
+
runnable: z.ZodBoolean;
|
|
3314
|
+
}, z.core.$strip>;
|
|
3315
|
+
codeExecution: z.ZodObject<{
|
|
3316
|
+
upstream: z.ZodEnum<{
|
|
3317
|
+
supported: "supported";
|
|
3318
|
+
unknown: "unknown";
|
|
3319
|
+
unsupported: "unsupported";
|
|
3320
|
+
}>;
|
|
3321
|
+
runnable: z.ZodBoolean;
|
|
3322
|
+
}, z.core.$strip>;
|
|
3323
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
3324
|
+
upstream: z.ZodEnum<{
|
|
3325
|
+
supported: "supported";
|
|
3326
|
+
unknown: "unknown";
|
|
3327
|
+
unsupported: "unsupported";
|
|
3328
|
+
}>;
|
|
3329
|
+
runnable: z.ZodBoolean;
|
|
3330
|
+
}, z.core.$strip>>;
|
|
3331
|
+
}, z.core.$strip>;
|
|
3332
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
3333
|
+
audio: "audio";
|
|
3334
|
+
image: "image";
|
|
3335
|
+
text: "text";
|
|
3336
|
+
}>>;
|
|
3337
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3338
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
3339
|
+
audio: "audio";
|
|
3340
|
+
image: "image";
|
|
3341
|
+
text: "text";
|
|
3342
|
+
}>>;
|
|
3343
|
+
transports: z.ZodObject<{
|
|
3344
|
+
sse: z.ZodObject<{
|
|
3345
|
+
upstream: z.ZodEnum<{
|
|
3346
|
+
supported: "supported";
|
|
3347
|
+
unknown: "unknown";
|
|
3348
|
+
unsupported: "unsupported";
|
|
3349
|
+
}>;
|
|
3350
|
+
runnable: z.ZodBoolean;
|
|
3351
|
+
}, z.core.$strip>;
|
|
3352
|
+
responsesWebSocket: z.ZodObject<{
|
|
3353
|
+
upstream: z.ZodEnum<{
|
|
3354
|
+
supported: "supported";
|
|
3355
|
+
unknown: "unknown";
|
|
3356
|
+
unsupported: "unsupported";
|
|
3357
|
+
}>;
|
|
3358
|
+
runnable: z.ZodBoolean;
|
|
3359
|
+
}, z.core.$strip>;
|
|
3360
|
+
realtimeAudio: z.ZodObject<{
|
|
3361
|
+
upstream: z.ZodEnum<{
|
|
3362
|
+
supported: "supported";
|
|
3363
|
+
unknown: "unknown";
|
|
3364
|
+
unsupported: "unsupported";
|
|
3365
|
+
}>;
|
|
3366
|
+
runnable: z.ZodBoolean;
|
|
3367
|
+
}, z.core.$strip>;
|
|
3368
|
+
}, z.core.$strip>;
|
|
3369
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
3370
|
+
upstream: z.ZodEnum<{
|
|
3371
|
+
supported: "supported";
|
|
3372
|
+
unknown: "unknown";
|
|
3373
|
+
unsupported: "unsupported";
|
|
3374
|
+
}>;
|
|
3375
|
+
runnable: z.ZodBoolean;
|
|
3376
|
+
mode: z.ZodEnum<{
|
|
3377
|
+
automatic: "automatic";
|
|
3378
|
+
implicit: "implicit";
|
|
3379
|
+
none: "none";
|
|
3380
|
+
}>;
|
|
3381
|
+
}, z.core.$strip>>;
|
|
3382
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
3383
|
+
id: z.ZodEnum<{
|
|
3384
|
+
fast: "fast";
|
|
3385
|
+
priority: "priority";
|
|
3386
|
+
standard: "standard";
|
|
3387
|
+
}>;
|
|
3388
|
+
upstream: z.ZodEnum<{
|
|
3389
|
+
supported: "supported";
|
|
3390
|
+
unknown: "unknown";
|
|
3391
|
+
unsupported: "unsupported";
|
|
3392
|
+
}>;
|
|
3393
|
+
runnable: z.ZodBoolean;
|
|
3394
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
3395
|
+
}, z.core.$strip>>;
|
|
3396
|
+
}, z.core.$strip>;
|
|
3397
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
3398
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
3399
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
3400
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
3401
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
3402
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
3403
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
3404
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
3405
|
+
}, z.core.$strict>>>;
|
|
3406
|
+
opperModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3407
|
+
upstreamModelId: z.ZodString;
|
|
3408
|
+
label: z.ZodString;
|
|
3409
|
+
shortLabel: z.ZodOptional<z.ZodString>;
|
|
3410
|
+
logoUrl: z.ZodOptional<z.ZodString>;
|
|
3411
|
+
aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3412
|
+
capabilities: z.ZodObject<{
|
|
3413
|
+
reasoning: z.ZodObject<{
|
|
3414
|
+
upstream: z.ZodEnum<{
|
|
3415
|
+
supported: "supported";
|
|
3416
|
+
unknown: "unknown";
|
|
3417
|
+
unsupported: "unsupported";
|
|
3418
|
+
}>;
|
|
3419
|
+
runnable: z.ZodBoolean;
|
|
3420
|
+
efforts: z.ZodArray<z.ZodEnum<{
|
|
3421
|
+
high: "high";
|
|
3422
|
+
low: "low";
|
|
3423
|
+
max: "max";
|
|
3424
|
+
medium: "medium";
|
|
3425
|
+
minimal: "minimal";
|
|
3426
|
+
none: "none";
|
|
3427
|
+
xhigh: "xhigh";
|
|
3428
|
+
}>>;
|
|
3429
|
+
defaultEffort: z.ZodNullable<z.ZodEnum<{
|
|
3430
|
+
high: "high";
|
|
3431
|
+
low: "low";
|
|
3432
|
+
max: "max";
|
|
3433
|
+
medium: "medium";
|
|
3434
|
+
minimal: "minimal";
|
|
3435
|
+
none: "none";
|
|
3436
|
+
xhigh: "xhigh";
|
|
3437
|
+
}>>;
|
|
3438
|
+
required: z.ZodBoolean;
|
|
3439
|
+
}, z.core.$strip>;
|
|
3440
|
+
functionCalling: z.ZodObject<{
|
|
3441
|
+
upstream: z.ZodEnum<{
|
|
3442
|
+
supported: "supported";
|
|
3443
|
+
unknown: "unknown";
|
|
3444
|
+
unsupported: "unsupported";
|
|
3445
|
+
}>;
|
|
3446
|
+
runnable: z.ZodBoolean;
|
|
3447
|
+
}, z.core.$strip>;
|
|
3448
|
+
structuredOutput: z.ZodObject<{
|
|
3449
|
+
upstream: z.ZodEnum<{
|
|
3450
|
+
supported: "supported";
|
|
3451
|
+
unknown: "unknown";
|
|
3452
|
+
unsupported: "unsupported";
|
|
3453
|
+
}>;
|
|
3454
|
+
runnable: z.ZodBoolean;
|
|
3455
|
+
}, z.core.$strip>;
|
|
3456
|
+
hostedTools: z.ZodObject<{
|
|
3457
|
+
webSearch: z.ZodObject<{
|
|
3458
|
+
upstream: z.ZodEnum<{
|
|
3459
|
+
supported: "supported";
|
|
3460
|
+
unknown: "unknown";
|
|
3461
|
+
unsupported: "unsupported";
|
|
3462
|
+
}>;
|
|
3463
|
+
runnable: z.ZodBoolean;
|
|
3464
|
+
}, z.core.$strip>;
|
|
3465
|
+
xSearch: z.ZodObject<{
|
|
3466
|
+
upstream: z.ZodEnum<{
|
|
3467
|
+
supported: "supported";
|
|
3468
|
+
unknown: "unknown";
|
|
3469
|
+
unsupported: "unsupported";
|
|
3470
|
+
}>;
|
|
3471
|
+
runnable: z.ZodBoolean;
|
|
3472
|
+
}, z.core.$strip>;
|
|
3473
|
+
codeExecution: z.ZodObject<{
|
|
3474
|
+
upstream: z.ZodEnum<{
|
|
3475
|
+
supported: "supported";
|
|
3476
|
+
unknown: "unknown";
|
|
3477
|
+
unsupported: "unsupported";
|
|
3478
|
+
}>;
|
|
3479
|
+
runnable: z.ZodBoolean;
|
|
3480
|
+
}, z.core.$strip>;
|
|
3481
|
+
imageGeneration: z.ZodDefault<z.ZodObject<{
|
|
3482
|
+
upstream: z.ZodEnum<{
|
|
3483
|
+
supported: "supported";
|
|
3484
|
+
unknown: "unknown";
|
|
3485
|
+
unsupported: "unsupported";
|
|
3486
|
+
}>;
|
|
3487
|
+
runnable: z.ZodBoolean;
|
|
3488
|
+
}, z.core.$strip>>;
|
|
3489
|
+
}, z.core.$strip>;
|
|
3490
|
+
inputModalities: z.ZodArray<z.ZodEnum<{
|
|
3491
|
+
audio: "audio";
|
|
3492
|
+
image: "image";
|
|
3493
|
+
text: "text";
|
|
3494
|
+
}>>;
|
|
3495
|
+
inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
3496
|
+
outputModalities: z.ZodArray<z.ZodEnum<{
|
|
3497
|
+
audio: "audio";
|
|
3498
|
+
image: "image";
|
|
3499
|
+
text: "text";
|
|
3500
|
+
}>>;
|
|
3501
|
+
transports: z.ZodObject<{
|
|
3502
|
+
sse: z.ZodObject<{
|
|
3503
|
+
upstream: z.ZodEnum<{
|
|
3504
|
+
supported: "supported";
|
|
3505
|
+
unknown: "unknown";
|
|
3506
|
+
unsupported: "unsupported";
|
|
3507
|
+
}>;
|
|
3508
|
+
runnable: z.ZodBoolean;
|
|
3509
|
+
}, z.core.$strip>;
|
|
3510
|
+
responsesWebSocket: z.ZodObject<{
|
|
3511
|
+
upstream: z.ZodEnum<{
|
|
3512
|
+
supported: "supported";
|
|
3513
|
+
unknown: "unknown";
|
|
3514
|
+
unsupported: "unsupported";
|
|
3515
|
+
}>;
|
|
3516
|
+
runnable: z.ZodBoolean;
|
|
3517
|
+
}, z.core.$strip>;
|
|
3518
|
+
realtimeAudio: z.ZodObject<{
|
|
3519
|
+
upstream: z.ZodEnum<{
|
|
3520
|
+
supported: "supported";
|
|
3521
|
+
unknown: "unknown";
|
|
3522
|
+
unsupported: "unsupported";
|
|
3523
|
+
}>;
|
|
3524
|
+
runnable: z.ZodBoolean;
|
|
3525
|
+
}, z.core.$strip>;
|
|
3526
|
+
}, z.core.$strip>;
|
|
3527
|
+
promptCaching: z.ZodOptional<z.ZodObject<{
|
|
3528
|
+
upstream: z.ZodEnum<{
|
|
3529
|
+
supported: "supported";
|
|
3530
|
+
unknown: "unknown";
|
|
3531
|
+
unsupported: "unsupported";
|
|
3532
|
+
}>;
|
|
3533
|
+
runnable: z.ZodBoolean;
|
|
3534
|
+
mode: z.ZodEnum<{
|
|
3535
|
+
automatic: "automatic";
|
|
3536
|
+
implicit: "implicit";
|
|
3537
|
+
none: "none";
|
|
3538
|
+
}>;
|
|
3539
|
+
}, z.core.$strip>>;
|
|
3540
|
+
latencyModes: z.ZodArray<z.ZodObject<{
|
|
3541
|
+
id: z.ZodEnum<{
|
|
3542
|
+
fast: "fast";
|
|
3543
|
+
priority: "priority";
|
|
3544
|
+
standard: "standard";
|
|
3545
|
+
}>;
|
|
3546
|
+
upstream: z.ZodEnum<{
|
|
3547
|
+
supported: "supported";
|
|
3548
|
+
unknown: "unknown";
|
|
3549
|
+
unsupported: "unsupported";
|
|
3550
|
+
}>;
|
|
3551
|
+
runnable: z.ZodBoolean;
|
|
3552
|
+
billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
|
|
3553
|
+
}, z.core.$strip>>;
|
|
3554
|
+
}, z.core.$strip>;
|
|
3555
|
+
contextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
3556
|
+
effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
|
|
3557
|
+
autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
|
|
3558
|
+
toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
|
|
3559
|
+
maxOutputTokens: z.ZodOptional<z.ZodNumber>;
|
|
3560
|
+
credentialSource: z.ZodOptional<z.ZodNever>;
|
|
3561
|
+
billing: z.ZodOptional<z.ZodNever>;
|
|
3562
|
+
apiKey: z.ZodOptional<z.ZodNever>;
|
|
3563
|
+
pricing: z.ZodOptional<z.ZodNever>;
|
|
3564
|
+
}, z.core.$strict>>>;
|
|
3565
|
+
}, z.core.$strict>;
|
|
3566
|
+
export type ManagedModelsOverride = z.infer<typeof ManagedModelsOverride>;
|
|
3567
|
+
/** Parse and validate OPENGENI_MANAGED_MODELS_JSON (memoized per raw value). */
|
|
3568
|
+
export declare function parseManagedModelsJson(raw: string): ManagedModelsOverride;
|
|
3569
|
+
export declare function applyModelCatalogDocument(settings: Settings, rawDocument: unknown): Settings;
|
|
3570
|
+
export declare const IntegrationOAuthClientConfigSchema: z.ZodObject<{
|
|
3571
|
+
clientId: z.ZodString;
|
|
3572
|
+
clientSecret: z.ZodOptional<z.ZodString>;
|
|
3573
|
+
tokenEndpointAuthMethod: z.ZodDefault<z.ZodEnum<{
|
|
3574
|
+
client_secret_basic: "client_secret_basic";
|
|
3575
|
+
client_secret_post: "client_secret_post";
|
|
3576
|
+
none: "none";
|
|
3577
|
+
}>>;
|
|
3578
|
+
}, z.core.$strip>;
|
|
3579
|
+
export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClientConfigSchema>;
|
|
3580
|
+
/**
|
|
3581
|
+
* Runtime-resolved provider (built-in or registry), client-construction-ready.
|
|
3582
|
+
* The built-in OpenAI/Azure provider is always present and always "responses";
|
|
3583
|
+
* registry providers carry their own base URL / key / wire API. Compaction is
|
|
3584
|
+
* not a provider capability: all providers use the same durable plaintext
|
|
3585
|
+
* replacement.
|
|
3586
|
+
*/
|
|
3587
|
+
export interface ResolvedModelProvider {
|
|
3588
|
+
anthropic?: z.infer<typeof AnthropicProviderOptions> | undefined;
|
|
3589
|
+
id: string;
|
|
3590
|
+
label: string;
|
|
3591
|
+
kind: RegistryProviderKind | "openrouter-managed" | "opper-managed";
|
|
3592
|
+
api: ModelProviderApi;
|
|
3593
|
+
wireProfile: ModelProviderWireProfile;
|
|
3594
|
+
builtin: boolean;
|
|
3595
|
+
baseUrl?: string | undefined;
|
|
3596
|
+
apiKey?: string | undefined;
|
|
3597
|
+
defaultQuery?: Record<string, string> | undefined;
|
|
3598
|
+
defaultHeaders?: Record<string, string> | undefined;
|
|
3599
|
+
publicDefaultQueryNames?: string[] | undefined;
|
|
3600
|
+
publicDefaultHeaderNames?: string[] | undefined;
|
|
3601
|
+
/** Generic OpenAI-compatible stream silence bound override (ms). */
|
|
3602
|
+
streamIdleTimeoutMs?: number | undefined;
|
|
3603
|
+
/** Generic OpenAI-compatible keepalive-only progress bound override (ms). */
|
|
3604
|
+
streamProgressTimeoutMs?: number | undefined;
|
|
3605
|
+
credentialSource: CredentialSourceV1;
|
|
3606
|
+
billing: BillingAttributionV1;
|
|
3607
|
+
}
|
|
3608
|
+
/** A single exposed model + the provider that serves it. */
|
|
3609
|
+
export interface ConfiguredModel {
|
|
3610
|
+
schemaVersion: 1;
|
|
3611
|
+
id: string;
|
|
3612
|
+
aliases: string[];
|
|
3613
|
+
label: string;
|
|
3614
|
+
/** Optional curated compact label for dense UI (e.g. mobile composer). */
|
|
3615
|
+
shortLabel?: string | undefined;
|
|
3616
|
+
/** Optional HTTPS maker logo; display metadata does not change execution identity. */
|
|
3617
|
+
logoUrl?: string | undefined;
|
|
3618
|
+
providerId: string;
|
|
3619
|
+
providerLabel: string;
|
|
3620
|
+
api: ModelProviderApi;
|
|
3621
|
+
upstreamModelId: string;
|
|
3622
|
+
deployment: ModelDeploymentV1;
|
|
3623
|
+
executionLimits: ModelExecutionLimitsV1;
|
|
3624
|
+
credentialSource: CredentialSourceV1;
|
|
3625
|
+
billing: BillingAttributionV1;
|
|
3626
|
+
/** Workspace-facing funding policy, independent of upstream settlement. */
|
|
3627
|
+
cost: ConfiguredModelCostClass;
|
|
3628
|
+
capabilities: ModelCapabilitiesV1;
|
|
3629
|
+
requestPolicy?: {
|
|
3630
|
+
gateway: {
|
|
3631
|
+
only: [string, ...string[]];
|
|
3632
|
+
caching: "auto" | "none";
|
|
3633
|
+
};
|
|
2884
3634
|
};
|
|
2885
3635
|
pricing?: ModelPricingScheduleV1 | undefined;
|
|
2886
3636
|
definitionVersion: string;
|
|
@@ -2911,6 +3661,15 @@ export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh"
|
|
|
2911
3661
|
export declare const VERCEL_AI_GATEWAY_CONNECTION_ROLE: "vercel_ai_gateway";
|
|
2912
3662
|
export declare const WORKSPACE_OPENROUTER_CONNECTION_DOMAIN: "openrouter.ai";
|
|
2913
3663
|
export declare const WORKSPACE_OPENROUTER_CONNECTION_ROLE: "openrouter";
|
|
3664
|
+
export declare const WORKSPACE_OPPER_CONNECTION_DOMAIN: "api.opper.ai";
|
|
3665
|
+
export declare const WORKSPACE_OPPER_CONNECTION_ROLE: "opper";
|
|
3666
|
+
/**
|
|
3667
|
+
* Opper issues separate management keys (`op-mak-…`) that its inference routes
|
|
3668
|
+
* refuse with 403 ("management API keys cannot be used on inference routes").
|
|
3669
|
+
* Reject them before they are stored so a connection never looks ready while
|
|
3670
|
+
* every turn fails. Returns a user-facing explanation, or null when usable.
|
|
3671
|
+
*/
|
|
3672
|
+
export declare function opperCredentialProblem(apiKey: string): string | null;
|
|
2914
3673
|
export declare const CODEX_REALTIME_MODEL_ID: "gpt-live-1-boulder-alpha";
|
|
2915
3674
|
export declare const SUPERGROK_REALTIME_MODEL_ID: "supergrok/grok-voice-think-fast-2.0";
|
|
2916
3675
|
export declare const OPENGENI_REALTIME_MODEL_ID_PREFIX: "opengeni-gateway/";
|
|
@@ -2965,6 +3724,30 @@ export declare const OPENGENI_GATEWAY_MODELS: {
|
|
|
2965
3724
|
};
|
|
2966
3725
|
};
|
|
2967
3726
|
export declare const OPENGENI_OPENROUTER_MODELS: readonly OpenRouterCatalogModel[];
|
|
3727
|
+
/**
|
|
3728
|
+
* Reviewed Opper starter route. Snapshot of Opper's catalogue
|
|
3729
|
+
* (`GET https://api.opper.ai/v3/compat/models`) reviewed 2026-10-05 and probed
|
|
3730
|
+
* live end to end. The route is provider-pinned (`provider/model`) to AWS
|
|
3731
|
+
* Bedrock eu-north-1 (Stockholm) with no provider logging, so Opper never
|
|
3732
|
+
* pools it onto a non-EU provider. `pricing` is Opper's listed supplier rate
|
|
3733
|
+
* (USD per 1M tokens); turns debit Opper's exact reported cost +5% and use
|
|
3734
|
+
* this rate only when cost metadata is absent. Hosts replace this list with
|
|
3735
|
+
* OPENGENI_OPPER_MODELS_JSON (code mode) or the catalog document's
|
|
3736
|
+
* `opperModels` (database mode).
|
|
3737
|
+
*/
|
|
3738
|
+
export declare const OPENGENI_OPPER_MODELS: readonly OpperCatalogModel[];
|
|
3739
|
+
/** Keepalive-only progress bound for Opper streams: room for a full 128,000-
|
|
3740
|
+
* token hidden-reasoning response at roughly 35 tokens per second. */
|
|
3741
|
+
export declare const OPPER_STREAM_PROGRESS_TIMEOUT_MS: number;
|
|
3742
|
+
/**
|
|
3743
|
+
* `max_tokens` the Opper Chat adapter sends when a request sets none. Opper's
|
|
3744
|
+
* own default is 4,096 output tokens, which hidden reasoning can exhaust before
|
|
3745
|
+
* any answer, and Opper rejects (does not clamp) a value above the route's
|
|
3746
|
+
* limit. A configured entry's `maxOutputTokens` wins; a Claude-family custom id
|
|
3747
|
+
* gets the smallest Claude limit in Opper's catalogue; other ids keep Opper's
|
|
3748
|
+
* default.
|
|
3749
|
+
*/
|
|
3750
|
+
export declare function opperMaxOutputTokens(settings: Settings, upstreamModelId: string): number | undefined;
|
|
2968
3751
|
export declare function configuredGatewayUpstreamModelIds(settings: Settings): string[];
|
|
2969
3752
|
export declare function configuredGatewayWorkspaceProductModelIds(settings: Settings): string[];
|
|
2970
3753
|
export declare function configuredGatewayOrganizationProductModelIds(settings: Settings): string[];
|
|
@@ -2972,6 +3755,9 @@ export declare function configuredModelInputIdentities(settings: Settings): stri
|
|
|
2972
3755
|
export declare function configuredOpenRouterUpstreamModelIds(settings: Settings): string[];
|
|
2973
3756
|
export declare function configuredOpenRouterWorkspaceProductModelIds(settings: Settings): string[];
|
|
2974
3757
|
export declare function configuredOpenRouterOrganizationProductModelIds(settings: Settings): string[];
|
|
3758
|
+
export declare function configuredOpperUpstreamModelIds(settings: Settings): string[];
|
|
3759
|
+
export declare function configuredOpperWorkspaceProductModelIds(settings: Settings): string[];
|
|
3760
|
+
export declare function configuredOpperOrganizationProductModelIds(settings: Settings): string[];
|
|
2975
3761
|
/**
|
|
2976
3762
|
* Built-in OpenGeni credit pricing schedules.
|
|
2977
3763
|
*
|
|
@@ -3098,6 +3884,25 @@ export declare function withWorkspaceOpenRouterCredential(settings: Settings, ap
|
|
|
3098
3884
|
upstreamModelId: string;
|
|
3099
3885
|
label?: string | null;
|
|
3100
3886
|
}[]): Settings;
|
|
3887
|
+
/** Static Opper catalog overlay; it contains no concrete workspace credential. */
|
|
3888
|
+
export declare function withWorkspaceOpperCatalogProvider(settings: Settings, customModels?: readonly {
|
|
3889
|
+
upstreamModelId: string;
|
|
3890
|
+
label?: string | null;
|
|
3891
|
+
}[]): Settings;
|
|
3892
|
+
/** Runtime overlay after the worker resolves the workspace's encrypted Opper key. */
|
|
3893
|
+
export declare function withWorkspaceOpperCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
3894
|
+
upstreamModelId: string;
|
|
3895
|
+
label?: string | null;
|
|
3896
|
+
}[]): Settings;
|
|
3897
|
+
/** Secret-free organization Opper catalog overlay. */
|
|
3898
|
+
export declare function withOrganizationOpperCatalogProvider(settings: Settings, customModels?: readonly {
|
|
3899
|
+
upstreamModelId: string;
|
|
3900
|
+
label?: string | null;
|
|
3901
|
+
}[]): Settings;
|
|
3902
|
+
export declare function withOrganizationOpperCredential(settings: Settings, apiKey: string, customModels?: readonly {
|
|
3903
|
+
upstreamModelId: string;
|
|
3904
|
+
label?: string | null;
|
|
3905
|
+
}[]): Settings;
|
|
3101
3906
|
/** Secret-free organization Vercel AI Gateway catalog overlay. */
|
|
3102
3907
|
export declare function withOrganizationGatewayCatalogProvider(settings: Settings, customModels?: readonly {
|
|
3103
3908
|
upstreamModelId: string;
|