@opengeni/config 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,33 @@
1
- import { Entitlements, LatencyMode, ReasoningEffort, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, type TurnExecutionLatencyModeSourceV1, type TurnExecutionModelSourceV1, type TurnExecutionReasoningSourceV1, type VideoGenerationResolution, type FirstPartyMcpToolName as FirstPartyMcpToolNameType } from "@opengeni/contracts";
1
+ export { managedUserEmailAllowed } from "./managed-user-admission.js";
2
+ export * from "./realtime-voice-pricing.js";
3
+ export * from "./web-search.js";
4
+ export { CreditPromotionPolicy, signupCreditModelIds, promotionalCreditScope, } from "./credit-promotions.js";
5
+ import { type AgentConfigDeploymentLimits, type OrganizationModelDefaults, type ModelCompactionPolicy, Entitlements, LatencyMode, ReasoningEffort, SandboxBackend, StaticUsageLimits, TurnExecutionPolicyV1, TurnServingPolicyV1, type TurnExecutionLatencyModeSourceV1, type TurnExecutionModelSourceV1, type TurnExecutionReasoningSourceV1, type VideoGenerationResolution, type FirstPartyMcpToolName as FirstPartyMcpToolNameType, type Session } from "@opengeni/contracts";
6
+ import type { CodeSearchDeploymentPolicy } from "@opengeni/contracts/code-search";
2
7
  export { XAI_SUBSCRIPTION_MODEL_ID_PREFIX } from "@opengeni/xai-subscription";
3
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;
4
26
  export declare const DEFAULT_OPENROUTER_MODEL_ID: "openrouter/nvidia/nemotron-3-super-120b-a12b:free";
5
27
  export declare const DEFAULT_MODEL_COST_POLICY_JSON: string;
6
28
  export declare const SANDBOX_ARCHIVE_CAPTURE_MAX_TIMEOUT_MS: number;
7
29
  export declare const SANDBOX_ARCHIVE_CAPTURE_SETTLEMENT_GRACE_MS = 10000;
30
+ export declare const SANDBOX_DEADLINE_COMMAND_STOP_GRACE_MS = 120000;
8
31
  export declare const SANDBOX_SNAPSHOT_MAX_TIMEOUT_MS: number;
9
32
  export declare const GOOGLE_DRIVE_PROVIDER_REQUEST_TIMEOUT_MAX_MS = 60000;
10
33
  export declare const GOOGLE_DRIVE_PROVIDER_RETRY_DELAY_MAX_MS = 60000;
@@ -28,8 +51,9 @@ export declare const sandboxPreparationProfiles: Record<string, {
28
51
  export declare const AGENT_INSTRUCTIONS_CORE_PLACEHOLDER = "{{core}}";
29
52
  /**
30
53
  * Default per-workspace agent persona template. This is the BRAND + tool-usage
31
- * opinion (the white-labellable surface): the "You are an OpenGeni workspace
32
- * agent." identity line, the framing/opinion lines, and the mount-path facts.
54
+ * opinion (the white-labellable surface): the general-assistant identity line,
55
+ * the framing/opinion lines, and the mount-path facts. Domain-specific tooling
56
+ * guidance (for example Terraform or Checkov) belongs in opt-in Skills.
33
57
  *
34
58
  * The CORE that MUST survive any override — the goal-loop ownership line (which
35
59
  * names the opengeni__goal_* tools) and the dynamic workspace-environment block
@@ -78,13 +102,14 @@ export declare const McpOperationRecoverySchema: z.ZodRecord<z.ZodString, z.ZodO
78
102
  observerTool: z.ZodString;
79
103
  }, z.core.$strict>>;
80
104
  /** Public, digest-pinned desktop image used by Modal unless the operator overrides it. */
81
- export declare const DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:c3bd17b8841de1bff9bb2777aad422cf8c75de78e2c30f9ac81d0cd6810a1b78";
105
+ export declare const DEFAULT_MODAL_IMAGE_REF = "opengenipublicneuacr.azurecr.io/opengeni-desktop@sha256:554d5b324a580071dd669e7c1190931e498eb1b397412a27c7de84a430ef393a";
82
106
  declare const SettingsSchema: z.ZodObject<{
83
107
  serviceName: z.ZodDefault<z.ZodString>;
84
108
  environment: z.ZodDefault<z.ZodString>;
85
109
  deploymentRevision: z.ZodDefault<z.ZodString>;
86
110
  serverVersion: z.ZodOptional<z.ZodString>;
87
111
  databaseUrl: z.ZodDefault<z.ZodString>;
112
+ apiDatabasePoolMax: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
88
113
  dbSchema: z.ZodDefault<z.ZodString>;
89
114
  rlsStrategy: z.ZodDefault<z.ZodEnum<{
90
115
  force: "force";
@@ -126,23 +151,37 @@ declare const SettingsSchema: z.ZodObject<{
126
151
  analyticsPosthogProjectKey: z.ZodOptional<z.ZodString>;
127
152
  analyticsPosthogHost: z.ZodOptional<z.ZodString>;
128
153
  analyticsGa4MeasurementId: z.ZodOptional<z.ZodString>;
154
+ legalPrivacyPolicyUrl: z.ZodOptional<z.ZodString>;
155
+ legalTermsOfServiceUrl: z.ZodOptional<z.ZodString>;
156
+ supportEmail: z.ZodOptional<z.ZodString>;
129
157
  publicBaseUrl: z.ZodOptional<z.ZodString>;
158
+ documentationUrl: z.ZodPreprocess<z.ZodDefault<z.ZodNullable<z.ZodURL>>>;
130
159
  mcpOauthEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
131
- mcpOauthTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
160
+ apiTrustedProxyHops: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
161
+ apiTrustedProxyCidrs: z.ZodDefault<z.ZodString>;
132
162
  webBaseUrl: z.ZodOptional<z.ZodString>;
133
163
  agentReleasesBaseUrl: z.ZodDefault<z.ZodString>;
134
164
  agentStableVersion: z.ZodDefault<z.ZodString>;
135
165
  agentBetaVersion: z.ZodOptional<z.ZodString>;
166
+ agentAutoUpdate: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
136
167
  productAccessMode: z.ZodDefault<z.ZodEnum<{
137
168
  configured: "configured";
138
169
  local: "local";
139
170
  managed: "managed";
140
171
  }>>;
141
- organizationTenancyCanonicalActivationEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
142
172
  billingMode: z.ZodDefault<z.ZodEnum<{
143
173
  disabled: "disabled";
144
174
  stripe: "stripe";
145
175
  }>>;
176
+ verifiedSignupTrialCreditsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
177
+ creditPromotionPolicy: z.ZodPreprocess<z.ZodDefault<z.ZodObject<{
178
+ defaultModelIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
179
+ signupModelIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
180
+ offers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
181
+ label: z.ZodString;
182
+ eligibleModelIds: z.ZodOptional<z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>>;
183
+ }, z.core.$strict>>>;
184
+ }, z.core.$strict>>>;
146
185
  entitlementsMode: z.ZodDefault<z.ZodEnum<{
147
186
  managed: "managed";
148
187
  none: "none";
@@ -153,10 +192,14 @@ declare const SettingsSchema: z.ZodObject<{
153
192
  none: "none";
154
193
  static: "static";
155
194
  }>>;
195
+ usageAllowancesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
156
196
  staticEntitlementsJson: z.ZodDefault<z.ZodString>;
157
197
  staticUsageLimitsJson: z.ZodDefault<z.ZodString>;
158
198
  delegationSecret: z.ZodOptional<z.ZodString>;
159
199
  defaultFirstPartyMcpTools: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
200
+ admin_action_call: "admin_action_call";
201
+ admin_action_describe: "admin_action_describe";
202
+ admin_actions_search: "admin_actions_search";
160
203
  artifacts_archive: "artifacts_archive";
161
204
  artifacts_create: "artifacts_create";
162
205
  artifacts_get_source: "artifacts_get_source";
@@ -172,11 +215,15 @@ declare const SettingsSchema: z.ZodObject<{
172
215
  browser_auth: "browser_auth";
173
216
  browser_clipboard: "browser_clipboard";
174
217
  browser_debug: "browser_debug";
218
+ browser_download_save: "browser_download_save";
219
+ browser_downloads: "browser_downloads";
175
220
  browser_identity: "browser_identity";
176
221
  browser_lifecycle: "browser_lifecycle";
177
222
  browser_observe: "browser_observe";
178
223
  browser_open: "browser_open";
179
224
  browser_publish: "browser_publish";
225
+ browser_read: "browser_read";
226
+ browser_screenshot: "browser_screenshot";
180
227
  browser_tabs: "browser_tabs";
181
228
  capability_authorization_request: "capability_authorization_request";
182
229
  capability_catalog_search: "capability_catalog_search";
@@ -190,7 +237,10 @@ declare const SettingsSchema: z.ZodObject<{
190
237
  computer_observe: "computer_observe";
191
238
  computer_open: "computer_open";
192
239
  computer_targets: "computer_targets";
240
+ connected_machine_enable_screen_control: "connected_machine_enable_screen_control";
241
+ connected_machine_enroll_token: "connected_machine_enroll_token";
193
242
  connected_machine_remove: "connected_machine_remove";
243
+ custom_mcp_setup_request: "custom_mcp_setup_request";
194
244
  editable_artifact_apply: "editable_artifact_apply";
195
245
  editable_artifact_create: "editable_artifact_create";
196
246
  editable_artifact_export: "editable_artifact_export";
@@ -219,6 +269,7 @@ declare const SettingsSchema: z.ZodObject<{
219
269
  goal_resume: "goal_resume";
220
270
  goal_set: "goal_set";
221
271
  goal_update: "goal_update";
272
+ inbox_tidy: "inbox_tidy";
222
273
  instruction_policy_get: "instruction_policy_get";
223
274
  instruction_policy_propose: "instruction_policy_propose";
224
275
  instruction_policy_save: "instruction_policy_save";
@@ -237,6 +288,8 @@ declare const SettingsSchema: z.ZodObject<{
237
288
  memory_correct: "memory_correct";
238
289
  memory_save: "memory_save";
239
290
  memory_search: "memory_search";
291
+ notification_withdraw: "notification_withdraw";
292
+ notify_user: "notify_user";
240
293
  preference_propose: "preference_propose";
241
294
  preference_registry_get: "preference_registry_get";
242
295
  preference_registry_summary: "preference_registry_summary";
@@ -274,19 +327,38 @@ declare const SettingsSchema: z.ZodObject<{
274
327
  scheduled_tasks_resume: "scheduled_tasks_resume";
275
328
  scheduled_tasks_trigger: "scheduled_tasks_trigger";
276
329
  scheduled_tasks_update: "scheduled_tasks_update";
330
+ secret_delete: "secret_delete";
331
+ secret_get: "secret_get";
332
+ secret_move: "secret_move";
333
+ secret_save: "secret_save";
334
+ secret_search: "secret_search";
277
335
  session_create: "session_create";
278
336
  session_events: "session_events";
279
337
  session_get: "session_get";
280
338
  session_human_input_respond: "session_human_input_respond";
339
+ session_message_status: "session_message_status";
281
340
  session_pause: "session_pause";
282
341
  session_resume: "session_resume";
283
342
  session_send_message: "session_send_message";
343
+ session_set_model: "session_set_model";
284
344
  session_set_project: "session_set_project";
285
345
  session_steer: "session_steer";
346
+ session_target_get: "session_target_get";
347
+ session_target_set: "session_target_set";
286
348
  session_wait: "session_wait";
287
349
  sessions_list: "sessions_list";
288
350
  set_other_session_title: "set_other_session_title";
289
351
  set_session_title: "set_session_title";
352
+ site_data_define_collection: "site_data_define_collection";
353
+ site_data_describe: "site_data_describe";
354
+ site_data_export: "site_data_export";
355
+ site_data_import: "site_data_import";
356
+ site_data_query: "site_data_query";
357
+ site_data_reset: "site_data_reset";
358
+ site_data_write: "site_data_write";
359
+ site_files_delete: "site_files_delete";
360
+ site_files_list: "site_files_list";
361
+ site_files_upload: "site_files_upload";
290
362
  slack_bot_channel_history: "slack_bot_channel_history";
291
363
  slack_bot_delete_message: "slack_bot_delete_message";
292
364
  slack_bot_file_content: "slack_bot_file_content";
@@ -295,8 +367,11 @@ declare const SettingsSchema: z.ZodObject<{
295
367
  slack_bot_list_files: "slack_bot_list_files";
296
368
  slack_bot_list_users: "slack_bot_list_users";
297
369
  slack_bot_post_message: "slack_bot_post_message";
370
+ slack_bot_prepare_message: "slack_bot_prepare_message";
298
371
  slack_bot_search: "slack_bot_search";
372
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
299
373
  slack_bot_thread_replies: "slack_bot_thread_replies";
374
+ slack_bot_upload_file: "slack_bot_upload_file";
300
375
  social_connections_list: "social_connections_list";
301
376
  social_daily_analysis_context: "social_daily_analysis_context";
302
377
  social_mentions_live: "social_mentions_live";
@@ -326,6 +401,9 @@ declare const SettingsSchema: z.ZodObject<{
326
401
  x_thread_fetch: "x_thread_fetch";
327
402
  }>>>>;
328
403
  allowedFirstPartyMcpTools: z.ZodPreprocess<z.ZodOptional<z.ZodArray<z.ZodEnum<{
404
+ admin_action_call: "admin_action_call";
405
+ admin_action_describe: "admin_action_describe";
406
+ admin_actions_search: "admin_actions_search";
329
407
  artifacts_archive: "artifacts_archive";
330
408
  artifacts_create: "artifacts_create";
331
409
  artifacts_get_source: "artifacts_get_source";
@@ -341,11 +419,15 @@ declare const SettingsSchema: z.ZodObject<{
341
419
  browser_auth: "browser_auth";
342
420
  browser_clipboard: "browser_clipboard";
343
421
  browser_debug: "browser_debug";
422
+ browser_download_save: "browser_download_save";
423
+ browser_downloads: "browser_downloads";
344
424
  browser_identity: "browser_identity";
345
425
  browser_lifecycle: "browser_lifecycle";
346
426
  browser_observe: "browser_observe";
347
427
  browser_open: "browser_open";
348
428
  browser_publish: "browser_publish";
429
+ browser_read: "browser_read";
430
+ browser_screenshot: "browser_screenshot";
349
431
  browser_tabs: "browser_tabs";
350
432
  capability_authorization_request: "capability_authorization_request";
351
433
  capability_catalog_search: "capability_catalog_search";
@@ -359,7 +441,10 @@ declare const SettingsSchema: z.ZodObject<{
359
441
  computer_observe: "computer_observe";
360
442
  computer_open: "computer_open";
361
443
  computer_targets: "computer_targets";
444
+ connected_machine_enable_screen_control: "connected_machine_enable_screen_control";
445
+ connected_machine_enroll_token: "connected_machine_enroll_token";
362
446
  connected_machine_remove: "connected_machine_remove";
447
+ custom_mcp_setup_request: "custom_mcp_setup_request";
363
448
  editable_artifact_apply: "editable_artifact_apply";
364
449
  editable_artifact_create: "editable_artifact_create";
365
450
  editable_artifact_export: "editable_artifact_export";
@@ -388,6 +473,7 @@ declare const SettingsSchema: z.ZodObject<{
388
473
  goal_resume: "goal_resume";
389
474
  goal_set: "goal_set";
390
475
  goal_update: "goal_update";
476
+ inbox_tidy: "inbox_tidy";
391
477
  instruction_policy_get: "instruction_policy_get";
392
478
  instruction_policy_propose: "instruction_policy_propose";
393
479
  instruction_policy_save: "instruction_policy_save";
@@ -406,6 +492,8 @@ declare const SettingsSchema: z.ZodObject<{
406
492
  memory_correct: "memory_correct";
407
493
  memory_save: "memory_save";
408
494
  memory_search: "memory_search";
495
+ notification_withdraw: "notification_withdraw";
496
+ notify_user: "notify_user";
409
497
  preference_propose: "preference_propose";
410
498
  preference_registry_get: "preference_registry_get";
411
499
  preference_registry_summary: "preference_registry_summary";
@@ -443,19 +531,38 @@ declare const SettingsSchema: z.ZodObject<{
443
531
  scheduled_tasks_resume: "scheduled_tasks_resume";
444
532
  scheduled_tasks_trigger: "scheduled_tasks_trigger";
445
533
  scheduled_tasks_update: "scheduled_tasks_update";
534
+ secret_delete: "secret_delete";
535
+ secret_get: "secret_get";
536
+ secret_move: "secret_move";
537
+ secret_save: "secret_save";
538
+ secret_search: "secret_search";
446
539
  session_create: "session_create";
447
540
  session_events: "session_events";
448
541
  session_get: "session_get";
449
542
  session_human_input_respond: "session_human_input_respond";
543
+ session_message_status: "session_message_status";
450
544
  session_pause: "session_pause";
451
545
  session_resume: "session_resume";
452
546
  session_send_message: "session_send_message";
547
+ session_set_model: "session_set_model";
453
548
  session_set_project: "session_set_project";
454
549
  session_steer: "session_steer";
550
+ session_target_get: "session_target_get";
551
+ session_target_set: "session_target_set";
455
552
  session_wait: "session_wait";
456
553
  sessions_list: "sessions_list";
457
554
  set_other_session_title: "set_other_session_title";
458
555
  set_session_title: "set_session_title";
556
+ site_data_define_collection: "site_data_define_collection";
557
+ site_data_describe: "site_data_describe";
558
+ site_data_export: "site_data_export";
559
+ site_data_import: "site_data_import";
560
+ site_data_query: "site_data_query";
561
+ site_data_reset: "site_data_reset";
562
+ site_data_write: "site_data_write";
563
+ site_files_delete: "site_files_delete";
564
+ site_files_list: "site_files_list";
565
+ site_files_upload: "site_files_upload";
459
566
  slack_bot_channel_history: "slack_bot_channel_history";
460
567
  slack_bot_delete_message: "slack_bot_delete_message";
461
568
  slack_bot_file_content: "slack_bot_file_content";
@@ -464,8 +571,11 @@ declare const SettingsSchema: z.ZodObject<{
464
571
  slack_bot_list_files: "slack_bot_list_files";
465
572
  slack_bot_list_users: "slack_bot_list_users";
466
573
  slack_bot_post_message: "slack_bot_post_message";
574
+ slack_bot_prepare_message: "slack_bot_prepare_message";
467
575
  slack_bot_search: "slack_bot_search";
576
+ slack_bot_send_prepared_message: "slack_bot_send_prepared_message";
468
577
  slack_bot_thread_replies: "slack_bot_thread_replies";
578
+ slack_bot_upload_file: "slack_bot_upload_file";
469
579
  social_connections_list: "social_connections_list";
470
580
  social_daily_analysis_context: "social_daily_analysis_context";
471
581
  social_mentions_live: "social_mentions_live";
@@ -494,6 +604,7 @@ declare const SettingsSchema: z.ZodObject<{
494
604
  x_search_live: "x_search_live";
495
605
  x_thread_fetch: "x_thread_fetch";
496
606
  }>>>>;
607
+ artifactMaterializerDeployed: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
497
608
  streamTokenSecret: z.ZodOptional<z.ZodString>;
498
609
  streamControlEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
499
610
  workDiscoveryEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
@@ -502,16 +613,27 @@ declare const SettingsSchema: z.ZodObject<{
502
613
  workDiscoveryAutomaticNudgesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
503
614
  ogtoolPackageSpec: z.ZodOptional<z.ZodString>;
504
615
  environmentsEncryptionKey: z.ZodOptional<z.ZodString>;
616
+ onePasswordFakeTokens: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
505
617
  integrationsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
506
618
  integrationsStateSecret: z.ZodOptional<z.ZodString>;
507
619
  integrationsAllowPrivateNetworkTargets: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
620
+ privacyOnlyMeAllowed: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
621
+ privacyWorkspaceDefaultRequired: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
622
+ privacyAdminScheduleSummariesRequired: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
508
623
  integrationsOauthClientsJson: z.ZodDefault<z.ZodString>;
624
+ gmailWatchTopicName: z.ZodOptional<z.ZodString>;
509
625
  slackClientId: z.ZodOptional<z.ZodString>;
510
626
  slackClientSecret: z.ZodOptional<z.ZodString>;
511
627
  slackSigningSecret: z.ZodOptional<z.ZodString>;
628
+ slackAccessMode: z.ZodDefault<z.ZodEnum<{
629
+ full: "full";
630
+ limited: "limited";
631
+ }>>;
512
632
  slackBotDisplayName: z.ZodDefault<z.ZodEnum<{
513
633
  OpenGeni: "OpenGeni";
514
634
  "OpenGeni Staging": "OpenGeni Staging";
635
+ Opengeni: "Opengeni";
636
+ "Opengeni Staging": "Opengeni Staging";
515
637
  }>>;
516
638
  slackCommand: z.ZodDefault<z.ZodString>;
517
639
  googleDriveClientId: z.ZodOptional<z.ZodString>;
@@ -538,6 +660,7 @@ declare const SettingsSchema: z.ZodObject<{
538
660
  goalIdleBackoffMs: z.ZodDefault<z.ZodPreprocess<z.ZodReadonly<z.ZodArray<z.ZodNumber>>>>;
539
661
  goalIdleBackoffMaxMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
540
662
  childLifecycleNoticesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
663
+ sessionUsageLimitsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
541
664
  slackWorkspaceRoutingEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
542
665
  agentMaxModelCallsPerTurn: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
543
666
  contextWindowTokens: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -552,10 +675,12 @@ declare const SettingsSchema: z.ZodObject<{
552
675
  authAllowMetrics: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
553
676
  apiHost: z.ZodDefault<z.ZodString>;
554
677
  apiPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
678
+ apiMetricsPort: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
555
679
  workerHttpPort: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
556
680
  opengeniMcpInternalUrl: z.ZodOptional<z.ZodString>;
557
681
  opengeniMcpUrl: z.ZodOptional<z.ZodString>;
558
682
  corsAllowOriginRegex: z.ZodDefault<z.ZodString>;
683
+ localAllowedOrigins: z.ZodOptional<z.ZodString>;
559
684
  openaiProvider: z.ZodDefault<z.ZodEnum<{
560
685
  azure: "azure";
561
686
  openai: "openai";
@@ -581,6 +706,8 @@ declare const SettingsSchema: z.ZodObject<{
581
706
  voiceInputResumableMaxDurationSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
582
707
  voiceInputResumableMaxSizeBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
583
708
  voiceInputResumableMaxChunkSizeBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
709
+ sessionArchiveEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
710
+ sessionArchiveIdleDays: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
584
711
  voiceInputResumableRetentionSeconds: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
585
712
  voiceInputFfmpegPath: z.ZodDefault<z.ZodString>;
586
713
  voiceInputProviderOrder: z.ZodDefault<z.ZodString>;
@@ -594,6 +721,20 @@ declare const SettingsSchema: z.ZodObject<{
594
721
  voiceInputAzureApiVersion: z.ZodOptional<z.ZodString>;
595
722
  voiceInputAzureApiKey: z.ZodOptional<z.ZodString>;
596
723
  voiceInputAzureAdToken: z.ZodOptional<z.ZodString>;
724
+ azureLiveEndpoint: z.ZodOptional<z.ZodString>;
725
+ azureLiveApiKey: z.ZodOptional<z.ZodString>;
726
+ azureLiveDeployment: z.ZodDefault<z.ZodString>;
727
+ azureLiveVoice: z.ZodDefault<z.ZodString>;
728
+ azureLivePricingJson: z.ZodOptional<z.ZodString>;
729
+ aiGatewayRealtimePricingJson: z.ZodOptional<z.ZodString>;
730
+ voiceInputMaiEndpoint: z.ZodOptional<z.ZodString>;
731
+ voiceInputMaiApiKey: z.ZodOptional<z.ZodString>;
732
+ voiceInputMaiApiVersion: z.ZodDefault<z.ZodString>;
733
+ voiceInputMaiPricingJson: z.ZodOptional<z.ZodString>;
734
+ voiceInputMaiModel: z.ZodDefault<z.ZodString>;
735
+ voiceInputAzureModel: z.ZodOptional<z.ZodString>;
736
+ voiceInputOpenaiPricingJson: z.ZodOptional<z.ZodString>;
737
+ voiceInputAzurePricingJson: z.ZodOptional<z.ZodString>;
597
738
  voiceInputCodexExperimentalEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
598
739
  modelPricingJson: z.ZodDefault<z.ZodString>;
599
740
  modelCatalogSource: z.ZodDefault<z.ZodEnum<{
@@ -603,17 +744,30 @@ declare const SettingsSchema: z.ZodObject<{
603
744
  modelCostPolicyJson: z.ZodDefault<z.ZodString>;
604
745
  modelNotesJson: z.ZodDefault<z.ZodString>;
605
746
  openrouterApiKey: z.ZodOptional<z.ZodString>;
747
+ opperApiKey: z.ZodOptional<z.ZodString>;
748
+ managedModelsJson: z.ZodOptional<z.ZodString>;
606
749
  resolvedGatewayModelsJson: z.ZodOptional<z.ZodString>;
607
750
  resolvedOpenRouterModelsJson: z.ZodOptional<z.ZodString>;
751
+ resolvedOpperModelsJson: z.ZodOptional<z.ZodString>;
752
+ resolvedCodexModelsJson: z.ZodOptional<z.ZodString>;
608
753
  modelProvidersJson: z.ZodDefault<z.ZodString>;
609
754
  codexSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
755
+ experimentSystemPromptCacheSplit: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
756
+ experimentCutPolling: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
757
+ experimentOutputCost: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
610
758
  supergrokSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
759
+ claudeSubscriptionEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
611
760
  supergrokResponseStreamIdleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
761
+ modelStreamIdleTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
762
+ modelStreamProgressTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
612
763
  codexConnectedAppsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
613
764
  codexProductSku: z.ZodOptional<z.ZodString>;
614
765
  codexToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
615
766
  lazyToolSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
616
767
  codexFleetPolicyShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
768
+ subscriptionCoreShadowEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
769
+ subscriptionCrossProviderFailoverEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
770
+ subscriptionCoreShadowTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
617
771
  codexRotationNearExhaustionPct: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
618
772
  reasoningConfigurationUpdatesEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
619
773
  openaiReasoningEffort: z.ZodDefault<z.ZodEnum<{
@@ -626,6 +780,16 @@ declare const SettingsSchema: z.ZodObject<{
626
780
  xhigh: "xhigh";
627
781
  }>>;
628
782
  openaiAllowedReasoningEfforts: z.ZodDefault<z.ZodString>;
783
+ creditsDefaultModel: z.ZodDefault<z.ZodString>;
784
+ creditsDefaultReasoningEffort: z.ZodDefault<z.ZodEnum<{
785
+ high: "high";
786
+ low: "low";
787
+ max: "max";
788
+ medium: "medium";
789
+ minimal: "minimal";
790
+ none: "none";
791
+ xhigh: "xhigh";
792
+ }>>;
629
793
  openaiResponsesTransport: z.ZodDefault<z.ZodEnum<{
630
794
  http: "http";
631
795
  websocket: "websocket";
@@ -637,7 +801,32 @@ declare const SettingsSchema: z.ZodObject<{
637
801
  openaiReasoningEncryptedContent: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
638
802
  openaiMaxRetries: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
639
803
  webSearchEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
804
+ webSearchProvider: z.ZodOptional<z.ZodString>;
805
+ webFetchProvider: z.ZodOptional<z.ZodString>;
806
+ webSearchPrefer: z.ZodOptional<z.ZodString>;
807
+ webSearchProviderCredentials: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
808
+ apiKey: z.ZodOptional<z.ZodString>;
809
+ baseUrl: z.ZodOptional<z.ZodString>;
810
+ }, z.core.$strict>>>;
811
+ webSearchApiKey: z.ZodOptional<z.ZodString>;
812
+ webSearchBaseUrl: z.ZodOptional<z.ZodString>;
813
+ webFetchApiKey: z.ZodOptional<z.ZodString>;
814
+ webFetchBaseUrl: z.ZodOptional<z.ZodString>;
815
+ webSearchProviderMode: z.ZodOptional<z.ZodString>;
816
+ webSearchPricingJson: z.ZodOptional<z.ZodString>;
817
+ webSearchRequestTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
818
+ jevApiKey: z.ZodOptional<z.ZodString>;
819
+ jevBaseUrl: z.ZodDefault<z.ZodString>;
820
+ jevModel: z.ZodDefault<z.ZodString>;
821
+ jevRequestTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
822
+ codeSearchMode: z.ZodDefault<z.ZodEnum<{
823
+ default_on: "default_on";
824
+ experiment: "experiment";
825
+ off: "off";
826
+ opt_in: "opt_in";
827
+ }>>;
640
828
  agentInstructionsTemplate: z.ZodDefault<z.ZodString>;
829
+ experimentKnowledgeRetrievalGuidance: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
641
830
  azureOpenaiBaseUrl: z.ZodOptional<z.ZodString>;
642
831
  azureOpenaiEndpoint: z.ZodOptional<z.ZodString>;
643
832
  azureOpenaiDeployment: z.ZodOptional<z.ZodString>;
@@ -731,6 +920,7 @@ declare const SettingsSchema: z.ZodObject<{
731
920
  blaxelTtl: z.ZodOptional<z.ZodString>;
732
921
  cloudflareWorkerUrl: z.ZodOptional<z.ZodString>;
733
922
  cloudflareApiKey: z.ZodOptional<z.ZodString>;
923
+ experimentalBrowserContextPoolEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
734
924
  browserbaseApiKey: z.ZodOptional<z.ZodString>;
735
925
  kernelApiKey: z.ZodOptional<z.ZodString>;
736
926
  kernelEndpoint: z.ZodOptional<z.ZodString>;
@@ -773,6 +963,7 @@ declare const SettingsSchema: z.ZodObject<{
773
963
  sandboxViewerHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
774
964
  sandboxInteractionHolderTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
775
965
  sandboxIdleGraceMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
966
+ sandboxIdleCommandContainmentMs: z.ZodPipe<z.ZodOptional<z.ZodCoercedNumber<unknown>>, z.ZodTransform<number | undefined, number | undefined>>;
776
967
  sandboxSnapshotIntervalMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
777
968
  sandboxSnapshotTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
778
969
  sandboxDrainSnapshotTimeoutMs: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -784,9 +975,15 @@ declare const SettingsSchema: z.ZodObject<{
784
975
  workspaceControlLockTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
785
976
  rigSetupTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
786
977
  sandboxWarmRateMicrosPerSecondJson: z.ZodDefault<z.ZodString>;
978
+ sandboxWarmBillingMode: z.ZodDefault<z.ZodEnum<{
979
+ credits: "credits";
980
+ shadow: "shadow";
981
+ usage_only: "usage_only";
982
+ }>>;
787
983
  sandboxMaxWarmSecondsPerWorkspace: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
788
984
  sandboxPreparationProfiles: z.ZodDefault<z.ZodString>;
789
985
  sandboxEnvAllowlist: z.ZodDefault<z.ZodString>;
986
+ sandboxImageAllowlist: z.ZodDefault<z.ZodString>;
790
987
  objectStorageEndpoint: z.ZodOptional<z.ZodString>;
791
988
  objectStorageInternalEndpoint: z.ZodOptional<z.ZodString>;
792
989
  objectStorageSandboxEndpoint: z.ZodOptional<z.ZodString>;
@@ -821,6 +1018,26 @@ declare const SettingsSchema: z.ZodObject<{
821
1018
  documentEmbeddingDimensions: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
822
1019
  documentEmbeddingApiKey: z.ZodOptional<z.ZodString>;
823
1020
  documentEmbeddingBaseUrl: z.ZodOptional<z.ZodString>;
1021
+ documentEmbeddingBillingMode: z.ZodDefault<z.ZodEnum<{
1022
+ credits: "credits";
1023
+ shadow: "shadow";
1024
+ usage_only: "usage_only";
1025
+ }>>;
1026
+ siteDataRecordBytesPerSite: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1027
+ siteDataMaxRecordBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1028
+ siteDataMaxCollectionsPerSite: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1029
+ siteDataFileBytesPerSite: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1030
+ siteDataMaxFileBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1031
+ siteDataWorkspaceBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1032
+ siteDataViewerWritesPerMinute: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1033
+ siteDataSiteWritesPerMinute: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1034
+ siteDataViewerReadsPerMinute: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1035
+ siteDataManagerWritesPerMinute: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1036
+ siteDataSiteValidationMsPerMinute: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1037
+ siteDataWorkspaceValidationMsPerMinute: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1038
+ siteDataMaxRecordsPerCollection: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
1039
+ documentEmbeddingCreditsActivatedAt: z.ZodOptional<z.ZodISODateTime>;
1040
+ documentEmbeddingRateMicrosPerMillionBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
824
1041
  documentCurationProvider: z.ZodDefault<z.ZodEnum<{
825
1042
  heuristic: "heuristic";
826
1043
  none: "none";
@@ -859,16 +1076,29 @@ declare const SettingsSchema: z.ZodObject<{
859
1076
  managedAuthGoogleClientSecret: z.ZodOptional<z.ZodString>;
860
1077
  managedAuthGithubClientId: z.ZodOptional<z.ZodString>;
861
1078
  managedAuthGithubClientSecret: z.ZodOptional<z.ZodString>;
1079
+ allowedUserEmails: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodEmail, z.ZodTransform<string, string>>>>;
862
1080
  managedAuthSessionSetMode: z.ZodDefault<z.ZodEnum<{
863
1081
  broker: "broker";
864
1082
  dual: "dual";
865
1083
  legacy: "legacy";
866
1084
  }>>;
1085
+ nativeAppSchemes: z.ZodDefault<z.ZodArray<z.ZodString>>;
1086
+ nativeAppIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
1087
+ apnsKeyId: z.ZodOptional<z.ZodString>;
1088
+ apnsTeamId: z.ZodOptional<z.ZodString>;
1089
+ apnsPrivateKey: z.ZodOptional<z.ZodString>;
1090
+ fcmServiceAccountJson: z.ZodOptional<z.ZodString>;
1091
+ managedAuthNewSignupsEnabled: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1092
+ managedAuthRequireEmailVerification: z.ZodOptional<z.ZodPreprocess<z.ZodBoolean>>;
867
1093
  organizationUserSetupEmailTokenTransport: z.ZodDefault<z.ZodEnum<{
868
1094
  fragment: "fragment";
869
1095
  query: "query";
870
1096
  }>>;
871
1097
  organizationUserSetupQueryEdgeSanitizationConfirmed: z.ZodDefault<z.ZodPreprocess<z.ZodBoolean>>;
1098
+ managedEmailDelivery: z.ZodDefault<z.ZodEnum<{
1099
+ disabled: "disabled";
1100
+ resend: "resend";
1101
+ }>>;
872
1102
  resendApiKey: z.ZodOptional<z.ZodString>;
873
1103
  emailFrom: z.ZodDefault<z.ZodString>;
874
1104
  stripeSecretKey: z.ZodOptional<z.ZodString>;
@@ -881,6 +1111,7 @@ declare const SettingsSchema: z.ZodObject<{
881
1111
  url: z.ZodString;
882
1112
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
883
1113
  timeoutMs: z.ZodOptional<z.ZodNumber>;
1114
+ setupTimeoutMs: z.ZodOptional<z.ZodNumber>;
884
1115
  cacheToolsList: z.ZodDefault<z.ZodBoolean>;
885
1116
  requireApproval: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodPipe<z.ZodArray<z.ZodString>, z.ZodTransform<string[], string[]>>]>>;
886
1117
  headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1031,13 +1262,23 @@ export declare function googleDriveOAuthCallbackUrl(publicBaseUrl: string | unde
1031
1262
  /** Exact callback registered on the environment-specific personal GitHub OAuth App. */
1032
1263
  export declare function personalGitHubOAuthCallbackUrl(publicBaseUrl: string | undefined): string | null;
1033
1264
  /** Declarative voice-input transcription provider ids. */
1034
- export type VoiceInputProviderId = "openai" | "azure-openai" | "codex-subscription" | "supergrok-subscription";
1265
+ export type VoiceInputProviderId = "openai" | "azure-openai" | "azure-mai" | "codex-subscription" | "supergrok-subscription";
1035
1266
  export type VoiceInputProviderConfig = {
1267
+ id: "azure-mai";
1268
+ kind: "azure-mai";
1269
+ pricing: VoiceInputPricing | null;
1270
+ endpoint: string;
1271
+ apiKey: string;
1272
+ apiVersion: string;
1273
+ model: string;
1274
+ } | {
1036
1275
  id: "openai";
1037
1276
  kind: "openai";
1038
1277
  apiKey: string;
1039
1278
  baseUrl: string;
1040
1279
  model: string;
1280
+ /** Deployment-funded: Opengeni pays upstream and charges credits. */
1281
+ pricing: VoiceInputPricing | null;
1041
1282
  } | {
1042
1283
  id: "azure-openai";
1043
1284
  kind: "azure-openai";
@@ -1046,6 +1287,10 @@ export type VoiceInputProviderConfig = {
1046
1287
  apiVersion: string;
1047
1288
  apiKey: string | null;
1048
1289
  adToken: string | null;
1290
+ /** Underlying model (pricing + response shape); defaults to the deployment name. */
1291
+ model: string;
1292
+ /** Deployment-funded: Opengeni pays upstream and charges credits. */
1293
+ pricing: VoiceInputPricing | null;
1049
1294
  } | {
1050
1295
  id: "codex-subscription";
1051
1296
  kind: "codex-subscription";
@@ -1055,6 +1300,17 @@ export type VoiceInputProviderConfig = {
1055
1300
  kind: "supergrok-subscription";
1056
1301
  experimental: true;
1057
1302
  };
1303
+ /** The deployment's Jev key, or undefined when it is missing or a placeholder. */
1304
+ export declare function usableJevApiKey(settings: Pick<Settings, "jevApiKey">): string | undefined;
1305
+ /** Deployment half of agent configuration: hard capability limits. */
1306
+ export declare function agentConfigDeploymentPolicy(settings: FirstPartyMcpToolPolicySettings & Pick<Settings, "webSearchEnabled">): AgentConfigDeploymentLimits;
1307
+ /**
1308
+ * Deployment half of the `code_search` decision. `available` is false when
1309
+ * the mode is off or no usable Jev key is configured; workspaces then cannot
1310
+ * turn it on. `workspaceDefault` applies to workspaces without their own
1311
+ * setting.
1312
+ */
1313
+ export declare function codeSearchDeploymentPolicy(settings: Pick<Settings, "codeSearchMode" | "jevApiKey">): CodeSearchDeploymentPolicy;
1058
1314
  /**
1059
1315
  * Reject empty / template secrets so `.env.example` placeholders like
1060
1316
  * `your-key` cannot advertise voice input as available and then 401 upstream.
@@ -1066,6 +1322,93 @@ export declare function isUsableVoiceInputSecret(value: string | null | undefine
1066
1322
  * whether at least one non-experimental (or probed experimental) provider exists.
1067
1323
  */
1068
1324
  export declare function resolveVoiceInputProviderRegistry(settings: Settings): VoiceInputProviderConfig[];
1325
+ /** Why a credentialed deployment-funded voice provider is withheld. */
1326
+ export type VoiceInputPricingIssue = {
1327
+ providerId: "openai" | "azure-openai" | "azure-mai";
1328
+ env: string;
1329
+ reason: "malformed" | "unpriced";
1330
+ message: string;
1331
+ };
1332
+ /**
1333
+ * Pricing problems that withhold a credentialed deployment-funded provider.
1334
+ * A malformed PRICING_JSON never fails boot (workers share this config and
1335
+ * must not crash-loop over a voice-only setting); the API logs each issue
1336
+ * once at startup and the provider stays unavailable.
1337
+ */
1338
+ export declare function voiceInputPricingIssues(settings: Settings): VoiceInputPricingIssue[];
1339
+ /**
1340
+ * Opengeni credit price for one deployment-funded transcription provider.
1341
+ * Rates are upstream list prices in integer USD micros; `marginBps` (500 =
1342
+ * +5%) is added on top, exactly like model pricing. `microsPerMinute` prices
1343
+ * provider-reported audio duration (Whisper, `usage.type: "duration"`) and is
1344
+ * a server-measured WAV duration when provider usage is absent. Token
1345
+ * rates price `usage.type: "tokens"` (gpt-4o-transcribe family); `input`
1346
+ * covers text input tokens and, unless `audioInput` is set, audio tokens.
1347
+ */
1348
+ export type VoiceInputPricing = {
1349
+ microsPerMinute: number;
1350
+ inputMicrosPerMillionTokens?: number | undefined;
1351
+ audioInputMicrosPerMillionTokens?: number | undefined;
1352
+ outputMicrosPerMillionTokens?: number | undefined;
1353
+ marginBps?: number | undefined;
1354
+ };
1355
+ /**
1356
+ * Built-in list prices (OpenAI API pricing, "Transcription models" table)
1357
+ * plus the default 5% Opengeni margin used for model pricing. Azure Global
1358
+ * Standard deployments use the same list prices; set the provider
1359
+ * PRICING_JSON when a deployment's contracted or regional price differs.
1360
+ */
1361
+ export declare const defaultVoiceInputPricing: Readonly<Record<string, VoiceInputPricing>>;
1362
+ /** Lowercased model with a dated snapshot suffix (`-2025-03-20`) removed. */
1363
+ export declare function canonicalVoiceInputModel(model: string): string;
1364
+ /** Whisper reports its billed audio duration only in `verbose_json`. */
1365
+ export declare function voiceInputModelReportsDurationOnly(model: string): boolean;
1366
+ /** Parse one provider pricing JSON. Throws a configuration error when malformed. */
1367
+ export declare function parseVoiceInputPricingJson(raw: string | undefined, env?: string): VoiceInputPricing | null;
1368
+ /** Explicit provider pricing JSON wins; otherwise the built-in list price for the model. */
1369
+ export declare function resolveVoiceInputPricing(raw: string | undefined, model: string): VoiceInputPricing | null;
1370
+ /** Non-throwing {@link resolveVoiceInputPricing} for registry resolution. */
1371
+ export declare function safeResolveVoiceInputPricing(raw: string | undefined, model: string, env?: string): {
1372
+ ok: true;
1373
+ pricing: VoiceInputPricing | null;
1374
+ } | {
1375
+ ok: false;
1376
+ error: string;
1377
+ };
1378
+ /** Same predicate as model/credit limits: credit balance and debits are enforced. */
1379
+ export declare function voiceInputCreditBillingActive(settings: Pick<Settings, "billingMode" | "usageLimitsMode">): boolean;
1380
+ /** Provider-reported transcription usage, normalized. Never client-reported. */
1381
+ export type VoiceInputUsage = {
1382
+ kind: "tokens";
1383
+ inputTokens: number;
1384
+ audioInputTokens: number;
1385
+ textInputTokens: number;
1386
+ outputTokens: number;
1387
+ } | {
1388
+ kind: "duration";
1389
+ seconds: number;
1390
+ };
1391
+ export type VoiceInputCost = {
1392
+ /** Upstream list cost before margin, rounded up to whole micros. */
1393
+ providerCostMicros: number;
1394
+ /** Opengeni credit price after margin, rounded up to whole micros. */
1395
+ creditCostMicros: number;
1396
+ };
1397
+ /** True when token usage can be priced exactly. */
1398
+ export declare function voiceInputPricingHasTokenRates(pricing: VoiceInputPricing): boolean;
1399
+ /**
1400
+ * Exact integer credit math. Token usage needs token rates; duration usage
1401
+ * uses `microsPerMinute` at millisecond resolution. Both round up once, after
1402
+ * summing, so a positive use never becomes a free debit.
1403
+ */
1404
+ export declare function calculateVoiceInputCost(pricing: VoiceInputPricing, usage: VoiceInputUsage): VoiceInputCost;
1405
+ /**
1406
+ * Deployment-funded providers that have credentials but are withheld because
1407
+ * credit billing is active and no price is known. The API logs these (and
1408
+ * malformed pricing, see {@link voiceInputPricingIssues}) once at startup so
1409
+ * an operator sees why voice input stayed unavailable.
1410
+ */
1411
+ export declare function unpricedVoiceInputProviders(settings: Settings): VoiceInputProviderId[];
1069
1412
  /** True when the deployment has at least one supported (non-experimental) provider. */
1070
1413
  export declare function voiceInputDeploymentConfigured(settings: Settings): boolean;
1071
1414
  export type TemporalTlsConnectionConfig = {
@@ -1103,11 +1446,29 @@ export type ModelUsageInput = {
1103
1446
  requestUsageEntries?: ModelUsageInput[] | undefined;
1104
1447
  };
1105
1448
  export type ModelUsageCostBreakdown = {
1106
- /** Provider-rate cost basis for the exact usage, before OpenGeni margin. */
1449
+ /** Provider-rate cost basis for the exact usage, before Opengeni margin. */
1107
1450
  providerCostMicros: number;
1108
- /** OpenGeni credit price after configured margin and latency-mode multiplier. */
1451
+ /** Opengeni credit price after configured margin and latency-mode multiplier. */
1109
1452
  creditCostMicros: number;
1110
1453
  };
1454
+ export type ModelListCostClassesMicros = {
1455
+ uncachedInput: number;
1456
+ cacheRead: number;
1457
+ cacheWrite: number;
1458
+ output: number;
1459
+ };
1460
+ export type ModelListUsageCostSnapshot = ModelUsageCostBreakdown & {
1461
+ /** Captured upstream list costs, summing to providerCostMicros, never debits. */
1462
+ listByClassMicros: ModelListCostClassesMicros | null;
1463
+ /** True only when a returned class split includes latency rounding allocation. */
1464
+ listByClassApprox: boolean;
1465
+ };
1466
+ export type ModelRecordedListCostAllocation = {
1467
+ /** Approximate attribution of a stored upstream total, never a new price. */
1468
+ listByClassMicros: ModelListCostClassesMicros | null;
1469
+ /** True for every eligible historical allocation, including known zero. */
1470
+ listByClassApprox: boolean;
1471
+ };
1111
1472
  export type StaticUsageLimitsConfig = StaticUsageLimits;
1112
1473
  export type EntitlementsConfig = Entitlements;
1113
1474
  export declare const CapabilitySupportV1: z.ZodEnum<{
@@ -1284,7 +1645,7 @@ export type CredentialSourceV1 = {
1284
1645
  mechanism: "api_key" | "azure_ad_bearer" | "none";
1285
1646
  } | {
1286
1647
  kind: "connected_subscription";
1287
- provider: "codex" | "xai";
1648
+ provider: "codex" | "xai" | "claude";
1288
1649
  } | {
1289
1650
  kind: "workspace_connection";
1290
1651
  mechanism: "api_key";
@@ -1304,6 +1665,7 @@ export type BillingAttributionV1 = {
1304
1665
  * silently no-ops hosted tools (see docs/model-providers.md).
1305
1666
  */
1306
1667
  export declare const ModelProviderApi: z.ZodEnum<{
1668
+ "anthropic-messages": "anthropic-messages";
1307
1669
  chat: "chat";
1308
1670
  responses: "responses";
1309
1671
  }>;
@@ -1326,10 +1688,18 @@ export type ModelProviderWireProfile = z.infer<typeof ModelProviderWireProfile>;
1326
1688
  */
1327
1689
  export declare const RegistryProviderKind: z.ZodEnum<{
1328
1690
  anonymous: "anonymous";
1691
+ "anthropic-organization": "anthropic-organization";
1692
+ "anthropic-workspace": "anthropic-workspace";
1329
1693
  "api-key": "api-key";
1694
+ "claude-subscription-organization": "claude-subscription-organization";
1695
+ "claude-subscription-workspace": "claude-subscription-workspace";
1330
1696
  "codex-subscription": "codex-subscription";
1697
+ "direct-azure-workspace": "direct-azure-workspace";
1698
+ "direct-openai-workspace": "direct-openai-workspace";
1331
1699
  "openrouter-organization": "openrouter-organization";
1332
1700
  "openrouter-workspace": "openrouter-workspace";
1701
+ "opper-organization": "opper-organization";
1702
+ "opper-workspace": "opper-workspace";
1333
1703
  "vercel-gateway-managed": "vercel-gateway-managed";
1334
1704
  "vercel-gateway-organization": "vercel-gateway-organization";
1335
1705
  "vercel-gateway-workspace": "vercel-gateway-workspace";
@@ -1337,13 +1707,60 @@ export declare const RegistryProviderKind: z.ZodEnum<{
1337
1707
  }>;
1338
1708
  export type RegistryProviderKind = z.infer<typeof RegistryProviderKind>;
1339
1709
  /** A non-built-in provider declared by the host via OPENGENI_MODEL_PROVIDERS_JSON. */
1710
+ export declare const ClaudeSubscriptionIdentity: z.ZodObject<{
1711
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1712
+ deviceId: z.ZodString;
1713
+ }, z.core.$strict>;
1714
+ export type ClaudeSubscriptionIdentity = z.infer<typeof ClaudeSubscriptionIdentity>;
1715
+ export declare const ClaudeSubscriptionCredential: z.ZodObject<{
1716
+ version: z.ZodLiteral<1>;
1717
+ token: z.ZodString;
1718
+ identity: z.ZodObject<{
1719
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1720
+ deviceId: z.ZodString;
1721
+ }, z.core.$strict>;
1722
+ oauth: z.ZodOptional<z.ZodObject<{
1723
+ refreshToken: z.ZodString;
1724
+ expiresAt: z.ZodString;
1725
+ scopes: z.ZodArray<z.ZodString>;
1726
+ }, z.core.$strict>>;
1727
+ }, z.core.$strict>;
1728
+ declare const AnthropicProviderOptions: z.ZodObject<{
1729
+ identity: z.ZodOptional<z.ZodObject<{
1730
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1731
+ deviceId: z.ZodString;
1732
+ }, z.core.$strict>>;
1733
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1734
+ connectionId: z.ZodString;
1735
+ credentialVersion: z.ZodNumber;
1736
+ }, z.core.$strict>>;
1737
+ auth: z.ZodDefault<z.ZodEnum<{
1738
+ "api-key": "api-key";
1739
+ oauth: "oauth";
1740
+ }>>;
1741
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
1742
+ "1h": "1h";
1743
+ "5m": "5m";
1744
+ off: "off";
1745
+ }>>;
1746
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
1747
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
1748
+ }, z.core.$strip>;
1340
1749
  declare const RegistryProviderSchema: z.ZodObject<{
1341
1750
  kind: z.ZodDefault<z.ZodEnum<{
1342
1751
  anonymous: "anonymous";
1752
+ "anthropic-organization": "anthropic-organization";
1753
+ "anthropic-workspace": "anthropic-workspace";
1343
1754
  "api-key": "api-key";
1755
+ "claude-subscription-organization": "claude-subscription-organization";
1756
+ "claude-subscription-workspace": "claude-subscription-workspace";
1344
1757
  "codex-subscription": "codex-subscription";
1758
+ "direct-azure-workspace": "direct-azure-workspace";
1759
+ "direct-openai-workspace": "direct-openai-workspace";
1345
1760
  "openrouter-organization": "openrouter-organization";
1346
1761
  "openrouter-workspace": "openrouter-workspace";
1762
+ "opper-organization": "opper-organization";
1763
+ "opper-workspace": "opper-workspace";
1347
1764
  "vercel-gateway-managed": "vercel-gateway-managed";
1348
1765
  "vercel-gateway-organization": "vercel-gateway-organization";
1349
1766
  "vercel-gateway-workspace": "vercel-gateway-workspace";
@@ -1352,9 +1769,33 @@ declare const RegistryProviderSchema: z.ZodObject<{
1352
1769
  id: z.ZodString;
1353
1770
  label: z.ZodOptional<z.ZodString>;
1354
1771
  api: z.ZodDefault<z.ZodEnum<{
1772
+ "anthropic-messages": "anthropic-messages";
1355
1773
  chat: "chat";
1356
1774
  responses: "responses";
1357
1775
  }>>;
1776
+ anthropic: z.ZodOptional<z.ZodObject<{
1777
+ identity: z.ZodOptional<z.ZodObject<{
1778
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
1779
+ deviceId: z.ZodString;
1780
+ }, z.core.$strict>>;
1781
+ credentialBinding: z.ZodOptional<z.ZodObject<{
1782
+ connectionId: z.ZodString;
1783
+ credentialVersion: z.ZodNumber;
1784
+ }, z.core.$strict>>;
1785
+ auth: z.ZodDefault<z.ZodEnum<{
1786
+ "api-key": "api-key";
1787
+ oauth: "oauth";
1788
+ }>>;
1789
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
1790
+ "1h": "1h";
1791
+ "5m": "5m";
1792
+ off: "off";
1793
+ }>>;
1794
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
1795
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
1796
+ }, z.core.$strip>>;
1797
+ streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
1798
+ streamProgressTimeoutMs: z.ZodOptional<z.ZodNumber>;
1358
1799
  wireProfile: z.ZodDefault<z.ZodEnum<{
1359
1800
  "azure-openai": "azure-openai";
1360
1801
  openai: "openai";
@@ -1374,6 +1815,7 @@ declare const RegistryProviderSchema: z.ZodObject<{
1374
1815
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
1375
1816
  label: z.ZodOptional<z.ZodString>;
1376
1817
  shortLabel: z.ZodOptional<z.ZodString>;
1818
+ logoUrl: z.ZodOptional<z.ZodString>;
1377
1819
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
1378
1820
  effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
1379
1821
  autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
@@ -1565,6 +2007,14 @@ export declare const WORKSPACE_OPENROUTER_MODEL_ID_PREFIX: "workspace-openrouter
1565
2007
  export declare const ORGANIZATION_OPENROUTER_PROVIDER_ID: "organization-openrouter";
1566
2008
  export declare const ORGANIZATION_OPENROUTER_MODEL_ID_PREFIX: "organization-openrouter/";
1567
2009
  export declare const OPENROUTER_BASE_URL: "https://openrouter.ai/api/v1";
2010
+ export declare const OPPER_PROVIDER_ID: "opper";
2011
+ export declare const OPPER_MODEL_ID_PREFIX: "opper/";
2012
+ export declare const WORKSPACE_OPPER_PROVIDER_ID: "workspace-opper";
2013
+ export declare const WORKSPACE_OPPER_MODEL_ID_PREFIX: "workspace-opper/";
2014
+ export declare const ORGANIZATION_OPPER_PROVIDER_ID: "organization-opper";
2015
+ export declare const ORGANIZATION_OPPER_MODEL_ID_PREFIX: "organization-opper/";
2016
+ /** Opper's OpenAI-compatible Chat Completions surface (Bearer key). */
2017
+ export declare const OPPER_BASE_URL: "https://api.opper.ai/v3/compat";
1568
2018
  export declare const ModelCostClass: z.ZodEnum<{
1569
2019
  credits: "credits";
1570
2020
  free: "free";
@@ -1587,6 +2037,7 @@ export declare const GatewayCatalogModel: z.ZodObject<{
1587
2037
  upstreamModelId: z.ZodString;
1588
2038
  label: z.ZodString;
1589
2039
  shortLabel: z.ZodOptional<z.ZodString>;
2040
+ logoUrl: z.ZodOptional<z.ZodString>;
1590
2041
  providers: z.ZodArray<z.ZodString>;
1591
2042
  implicitCaching: z.ZodDefault<z.ZodBoolean>;
1592
2043
  vision: z.ZodDefault<z.ZodBoolean>;
@@ -1628,6 +2079,7 @@ export declare const OpenRouterCatalogModel: z.ZodObject<{
1628
2079
  upstreamModelId: z.ZodString;
1629
2080
  label: z.ZodString;
1630
2081
  shortLabel: z.ZodOptional<z.ZodString>;
2082
+ logoUrl: z.ZodOptional<z.ZodString>;
1631
2083
  aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
1632
2084
  capabilities: z.ZodObject<{
1633
2085
  reasoning: z.ZodObject<{
@@ -1782,6 +2234,196 @@ export declare const OpenRouterCatalogModel: z.ZodObject<{
1782
2234
  apiKey: z.ZodOptional<z.ZodNever>;
1783
2235
  }, z.core.$strict>;
1784
2236
  export type OpenRouterCatalogModel = z.infer<typeof OpenRouterCatalogModel>;
2237
+ /**
2238
+ * One reviewed Opper route. `upstreamModelId` is Opper's exact catalogue id:
2239
+ * a bare upstream name is a pool (Opper picks the serving provider), while a
2240
+ * `provider/model` id pins one route and region. Curated entries pin a route.
2241
+ * Code-defined entries may carry a reviewed price; database documents may not.
2242
+ */
2243
+ export declare const OpperCatalogModel: z.ZodObject<{
2244
+ upstreamModelId: z.ZodString;
2245
+ label: z.ZodString;
2246
+ shortLabel: z.ZodOptional<z.ZodString>;
2247
+ logoUrl: z.ZodOptional<z.ZodString>;
2248
+ aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
2249
+ capabilities: z.ZodObject<{
2250
+ reasoning: z.ZodObject<{
2251
+ upstream: z.ZodEnum<{
2252
+ supported: "supported";
2253
+ unknown: "unknown";
2254
+ unsupported: "unsupported";
2255
+ }>;
2256
+ runnable: z.ZodBoolean;
2257
+ efforts: z.ZodArray<z.ZodEnum<{
2258
+ high: "high";
2259
+ low: "low";
2260
+ max: "max";
2261
+ medium: "medium";
2262
+ minimal: "minimal";
2263
+ none: "none";
2264
+ xhigh: "xhigh";
2265
+ }>>;
2266
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
2267
+ high: "high";
2268
+ low: "low";
2269
+ max: "max";
2270
+ medium: "medium";
2271
+ minimal: "minimal";
2272
+ none: "none";
2273
+ xhigh: "xhigh";
2274
+ }>>;
2275
+ required: z.ZodBoolean;
2276
+ }, z.core.$strip>;
2277
+ functionCalling: z.ZodObject<{
2278
+ upstream: z.ZodEnum<{
2279
+ supported: "supported";
2280
+ unknown: "unknown";
2281
+ unsupported: "unsupported";
2282
+ }>;
2283
+ runnable: z.ZodBoolean;
2284
+ }, z.core.$strip>;
2285
+ structuredOutput: z.ZodObject<{
2286
+ upstream: z.ZodEnum<{
2287
+ supported: "supported";
2288
+ unknown: "unknown";
2289
+ unsupported: "unsupported";
2290
+ }>;
2291
+ runnable: z.ZodBoolean;
2292
+ }, z.core.$strip>;
2293
+ hostedTools: z.ZodObject<{
2294
+ webSearch: z.ZodObject<{
2295
+ upstream: z.ZodEnum<{
2296
+ supported: "supported";
2297
+ unknown: "unknown";
2298
+ unsupported: "unsupported";
2299
+ }>;
2300
+ runnable: z.ZodBoolean;
2301
+ }, z.core.$strip>;
2302
+ xSearch: z.ZodObject<{
2303
+ upstream: z.ZodEnum<{
2304
+ supported: "supported";
2305
+ unknown: "unknown";
2306
+ unsupported: "unsupported";
2307
+ }>;
2308
+ runnable: z.ZodBoolean;
2309
+ }, z.core.$strip>;
2310
+ codeExecution: z.ZodObject<{
2311
+ upstream: z.ZodEnum<{
2312
+ supported: "supported";
2313
+ unknown: "unknown";
2314
+ unsupported: "unsupported";
2315
+ }>;
2316
+ runnable: z.ZodBoolean;
2317
+ }, z.core.$strip>;
2318
+ imageGeneration: z.ZodDefault<z.ZodObject<{
2319
+ upstream: z.ZodEnum<{
2320
+ supported: "supported";
2321
+ unknown: "unknown";
2322
+ unsupported: "unsupported";
2323
+ }>;
2324
+ runnable: z.ZodBoolean;
2325
+ }, z.core.$strip>>;
2326
+ }, z.core.$strip>;
2327
+ inputModalities: z.ZodArray<z.ZodEnum<{
2328
+ audio: "audio";
2329
+ image: "image";
2330
+ text: "text";
2331
+ }>>;
2332
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
2333
+ outputModalities: z.ZodArray<z.ZodEnum<{
2334
+ audio: "audio";
2335
+ image: "image";
2336
+ text: "text";
2337
+ }>>;
2338
+ transports: z.ZodObject<{
2339
+ sse: z.ZodObject<{
2340
+ upstream: z.ZodEnum<{
2341
+ supported: "supported";
2342
+ unknown: "unknown";
2343
+ unsupported: "unsupported";
2344
+ }>;
2345
+ runnable: z.ZodBoolean;
2346
+ }, z.core.$strip>;
2347
+ responsesWebSocket: z.ZodObject<{
2348
+ upstream: z.ZodEnum<{
2349
+ supported: "supported";
2350
+ unknown: "unknown";
2351
+ unsupported: "unsupported";
2352
+ }>;
2353
+ runnable: z.ZodBoolean;
2354
+ }, z.core.$strip>;
2355
+ realtimeAudio: z.ZodObject<{
2356
+ upstream: z.ZodEnum<{
2357
+ supported: "supported";
2358
+ unknown: "unknown";
2359
+ unsupported: "unsupported";
2360
+ }>;
2361
+ runnable: z.ZodBoolean;
2362
+ }, z.core.$strip>;
2363
+ }, z.core.$strip>;
2364
+ promptCaching: z.ZodOptional<z.ZodObject<{
2365
+ upstream: z.ZodEnum<{
2366
+ supported: "supported";
2367
+ unknown: "unknown";
2368
+ unsupported: "unsupported";
2369
+ }>;
2370
+ runnable: z.ZodBoolean;
2371
+ mode: z.ZodEnum<{
2372
+ automatic: "automatic";
2373
+ implicit: "implicit";
2374
+ none: "none";
2375
+ }>;
2376
+ }, z.core.$strip>>;
2377
+ latencyModes: z.ZodArray<z.ZodObject<{
2378
+ id: z.ZodEnum<{
2379
+ fast: "fast";
2380
+ priority: "priority";
2381
+ standard: "standard";
2382
+ }>;
2383
+ upstream: z.ZodEnum<{
2384
+ supported: "supported";
2385
+ unknown: "unknown";
2386
+ unsupported: "unsupported";
2387
+ }>;
2388
+ runnable: z.ZodBoolean;
2389
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
2390
+ }, z.core.$strip>>;
2391
+ }, z.core.$strip>;
2392
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
2393
+ effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
2394
+ autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
2395
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
2396
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
2397
+ pricing: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
2398
+ inputMicrosPerMillionTokens: z.ZodNumber;
2399
+ cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
2400
+ cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
2401
+ outputMicrosPerMillionTokens: z.ZodNumber;
2402
+ marginBps: z.ZodOptional<z.ZodNumber>;
2403
+ }, z.core.$strip>, z.ZodObject<{
2404
+ default: z.ZodObject<{
2405
+ inputMicrosPerMillionTokens: z.ZodNumber;
2406
+ cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
2407
+ cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
2408
+ outputMicrosPerMillionTokens: z.ZodNumber;
2409
+ marginBps: z.ZodOptional<z.ZodNumber>;
2410
+ }, z.core.$strip>;
2411
+ inputTokenTiers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2412
+ minimumInputTokens: z.ZodNumber;
2413
+ pricing: z.ZodObject<{
2414
+ inputMicrosPerMillionTokens: z.ZodNumber;
2415
+ cachedInputMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
2416
+ cacheWriteMicrosPerMillionTokens: z.ZodOptional<z.ZodNumber>;
2417
+ outputMicrosPerMillionTokens: z.ZodNumber;
2418
+ marginBps: z.ZodOptional<z.ZodNumber>;
2419
+ }, z.core.$strip>;
2420
+ }, z.core.$strip>>>;
2421
+ }, z.core.$strip>]>>;
2422
+ credentialSource: z.ZodOptional<z.ZodNever>;
2423
+ billing: z.ZodOptional<z.ZodNever>;
2424
+ apiKey: z.ZodOptional<z.ZodNever>;
2425
+ }, z.core.$strict>;
2426
+ export type OpperCatalogModel = z.infer<typeof OpperCatalogModel>;
1785
2427
  export declare const ModelCatalogDocument: z.ZodObject<{
1786
2428
  schemaVersion: z.ZodLiteral<1>;
1787
2429
  defaultModel: z.ZodOptional<z.ZodString>;
@@ -1790,9 +2432,33 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1790
2432
  id: z.ZodString;
1791
2433
  label: z.ZodOptional<z.ZodString>;
1792
2434
  api: z.ZodDefault<z.ZodEnum<{
2435
+ "anthropic-messages": "anthropic-messages";
1793
2436
  chat: "chat";
1794
2437
  responses: "responses";
1795
2438
  }>>;
2439
+ anthropic: z.ZodOptional<z.ZodObject<{
2440
+ identity: z.ZodOptional<z.ZodObject<{
2441
+ accountUuid: z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"">]>;
2442
+ deviceId: z.ZodString;
2443
+ }, z.core.$strict>>;
2444
+ credentialBinding: z.ZodOptional<z.ZodObject<{
2445
+ connectionId: z.ZodString;
2446
+ credentialVersion: z.ZodNumber;
2447
+ }, z.core.$strict>>;
2448
+ auth: z.ZodDefault<z.ZodEnum<{
2449
+ "api-key": "api-key";
2450
+ oauth: "oauth";
2451
+ }>>;
2452
+ cacheTtl: z.ZodDefault<z.ZodEnum<{
2453
+ "1h": "1h";
2454
+ "5m": "5m";
2455
+ off: "off";
2456
+ }>>;
2457
+ maxOutputTokens: z.ZodDefault<z.ZodNumber>;
2458
+ streamIdleTimeoutMs: z.ZodDefault<z.ZodNumber>;
2459
+ }, z.core.$strip>>;
2460
+ streamIdleTimeoutMs: z.ZodOptional<z.ZodNumber>;
2461
+ streamProgressTimeoutMs: z.ZodOptional<z.ZodNumber>;
1796
2462
  wireProfile: z.ZodDefault<z.ZodEnum<{
1797
2463
  "azure-openai": "azure-openai";
1798
2464
  openai: "openai";
@@ -1810,6 +2476,7 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1810
2476
  aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
1811
2477
  label: z.ZodOptional<z.ZodString>;
1812
2478
  shortLabel: z.ZodOptional<z.ZodString>;
2479
+ logoUrl: z.ZodOptional<z.ZodString>;
1813
2480
  contextWindowTokens: z.ZodOptional<z.ZodNumber>;
1814
2481
  effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
1815
2482
  autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
@@ -1970,12 +2637,690 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1970
2637
  publicDefaultHeaderNames: z.ZodOptional<z.ZodNever>;
1971
2638
  publicDefaultQueryNames: z.ZodOptional<z.ZodNever>;
1972
2639
  }, z.core.$strict>>>;
1973
- gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
1974
- productId: z.ZodString;
1975
- workspaceProductId: z.ZodString;
1976
- upstreamModelId: z.ZodString;
1977
- label: z.ZodString;
1978
- shortLabel: z.ZodOptional<z.ZodString>;
2640
+ codexModels: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodObject<{
2641
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
2642
+ label: z.ZodOptional<z.ZodString>;
2643
+ shortLabel: z.ZodOptional<z.ZodString>;
2644
+ logoUrl: z.ZodOptional<z.ZodString>;
2645
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
2646
+ effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
2647
+ autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
2648
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
2649
+ reasoningEffort: z.ZodOptional<z.ZodBoolean>;
2650
+ hostedWebSearch: z.ZodOptional<z.ZodBoolean>;
2651
+ credentialSource: z.ZodOptional<z.ZodNever>;
2652
+ billing: z.ZodOptional<z.ZodNever>;
2653
+ retired: z.ZodOptional<z.ZodBoolean>;
2654
+ id: z.ZodString;
2655
+ upstreamModelId: z.ZodString;
2656
+ capabilities: z.ZodObject<{
2657
+ reasoning: z.ZodObject<{
2658
+ upstream: z.ZodEnum<{
2659
+ supported: "supported";
2660
+ unknown: "unknown";
2661
+ unsupported: "unsupported";
2662
+ }>;
2663
+ runnable: z.ZodBoolean;
2664
+ efforts: z.ZodArray<z.ZodEnum<{
2665
+ high: "high";
2666
+ low: "low";
2667
+ max: "max";
2668
+ medium: "medium";
2669
+ minimal: "minimal";
2670
+ none: "none";
2671
+ xhigh: "xhigh";
2672
+ }>>;
2673
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
2674
+ high: "high";
2675
+ low: "low";
2676
+ max: "max";
2677
+ medium: "medium";
2678
+ minimal: "minimal";
2679
+ none: "none";
2680
+ xhigh: "xhigh";
2681
+ }>>;
2682
+ required: z.ZodBoolean;
2683
+ }, z.core.$strip>;
2684
+ functionCalling: z.ZodObject<{
2685
+ upstream: z.ZodEnum<{
2686
+ supported: "supported";
2687
+ unknown: "unknown";
2688
+ unsupported: "unsupported";
2689
+ }>;
2690
+ runnable: z.ZodBoolean;
2691
+ }, z.core.$strip>;
2692
+ structuredOutput: z.ZodObject<{
2693
+ upstream: z.ZodEnum<{
2694
+ supported: "supported";
2695
+ unknown: "unknown";
2696
+ unsupported: "unsupported";
2697
+ }>;
2698
+ runnable: z.ZodBoolean;
2699
+ }, z.core.$strip>;
2700
+ hostedTools: z.ZodObject<{
2701
+ webSearch: z.ZodObject<{
2702
+ upstream: z.ZodEnum<{
2703
+ supported: "supported";
2704
+ unknown: "unknown";
2705
+ unsupported: "unsupported";
2706
+ }>;
2707
+ runnable: z.ZodBoolean;
2708
+ }, z.core.$strip>;
2709
+ xSearch: z.ZodObject<{
2710
+ upstream: z.ZodEnum<{
2711
+ supported: "supported";
2712
+ unknown: "unknown";
2713
+ unsupported: "unsupported";
2714
+ }>;
2715
+ runnable: z.ZodBoolean;
2716
+ }, z.core.$strip>;
2717
+ codeExecution: z.ZodObject<{
2718
+ upstream: z.ZodEnum<{
2719
+ supported: "supported";
2720
+ unknown: "unknown";
2721
+ unsupported: "unsupported";
2722
+ }>;
2723
+ runnable: z.ZodBoolean;
2724
+ }, z.core.$strip>;
2725
+ imageGeneration: z.ZodDefault<z.ZodObject<{
2726
+ upstream: z.ZodEnum<{
2727
+ supported: "supported";
2728
+ unknown: "unknown";
2729
+ unsupported: "unsupported";
2730
+ }>;
2731
+ runnable: z.ZodBoolean;
2732
+ }, z.core.$strip>>;
2733
+ }, z.core.$strip>;
2734
+ inputModalities: z.ZodArray<z.ZodEnum<{
2735
+ audio: "audio";
2736
+ image: "image";
2737
+ text: "text";
2738
+ }>>;
2739
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
2740
+ outputModalities: z.ZodArray<z.ZodEnum<{
2741
+ audio: "audio";
2742
+ image: "image";
2743
+ text: "text";
2744
+ }>>;
2745
+ transports: z.ZodObject<{
2746
+ sse: z.ZodObject<{
2747
+ upstream: z.ZodEnum<{
2748
+ supported: "supported";
2749
+ unknown: "unknown";
2750
+ unsupported: "unsupported";
2751
+ }>;
2752
+ runnable: z.ZodBoolean;
2753
+ }, z.core.$strip>;
2754
+ responsesWebSocket: z.ZodObject<{
2755
+ upstream: z.ZodEnum<{
2756
+ supported: "supported";
2757
+ unknown: "unknown";
2758
+ unsupported: "unsupported";
2759
+ }>;
2760
+ runnable: z.ZodBoolean;
2761
+ }, z.core.$strip>;
2762
+ realtimeAudio: z.ZodObject<{
2763
+ upstream: z.ZodEnum<{
2764
+ supported: "supported";
2765
+ unknown: "unknown";
2766
+ unsupported: "unsupported";
2767
+ }>;
2768
+ runnable: z.ZodBoolean;
2769
+ }, z.core.$strip>;
2770
+ }, z.core.$strip>;
2771
+ promptCaching: z.ZodOptional<z.ZodObject<{
2772
+ upstream: z.ZodEnum<{
2773
+ supported: "supported";
2774
+ unknown: "unknown";
2775
+ unsupported: "unsupported";
2776
+ }>;
2777
+ runnable: z.ZodBoolean;
2778
+ mode: z.ZodEnum<{
2779
+ automatic: "automatic";
2780
+ implicit: "implicit";
2781
+ none: "none";
2782
+ }>;
2783
+ }, z.core.$strip>>;
2784
+ latencyModes: z.ZodArray<z.ZodObject<{
2785
+ id: z.ZodEnum<{
2786
+ fast: "fast";
2787
+ priority: "priority";
2788
+ standard: "standard";
2789
+ }>;
2790
+ upstream: z.ZodEnum<{
2791
+ supported: "supported";
2792
+ unknown: "unknown";
2793
+ unsupported: "unsupported";
2794
+ }>;
2795
+ runnable: z.ZodBoolean;
2796
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
2797
+ }, z.core.$strip>>;
2798
+ }, z.core.$strip>;
2799
+ pricing: z.ZodOptional<z.ZodNever>;
2800
+ }, z.core.$strict>, z.ZodTransform<{
2801
+ aliases?: string[] | undefined;
2802
+ label?: string | undefined;
2803
+ shortLabel?: string | undefined;
2804
+ logoUrl?: string | undefined;
2805
+ contextWindowTokens?: number | undefined;
2806
+ effectiveContextWindowTokens?: number | undefined;
2807
+ autoCompactTokenLimit?: number | undefined;
2808
+ toolOutputTruncationTokens?: number | undefined;
2809
+ reasoningEffort?: boolean | undefined;
2810
+ hostedWebSearch?: boolean | undefined;
2811
+ credentialSource?: undefined;
2812
+ billing?: undefined;
2813
+ retired?: boolean | undefined;
2814
+ id: string;
2815
+ upstreamModelId: string;
2816
+ pricing?: undefined;
2817
+ capabilities: {
2818
+ reasoning: {
2819
+ upstream: "supported" | "unknown" | "unsupported";
2820
+ runnable: boolean;
2821
+ efforts: ("high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh")[];
2822
+ defaultEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
2823
+ required: boolean;
2824
+ };
2825
+ functionCalling: {
2826
+ upstream: "supported" | "unknown" | "unsupported";
2827
+ runnable: boolean;
2828
+ };
2829
+ structuredOutput: {
2830
+ upstream: "supported" | "unknown" | "unsupported";
2831
+ runnable: boolean;
2832
+ };
2833
+ hostedTools: {
2834
+ webSearch: {
2835
+ upstream: "supported" | "unknown" | "unsupported";
2836
+ runnable: boolean;
2837
+ };
2838
+ xSearch: {
2839
+ upstream: "supported" | "unknown" | "unsupported";
2840
+ runnable: boolean;
2841
+ };
2842
+ codeExecution: {
2843
+ upstream: "supported" | "unknown" | "unsupported";
2844
+ runnable: boolean;
2845
+ };
2846
+ imageGeneration: {
2847
+ upstream: "supported" | "unknown" | "unsupported";
2848
+ runnable: boolean;
2849
+ };
2850
+ };
2851
+ inputModalities: ("audio" | "image" | "text")[];
2852
+ inputFileMediaTypes: string[];
2853
+ outputModalities: ("audio" | "image" | "text")[];
2854
+ transports: {
2855
+ sse: {
2856
+ upstream: "supported" | "unknown" | "unsupported";
2857
+ runnable: boolean;
2858
+ };
2859
+ responsesWebSocket: {
2860
+ upstream: "supported" | "unknown" | "unsupported";
2861
+ runnable: boolean;
2862
+ };
2863
+ realtimeAudio: {
2864
+ upstream: "supported" | "unknown" | "unsupported";
2865
+ runnable: boolean;
2866
+ };
2867
+ };
2868
+ promptCaching?: {
2869
+ upstream: "supported" | "unknown" | "unsupported";
2870
+ runnable: boolean;
2871
+ mode: "automatic" | "implicit" | "none";
2872
+ } | undefined;
2873
+ latencyModes: {
2874
+ id: "fast" | "priority" | "standard";
2875
+ upstream: "supported" | "unknown" | "unsupported";
2876
+ runnable: boolean;
2877
+ billingMultiplierBps?: number | undefined;
2878
+ }[];
2879
+ };
2880
+ }, {
2881
+ aliases?: string[] | undefined;
2882
+ label?: string | undefined;
2883
+ shortLabel?: string | undefined;
2884
+ logoUrl?: string | undefined;
2885
+ contextWindowTokens?: number | undefined;
2886
+ effectiveContextWindowTokens?: number | undefined;
2887
+ autoCompactTokenLimit?: number | undefined;
2888
+ toolOutputTruncationTokens?: number | undefined;
2889
+ reasoningEffort?: boolean | undefined;
2890
+ hostedWebSearch?: boolean | undefined;
2891
+ credentialSource?: undefined;
2892
+ billing?: undefined;
2893
+ retired?: boolean | undefined;
2894
+ id: string;
2895
+ upstreamModelId: string;
2896
+ capabilities: {
2897
+ reasoning: {
2898
+ upstream: "supported" | "unknown" | "unsupported";
2899
+ runnable: boolean;
2900
+ efforts: ("high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh")[];
2901
+ defaultEffort: "high" | "low" | "max" | "medium" | "minimal" | "none" | "xhigh" | null;
2902
+ required: boolean;
2903
+ };
2904
+ functionCalling: {
2905
+ upstream: "supported" | "unknown" | "unsupported";
2906
+ runnable: boolean;
2907
+ };
2908
+ structuredOutput: {
2909
+ upstream: "supported" | "unknown" | "unsupported";
2910
+ runnable: boolean;
2911
+ };
2912
+ hostedTools: {
2913
+ webSearch: {
2914
+ upstream: "supported" | "unknown" | "unsupported";
2915
+ runnable: boolean;
2916
+ };
2917
+ xSearch: {
2918
+ upstream: "supported" | "unknown" | "unsupported";
2919
+ runnable: boolean;
2920
+ };
2921
+ codeExecution: {
2922
+ upstream: "supported" | "unknown" | "unsupported";
2923
+ runnable: boolean;
2924
+ };
2925
+ imageGeneration: {
2926
+ upstream: "supported" | "unknown" | "unsupported";
2927
+ runnable: boolean;
2928
+ };
2929
+ };
2930
+ inputModalities: ("audio" | "image" | "text")[];
2931
+ inputFileMediaTypes: string[];
2932
+ outputModalities: ("audio" | "image" | "text")[];
2933
+ transports: {
2934
+ sse: {
2935
+ upstream: "supported" | "unknown" | "unsupported";
2936
+ runnable: boolean;
2937
+ };
2938
+ responsesWebSocket: {
2939
+ upstream: "supported" | "unknown" | "unsupported";
2940
+ runnable: boolean;
2941
+ };
2942
+ realtimeAudio: {
2943
+ upstream: "supported" | "unknown" | "unsupported";
2944
+ runnable: boolean;
2945
+ };
2946
+ };
2947
+ promptCaching?: {
2948
+ upstream: "supported" | "unknown" | "unsupported";
2949
+ runnable: boolean;
2950
+ mode: "automatic" | "implicit" | "none";
2951
+ } | undefined;
2952
+ latencyModes: {
2953
+ id: "fast" | "priority" | "standard";
2954
+ upstream: "supported" | "unknown" | "unsupported";
2955
+ runnable: boolean;
2956
+ billingMultiplierBps?: number | undefined;
2957
+ }[];
2958
+ };
2959
+ pricing?: undefined;
2960
+ }>>>>;
2961
+ gatewayModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
2962
+ productId: z.ZodString;
2963
+ workspaceProductId: z.ZodString;
2964
+ upstreamModelId: z.ZodString;
2965
+ label: z.ZodString;
2966
+ shortLabel: z.ZodOptional<z.ZodString>;
2967
+ logoUrl: z.ZodOptional<z.ZodString>;
2968
+ providers: z.ZodArray<z.ZodString>;
2969
+ implicitCaching: z.ZodDefault<z.ZodBoolean>;
2970
+ vision: z.ZodDefault<z.ZodBoolean>;
2971
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
2972
+ contextWindowTokens: z.ZodDefault<z.ZodNumber>;
2973
+ effectiveContextWindowTokens: z.ZodDefault<z.ZodNumber>;
2974
+ autoCompactTokenLimit: z.ZodDefault<z.ZodNumber>;
2975
+ credentialSource: z.ZodOptional<z.ZodNever>;
2976
+ billing: z.ZodOptional<z.ZodNever>;
2977
+ apiKey: z.ZodOptional<z.ZodNever>;
2978
+ pricing: z.ZodOptional<z.ZodNever>;
2979
+ }, z.core.$strict>>>;
2980
+ openrouterModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
2981
+ upstreamModelId: z.ZodString;
2982
+ label: z.ZodString;
2983
+ shortLabel: z.ZodOptional<z.ZodString>;
2984
+ logoUrl: z.ZodOptional<z.ZodString>;
2985
+ aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
2986
+ capabilities: z.ZodObject<{
2987
+ reasoning: z.ZodObject<{
2988
+ upstream: z.ZodEnum<{
2989
+ supported: "supported";
2990
+ unknown: "unknown";
2991
+ unsupported: "unsupported";
2992
+ }>;
2993
+ runnable: z.ZodBoolean;
2994
+ efforts: z.ZodArray<z.ZodEnum<{
2995
+ high: "high";
2996
+ low: "low";
2997
+ max: "max";
2998
+ medium: "medium";
2999
+ minimal: "minimal";
3000
+ none: "none";
3001
+ xhigh: "xhigh";
3002
+ }>>;
3003
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
3004
+ high: "high";
3005
+ low: "low";
3006
+ max: "max";
3007
+ medium: "medium";
3008
+ minimal: "minimal";
3009
+ none: "none";
3010
+ xhigh: "xhigh";
3011
+ }>>;
3012
+ required: z.ZodBoolean;
3013
+ }, z.core.$strip>;
3014
+ functionCalling: z.ZodObject<{
3015
+ upstream: z.ZodEnum<{
3016
+ supported: "supported";
3017
+ unknown: "unknown";
3018
+ unsupported: "unsupported";
3019
+ }>;
3020
+ runnable: z.ZodBoolean;
3021
+ }, z.core.$strip>;
3022
+ structuredOutput: z.ZodObject<{
3023
+ upstream: z.ZodEnum<{
3024
+ supported: "supported";
3025
+ unknown: "unknown";
3026
+ unsupported: "unsupported";
3027
+ }>;
3028
+ runnable: z.ZodBoolean;
3029
+ }, z.core.$strip>;
3030
+ hostedTools: z.ZodObject<{
3031
+ webSearch: z.ZodObject<{
3032
+ upstream: z.ZodEnum<{
3033
+ supported: "supported";
3034
+ unknown: "unknown";
3035
+ unsupported: "unsupported";
3036
+ }>;
3037
+ runnable: z.ZodBoolean;
3038
+ }, z.core.$strip>;
3039
+ xSearch: z.ZodObject<{
3040
+ upstream: z.ZodEnum<{
3041
+ supported: "supported";
3042
+ unknown: "unknown";
3043
+ unsupported: "unsupported";
3044
+ }>;
3045
+ runnable: z.ZodBoolean;
3046
+ }, z.core.$strip>;
3047
+ codeExecution: z.ZodObject<{
3048
+ upstream: z.ZodEnum<{
3049
+ supported: "supported";
3050
+ unknown: "unknown";
3051
+ unsupported: "unsupported";
3052
+ }>;
3053
+ runnable: z.ZodBoolean;
3054
+ }, z.core.$strip>;
3055
+ imageGeneration: z.ZodDefault<z.ZodObject<{
3056
+ upstream: z.ZodEnum<{
3057
+ supported: "supported";
3058
+ unknown: "unknown";
3059
+ unsupported: "unsupported";
3060
+ }>;
3061
+ runnable: z.ZodBoolean;
3062
+ }, z.core.$strip>>;
3063
+ }, z.core.$strip>;
3064
+ inputModalities: z.ZodArray<z.ZodEnum<{
3065
+ audio: "audio";
3066
+ image: "image";
3067
+ text: "text";
3068
+ }>>;
3069
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3070
+ outputModalities: z.ZodArray<z.ZodEnum<{
3071
+ audio: "audio";
3072
+ image: "image";
3073
+ text: "text";
3074
+ }>>;
3075
+ transports: z.ZodObject<{
3076
+ sse: z.ZodObject<{
3077
+ upstream: z.ZodEnum<{
3078
+ supported: "supported";
3079
+ unknown: "unknown";
3080
+ unsupported: "unsupported";
3081
+ }>;
3082
+ runnable: z.ZodBoolean;
3083
+ }, z.core.$strip>;
3084
+ responsesWebSocket: 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
+ realtimeAudio: 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
+ }, z.core.$strip>;
3101
+ promptCaching: z.ZodOptional<z.ZodObject<{
3102
+ upstream: z.ZodEnum<{
3103
+ supported: "supported";
3104
+ unknown: "unknown";
3105
+ unsupported: "unsupported";
3106
+ }>;
3107
+ runnable: z.ZodBoolean;
3108
+ mode: z.ZodEnum<{
3109
+ automatic: "automatic";
3110
+ implicit: "implicit";
3111
+ none: "none";
3112
+ }>;
3113
+ }, z.core.$strip>>;
3114
+ latencyModes: z.ZodArray<z.ZodObject<{
3115
+ id: z.ZodEnum<{
3116
+ fast: "fast";
3117
+ priority: "priority";
3118
+ standard: "standard";
3119
+ }>;
3120
+ upstream: z.ZodEnum<{
3121
+ supported: "supported";
3122
+ unknown: "unknown";
3123
+ unsupported: "unsupported";
3124
+ }>;
3125
+ runnable: z.ZodBoolean;
3126
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
3127
+ }, z.core.$strip>>;
3128
+ }, z.core.$strip>;
3129
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
3130
+ effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
3131
+ autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
3132
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
3133
+ credentialSource: z.ZodOptional<z.ZodNever>;
3134
+ billing: z.ZodOptional<z.ZodNever>;
3135
+ pricing: z.ZodOptional<z.ZodNever>;
3136
+ apiKey: z.ZodOptional<z.ZodNever>;
3137
+ }, z.core.$strict>>>;
3138
+ opperModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
3139
+ upstreamModelId: z.ZodString;
3140
+ label: z.ZodString;
3141
+ shortLabel: z.ZodOptional<z.ZodString>;
3142
+ logoUrl: z.ZodOptional<z.ZodString>;
3143
+ aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
3144
+ capabilities: z.ZodObject<{
3145
+ reasoning: z.ZodObject<{
3146
+ upstream: z.ZodEnum<{
3147
+ supported: "supported";
3148
+ unknown: "unknown";
3149
+ unsupported: "unsupported";
3150
+ }>;
3151
+ runnable: z.ZodBoolean;
3152
+ efforts: z.ZodArray<z.ZodEnum<{
3153
+ high: "high";
3154
+ low: "low";
3155
+ max: "max";
3156
+ medium: "medium";
3157
+ minimal: "minimal";
3158
+ none: "none";
3159
+ xhigh: "xhigh";
3160
+ }>>;
3161
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
3162
+ high: "high";
3163
+ low: "low";
3164
+ max: "max";
3165
+ medium: "medium";
3166
+ minimal: "minimal";
3167
+ none: "none";
3168
+ xhigh: "xhigh";
3169
+ }>>;
3170
+ required: z.ZodBoolean;
3171
+ }, z.core.$strip>;
3172
+ functionCalling: z.ZodObject<{
3173
+ upstream: z.ZodEnum<{
3174
+ supported: "supported";
3175
+ unknown: "unknown";
3176
+ unsupported: "unsupported";
3177
+ }>;
3178
+ runnable: z.ZodBoolean;
3179
+ }, z.core.$strip>;
3180
+ structuredOutput: z.ZodObject<{
3181
+ upstream: z.ZodEnum<{
3182
+ supported: "supported";
3183
+ unknown: "unknown";
3184
+ unsupported: "unsupported";
3185
+ }>;
3186
+ runnable: z.ZodBoolean;
3187
+ }, z.core.$strip>;
3188
+ hostedTools: z.ZodObject<{
3189
+ webSearch: z.ZodObject<{
3190
+ upstream: z.ZodEnum<{
3191
+ supported: "supported";
3192
+ unknown: "unknown";
3193
+ unsupported: "unsupported";
3194
+ }>;
3195
+ runnable: z.ZodBoolean;
3196
+ }, z.core.$strip>;
3197
+ xSearch: z.ZodObject<{
3198
+ upstream: z.ZodEnum<{
3199
+ supported: "supported";
3200
+ unknown: "unknown";
3201
+ unsupported: "unsupported";
3202
+ }>;
3203
+ runnable: z.ZodBoolean;
3204
+ }, z.core.$strip>;
3205
+ codeExecution: z.ZodObject<{
3206
+ upstream: z.ZodEnum<{
3207
+ supported: "supported";
3208
+ unknown: "unknown";
3209
+ unsupported: "unsupported";
3210
+ }>;
3211
+ runnable: z.ZodBoolean;
3212
+ }, z.core.$strip>;
3213
+ imageGeneration: z.ZodDefault<z.ZodObject<{
3214
+ upstream: z.ZodEnum<{
3215
+ supported: "supported";
3216
+ unknown: "unknown";
3217
+ unsupported: "unsupported";
3218
+ }>;
3219
+ runnable: z.ZodBoolean;
3220
+ }, z.core.$strip>>;
3221
+ }, z.core.$strip>;
3222
+ inputModalities: z.ZodArray<z.ZodEnum<{
3223
+ audio: "audio";
3224
+ image: "image";
3225
+ text: "text";
3226
+ }>>;
3227
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3228
+ outputModalities: z.ZodArray<z.ZodEnum<{
3229
+ audio: "audio";
3230
+ image: "image";
3231
+ text: "text";
3232
+ }>>;
3233
+ transports: z.ZodObject<{
3234
+ sse: z.ZodObject<{
3235
+ upstream: z.ZodEnum<{
3236
+ supported: "supported";
3237
+ unknown: "unknown";
3238
+ unsupported: "unsupported";
3239
+ }>;
3240
+ runnable: z.ZodBoolean;
3241
+ }, z.core.$strip>;
3242
+ responsesWebSocket: z.ZodObject<{
3243
+ upstream: z.ZodEnum<{
3244
+ supported: "supported";
3245
+ unknown: "unknown";
3246
+ unsupported: "unsupported";
3247
+ }>;
3248
+ runnable: z.ZodBoolean;
3249
+ }, z.core.$strip>;
3250
+ realtimeAudio: z.ZodObject<{
3251
+ upstream: z.ZodEnum<{
3252
+ supported: "supported";
3253
+ unknown: "unknown";
3254
+ unsupported: "unsupported";
3255
+ }>;
3256
+ runnable: z.ZodBoolean;
3257
+ }, z.core.$strip>;
3258
+ }, z.core.$strip>;
3259
+ promptCaching: z.ZodOptional<z.ZodObject<{
3260
+ upstream: z.ZodEnum<{
3261
+ supported: "supported";
3262
+ unknown: "unknown";
3263
+ unsupported: "unsupported";
3264
+ }>;
3265
+ runnable: z.ZodBoolean;
3266
+ mode: z.ZodEnum<{
3267
+ automatic: "automatic";
3268
+ implicit: "implicit";
3269
+ none: "none";
3270
+ }>;
3271
+ }, z.core.$strip>>;
3272
+ latencyModes: z.ZodArray<z.ZodObject<{
3273
+ id: z.ZodEnum<{
3274
+ fast: "fast";
3275
+ priority: "priority";
3276
+ standard: "standard";
3277
+ }>;
3278
+ upstream: z.ZodEnum<{
3279
+ supported: "supported";
3280
+ unknown: "unknown";
3281
+ unsupported: "unsupported";
3282
+ }>;
3283
+ runnable: z.ZodBoolean;
3284
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
3285
+ }, z.core.$strip>>;
3286
+ }, z.core.$strip>;
3287
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
3288
+ effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
3289
+ autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
3290
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
3291
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
3292
+ credentialSource: z.ZodOptional<z.ZodNever>;
3293
+ billing: z.ZodOptional<z.ZodNever>;
3294
+ apiKey: z.ZodOptional<z.ZodNever>;
3295
+ pricing: z.ZodOptional<z.ZodNever>;
3296
+ }, z.core.$strict>>>;
3297
+ modelNotes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
3298
+ billing: z.ZodOptional<z.ZodNever>;
3299
+ enabled: z.ZodOptional<z.ZodNever>;
3300
+ apiKey: z.ZodOptional<z.ZodNever>;
3301
+ bands: z.ZodOptional<z.ZodNever>;
3302
+ }, z.core.$strict>;
3303
+ export type ModelCatalogDocument = z.infer<typeof ModelCatalogDocument>;
3304
+ export declare function parseModelCatalogDocument(value: unknown): ModelCatalogDocument;
3305
+ /** Pure secret-free database catalog overlay. getSettings remains env-only. */
3306
+ /**
3307
+ * OPENGENI_MANAGED_MODELS_JSON: the managed-provider slice of a catalog
3308
+ * document for code catalog mode. Each present array uses the database
3309
+ * document's exact strict entry schema (so no entry may carry `pricing`,
3310
+ * credentials, or billing) and replaces that provider's reviewed code table;
3311
+ * an omitted array keeps it. Price authority stays with provider-reported
3312
+ * cost (Gateway/Opper), the reviewed code snapshot, and
3313
+ * OPENGENI_MODEL_PRICING_JSON, which boot validation requires for every
3314
+ * credits-billed product without a reviewed price.
3315
+ */
3316
+ export declare const ManagedModelsOverride: z.ZodObject<{
3317
+ gatewayModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
3318
+ productId: z.ZodString;
3319
+ workspaceProductId: z.ZodString;
3320
+ upstreamModelId: z.ZodString;
3321
+ label: z.ZodString;
3322
+ shortLabel: z.ZodOptional<z.ZodString>;
3323
+ logoUrl: z.ZodOptional<z.ZodString>;
1979
3324
  providers: z.ZodArray<z.ZodString>;
1980
3325
  implicitCaching: z.ZodDefault<z.ZodBoolean>;
1981
3326
  vision: z.ZodDefault<z.ZodBoolean>;
@@ -1988,10 +3333,11 @@ export declare const ModelCatalogDocument: z.ZodObject<{
1988
3333
  apiKey: z.ZodOptional<z.ZodNever>;
1989
3334
  pricing: z.ZodOptional<z.ZodNever>;
1990
3335
  }, z.core.$strict>>>;
1991
- openrouterModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
3336
+ openrouterModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1992
3337
  upstreamModelId: z.ZodString;
1993
3338
  label: z.ZodString;
1994
3339
  shortLabel: z.ZodOptional<z.ZodString>;
3340
+ logoUrl: z.ZodOptional<z.ZodString>;
1995
3341
  aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
1996
3342
  capabilities: z.ZodObject<{
1997
3343
  reasoning: z.ZodObject<{
@@ -2145,15 +3491,169 @@ export declare const ModelCatalogDocument: z.ZodObject<{
2145
3491
  pricing: z.ZodOptional<z.ZodNever>;
2146
3492
  apiKey: z.ZodOptional<z.ZodNever>;
2147
3493
  }, z.core.$strict>>>;
2148
- modelNotes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2149
- billing: z.ZodOptional<z.ZodNever>;
2150
- enabled: z.ZodOptional<z.ZodNever>;
2151
- apiKey: z.ZodOptional<z.ZodNever>;
2152
- bands: z.ZodOptional<z.ZodNever>;
3494
+ opperModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
3495
+ upstreamModelId: z.ZodString;
3496
+ label: z.ZodString;
3497
+ shortLabel: z.ZodOptional<z.ZodString>;
3498
+ logoUrl: z.ZodOptional<z.ZodString>;
3499
+ aliases: z.ZodDefault<z.ZodArray<z.ZodString>>;
3500
+ capabilities: z.ZodObject<{
3501
+ reasoning: z.ZodObject<{
3502
+ upstream: z.ZodEnum<{
3503
+ supported: "supported";
3504
+ unknown: "unknown";
3505
+ unsupported: "unsupported";
3506
+ }>;
3507
+ runnable: z.ZodBoolean;
3508
+ efforts: z.ZodArray<z.ZodEnum<{
3509
+ high: "high";
3510
+ low: "low";
3511
+ max: "max";
3512
+ medium: "medium";
3513
+ minimal: "minimal";
3514
+ none: "none";
3515
+ xhigh: "xhigh";
3516
+ }>>;
3517
+ defaultEffort: z.ZodNullable<z.ZodEnum<{
3518
+ high: "high";
3519
+ low: "low";
3520
+ max: "max";
3521
+ medium: "medium";
3522
+ minimal: "minimal";
3523
+ none: "none";
3524
+ xhigh: "xhigh";
3525
+ }>>;
3526
+ required: z.ZodBoolean;
3527
+ }, z.core.$strip>;
3528
+ functionCalling: z.ZodObject<{
3529
+ upstream: z.ZodEnum<{
3530
+ supported: "supported";
3531
+ unknown: "unknown";
3532
+ unsupported: "unsupported";
3533
+ }>;
3534
+ runnable: z.ZodBoolean;
3535
+ }, z.core.$strip>;
3536
+ structuredOutput: z.ZodObject<{
3537
+ upstream: z.ZodEnum<{
3538
+ supported: "supported";
3539
+ unknown: "unknown";
3540
+ unsupported: "unsupported";
3541
+ }>;
3542
+ runnable: z.ZodBoolean;
3543
+ }, z.core.$strip>;
3544
+ hostedTools: z.ZodObject<{
3545
+ webSearch: z.ZodObject<{
3546
+ upstream: z.ZodEnum<{
3547
+ supported: "supported";
3548
+ unknown: "unknown";
3549
+ unsupported: "unsupported";
3550
+ }>;
3551
+ runnable: z.ZodBoolean;
3552
+ }, z.core.$strip>;
3553
+ xSearch: z.ZodObject<{
3554
+ upstream: z.ZodEnum<{
3555
+ supported: "supported";
3556
+ unknown: "unknown";
3557
+ unsupported: "unsupported";
3558
+ }>;
3559
+ runnable: z.ZodBoolean;
3560
+ }, z.core.$strip>;
3561
+ codeExecution: z.ZodObject<{
3562
+ upstream: z.ZodEnum<{
3563
+ supported: "supported";
3564
+ unknown: "unknown";
3565
+ unsupported: "unsupported";
3566
+ }>;
3567
+ runnable: z.ZodBoolean;
3568
+ }, z.core.$strip>;
3569
+ imageGeneration: z.ZodDefault<z.ZodObject<{
3570
+ upstream: z.ZodEnum<{
3571
+ supported: "supported";
3572
+ unknown: "unknown";
3573
+ unsupported: "unsupported";
3574
+ }>;
3575
+ runnable: z.ZodBoolean;
3576
+ }, z.core.$strip>>;
3577
+ }, z.core.$strip>;
3578
+ inputModalities: z.ZodArray<z.ZodEnum<{
3579
+ audio: "audio";
3580
+ image: "image";
3581
+ text: "text";
3582
+ }>>;
3583
+ inputFileMediaTypes: z.ZodDefault<z.ZodArray<z.ZodString>>;
3584
+ outputModalities: z.ZodArray<z.ZodEnum<{
3585
+ audio: "audio";
3586
+ image: "image";
3587
+ text: "text";
3588
+ }>>;
3589
+ transports: z.ZodObject<{
3590
+ sse: z.ZodObject<{
3591
+ upstream: z.ZodEnum<{
3592
+ supported: "supported";
3593
+ unknown: "unknown";
3594
+ unsupported: "unsupported";
3595
+ }>;
3596
+ runnable: z.ZodBoolean;
3597
+ }, z.core.$strip>;
3598
+ responsesWebSocket: z.ZodObject<{
3599
+ upstream: z.ZodEnum<{
3600
+ supported: "supported";
3601
+ unknown: "unknown";
3602
+ unsupported: "unsupported";
3603
+ }>;
3604
+ runnable: z.ZodBoolean;
3605
+ }, z.core.$strip>;
3606
+ realtimeAudio: z.ZodObject<{
3607
+ upstream: z.ZodEnum<{
3608
+ supported: "supported";
3609
+ unknown: "unknown";
3610
+ unsupported: "unsupported";
3611
+ }>;
3612
+ runnable: z.ZodBoolean;
3613
+ }, z.core.$strip>;
3614
+ }, z.core.$strip>;
3615
+ promptCaching: z.ZodOptional<z.ZodObject<{
3616
+ upstream: z.ZodEnum<{
3617
+ supported: "supported";
3618
+ unknown: "unknown";
3619
+ unsupported: "unsupported";
3620
+ }>;
3621
+ runnable: z.ZodBoolean;
3622
+ mode: z.ZodEnum<{
3623
+ automatic: "automatic";
3624
+ implicit: "implicit";
3625
+ none: "none";
3626
+ }>;
3627
+ }, z.core.$strip>>;
3628
+ latencyModes: z.ZodArray<z.ZodObject<{
3629
+ id: z.ZodEnum<{
3630
+ fast: "fast";
3631
+ priority: "priority";
3632
+ standard: "standard";
3633
+ }>;
3634
+ upstream: z.ZodEnum<{
3635
+ supported: "supported";
3636
+ unknown: "unknown";
3637
+ unsupported: "unsupported";
3638
+ }>;
3639
+ runnable: z.ZodBoolean;
3640
+ billingMultiplierBps: z.ZodOptional<z.ZodNumber>;
3641
+ }, z.core.$strip>>;
3642
+ }, z.core.$strip>;
3643
+ contextWindowTokens: z.ZodOptional<z.ZodNumber>;
3644
+ effectiveContextWindowTokens: z.ZodOptional<z.ZodNumber>;
3645
+ autoCompactTokenLimit: z.ZodOptional<z.ZodNumber>;
3646
+ toolOutputTruncationTokens: z.ZodOptional<z.ZodNumber>;
3647
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
3648
+ credentialSource: z.ZodOptional<z.ZodNever>;
3649
+ billing: z.ZodOptional<z.ZodNever>;
3650
+ apiKey: z.ZodOptional<z.ZodNever>;
3651
+ pricing: z.ZodOptional<z.ZodNever>;
3652
+ }, z.core.$strict>>>;
2153
3653
  }, z.core.$strict>;
2154
- export type ModelCatalogDocument = z.infer<typeof ModelCatalogDocument>;
2155
- export declare function parseModelCatalogDocument(value: unknown): ModelCatalogDocument;
2156
- /** Pure secret-free database catalog overlay. getSettings remains env-only. */
3654
+ export type ManagedModelsOverride = z.infer<typeof ManagedModelsOverride>;
3655
+ /** Parse and validate OPENGENI_MANAGED_MODELS_JSON (memoized per raw value). */
3656
+ export declare function parseManagedModelsJson(raw: string): ManagedModelsOverride;
2157
3657
  export declare function applyModelCatalogDocument(settings: Settings, rawDocument: unknown): Settings;
2158
3658
  export declare const IntegrationOAuthClientConfigSchema: z.ZodObject<{
2159
3659
  clientId: z.ZodString;
@@ -2173,9 +3673,10 @@ export type IntegrationOAuthClientConfig = z.infer<typeof IntegrationOAuthClient
2173
3673
  * replacement.
2174
3674
  */
2175
3675
  export interface ResolvedModelProvider {
3676
+ anthropic?: z.infer<typeof AnthropicProviderOptions> | undefined;
2176
3677
  id: string;
2177
3678
  label: string;
2178
- kind: RegistryProviderKind | "openrouter-managed";
3679
+ kind: RegistryProviderKind | "openrouter-managed" | "opper-managed";
2179
3680
  api: ModelProviderApi;
2180
3681
  wireProfile: ModelProviderWireProfile;
2181
3682
  builtin: boolean;
@@ -2185,6 +3686,10 @@ export interface ResolvedModelProvider {
2185
3686
  defaultHeaders?: Record<string, string> | undefined;
2186
3687
  publicDefaultQueryNames?: string[] | undefined;
2187
3688
  publicDefaultHeaderNames?: string[] | undefined;
3689
+ /** Generic OpenAI-compatible stream silence bound override (ms). */
3690
+ streamIdleTimeoutMs?: number | undefined;
3691
+ /** Generic OpenAI-compatible keepalive-only progress bound override (ms). */
3692
+ streamProgressTimeoutMs?: number | undefined;
2188
3693
  credentialSource: CredentialSourceV1;
2189
3694
  billing: BillingAttributionV1;
2190
3695
  }
@@ -2196,6 +3701,8 @@ export interface ConfiguredModel {
2196
3701
  label: string;
2197
3702
  /** Optional curated compact label for dense UI (e.g. mobile composer). */
2198
3703
  shortLabel?: string | undefined;
3704
+ /** Optional HTTPS maker logo; display metadata does not change execution identity. */
3705
+ logoUrl?: string | undefined;
2199
3706
  providerId: string;
2200
3707
  providerLabel: string;
2201
3708
  api: ModelProviderApi;
@@ -2222,12 +3729,35 @@ export interface ConfiguredModel {
2222
3729
  reasoningEffort: boolean;
2223
3730
  hostedWebSearch: boolean;
2224
3731
  }
3732
+ /**
3733
+ * Whether a resolved route is the deployment-funded OpenRouter free tier: the
3734
+ * managed OpenRouter provider, which sends every workspace's requests with the
3735
+ * deployment's one OpenRouter key, serving an upstream `:free` variant (the
3736
+ * curated catalog admits nothing else). OpenRouter limits free-variant
3737
+ * requests per account per minute and per day, so each request on this route
3738
+ * spends quota that every turn on the deployment shares. A workspace or
3739
+ * organization OpenRouter connection uses its own account and is not this
3740
+ * route.
3741
+ */
3742
+ export declare function isManagedOpenRouterFreeRoute(route: {
3743
+ provider: Pick<ResolvedModelProvider, "kind">;
3744
+ configured: Pick<ConfiguredModel, "upstreamModelId">;
3745
+ }): boolean;
2225
3746
  export declare const VERCEL_AI_GATEWAY_BASE_URL: "https://ai-gateway.vercel.sh/v1";
2226
3747
  export declare const VERCEL_AI_GATEWAY_AI_SDK_BASE_URL: "https://ai-gateway.vercel.sh/v4/ai";
2227
3748
  export declare const VERCEL_AI_GATEWAY_CONNECTION_DOMAIN: "ai-gateway.vercel.sh";
2228
3749
  export declare const VERCEL_AI_GATEWAY_CONNECTION_ROLE: "vercel_ai_gateway";
2229
3750
  export declare const WORKSPACE_OPENROUTER_CONNECTION_DOMAIN: "openrouter.ai";
2230
3751
  export declare const WORKSPACE_OPENROUTER_CONNECTION_ROLE: "openrouter";
3752
+ export declare const WORKSPACE_OPPER_CONNECTION_DOMAIN: "api.opper.ai";
3753
+ export declare const WORKSPACE_OPPER_CONNECTION_ROLE: "opper";
3754
+ /**
3755
+ * Opper issues separate management keys (`op-mak-…`) that its inference routes
3756
+ * refuse with 403 ("management API keys cannot be used on inference routes").
3757
+ * Reject them before they are stored so a connection never looks ready while
3758
+ * every turn fails. Returns a user-facing explanation, or null when usable.
3759
+ */
3760
+ export declare function opperCredentialProblem(apiKey: string): string | null;
2231
3761
  export declare const CODEX_REALTIME_MODEL_ID: "gpt-live-1-boulder-alpha";
2232
3762
  export declare const SUPERGROK_REALTIME_MODEL_ID: "supergrok/grok-voice-think-fast-2.0";
2233
3763
  export declare const OPENGENI_REALTIME_MODEL_ID_PREFIX: "opengeni-gateway/";
@@ -2282,6 +3812,35 @@ export declare const OPENGENI_GATEWAY_MODELS: {
2282
3812
  };
2283
3813
  };
2284
3814
  export declare const OPENGENI_OPENROUTER_MODELS: readonly OpenRouterCatalogModel[];
3815
+ /**
3816
+ * Reviewed Opper starter route. Snapshot of Opper's catalogue
3817
+ * (`GET https://api.opper.ai/v3/compat/models`) reviewed 2026-10-05 and probed
3818
+ * live end to end. The route is provider-pinned (`provider/model`) to AWS
3819
+ * Bedrock eu-north-1 (Stockholm) with no provider logging, so Opper never
3820
+ * pools it onto a non-EU provider. `pricing` is Opper's listed supplier rate
3821
+ * (USD per 1M tokens); turns debit Opper's exact reported cost +5% and use
3822
+ * this rate only when cost metadata is absent. Hosts replace this list with
3823
+ * OPENGENI_OPPER_MODELS_JSON (code mode) or the catalog document's
3824
+ * `opperModels` (database mode).
3825
+ */
3826
+ /**
3827
+ * Default automatic-compaction threshold for Claude Opus 5.5 on every route.
3828
+ * Workspaces can still choose another threshold per model.
3829
+ */
3830
+ export declare const OPUS_5_5_AUTO_COMPACT_TOKEN_LIMIT = 300000;
3831
+ export declare const OPENGENI_OPPER_MODELS: readonly OpperCatalogModel[];
3832
+ /** Keepalive-only progress bound for Opper streams: room for a full 128,000-
3833
+ * token hidden-reasoning response at roughly 35 tokens per second. */
3834
+ export declare const OPPER_STREAM_PROGRESS_TIMEOUT_MS: number;
3835
+ /**
3836
+ * `max_tokens` the Opper Chat adapter sends when a request sets none. Opper's
3837
+ * own default is 4,096 output tokens, which hidden reasoning can exhaust before
3838
+ * any answer, and Opper rejects (does not clamp) a value above the route's
3839
+ * limit. A configured entry's `maxOutputTokens` wins; a Claude-family custom id
3840
+ * gets the smallest Claude limit in Opper's catalogue; other ids keep Opper's
3841
+ * default.
3842
+ */
3843
+ export declare function opperMaxOutputTokens(settings: Settings, upstreamModelId: string): number | undefined;
2285
3844
  export declare function configuredGatewayUpstreamModelIds(settings: Settings): string[];
2286
3845
  export declare function configuredGatewayWorkspaceProductModelIds(settings: Settings): string[];
2287
3846
  export declare function configuredGatewayOrganizationProductModelIds(settings: Settings): string[];
@@ -2289,8 +3848,11 @@ export declare function configuredModelInputIdentities(settings: Settings): stri
2289
3848
  export declare function configuredOpenRouterUpstreamModelIds(settings: Settings): string[];
2290
3849
  export declare function configuredOpenRouterWorkspaceProductModelIds(settings: Settings): string[];
2291
3850
  export declare function configuredOpenRouterOrganizationProductModelIds(settings: Settings): string[];
3851
+ export declare function configuredOpperUpstreamModelIds(settings: Settings): string[];
3852
+ export declare function configuredOpperWorkspaceProductModelIds(settings: Settings): string[];
3853
+ export declare function configuredOpperOrganizationProductModelIds(settings: Settings): string[];
2292
3854
  /**
2293
- * Built-in OpenGeni credit pricing schedules.
3855
+ * Built-in Opengeni credit pricing schedules.
2294
3856
  *
2295
3857
  * Rates are provider list prices in USD micros per 1M tokens. Debit applies
2296
3858
  * `marginBps` (500 = +5%) on top. Long-context tiers follow OpenAI's
@@ -2298,7 +3860,7 @@ export declare function configuredOpenRouterOrganizationProductModelIds(settings
2298
3860
  *
2299
3861
  * GPT-5.4 and older families are intentionally omitted — they are no longer
2300
3862
  * offered. Codex / connected-subscription turns use `metering: external`, so
2301
- * this map never debits them, but it does provide their equivalent OpenGeni
3863
+ * this map never debits them, but it does provide their equivalent Opengeni
2302
3864
  * credit price when a matching product model is configured.
2303
3865
  *
2304
3866
  * When adding or changing a billed model, run `bun run check:model-pricing`
@@ -2306,6 +3868,8 @@ export declare function configuredOpenRouterOrganizationProductModelIds(settings
2306
3868
  * llm-prices.com as a ground-truth canary; it does not generate this table.
2307
3869
  */
2308
3870
  export declare const defaultModelPricing: Record<string, ModelPricingScheduleV1>;
3871
+ /** Reviewed comparison rates only; never debit or execution-definition defaults. */
3872
+ export declare const reviewedModelListPricing: Record<string, ModelPricingScheduleV1>;
2309
3873
  export type SandboxRequiredEnv = {
2310
3874
  field: keyof Settings;
2311
3875
  env: string;
@@ -2325,15 +3889,24 @@ export type FirstPartyMcpToolPolicy = {
2325
3889
  default: FirstPartyMcpToolNameType[];
2326
3890
  allowed: FirstPartyMcpToolNameType[];
2327
3891
  };
3892
+ export type FirstPartyMcpToolPolicySettings = Pick<Settings, "defaultFirstPartyMcpTools" | "allowedFirstPartyMcpTools" | "artifactMaterializerDeployed">;
3893
+ /**
3894
+ * First-party tools whose backing workload this deployment does not run. They
3895
+ * are absent from the ceiling (never offered) and an explicit request for one
3896
+ * is dropped rather than rejected: it is a deployment fact, not a caller error.
3897
+ */
3898
+ export declare function deploymentUnavailableFirstPartyMcpTools(settings: Pick<Settings, "artifactMaterializerDeployed">): ReadonlySet<FirstPartyMcpToolNameType>;
2328
3899
  /** Resolve the deployment's session-tool defaults and hard execution ceiling. */
2329
- export declare function resolveFirstPartyMcpToolPolicy(settings: Pick<Settings, "defaultFirstPartyMcpTools" | "allowedFirstPartyMcpTools">): FirstPartyMcpToolPolicy;
3900
+ export declare function resolveFirstPartyMcpToolPolicy(settings: FirstPartyMcpToolPolicySettings): FirstPartyMcpToolPolicy;
2330
3901
  /** Apply the deployment ceiling to an existing durable session selection. */
2331
- export declare function allowedFirstPartyMcpToolsForSession(settings: Pick<Settings, "defaultFirstPartyMcpTools" | "allowedFirstPartyMcpTools">, selected: readonly FirstPartyMcpToolNameType[] | null | undefined): FirstPartyMcpToolNameType[];
3902
+ export declare function allowedFirstPartyMcpToolsForSession(settings: FirstPartyMcpToolPolicySettings, selected: readonly FirstPartyMcpToolNameType[] | null | undefined): FirstPartyMcpToolNameType[];
3903
+ /** Resolve durable selection intent before freezing a new attempt's catalog. */
3904
+ export declare function resolveSessionFirstPartyMcpTools(settings: FirstPartyMcpToolPolicySettings, session: Pick<Session, "firstPartyMcpTools" | "toolPolicy"> & Partial<Pick<Session, "agent">>, workspaceSettings: unknown): FirstPartyMcpToolNameType[];
2332
3905
  /**
2333
3906
  * The Modal sandbox idle timeout (seconds) the provider actually passes as
2334
3907
  * idleTimeoutMs (sandbox-file-persistence). When the operator did not pin
2335
3908
  * OPENGENI_MODAL_IDLE_TIMEOUT_SECONDS we DEFAULT it to the hard lifetime
2336
- * (modalTimeoutSeconds): OpenGeni's reaper owns box lifecycle, so Modal's
3909
+ * (modalTimeoutSeconds): Opengeni's reaper owns box lifecycle, so Modal's
2337
3910
  * built-in idle-reap (which would otherwise fire on its short server default and
2338
3911
  * kill the box BEFORE the reaper can snapshot /workspace) is pushed out to the
2339
3912
  * hard backstop. An explicit smaller value is honoured (the boot invariant keeps
@@ -2355,15 +3928,26 @@ export declare function effectiveSandboxLifecycle(settings: Settings, backend?:
2355
3928
  /**
2356
3929
  * One shared upper bound for the durable provider-capture claim and for command
2357
3930
  * admission waiting behind it. The SDK request itself is bounded by
2358
- * sandboxSnapshotTimeoutMs; the extra window lets a non-cancellable provider
2359
- * response settle and release its exact claim without turning a normal
2360
- * checkpoint into a visible command failure. Database validation caps both
2361
- * consumers at one hour.
3931
+ * sandboxSnapshotTimeoutMs (a warm host-backed spool capture is stopped there);
3932
+ * the extra window lets a non-cancellable provider response settle and release
3933
+ * its exact claim without turning a normal checkpoint into a visible command
3934
+ * failure. Database validation caps both consumers at one hour.
2362
3935
  */
2363
3936
  export declare function sandboxArchiveCaptureTimeoutMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs">): number;
2364
3937
  /** Provider operation budget used only by zero-holder drain/rotation capture.
2365
3938
  * Unset preserves the historical shared snapshot budget exactly. */
2366
3939
  export declare function effectiveSandboxDrainSnapshotTimeoutMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs" | "sandboxDrainSnapshotTimeoutMs">): number;
3940
+ /**
3941
+ * How long before a finite provider deadline the deadline save stops waiting
3942
+ * for an orderly shutdown and becomes mandatory. Past this point the
3943
+ * reaper captures and terminates the box around anything that cannot finish in
3944
+ * time (pending owner quiescence, sibling attempts that do not hold the box,
3945
+ * in-flight requests whose holders are gone, commands that ignored their stop
3946
+ * request) instead of letting the provider kill it uncaptured. It leaves the
3947
+ * legacy command stop grace, the full drain capture budget and two reaper
3948
+ * periods before the deadline, and never exceeds the rotation lead.
3949
+ */
3950
+ export declare function sandboxDeadlineMandatoryCaptureLeadMs(settings: Pick<Settings, "sandboxRotationLeadMs" | "sandboxSnapshotTimeoutMs" | "sandboxDrainSnapshotTimeoutMs" | "sandboxLeaseReaperPeriodMs">): number;
2367
3951
  export declare function sandboxLifecycleTransitionWaitMs(settings: Pick<Settings, "sandboxSnapshotTimeoutMs" | "sandboxDrainSnapshotTimeoutMs" | "sandboxLeaseReaperPeriodMs">): number;
2368
3952
  export declare function collectSandboxEnvironment(settings: Settings, source?: NodeJS.ProcessEnv): Record<string, string>;
2369
3953
  /**
@@ -2375,6 +3959,17 @@ export declare function collectSandboxEnvironment(settings: Settings, source?: N
2375
3959
  */
2376
3960
  export declare function resolveProviderApiKey(provider: Pick<RegistryProvider, "apiKey" | "apiKeyEnv">, source?: NodeJS.ProcessEnv): string | undefined;
2377
3961
  export declare function gatewayRequestPolicyForUpstreamModel(upstreamModelId: string, models?: readonly GatewayCatalogModel[]): ConfiguredModel["requestPolicy"];
3962
+ /** Customer-owned OpenAI/Azure routes, bound to immutable connection identity. */
3963
+ export declare function withDirectModelProviders(settings: Settings, connections: readonly {
3964
+ id: string;
3965
+ version: number;
3966
+ subjectId: string | null;
3967
+ kind: string;
3968
+ status: string;
3969
+ providerDomain: string;
3970
+ metadata: Record<string, unknown>;
3971
+ apiKey?: string;
3972
+ }[]): Settings;
2378
3973
  /** Static catalog overlay; it contains no concrete workspace credential. */
2379
3974
  export declare function withWorkspaceGatewayCatalogProvider(settings: Settings, customModels?: readonly {
2380
3975
  upstreamModelId: string;
@@ -2395,6 +3990,25 @@ export declare function withWorkspaceOpenRouterCredential(settings: Settings, ap
2395
3990
  upstreamModelId: string;
2396
3991
  label?: string | null;
2397
3992
  }[]): Settings;
3993
+ /** Static Opper catalog overlay; it contains no concrete workspace credential. */
3994
+ export declare function withWorkspaceOpperCatalogProvider(settings: Settings, customModels?: readonly {
3995
+ upstreamModelId: string;
3996
+ label?: string | null;
3997
+ }[]): Settings;
3998
+ /** Runtime overlay after the worker resolves the workspace's encrypted Opper key. */
3999
+ export declare function withWorkspaceOpperCredential(settings: Settings, apiKey: string, customModels?: readonly {
4000
+ upstreamModelId: string;
4001
+ label?: string | null;
4002
+ }[]): Settings;
4003
+ /** Secret-free organization Opper catalog overlay. */
4004
+ export declare function withOrganizationOpperCatalogProvider(settings: Settings, customModels?: readonly {
4005
+ upstreamModelId: string;
4006
+ label?: string | null;
4007
+ }[]): Settings;
4008
+ export declare function withOrganizationOpperCredential(settings: Settings, apiKey: string, customModels?: readonly {
4009
+ upstreamModelId: string;
4010
+ label?: string | null;
4011
+ }[]): Settings;
2398
4012
  /** Secret-free organization Vercel AI Gateway catalog overlay. */
2399
4013
  export declare function withOrganizationGatewayCatalogProvider(settings: Settings, customModels?: readonly {
2400
4014
  upstreamModelId: string;
@@ -2428,7 +4042,7 @@ export declare function productShortLabelForModelId(modelId: string): string | n
2428
4042
  /** Undefined and the exact public OpenAI v1 endpoint are the same direct route. */
2429
4043
  export declare function isDirectOpenAiApiBaseUrl(baseUrl: string | undefined): boolean;
2430
4044
  /**
2431
- * Map OpenGeni latency mode to the provider `service_tier` wire value.
4045
+ * Map Opengeni latency mode to the provider `service_tier` wire value.
2432
4046
  * Azure, Codex ChatGPT, and xAI accept `priority`; OpenAI API accepts `fast`.
2433
4047
  * Standard omits the field.
2434
4048
  */
@@ -2436,7 +4050,22 @@ export declare function serviceTierForLatencyMode(providerId: string, latencyMod
2436
4050
  /** True when the response tier fulfills a non-standard Fast/priority request. */
2437
4051
  export declare function responseSatisfiesLatencyMode(requested: LatencyMode, responseServiceTier: string | null | undefined): boolean;
2438
4052
  export declare function runnableLatencyModesForModel(settings: Settings, modelId: string): LatencyMode[];
4053
+ export declare class UnsupportedLatencyModeError extends Error {
4054
+ readonly modelId: string;
4055
+ readonly latencyMode: LatencyMode;
4056
+ readonly allowedLatencyModes: readonly LatencyMode[];
4057
+ readonly code = "UNSUPPORTED_LATENCY_MODE";
4058
+ constructor(modelId: string, latencyMode: LatencyMode, allowedLatencyModes: readonly LatencyMode[]);
4059
+ }
2439
4060
  export declare function modelCostClassForConfiguredModel(_settings: Settings, model: Pick<ConfiguredModel, "cost">): ConfiguredModelCostClass;
4061
+ /**
4062
+ * The executable model an accepted turn runs: the current definition, except
4063
+ * that a turn frozen before hosted web search was enabled keeps its frozen
4064
+ * tool set (no web_search) on every recovery attempt. Only the next accepted
4065
+ * logical turn resolves the newly enabled tool. Call only with a policy that
4066
+ * already passed assertTurnExecutionPolicyMatchesConfigV1.
4067
+ */
4068
+ export declare function configuredModelForAcceptedTurnExecutionPolicy(model: ConfiguredModel, provider: ResolvedModelProvider, policy: TurnExecutionPolicyV1): ConfiguredModel;
2440
4069
  /**
2441
4070
  * The built-in provider's stable id: "openai" on the OpenAI platform, "azure"
2442
4071
  * on Azure. Exported because the workspace model-policy gate must attribute
@@ -2460,6 +4089,8 @@ export declare function configuredProviders(settings: Settings, source?: NodeJS.
2460
4089
  * select, lease, refresh, or expose a concrete credential; those runtime
2461
4090
  * operations remain owned by the credential allocator.
2462
4091
  */
4092
+ /** Exact upstream slugs of the active Codex catalog (or the built-in fallback list). */
4093
+ export declare function codexUpstreamModelSlugs(settings: Settings): string[];
2463
4094
  export declare function withCodexCatalogProvider(settings: Settings): Settings;
2464
4095
  /**
2465
4096
  * Static SuperGrok product catalogue, matching the Codex subscription seam.
@@ -2481,6 +4112,18 @@ export declare function withXaiSubscriptionCatalogProvider(settings: Settings):
2481
4112
  * serves. A policy blocking the built-in must block this path too.
2482
4113
  */
2483
4114
  export declare function policyProviderIdForModel(settings: Settings, modelId: string): string;
4115
+ /**
4116
+ * Whether a model id spends Opengeni credits, for the workspace model
4117
+ * policy's credit switch. MUST agree with the cost the worker bills
4118
+ * (`ConfiguredModel.cost === "credits"`):
4119
+ * - a configured model → its own cost class;
4120
+ * - `codex/…`, `xai…/`, and workspace/organization connection ids → never;
4121
+ * - anything else → the legacy built-in fallback, which the deployment pays
4122
+ * and bills in credits unless the cost policy marks that exact id free.
4123
+ * Failing closed here keeps an unknown id from slipping past a workspace
4124
+ * that turned credits off.
4125
+ */
4126
+ export declare function policyChargesCreditsForModel(settings: Settings, modelId: string): boolean;
2484
4127
  /**
2485
4128
  * Every model a client may use, the built-in provider's models first
2486
4129
  * (configuredAllowedModels-from-openai, mapped to "responses" with
@@ -2500,6 +4143,14 @@ export declare function canonicalizeConfiguredModelId(settings: Settings, modelI
2500
4143
  * openai allow-list, then registry ids.
2501
4144
  */
2502
4145
  export declare function configuredAllowedModels(settings: Settings): string[];
4146
+ /** Retirement is selection metadata, never provider authority or executable identity. */
4147
+ export declare function isModelAvailableForNewSelection(settings: Settings, modelId: string): boolean;
4148
+ /** Called only with the durable policy installed for a claimed accepted attempt. */
4149
+ export declare function settingsForAcceptedSubscriptionTurn(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
4150
+ modelId: string;
4151
+ reasoningEffort: Settings["openaiReasoningEffort"];
4152
+ latencyMode?: LatencyMode;
4153
+ }): Settings;
2503
4154
  /**
2504
4155
  * Resolve a model string to the provider that serves it and its configured
2505
4156
  * shape. Returns undefined when the id is not exposed (built-in allow-list nor
@@ -2527,16 +4178,33 @@ export type ResolveTurnExecutionPolicyV1Input = {
2527
4178
  * callers must keep their live credential/readiness gate authoritative.
2528
4179
  */
2529
4180
  export declare function resolveModelProviderForTurn(settings: Settings, modelId: string): ReturnType<typeof resolveModelProvider>;
4181
+ /**
4182
+ * The requested model cannot start new work: it is retired from new selection
4183
+ * or absent from the configured catalog. Callers that own a durable refusal
4184
+ * (for example a scheduled occurrence) record it instead of failing blindly.
4185
+ */
4186
+ export declare class TurnExecutionPolicyModelUnavailableError extends Error {
4187
+ constructor(message: string);
4188
+ }
2530
4189
  /**
2531
4190
  * Build a trusted, secret-safe execution policy from the normalized catalog.
2532
4191
  * The Codex overlay here contains static product/provider identity only; it
2533
4192
  * neither proves readiness nor chooses, decrypts, leases, or exposes an account.
2534
4193
  */
2535
4194
  export declare function resolveTurnExecutionPolicyV1(settings: Settings, input: ResolveTurnExecutionPolicyV1Input): TurnExecutionPolicyV1;
4195
+ /** Explicit accepted execution identity matches, but its definition digest differs. */
4196
+ export declare class TurnExecutionPolicyDefinitionMismatchError extends Error {
4197
+ readonly code = "turn_execution_policy_definition_mismatch";
4198
+ constructor();
4199
+ }
2536
4200
  /**
2537
4201
  * Parse-time validation lives in @opengeni/contracts; this verifier binds a
2538
- * present snapshot to the current executable definition and exact turn row.
2539
- * Any deployment/provider drift fails before a provider or compaction call.
4202
+ * serving snapshot to its executable definition and mapped reasoning. This
4203
+ * does not activate placement or replace the immutable accepted-turn policy.
4204
+ */
4205
+ export declare function assertTurnServingPolicyMatchesConfigV1(settings: Settings, revision: TurnServingPolicyV1, acceptedPolicy: TurnExecutionPolicyV1): ReturnType<typeof assertTurnExecutionPolicyMatchesConfigV1>;
4206
+ /** Bind an accepted snapshot to the current definition and exact turn row.
4207
+ * Non-additive executable drift fails before a provider or compaction call.
2540
4208
  */
2541
4209
  export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Settings, policy: TurnExecutionPolicyV1, expected: {
2542
4210
  modelId: string;
@@ -2554,6 +4222,13 @@ export declare function assertTurnExecutionPolicyMatchesConfigV1(settings: Setti
2554
4222
  * complete schedule, and always replace the lower-precedence schedule.
2555
4223
  */
2556
4224
  export declare function configuredModelPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
4225
+ /**
4226
+ * Insights list-price metadata, including reviewed namespaced provider routes.
4227
+ * Kept separate from debit/catalog pricing: adding a comparison must not change
4228
+ * an accepted turn's frozen execution-definition hash or payer classification.
4229
+ * Inline registry and explicit product-ID prices always win over projections.
4230
+ */
4231
+ export declare function configuredModelListPricingSchedules(settings: Settings): Record<string, ModelPricingScheduleV1>;
2557
4232
  /** Legacy flat projection: returns the default/below-threshold price. */
2558
4233
  export declare function configuredModelPricing(settings: Settings): Record<string, ModelPricing>;
2559
4234
  /** Select the per-provider-request price at an exact input-token threshold. */
@@ -2568,7 +4243,15 @@ export declare function contextInputBudgetTokens(settings: Pick<Settings, "conte
2568
4243
  * metadata is authoritative when present; deployment defaults remain the
2569
4244
  * fallback for models that do not declare their own limits.
2570
4245
  */
2571
- export declare function settingsWithResolvedModelContext(settings: Settings, model: Pick<ConfiguredModel, "contextWindowTokens" | "effectiveContextWindowTokens" | "autoCompactTokenLimit" | "toolOutputTruncationTokens">): Settings;
4246
+ export declare function settingsWithResolvedModelContext(settings: Settings, model: Pick<ConfiguredModel, "contextWindowTokens" | "effectiveContextWindowTokens" | "autoCompactTokenLimit" | "toolOutputTruncationTokens"> & {
4247
+ id?: string;
4248
+ }, workspaceSettings?: unknown, organizationDefaults?: Pick<OrganizationModelDefaults, "modelCompactionThresholds"> | null): Settings;
4249
+ /**
4250
+ * One policy projection for settings UI and all model-facing worker paths.
4251
+ * The workspace's own preference wins, then the organization's default for
4252
+ * the model, then the model's own default.
4253
+ */
4254
+ export declare function workspaceModelCompactionPolicy(settings: Settings, model: Pick<ConfiguredModel, "id" | "contextWindowTokens" | "effectiveContextWindowTokens" | "autoCompactTokenLimit">, workspaceSettings: unknown, organizationDefaults?: Pick<OrganizationModelDefaults, "modelCompactionThresholds"> | null): ModelCompactionPolicy;
2572
4255
  export declare function configuredStaticUsageLimits(settings: Settings): StaticUsageLimitsConfig;
2573
4256
  export declare function configuredEntitlements(settings: Settings): EntitlementsConfig;
2574
4257
  export declare function calculateModelUsageCostMicros(settings: Settings, model: string, usage: ModelUsageInput, options?: {
@@ -2577,21 +4260,44 @@ export declare function calculateModelUsageCostMicros(settings: Settings, model:
2577
4260
  export declare function calculateModelUsageCostBreakdown(settings: Settings, model: string, usage: ModelUsageInput, options?: {
2578
4261
  latencyMode?: LatencyMode;
2579
4262
  }): ModelUsageCostBreakdown;
4263
+ /** Provider-list/equivalent-credit comparison only; never debit authority. */
4264
+ export declare function calculateModelListUsageCostBreakdown(settings: Settings, model: string, usage: ModelUsageInput, options?: {
4265
+ latencyMode?: LatencyMode;
4266
+ }): ModelUsageCostBreakdown;
4267
+ /**
4268
+ * Forward-only list comparison snapshot for the model-call fact writer.
4269
+ * Callers must establish request price provenance (including geography/service
4270
+ * tier) and retain per-request counters. Unknown counters/TTL/modifiers yield
4271
+ * no class split, not invented zeros. Historical facts must not use this helper.
4272
+ * Native Claude details preserve cache_write_tokens_5m and cache_write_tokens_1h.
4273
+ */
4274
+ export declare function calculateModelListUsageCostSnapshot(settings: Settings, model: string, usage: ModelUsageInput, options?: {
4275
+ latencyMode?: LatencyMode;
4276
+ priceContextKnown?: boolean;
4277
+ }): ModelListUsageCostSnapshot;
4278
+ /**
4279
+ * Approximate class attribution of a previously recorded upstream list total.
4280
+ * Current reviewed rates are weights only: this never recomputes that total,
4281
+ * credits, or charges. Missing class counters/rates remain unknown. Historical
4282
+ * cache writes use the schedule's single TTL rate, not an exact TTL assertion.
4283
+ * Reasoning is already included in outputTokens and is never added again.
4284
+ */
4285
+ export declare function allocateRecordedModelListCostByClass(settings: Settings, model: string, usage: ModelUsageInput, recordedProviderCostMicros: number | null | undefined): ModelRecordedListCostAllocation;
2580
4286
  /**
2581
- * Convert AI Gateway's exact USD inference cost to OpenGeni credit micros and
4287
+ * Convert AI Gateway's exact USD inference cost to Opengeni credit micros and
2582
4288
  * apply the configured model margin. Decimal arithmetic is integer-only so a
2583
4289
  * sub-micro provider charge cannot be lost to floating-point rounding.
2584
4290
  */
2585
4291
  export declare function calculateGatewayReportedCostMicros(settings: Settings, model: string, inferenceCostUsd: string, options?: {
2586
4292
  inputTokens?: number;
2587
4293
  }): number;
2588
- /** Exact provider-reported Gateway cost without requiring an OpenGeni price schedule. */
4294
+ /** Exact provider-reported Gateway cost without requiring an Opengeni price schedule. */
2589
4295
  export declare function calculateGatewayReportedProviderCostMicros(inferenceCostUsd: string): number;
2590
4296
  export declare function calculateGatewayReportedCostBreakdown(settings: Settings, model: string, inferenceCostUsd: string, options?: {
2591
4297
  inputTokens?: number;
2592
4298
  }): ModelUsageCostBreakdown;
2593
4299
  /**
2594
- * Exact OpenGeni product price frozen before a managed video request starts.
4300
+ * Exact Opengeni product price frozen before a managed video request starts.
2595
4301
  * Gateway reporting is delayed for asynchronous video, so this deliberately
2596
4302
  * does not masquerade as provider-reported cost.
2597
4303
  */
@@ -2615,7 +4321,7 @@ export declare function environmentsEncryptionKeyBytes(settings: Settings): Uint
2615
4321
  */
2616
4322
  export declare function temporalConnectionOptions(settings: Settings): TemporalConnectionOptions;
2617
4323
  /**
2618
- * The connection `search_path` for OpenGeni's db handles + the managed-auth pool
4324
+ * The connection `search_path` for Opengeni's db handles + the managed-auth pool
2619
4325
  * (Step I, §7.8 runtime half). Returns `undefined` when `dbSchema` is unset
2620
4326
  * (standalone) so no `search_path` startup parameter is sent and the server
2621
4327
  * default (`public`) applies — byte-for-byte today's behavior. When `dbSchema`
@@ -2626,6 +4332,15 @@ export declare function temporalConnectionOptions(settings: Settings): TemporalC
2626
4332
  */
2627
4333
  export declare function dbSearchPath(settings: Pick<Settings, "dbSchema">): string | undefined;
2628
4334
  export declare function collectGitIdentityEnvironment(settings: Settings): Record<string, string>;
4335
+ /**
4336
+ * The manifest-env constants predicate (W1 secrets delivery, RM-3). A sandbox
4337
+ * manifest may carry only deployment constants: HOME, PATH, git identity and
4338
+ * askpass pointers, `OPENGENI_*` pointers, and the deployment allowlist
4339
+ * (`sandboxEnvironmentVariableNames`). User secrets never qualify: they are
4340
+ * resolved per command from `{{secret:…}}` references. Used by `buildManifest`
4341
+ * and the persisted-envelope strip as a defensive filter.
4342
+ */
4343
+ export declare function sandboxManifestEnvironmentNamePredicate(settings: Settings): (name: string) => boolean;
2629
4344
  /**
2630
4345
  * The STABLE run-scoped sandbox environment: the subset of a run's box-manifest
2631
4346
  * environment that is IDENTICAL whether the box is first warmed by the worker
@@ -2637,9 +4352,9 @@ export declare function collectGitIdentityEnvironment(settings: Settings): Recor
2637
4352
  * manifest lacks or carries a different value for).
2638
4353
  *
2639
4354
  * Precedence (lowest → highest): deployment allowlist (`collectSandboxEnvironment`)
2640
- * < git identity (`collectGitIdentityEnvironment`) < the session's attached
2641
- * workspace environment < the backend-aware HOME default. Reserved-name validation
2642
- * at write time keeps workspace values from colliding with platform entries.
4355
+ * < git identity (`collectGitIdentityEnvironment`) < the backend-aware HOME default.
4356
+ * The manifest holds deployment constants only: user secrets never ride it.
4357
+ * They are resolved per command from `{{secret:…}}` references (W1 delivery).
2643
4358
  *
2644
4359
  * DELIBERATELY EXCLUDES the per-run, ROTATING git provider token VALUES that
2645
4360
  * `sandboxEnvironmentForRun` mints when a repository resource is
@@ -2655,10 +4370,9 @@ export declare function collectGitIdentityEnvironment(settings: Settings): Recor
2655
4370
  * the platform never mints or seeds git provider tokens there. The attach
2656
4371
  * surfaces have only the `Session` (no repo resources) and so never seed a token,
2657
4372
  * but unwritten files simply yield no auth; the BLOCKING attach-vs-turn error
2658
- * this helper fixes is for the common (no-repo) and workspace-environment-attached
2659
- * provisioned-box cases.
4373
+ * this helper fixes is for the common (no-repo) provisioned-box case.
2660
4374
  */
2661
- export declare function stableSandboxEnvironmentForRun(settings: Settings, workspaceEnvironment?: Record<string, string>, options?: {
4375
+ export declare function stableSandboxEnvironmentForRun(settings: Settings, options?: {
2662
4376
  workspaceId?: string;
2663
4377
  }): Record<string, string>;
2664
4378
  /**
@@ -2732,6 +4446,13 @@ export declare function sandboxWarmRateMicrosPerSecond(settings: Settings, backe
2732
4446
  */
2733
4447
  export declare function parseModelProvidersJson(raw: string): RegistryProvider[];
2734
4448
  export declare function parseIntegrationsOauthClientsJson(raw: string | undefined): Record<string, IntegrationOAuthClientConfig>;
4449
+ /**
4450
+ * The operator-registered client for one authorization server, matched by
4451
+ * exact issuer/URL key first and then trailing-slash-insensitively. The OAuth
4452
+ * start flow and the connector catalog's connectability projection share this
4453
+ * so a catalog row is offered exactly when a start would find a client.
4454
+ */
4455
+ export declare function findIntegrationsOauthClient(configured: Readonly<Record<string, IntegrationOAuthClientConfig>>, candidates: readonly string[]): IntegrationOAuthClientConfig | null;
2735
4456
  export declare const SocialOAuthClientConfigSchema: z.ZodObject<{
2736
4457
  clientId: z.ZodString;
2737
4458
  clientSecret: z.ZodOptional<z.ZodString>;
@@ -2742,12 +4463,18 @@ export declare function parseSocialOauthClientsJson(raw: string | undefined): Pa
2742
4463
  export declare function parseStaticUsageLimitsJson(raw: string): StaticUsageLimitsConfig;
2743
4464
  export declare function parseStaticEntitlementsJson(raw: string): EntitlementsConfig;
2744
4465
  /**
2745
- * The sandbox/external base URL of OpenGeni's first-party MCP endpoint, as a
4466
+ * Setup bound for Opengeni's own MCP servers. They are the deployment's API,
4467
+ * which is briefly slow while it restarts or is under load; the client's
4468
+ * 5-second default turned that into failed turns. Tool calls are unaffected.
4469
+ */
4470
+ export declare const FIRST_PARTY_MCP_SETUP_TIMEOUT_MS = 30000;
4471
+ /**
4472
+ * The sandbox/external base URL of Opengeni's first-party MCP endpoint, as a
2746
4473
  * `{workspaceId}` template. Codemode and remote placements use this route.
2747
4474
  *
2748
4475
  * BINDING CONTRACT (`opengeniMcpUrl`):
2749
4476
  * - STANDALONE (unset): falls back to the loopback default.
2750
- * - EMBEDDED / MOUNTED (must set): when OpenGeni's API is mounted as a host
4477
+ * - EMBEDDED / MOUNTED (must set): when Opengeni's API is mounted as a host
2751
4478
  * sub-app under a prefix (e.g. `https://host/og/v1/...`), the loopback
2752
4479
  * default is WRONG — the worker runs in the host process and `127.0.0.1:
2753
4480
  * ${apiPort}` is not where the mounted, sandbox-routable MCP lives. The host
@@ -2765,6 +4492,31 @@ export declare function firstPartyMcpInternalBaseUrl(settings: Settings): string
2765
4492
  export declare function firstPartyMcpWorkspaceUrl(settings: Settings, workspaceId: string): string;
2766
4493
  export declare function firstPartyMcpInternalWorkspaceUrl(settings: Settings, workspaceId: string): string;
2767
4494
  export declare function codemodeWorkspaceUrl(settings: Settings, workspaceId: string): string;
4495
+ export type TrustedProxyCidr = {
4496
+ address: string;
4497
+ prefix: number;
4498
+ family: "ipv4" | "ipv6";
4499
+ };
4500
+ /**
4501
+ * Parse `OPENGENI_API_TRUSTED_PROXY_CIDRS`: comma-separated IPv4/IPv6 CIDRs or
4502
+ * single addresses. Throws on any malformed entry so a typo can never widen or
4503
+ * silently disable the trusted proxy set.
4504
+ */
4505
+ export declare function trustedProxyCidrEntries(raw: string): TrustedProxyCidr[];
4506
+ /**
4507
+ * Parse `OPENGENI_LOCAL_ALLOWED_ORIGINS`: comma-separated exact browser origins
4508
+ * (`http(s)://host[:port]`, no path, query, credentials, or wildcard). Throws on
4509
+ * any malformed entry so a typo can never widen or silently disable the local
4510
+ * browser boundary.
4511
+ */
4512
+ export declare function localAllowedOriginEntries(raw: string | undefined): string[];
4513
+ /**
4514
+ * Local development only: whether a normalized API path is one a sandbox calls
4515
+ * (Codemode, first-party MCP, and the personal Git broker). The Linux Docker
4516
+ * sandbox route relays only these, and the local API serves only these on the
4517
+ * addresses that only sandboxes use (see `apps/api/src/http/local-browser-boundary.ts`).
4518
+ */
4519
+ export declare function localSandboxApiRouteAllowed(pathname: string): boolean;
2768
4520
  /** Validate one fully resolved, secret-bearing executable catalog. */
2769
4521
  export declare function validateModelCatalogSettings(settings: Settings, source?: NodeJS.ProcessEnv): ConfiguredModel[];
2770
4522
  /**
@@ -2830,3 +4582,39 @@ export interface NatsControlPlaneAuth {
2830
4582
  password: string;
2831
4583
  }
2832
4584
  export declare function resolveNatsControlPlaneAuth(settings: Pick<Settings, "selfhostedNatsControlUser" | "selfhostedNatsControlPassword">): NatsControlPlaneAuth | null;
4585
+ /** Image references a workspace may select as its default sandbox image. */
4586
+ export declare function sandboxImageAllowlist(settings: Pick<Settings, "sandboxImageAllowlist">): string[];
4587
+ /** Native Claude connections reuse the encrypted workspace and organization boundaries. */
4588
+ export declare const CLAUDE_CONNECTION_KINDS: readonly ["anthropic", "claude_subscription"];
4589
+ export type ClaudeConnectionKind = (typeof CLAUDE_CONNECTION_KINDS)[number];
4590
+ export declare function claudeNativeModelProfile(upstreamModelId: string): Readonly<{
4591
+ efforts: readonly ReasoningEffort[];
4592
+ defaultEffort: ReasoningEffort | null;
4593
+ contextWindowTokens: number;
4594
+ maxOutputTokens: number;
4595
+ autoCompactTokenLimit?: number;
4596
+ prefixBoundThinking?: boolean;
4597
+ }> | undefined;
4598
+ /**
4599
+ * Models a new Claude connection offers without anyone adding them. Seeded
4600
+ * once per scope and connection kind, only when that scope never configured
4601
+ * Claude models; a removed model stays removed.
4602
+ */
4603
+ export declare const CLAUDE_DEFAULT_CONNECTION_MODEL_IDS: readonly ["claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5"];
4604
+ export declare function claudeProviderId(kind: ClaudeConnectionKind, scope?: "workspace" | "organization"): string;
4605
+ export type ClaudeConnectionCatalog = Partial<Record<ClaudeConnectionKind, {
4606
+ active?: boolean;
4607
+ models: readonly {
4608
+ upstreamModelId: string;
4609
+ label?: string | null;
4610
+ }[];
4611
+ }>>;
4612
+ export declare function withClaudeConnectionCatalog(settings: Settings, connections: ClaudeConnectionCatalog, scope?: "workspace" | "organization"): Settings;
4613
+ export declare function withClaudeConnectionCredential(settings: Settings, kind: ClaudeConnectionKind, credential: string, scope?: "workspace" | "organization", credentialBinding?: {
4614
+ connectionId: string;
4615
+ credentialVersion: number;
4616
+ }): Settings;
4617
+ export * from "./claude-subscription-usage.js";
4618
+ export * from "./claude-subscription-oauth.js";
4619
+ export * from "./subscription-account-selection.js";
4620
+ export * from "./claude-subscription-capacity.js";