@ai-sdk/openai 3.0.117 → 3.0.118

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.mjs CHANGED
@@ -3081,6 +3081,7 @@ var openaiTools = {
3081
3081
 
3082
3082
  // src/responses/openai-responses-language-model.ts
3083
3083
  import {
3084
+ UnsupportedFunctionalityError as UnsupportedFunctionalityError6,
3084
3085
  APICallError as APICallError2
3085
3086
  } from "@ai-sdk/provider";
3086
3087
  import {
@@ -3144,7 +3145,308 @@ import {
3144
3145
  parseProviderOptions as parseProviderOptions5,
3145
3146
  validateTypes
3146
3147
  } from "@ai-sdk/provider-utils";
3148
+ import { z as z22 } from "zod/v4";
3149
+
3150
+ // src/responses/openai-responses-options.ts
3151
+ import {
3152
+ lazySchema as lazySchema20,
3153
+ zodSchema as zodSchema20
3154
+ } from "@ai-sdk/provider-utils";
3147
3155
  import { z as z21 } from "zod/v4";
3156
+ var TOP_LOGPROBS_MAX = 20;
3157
+ var openaiResponsesReasoningModelIds = [
3158
+ "o1",
3159
+ "o1-2024-12-17",
3160
+ "o3",
3161
+ "o3-2025-04-16",
3162
+ "o3-mini",
3163
+ "o3-mini-2025-01-31",
3164
+ "o4-mini",
3165
+ "o4-mini-2025-04-16",
3166
+ "gpt-5",
3167
+ "gpt-5-2025-08-07",
3168
+ "gpt-5-codex",
3169
+ "gpt-5-mini",
3170
+ "gpt-5-mini-2025-08-07",
3171
+ "gpt-5-nano",
3172
+ "gpt-5-nano-2025-08-07",
3173
+ "gpt-5-pro",
3174
+ "gpt-5-pro-2025-10-06",
3175
+ "gpt-5.1",
3176
+ "gpt-5.1-chat-latest",
3177
+ "gpt-5.1-codex-mini",
3178
+ "gpt-5.1-codex",
3179
+ "gpt-5.1-codex-max",
3180
+ "gpt-5.2",
3181
+ "gpt-5.2-chat-latest",
3182
+ "gpt-5.2-pro",
3183
+ "gpt-5.2-codex",
3184
+ "gpt-5.3-chat-latest",
3185
+ "gpt-5.3-codex",
3186
+ "gpt-5.4",
3187
+ "gpt-5.4-2026-03-05",
3188
+ "gpt-5.4-mini",
3189
+ "gpt-5.4-mini-2026-03-17",
3190
+ "gpt-5.4-nano",
3191
+ "gpt-5.4-nano-2026-03-17",
3192
+ "gpt-5.4-pro",
3193
+ "gpt-5.4-pro-2026-03-05",
3194
+ "gpt-5.5",
3195
+ "gpt-5.5-2026-04-23",
3196
+ "gpt-5.6",
3197
+ "gpt-5.6-luna",
3198
+ "gpt-5.6-sol",
3199
+ "gpt-5.6-terra",
3200
+ "gpt-6-astra",
3201
+ "gpt-6-luna",
3202
+ "gpt-6-sol"
3203
+ ];
3204
+ var openaiResponsesModelIds = [
3205
+ "gpt-4.1",
3206
+ "gpt-4.1-2025-04-14",
3207
+ "gpt-4.1-mini",
3208
+ "gpt-4.1-mini-2025-04-14",
3209
+ "gpt-4.1-nano",
3210
+ "gpt-4.1-nano-2025-04-14",
3211
+ "gpt-4o",
3212
+ "gpt-4o-2024-05-13",
3213
+ "gpt-4o-2024-08-06",
3214
+ "gpt-4o-2024-11-20",
3215
+ "gpt-4o-audio-preview",
3216
+ "gpt-4o-audio-preview-2024-12-17",
3217
+ "gpt-4o-search-preview",
3218
+ "gpt-4o-search-preview-2025-03-11",
3219
+ "gpt-4o-mini-search-preview",
3220
+ "gpt-4o-mini-search-preview-2025-03-11",
3221
+ "gpt-4o-mini",
3222
+ "gpt-4o-mini-2024-07-18",
3223
+ "gpt-3.5-turbo-0125",
3224
+ "gpt-3.5-turbo",
3225
+ "gpt-3.5-turbo-1106",
3226
+ "gpt-5-chat-latest",
3227
+ ...openaiResponsesReasoningModelIds
3228
+ ];
3229
+ var openaiLanguageModelResponsesOptionsSchema = lazySchema20(
3230
+ () => zodSchema20(
3231
+ z21.object({
3232
+ /**
3233
+ * The ID of the OpenAI Conversation to continue.
3234
+ * You must create a conversation first via the OpenAI API.
3235
+ * Cannot be used in conjunction with `previousResponseId`.
3236
+ * Defaults to `undefined`.
3237
+ * @see https://platform.openai.com/docs/api-reference/conversations/create
3238
+ */
3239
+ conversation: z21.string().nullish(),
3240
+ /**
3241
+ * The set of extra fields to include in the response (advanced, usually not needed).
3242
+ * Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'web_search_call.results', 'message.output_text.logprobs'.
3243
+ */
3244
+ include: z21.array(
3245
+ z21.enum([
3246
+ "reasoning.encrypted_content",
3247
+ // handled internally by default, only needed for unknown reasoning models
3248
+ "file_search_call.results",
3249
+ "web_search_call.results",
3250
+ "message.output_text.logprobs"
3251
+ ])
3252
+ ).nullish(),
3253
+ /**
3254
+ * Instructions for the model.
3255
+ * They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
3256
+ * Defaults to `undefined`.
3257
+ */
3258
+ instructions: z21.string().nullish(),
3259
+ /**
3260
+ * Return the log probabilities of the tokens. Including logprobs will increase
3261
+ * the response size and can slow down response times. However, it can
3262
+ * be useful to better understand how the model is behaving.
3263
+ *
3264
+ * Setting to true will return the log probabilities of the tokens that
3265
+ * were generated.
3266
+ *
3267
+ * Setting to a number will return the log probabilities of the top n
3268
+ * tokens that were generated.
3269
+ *
3270
+ * @see https://platform.openai.com/docs/api-reference/responses/create
3271
+ * @see https://cookbook.openai.com/examples/using_logprobs
3272
+ */
3273
+ logprobs: z21.union([z21.boolean(), z21.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
3274
+ /**
3275
+ * The maximum number of total calls to built-in tools that can be processed in a response.
3276
+ * This maximum number applies across all built-in tool calls, not per individual tool.
3277
+ * Any further attempts to call a tool by the model will be ignored.
3278
+ */
3279
+ maxToolCalls: z21.number().nullish(),
3280
+ /**
3281
+ * Additional metadata to store with the generation.
3282
+ */
3283
+ metadata: z21.any().nullish(),
3284
+ /**
3285
+ * Whether to use parallel tool calls. Defaults to `true`.
3286
+ */
3287
+ parallelToolCalls: z21.boolean().nullish(),
3288
+ /**
3289
+ * The ID of the previous response. You can use it to continue a conversation.
3290
+ * Defaults to `undefined`.
3291
+ */
3292
+ previousResponseId: z21.string().nullish(),
3293
+ /**
3294
+ * Sets a cache key to tie this prompt to cached prefixes for better caching performance.
3295
+ */
3296
+ promptCacheKey: z21.string().nullish(),
3297
+ /**
3298
+ * Prompt cache behavior for GPT-5.6 and later models.
3299
+ * `mode` controls whether OpenAI also places an implicit breakpoint.
3300
+ * `ttl` sets the minimum cache lifetime and currently only supports 30 minutes.
3301
+ */
3302
+ promptCacheOptions: z21.object({
3303
+ mode: z21.enum(["implicit", "explicit"]).optional(),
3304
+ ttl: z21.literal("30m").optional()
3305
+ }).optional(),
3306
+ /**
3307
+ * The retention policy for the prompt cache.
3308
+ * - 'in_memory': Default. Standard prompt caching behavior.
3309
+ * - '24h': Extended prompt caching that keeps cached prefixes active for up to 24 hours.
3310
+ * Available for models before GPT-5.6 that support extended caching.
3311
+ *
3312
+ * @deprecated For GPT-5.6 and later models, use `promptCacheOptions.ttl`.
3313
+ *
3314
+ * @default 'in_memory'
3315
+ */
3316
+ promptCacheRetention: z21.enum(["in_memory", "24h"]).nullish(),
3317
+ /**
3318
+ * Reasoning effort for reasoning models. Defaults to `medium`. If you use
3319
+ * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
3320
+ * GPT-5.6 supports 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
3321
+ * GPT-6 and later models support 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
3322
+ * Supported values vary by model.
3323
+ */
3324
+ reasoningEffort: z21.string().nullish(),
3325
+ /**
3326
+ * Updates the reasoning effort for GPT-6 and later models starting with this response
3327
+ * without changing the request-level reasoning effort. This preserves the
3328
+ * request prefix for prompt caching.
3329
+ *
3330
+ * Only supported by GPT-6 and later models in standard, single-agent mode. Cannot be
3331
+ * combined with automatic truncation.
3332
+ */
3333
+ reasoningEffortUpdate: z21.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
3334
+ /**
3335
+ * Controls how much model work GPT-5.6 performs before returning a final answer.
3336
+ * `standard` is the default. `pro` increases quality, latency, and token usage.
3337
+ */
3338
+ reasoningMode: z21.enum(["standard", "pro"]).optional(),
3339
+ /**
3340
+ * Controls which available reasoning items GPT-5.6 can use.
3341
+ * `auto` uses the model default, `current_turn` excludes reasoning from earlier
3342
+ * turns, and `all_turns` makes compatible earlier reasoning available.
3343
+ */
3344
+ reasoningContext: z21.enum(["auto", "current_turn", "all_turns"]).optional(),
3345
+ /**
3346
+ * Controls reasoning summary output from the model.
3347
+ * Set to "auto" to automatically receive the richest level available,
3348
+ * or "detailed" for comprehensive summaries.
3349
+ */
3350
+ reasoningSummary: z21.string().nullish(),
3351
+ /**
3352
+ * The identifier for safety monitoring and tracking.
3353
+ */
3354
+ safetyIdentifier: z21.string().nullish(),
3355
+ /**
3356
+ * Service tier for the request.
3357
+ * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
3358
+ * Set to 'priority' for faster processing with Enterprise access (available for gpt-4, gpt-5, gpt-5-mini, o3, o4-mini; gpt-5-nano is not supported).
3359
+ * Set to 'fast' for the same tier as 'priority' (OpenAI's newer name for it).
3360
+ *
3361
+ * Defaults to 'auto'.
3362
+ */
3363
+ serviceTier: z21.enum(["auto", "flex", "priority", "fast", "default"]).nullish(),
3364
+ /**
3365
+ * Whether to store the generation. Defaults to `true`.
3366
+ */
3367
+ store: z21.boolean().nullish(),
3368
+ /**
3369
+ * Whether to pass through non-image file types as generic input files.
3370
+ *
3371
+ * By default, inline file inputs are restricted to images and PDFs.
3372
+ * Enable this when the target OpenAI Responses model supports additional
3373
+ * file media types, such as text/csv.
3374
+ */
3375
+ passThroughUnsupportedFiles: z21.boolean().optional(),
3376
+ /**
3377
+ * Whether to use strict JSON schema validation.
3378
+ * Defaults to `true`.
3379
+ */
3380
+ strictJsonSchema: z21.boolean().nullish(),
3381
+ /**
3382
+ * Controls the verbosity of the model's responses. Lower values ('low') will result
3383
+ * in more concise responses, while higher values ('high') will result in more verbose responses.
3384
+ * Valid values: 'low', 'medium', 'high'.
3385
+ */
3386
+ textVerbosity: z21.enum(["low", "medium", "high"]).nullish(),
3387
+ /**
3388
+ * Controls output truncation. 'auto' (default) performs truncation automatically;
3389
+ * 'disabled' turns truncation off.
3390
+ */
3391
+ truncation: z21.enum(["auto", "disabled"]).nullish(),
3392
+ /**
3393
+ * A unique identifier representing your end-user, which can help OpenAI to
3394
+ * monitor and detect abuse.
3395
+ * Defaults to `undefined`.
3396
+ * @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
3397
+ */
3398
+ user: z21.string().nullish(),
3399
+ /**
3400
+ * Override the system message mode for this model.
3401
+ * - 'system': Use the 'system' role for system messages (default for most models)
3402
+ * - 'developer': Use the 'developer' role for system messages (used by reasoning models)
3403
+ * - 'remove': Remove system messages entirely
3404
+ *
3405
+ * If not specified, the mode is automatically determined based on the model.
3406
+ */
3407
+ systemMessageMode: z21.enum(["system", "developer", "remove"]).optional(),
3408
+ /**
3409
+ * Force treating this model as a reasoning model.
3410
+ *
3411
+ * This is useful for "stealth" reasoning models (e.g. via a custom baseURL)
3412
+ * where the model ID is not recognized by the SDK's allowlist.
3413
+ *
3414
+ * When enabled, the SDK applies reasoning-model parameter compatibility rules
3415
+ * and defaults `systemMessageMode` to `developer` unless overridden.
3416
+ */
3417
+ forceReasoning: z21.boolean().optional(),
3418
+ /**
3419
+ * Restrict the callable tools to a subset while keeping the full tools
3420
+ * list intact, so prompt caching is preserved across requests with
3421
+ * different allowlists.
3422
+ *
3423
+ * When set, this overrides the request-level `toolChoice` and emits
3424
+ * `tool_choice: { type: "allowed_tools", mode, tools }` on the wire.
3425
+ *
3426
+ * @see https://developers.openai.com/api/reference/resources/responses/methods/create#(resource)%20responses%20%3E%20(model)%20tool_choice_allowed%20%3E%20(schema)
3427
+ */
3428
+ allowedTools: z21.object({
3429
+ toolNames: z21.array(z21.string()).min(1),
3430
+ mode: z21.enum(["auto", "required"]).optional()
3431
+ }).optional()
3432
+ })
3433
+ )
3434
+ );
3435
+ var openaiResponsesSystemMessageOptionsSchema = lazySchema20(
3436
+ () => zodSchema20(
3437
+ z21.object({
3438
+ /**
3439
+ * Emit a configuration update at this position in Responses history.
3440
+ * Requires empty system message content and the same supported
3441
+ * configuration as the request-level reasoningEffortUpdate option.
3442
+ * Unsupported historical updates throw instead of being omitted.
3443
+ *
3444
+ * @see https://developers.openai.com/api/docs/guides/reasoning#change-reasoning-mid-conversation
3445
+ */
3446
+ reasoningEffortUpdate: z21.enum(["low", "medium", "high", "xhigh", "max"]).optional()
3447
+ })
3448
+ )
3449
+ );
3148
3450
 
3149
3451
  // src/responses/expand-parallel-tool-call.ts
3150
3452
  import {
@@ -3427,6 +3729,7 @@ async function convertToOpenAIResponsesInput({
3427
3729
  store,
3428
3730
  hasConversation = false,
3429
3731
  hasPreviousResponseId = false,
3732
+ configurationUpdateUnsupportedReason,
3430
3733
  hasLocalShellTool = false,
3431
3734
  hasShellTool = false,
3432
3735
  hasApplyPatchTool = false,
@@ -3446,6 +3749,33 @@ async function convertToOpenAIResponsesInput({
3446
3749
  for (const { role, content, providerOptions } of prompt) {
3447
3750
  switch (role) {
3448
3751
  case "system": {
3752
+ let options = await parseProviderOptions5({
3753
+ provider: providerOptionsName,
3754
+ providerOptions,
3755
+ schema: openaiResponsesSystemMessageOptionsSchema
3756
+ });
3757
+ if (options == null && providerOptionsName !== "openai") {
3758
+ options = await parseProviderOptions5({
3759
+ provider: "openai",
3760
+ providerOptions,
3761
+ schema: openaiResponsesSystemMessageOptionsSchema
3762
+ });
3763
+ }
3764
+ const effort = options == null ? void 0 : options.reasoningEffortUpdate;
3765
+ if (effort != null) {
3766
+ const unsupportedReason = content !== "" ? "Message-level reasoningEffortUpdate requires empty system message content." : configurationUpdateUnsupportedReason;
3767
+ if (unsupportedReason != null) {
3768
+ throw new UnsupportedFunctionalityError4({
3769
+ functionality: "Message-level reasoningEffortUpdate",
3770
+ message: unsupportedReason
3771
+ });
3772
+ }
3773
+ input.push({
3774
+ type: "configuration_update",
3775
+ reasoning: { effort }
3776
+ });
3777
+ break;
3778
+ }
3449
3779
  switch (systemMessageMode) {
3450
3780
  case "system": {
3451
3781
  const promptCacheBreakpoint = getPromptCacheBreakpoint2(
@@ -4162,9 +4492,9 @@ ${text}`,
4162
4492
  }
4163
4493
  return { input, warnings };
4164
4494
  }
4165
- var openaiResponsesReasoningProviderOptionsSchema = z21.object({
4166
- itemId: z21.string().nullish(),
4167
- reasoningEncryptedContent: z21.string().nullish()
4495
+ var openaiResponsesReasoningProviderOptionsSchema = z22.object({
4496
+ itemId: z22.string().nullish(),
4497
+ reasoningEncryptedContent: z22.string().nullish()
4168
4498
  });
4169
4499
 
4170
4500
  // src/responses/map-openai-responses-finish-reason.ts
@@ -4187,77 +4517,77 @@ function mapOpenAIResponseFinishReason({
4187
4517
 
4188
4518
  // src/responses/openai-responses-api.ts
4189
4519
  import {
4190
- lazySchema as lazySchema20,
4191
- zodSchema as zodSchema20
4520
+ lazySchema as lazySchema21,
4521
+ zodSchema as zodSchema21
4192
4522
  } from "@ai-sdk/provider-utils";
4193
- import { z as z22 } from "zod/v4";
4194
- var jsonValueSchema2 = z22.lazy(
4195
- () => z22.union([
4196
- z22.string(),
4197
- z22.number(),
4198
- z22.boolean(),
4199
- z22.null(),
4200
- z22.array(jsonValueSchema2),
4201
- z22.record(z22.string(), jsonValueSchema2.optional())
4523
+ import { z as z23 } from "zod/v4";
4524
+ var jsonValueSchema2 = z23.lazy(
4525
+ () => z23.union([
4526
+ z23.string(),
4527
+ z23.number(),
4528
+ z23.boolean(),
4529
+ z23.null(),
4530
+ z23.array(jsonValueSchema2),
4531
+ z23.record(z23.string(), jsonValueSchema2.optional())
4202
4532
  ])
4203
4533
  );
4204
- var jsonObjectSchema = z22.record(z22.string(), jsonValueSchema2.optional());
4205
- var openaiResponsesUsageSchema = z22.intersection(
4534
+ var jsonObjectSchema = z23.record(z23.string(), jsonValueSchema2.optional());
4535
+ var openaiResponsesUsageSchema = z23.intersection(
4206
4536
  jsonObjectSchema,
4207
- z22.object({
4208
- input_tokens: z22.number(),
4209
- input_tokens_details: z22.intersection(
4537
+ z23.object({
4538
+ input_tokens: z23.number(),
4539
+ input_tokens_details: z23.intersection(
4210
4540
  jsonObjectSchema,
4211
- z22.object({
4212
- cached_tokens: z22.number().nullish(),
4213
- cache_write_tokens: z22.number().nullish(),
4214
- orchestration_input_tokens: z22.number().nullish(),
4215
- orchestration_input_cached_tokens: z22.number().nullish()
4541
+ z23.object({
4542
+ cached_tokens: z23.number().nullish(),
4543
+ cache_write_tokens: z23.number().nullish(),
4544
+ orchestration_input_tokens: z23.number().nullish(),
4545
+ orchestration_input_cached_tokens: z23.number().nullish()
4216
4546
  })
4217
4547
  ).nullish(),
4218
- output_tokens: z22.number(),
4219
- output_tokens_details: z22.intersection(
4548
+ output_tokens: z23.number(),
4549
+ output_tokens_details: z23.intersection(
4220
4550
  jsonObjectSchema,
4221
- z22.object({
4222
- reasoning_tokens: z22.number().nullish(),
4223
- orchestration_output_tokens: z22.number().nullish()
4551
+ z23.object({
4552
+ reasoning_tokens: z23.number().nullish(),
4553
+ orchestration_output_tokens: z23.number().nullish()
4224
4554
  })
4225
4555
  ).nullish(),
4226
- total_tokens: z22.number().optional()
4556
+ total_tokens: z23.number().optional()
4227
4557
  })
4228
4558
  );
4229
4559
  function isRecord(value) {
4230
4560
  return value != null && typeof value === "object" && !Array.isArray(value);
4231
4561
  }
4232
- var openaiResponsesLocalShellCallSchema = z22.object({
4233
- type: z22.literal("local_shell_call"),
4234
- id: z22.string(),
4235
- call_id: z22.string(),
4236
- action: z22.object({
4237
- type: z22.literal("exec"),
4238
- command: z22.array(z22.string()),
4239
- timeout_ms: z22.number().optional(),
4240
- user: z22.string().optional(),
4241
- working_directory: z22.string().optional(),
4242
- env: z22.record(z22.string(), z22.string()).optional()
4562
+ var openaiResponsesLocalShellCallSchema = z23.object({
4563
+ type: z23.literal("local_shell_call"),
4564
+ id: z23.string(),
4565
+ call_id: z23.string(),
4566
+ action: z23.object({
4567
+ type: z23.literal("exec"),
4568
+ command: z23.array(z23.string()),
4569
+ timeout_ms: z23.number().optional(),
4570
+ user: z23.string().optional(),
4571
+ working_directory: z23.string().optional(),
4572
+ env: z23.record(z23.string(), z23.string()).optional()
4243
4573
  })
4244
4574
  });
4245
- var openaiResponsesNestedErrorChunkSchema = z22.object({
4246
- type: z22.literal("error"),
4247
- sequence_number: z22.number(),
4248
- error: z22.object({
4249
- type: z22.string(),
4250
- code: z22.string(),
4251
- message: z22.string(),
4252
- param: z22.string().nullish()
4575
+ var openaiResponsesNestedErrorChunkSchema = z23.object({
4576
+ type: z23.literal("error"),
4577
+ sequence_number: z23.number(),
4578
+ error: z23.object({
4579
+ type: z23.string(),
4580
+ code: z23.string(),
4581
+ message: z23.string(),
4582
+ param: z23.string().nullish()
4253
4583
  })
4254
4584
  });
4255
- var openaiResponsesErrorChunkSchema = z22.object({
4256
- type: z22.literal("error"),
4257
- sequence_number: z22.number(),
4258
- code: z22.string().nullish(),
4259
- message: z22.string(),
4260
- param: z22.string().nullish()
4585
+ var openaiResponsesErrorChunkSchema = z23.object({
4586
+ type: z23.literal("error"),
4587
+ sequence_number: z23.number(),
4588
+ code: z23.string().nullish(),
4589
+ message: z23.string(),
4590
+ param: z23.string().nullish()
4261
4591
  });
4262
4592
  var openaiResponsesModeledChunkTypes = /* @__PURE__ */ new Set([
4263
4593
  "error",
@@ -4313,1105 +4643,819 @@ function isModeledOpenAIResponsesChunk(value) {
4313
4643
  }
4314
4644
  return openaiResponsesModeledOutputItemTypes.has(value.item.type);
4315
4645
  }
4316
- var openaiResponsesChunkSchema = lazySchema20(
4317
- () => zodSchema20(
4318
- z22.union([
4319
- z22.object({
4320
- type: z22.literal("response.output_text.delta"),
4321
- item_id: z22.string(),
4322
- delta: z22.string(),
4323
- logprobs: z22.array(
4324
- z22.object({
4325
- token: z22.string(),
4326
- logprob: z22.number(),
4327
- top_logprobs: z22.array(
4328
- z22.object({
4329
- token: z22.string(),
4330
- logprob: z22.number()
4646
+ var openaiResponsesChunkSchema = lazySchema21(
4647
+ () => zodSchema21(
4648
+ z23.union([
4649
+ z23.object({
4650
+ type: z23.literal("response.output_text.delta"),
4651
+ item_id: z23.string(),
4652
+ delta: z23.string(),
4653
+ logprobs: z23.array(
4654
+ z23.object({
4655
+ token: z23.string(),
4656
+ logprob: z23.number(),
4657
+ top_logprobs: z23.array(
4658
+ z23.object({
4659
+ token: z23.string(),
4660
+ logprob: z23.number()
4331
4661
  })
4332
4662
  )
4333
4663
  })
4334
4664
  ).nullish()
4335
4665
  }),
4336
- z22.object({
4337
- type: z22.enum(["response.completed", "response.incomplete"]),
4338
- response: z22.object({
4339
- incomplete_details: z22.object({ reason: z22.string() }).nullish(),
4666
+ z23.object({
4667
+ type: z23.enum(["response.completed", "response.incomplete"]),
4668
+ response: z23.object({
4669
+ incomplete_details: z23.object({ reason: z23.string() }).nullish(),
4340
4670
  usage: openaiResponsesUsageSchema.nullish(),
4341
- reasoning: z22.object({
4342
- context: z22.string().nullish()
4671
+ reasoning: z23.object({
4672
+ context: z23.string().nullish()
4343
4673
  }).nullish(),
4344
- service_tier: z22.string().nullish()
4674
+ service_tier: z23.string().nullish()
4345
4675
  })
4346
4676
  }),
4347
- z22.object({
4348
- type: z22.literal("response.failed"),
4349
- sequence_number: z22.number(),
4350
- response: z22.object({
4351
- error: z22.object({
4352
- code: z22.string().nullish(),
4353
- message: z22.string()
4677
+ z23.object({
4678
+ type: z23.literal("response.failed"),
4679
+ sequence_number: z23.number(),
4680
+ response: z23.object({
4681
+ error: z23.object({
4682
+ code: z23.string().nullish(),
4683
+ message: z23.string()
4354
4684
  }).nullish(),
4355
- incomplete_details: z22.object({ reason: z22.string() }).nullish(),
4685
+ incomplete_details: z23.object({ reason: z23.string() }).nullish(),
4356
4686
  usage: openaiResponsesUsageSchema.nullish(),
4357
- reasoning: z22.object({
4358
- context: z22.string().nullish()
4687
+ reasoning: z23.object({
4688
+ context: z23.string().nullish()
4359
4689
  }).nullish(),
4360
- service_tier: z22.string().nullish()
4690
+ service_tier: z23.string().nullish()
4361
4691
  })
4362
4692
  }),
4363
- z22.object({
4364
- type: z22.literal("response.created"),
4365
- response: z22.object({
4366
- id: z22.string(),
4367
- created_at: z22.number(),
4368
- model: z22.string(),
4369
- service_tier: z22.string().nullish()
4693
+ z23.object({
4694
+ type: z23.literal("response.created"),
4695
+ response: z23.object({
4696
+ id: z23.string(),
4697
+ created_at: z23.number(),
4698
+ model: z23.string(),
4699
+ service_tier: z23.string().nullish()
4370
4700
  })
4371
4701
  }),
4372
- z22.object({
4373
- type: z22.literal("response.output_item.added"),
4374
- output_index: z22.number(),
4375
- item: z22.discriminatedUnion("type", [
4376
- z22.object({
4377
- type: z22.literal("message"),
4378
- id: z22.string(),
4379
- phase: z22.enum(["commentary", "final_answer"]).nullish()
4702
+ z23.object({
4703
+ type: z23.literal("response.output_item.added"),
4704
+ output_index: z23.number(),
4705
+ item: z23.discriminatedUnion("type", [
4706
+ z23.object({
4707
+ type: z23.literal("message"),
4708
+ id: z23.string(),
4709
+ phase: z23.enum(["commentary", "final_answer"]).nullish()
4380
4710
  }),
4381
- z22.object({
4382
- type: z22.literal("reasoning"),
4383
- id: z22.string(),
4384
- encrypted_content: z22.string().nullish()
4711
+ z23.object({
4712
+ type: z23.literal("reasoning"),
4713
+ id: z23.string(),
4714
+ encrypted_content: z23.string().nullish()
4385
4715
  }),
4386
- z22.object({
4387
- type: z22.literal("function_call"),
4388
- id: z22.string(),
4389
- call_id: z22.string(),
4390
- name: z22.string(),
4391
- arguments: z22.string(),
4392
- async: z22.boolean().nullish(),
4393
- namespace: z22.string().nullish()
4716
+ z23.object({
4717
+ type: z23.literal("function_call"),
4718
+ id: z23.string(),
4719
+ call_id: z23.string(),
4720
+ name: z23.string(),
4721
+ arguments: z23.string(),
4722
+ async: z23.boolean().nullish(),
4723
+ namespace: z23.string().nullish()
4394
4724
  }),
4395
- z22.object({
4396
- type: z22.literal("web_search_call"),
4397
- id: z22.string(),
4398
- status: z22.string()
4725
+ z23.object({
4726
+ type: z23.literal("web_search_call"),
4727
+ id: z23.string(),
4728
+ status: z23.string()
4399
4729
  }),
4400
- z22.object({
4401
- type: z22.literal("computer_call"),
4402
- id: z22.string(),
4403
- status: z22.string()
4730
+ z23.object({
4731
+ type: z23.literal("computer_call"),
4732
+ id: z23.string(),
4733
+ status: z23.string()
4404
4734
  }),
4405
- z22.object({
4406
- type: z22.literal("file_search_call"),
4407
- id: z22.string()
4735
+ z23.object({
4736
+ type: z23.literal("file_search_call"),
4737
+ id: z23.string()
4408
4738
  }),
4409
4739
  openaiResponsesLocalShellCallSchema,
4410
- z22.object({
4411
- type: z22.literal("image_generation_call"),
4412
- id: z22.string()
4740
+ z23.object({
4741
+ type: z23.literal("image_generation_call"),
4742
+ id: z23.string()
4413
4743
  }),
4414
- z22.object({
4415
- type: z22.literal("code_interpreter_call"),
4416
- id: z22.string(),
4417
- container_id: z22.string(),
4418
- code: z22.string().nullable(),
4419
- outputs: z22.array(
4420
- z22.discriminatedUnion("type", [
4421
- z22.object({ type: z22.literal("logs"), logs: z22.string() }),
4422
- z22.object({ type: z22.literal("image"), url: z22.string() })
4744
+ z23.object({
4745
+ type: z23.literal("code_interpreter_call"),
4746
+ id: z23.string(),
4747
+ container_id: z23.string(),
4748
+ code: z23.string().nullable(),
4749
+ outputs: z23.array(
4750
+ z23.discriminatedUnion("type", [
4751
+ z23.object({ type: z23.literal("logs"), logs: z23.string() }),
4752
+ z23.object({ type: z23.literal("image"), url: z23.string() })
4423
4753
  ])
4424
4754
  ).nullable(),
4425
- status: z22.string()
4755
+ status: z23.string()
4426
4756
  }),
4427
- z22.object({
4428
- type: z22.literal("mcp_call"),
4429
- id: z22.string(),
4430
- status: z22.string(),
4431
- approval_request_id: z22.string().nullish()
4757
+ z23.object({
4758
+ type: z23.literal("mcp_call"),
4759
+ id: z23.string(),
4760
+ status: z23.string(),
4761
+ approval_request_id: z23.string().nullish()
4432
4762
  }),
4433
- z22.object({
4434
- type: z22.literal("mcp_list_tools"),
4435
- id: z22.string()
4763
+ z23.object({
4764
+ type: z23.literal("mcp_list_tools"),
4765
+ id: z23.string()
4436
4766
  }),
4437
- z22.object({
4438
- type: z22.literal("mcp_approval_request"),
4439
- id: z22.string()
4767
+ z23.object({
4768
+ type: z23.literal("mcp_approval_request"),
4769
+ id: z23.string()
4440
4770
  }),
4441
- z22.object({
4442
- type: z22.literal("apply_patch_call"),
4443
- id: z22.string(),
4444
- call_id: z22.string(),
4445
- status: z22.enum(["in_progress", "completed"]),
4446
- operation: z22.discriminatedUnion("type", [
4447
- z22.object({
4448
- type: z22.literal("create_file"),
4449
- path: z22.string(),
4450
- diff: z22.string()
4771
+ z23.object({
4772
+ type: z23.literal("apply_patch_call"),
4773
+ id: z23.string(),
4774
+ call_id: z23.string(),
4775
+ status: z23.enum(["in_progress", "completed"]),
4776
+ operation: z23.discriminatedUnion("type", [
4777
+ z23.object({
4778
+ type: z23.literal("create_file"),
4779
+ path: z23.string(),
4780
+ diff: z23.string()
4451
4781
  }),
4452
- z22.object({
4453
- type: z22.literal("delete_file"),
4454
- path: z22.string()
4782
+ z23.object({
4783
+ type: z23.literal("delete_file"),
4784
+ path: z23.string()
4455
4785
  }),
4456
- z22.object({
4457
- type: z22.literal("update_file"),
4458
- path: z22.string(),
4459
- diff: z22.string()
4786
+ z23.object({
4787
+ type: z23.literal("update_file"),
4788
+ path: z23.string(),
4789
+ diff: z23.string()
4460
4790
  })
4461
4791
  ])
4462
4792
  }),
4463
- z22.object({
4464
- type: z22.literal("custom_tool_call"),
4465
- id: z22.string(),
4466
- call_id: z22.string(),
4467
- name: z22.string(),
4468
- input: z22.string(),
4469
- async: z22.boolean().nullish()
4793
+ z23.object({
4794
+ type: z23.literal("custom_tool_call"),
4795
+ id: z23.string(),
4796
+ call_id: z23.string(),
4797
+ name: z23.string(),
4798
+ input: z23.string(),
4799
+ async: z23.boolean().nullish()
4470
4800
  }),
4471
- z22.object({
4472
- type: z22.literal("shell_call"),
4473
- id: z22.string(),
4474
- call_id: z22.string(),
4475
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4476
- action: z22.object({
4477
- commands: z22.array(z22.string())
4801
+ z23.object({
4802
+ type: z23.literal("shell_call"),
4803
+ id: z23.string(),
4804
+ call_id: z23.string(),
4805
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
4806
+ action: z23.object({
4807
+ commands: z23.array(z23.string())
4478
4808
  })
4479
4809
  }),
4480
- z22.object({
4481
- type: z22.literal("shell_call_output"),
4482
- id: z22.string(),
4483
- call_id: z22.string(),
4484
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4485
- output: z22.array(
4486
- z22.object({
4487
- stdout: z22.string(),
4488
- stderr: z22.string(),
4489
- outcome: z22.discriminatedUnion("type", [
4490
- z22.object({ type: z22.literal("timeout") }),
4491
- z22.object({
4492
- type: z22.literal("exit"),
4493
- exit_code: z22.number()
4810
+ z23.object({
4811
+ type: z23.literal("shell_call_output"),
4812
+ id: z23.string(),
4813
+ call_id: z23.string(),
4814
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
4815
+ output: z23.array(
4816
+ z23.object({
4817
+ stdout: z23.string(),
4818
+ stderr: z23.string(),
4819
+ outcome: z23.discriminatedUnion("type", [
4820
+ z23.object({ type: z23.literal("timeout") }),
4821
+ z23.object({
4822
+ type: z23.literal("exit"),
4823
+ exit_code: z23.number()
4494
4824
  })
4495
4825
  ])
4496
4826
  })
4497
4827
  )
4498
4828
  }),
4499
- z22.object({
4500
- type: z22.literal("tool_search_call"),
4501
- id: z22.string(),
4502
- execution: z22.enum(["server", "client"]),
4503
- call_id: z22.string().nullable(),
4504
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4505
- arguments: z22.unknown()
4829
+ z23.object({
4830
+ type: z23.literal("tool_search_call"),
4831
+ id: z23.string(),
4832
+ execution: z23.enum(["server", "client"]),
4833
+ call_id: z23.string().nullable(),
4834
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
4835
+ arguments: z23.unknown()
4506
4836
  }),
4507
- z22.object({
4508
- type: z22.literal("tool_search_output"),
4509
- id: z22.string(),
4510
- execution: z22.enum(["server", "client"]),
4511
- call_id: z22.string().nullable(),
4512
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4513
- tools: z22.array(z22.record(z22.string(), jsonValueSchema2.optional()))
4837
+ z23.object({
4838
+ type: z23.literal("tool_search_output"),
4839
+ id: z23.string(),
4840
+ execution: z23.enum(["server", "client"]),
4841
+ call_id: z23.string().nullable(),
4842
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
4843
+ tools: z23.array(z23.record(z23.string(), jsonValueSchema2.optional()))
4514
4844
  })
4515
4845
  ])
4516
4846
  }),
4517
- z22.object({
4518
- type: z22.literal("response.output_item.done"),
4519
- output_index: z22.number(),
4520
- item: z22.discriminatedUnion("type", [
4521
- z22.object({
4522
- type: z22.literal("message"),
4523
- id: z22.string(),
4524
- phase: z22.enum(["commentary", "final_answer"]).nullish()
4847
+ z23.object({
4848
+ type: z23.literal("response.output_item.done"),
4849
+ output_index: z23.number(),
4850
+ item: z23.discriminatedUnion("type", [
4851
+ z23.object({
4852
+ type: z23.literal("message"),
4853
+ id: z23.string(),
4854
+ phase: z23.enum(["commentary", "final_answer"]).nullish()
4525
4855
  }),
4526
- z22.object({
4527
- type: z22.literal("reasoning"),
4528
- id: z22.string(),
4529
- encrypted_content: z22.string().nullish()
4856
+ z23.object({
4857
+ type: z23.literal("reasoning"),
4858
+ id: z23.string(),
4859
+ encrypted_content: z23.string().nullish()
4530
4860
  }),
4531
- z22.object({
4532
- type: z22.literal("function_call"),
4533
- id: z22.string(),
4534
- call_id: z22.string(),
4535
- name: z22.string(),
4536
- arguments: z22.string(),
4537
- async: z22.boolean().nullish(),
4538
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4539
- namespace: z22.string().nullish()
4861
+ z23.object({
4862
+ type: z23.literal("function_call"),
4863
+ id: z23.string(),
4864
+ call_id: z23.string(),
4865
+ name: z23.string(),
4866
+ arguments: z23.string(),
4867
+ async: z23.boolean().nullish(),
4868
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
4869
+ namespace: z23.string().nullish()
4540
4870
  }),
4541
- z22.object({
4542
- type: z22.literal("custom_tool_call"),
4543
- id: z22.string(),
4544
- call_id: z22.string(),
4545
- name: z22.string(),
4546
- input: z22.string(),
4547
- async: z22.boolean().nullish(),
4548
- status: z22.enum(["in_progress", "completed", "incomplete"])
4871
+ z23.object({
4872
+ type: z23.literal("custom_tool_call"),
4873
+ id: z23.string(),
4874
+ call_id: z23.string(),
4875
+ name: z23.string(),
4876
+ input: z23.string(),
4877
+ async: z23.boolean().nullish(),
4878
+ status: z23.enum(["in_progress", "completed", "incomplete"])
4549
4879
  }),
4550
- z22.object({
4551
- type: z22.literal("code_interpreter_call"),
4552
- id: z22.string(),
4553
- code: z22.string().nullable(),
4554
- container_id: z22.string(),
4555
- outputs: z22.array(
4556
- z22.discriminatedUnion("type", [
4557
- z22.object({ type: z22.literal("logs"), logs: z22.string() }),
4558
- z22.object({ type: z22.literal("image"), url: z22.string() })
4880
+ z23.object({
4881
+ type: z23.literal("code_interpreter_call"),
4882
+ id: z23.string(),
4883
+ code: z23.string().nullable(),
4884
+ container_id: z23.string(),
4885
+ outputs: z23.array(
4886
+ z23.discriminatedUnion("type", [
4887
+ z23.object({ type: z23.literal("logs"), logs: z23.string() }),
4888
+ z23.object({ type: z23.literal("image"), url: z23.string() })
4559
4889
  ])
4560
4890
  ).nullable()
4561
4891
  }),
4562
- z22.object({
4563
- type: z22.literal("image_generation_call"),
4564
- id: z22.string(),
4565
- result: z22.string()
4892
+ z23.object({
4893
+ type: z23.literal("image_generation_call"),
4894
+ id: z23.string(),
4895
+ result: z23.string()
4566
4896
  }),
4567
- z22.object({
4568
- type: z22.literal("web_search_call"),
4569
- id: z22.string(),
4570
- status: z22.string(),
4571
- action: z22.discriminatedUnion("type", [
4572
- z22.object({
4573
- type: z22.literal("search"),
4574
- query: z22.string().nullish(),
4575
- queries: z22.array(z22.string()).nullish(),
4576
- sources: z22.array(
4577
- z22.discriminatedUnion("type", [
4578
- z22.object({ type: z22.literal("url"), url: z22.string() }),
4579
- z22.object({ type: z22.literal("api"), name: z22.string() })
4897
+ z23.object({
4898
+ type: z23.literal("web_search_call"),
4899
+ id: z23.string(),
4900
+ status: z23.string(),
4901
+ action: z23.discriminatedUnion("type", [
4902
+ z23.object({
4903
+ type: z23.literal("search"),
4904
+ query: z23.string().nullish(),
4905
+ queries: z23.array(z23.string()).nullish(),
4906
+ sources: z23.array(
4907
+ z23.discriminatedUnion("type", [
4908
+ z23.object({ type: z23.literal("url"), url: z23.string() }),
4909
+ z23.object({ type: z23.literal("api"), name: z23.string() })
4580
4910
  ])
4581
4911
  ).nullish()
4582
4912
  }),
4583
- z22.object({
4584
- type: z22.literal("open_page"),
4585
- url: z22.string().nullish()
4913
+ z23.object({
4914
+ type: z23.literal("open_page"),
4915
+ url: z23.string().nullish()
4586
4916
  }),
4587
- z22.object({
4588
- type: z22.literal("find_in_page"),
4589
- url: z22.string().nullish(),
4590
- pattern: z22.string().nullish()
4917
+ z23.object({
4918
+ type: z23.literal("find_in_page"),
4919
+ url: z23.string().nullish(),
4920
+ pattern: z23.string().nullish()
4591
4921
  })
4592
4922
  ]).nullish()
4593
4923
  }),
4594
- z22.object({
4595
- type: z22.literal("file_search_call"),
4596
- id: z22.string(),
4597
- queries: z22.array(z22.string()),
4598
- results: z22.array(
4599
- z22.object({
4600
- attributes: z22.record(
4601
- z22.string(),
4602
- z22.union([z22.string(), z22.number(), z22.boolean()])
4924
+ z23.object({
4925
+ type: z23.literal("file_search_call"),
4926
+ id: z23.string(),
4927
+ queries: z23.array(z23.string()),
4928
+ results: z23.array(
4929
+ z23.object({
4930
+ attributes: z23.record(
4931
+ z23.string(),
4932
+ z23.union([z23.string(), z23.number(), z23.boolean()])
4603
4933
  ),
4604
- file_id: z22.string(),
4605
- filename: z22.string(),
4606
- score: z22.number(),
4607
- text: z22.string()
4934
+ file_id: z23.string(),
4935
+ filename: z23.string(),
4936
+ score: z23.number(),
4937
+ text: z23.string()
4608
4938
  })
4609
4939
  ).nullish()
4610
4940
  }),
4611
4941
  openaiResponsesLocalShellCallSchema,
4612
- z22.object({
4613
- type: z22.literal("computer_call"),
4614
- id: z22.string(),
4615
- status: z22.literal("completed")
4942
+ z23.object({
4943
+ type: z23.literal("computer_call"),
4944
+ id: z23.string(),
4945
+ status: z23.literal("completed")
4616
4946
  }),
4617
- z22.object({
4618
- type: z22.literal("mcp_call"),
4619
- id: z22.string(),
4620
- status: z22.string(),
4621
- arguments: z22.string(),
4622
- name: z22.string(),
4623
- server_label: z22.string(),
4624
- output: z22.string().nullish(),
4625
- error: z22.union([
4626
- z22.string(),
4627
- z22.object({
4628
- type: z22.string().optional(),
4629
- code: z22.union([z22.number(), z22.string()]).optional(),
4630
- message: z22.string().optional()
4947
+ z23.object({
4948
+ type: z23.literal("mcp_call"),
4949
+ id: z23.string(),
4950
+ status: z23.string(),
4951
+ arguments: z23.string(),
4952
+ name: z23.string(),
4953
+ server_label: z23.string(),
4954
+ output: z23.string().nullish(),
4955
+ error: z23.union([
4956
+ z23.string(),
4957
+ z23.object({
4958
+ type: z23.string().optional(),
4959
+ code: z23.union([z23.number(), z23.string()]).optional(),
4960
+ message: z23.string().optional()
4631
4961
  }).loose()
4632
4962
  ]).nullish(),
4633
- approval_request_id: z22.string().nullish()
4963
+ approval_request_id: z23.string().nullish()
4634
4964
  }),
4635
- z22.object({
4636
- type: z22.literal("mcp_list_tools"),
4637
- id: z22.string(),
4638
- server_label: z22.string(),
4639
- tools: z22.array(
4640
- z22.object({
4641
- name: z22.string(),
4642
- description: z22.string().optional(),
4643
- input_schema: z22.any(),
4644
- annotations: z22.record(z22.string(), z22.unknown()).optional()
4965
+ z23.object({
4966
+ type: z23.literal("mcp_list_tools"),
4967
+ id: z23.string(),
4968
+ server_label: z23.string(),
4969
+ tools: z23.array(
4970
+ z23.object({
4971
+ name: z23.string(),
4972
+ description: z23.string().optional(),
4973
+ input_schema: z23.any(),
4974
+ annotations: z23.record(z23.string(), z23.unknown()).optional()
4645
4975
  })
4646
4976
  ),
4647
- error: z22.union([
4648
- z22.string(),
4649
- z22.object({
4650
- type: z22.string().optional(),
4651
- code: z22.union([z22.number(), z22.string()]).optional(),
4652
- message: z22.string().optional()
4977
+ error: z23.union([
4978
+ z23.string(),
4979
+ z23.object({
4980
+ type: z23.string().optional(),
4981
+ code: z23.union([z23.number(), z23.string()]).optional(),
4982
+ message: z23.string().optional()
4653
4983
  }).loose()
4654
4984
  ]).optional()
4655
4985
  }),
4656
- z22.object({
4657
- type: z22.literal("mcp_approval_request"),
4658
- id: z22.string(),
4659
- server_label: z22.string(),
4660
- name: z22.string(),
4661
- arguments: z22.string(),
4662
- approval_request_id: z22.string().optional()
4986
+ z23.object({
4987
+ type: z23.literal("mcp_approval_request"),
4988
+ id: z23.string(),
4989
+ server_label: z23.string(),
4990
+ name: z23.string(),
4991
+ arguments: z23.string(),
4992
+ approval_request_id: z23.string().optional()
4663
4993
  }),
4664
- z22.object({
4665
- type: z22.literal("apply_patch_call"),
4666
- id: z22.string(),
4667
- call_id: z22.string(),
4668
- status: z22.enum(["in_progress", "completed"]),
4669
- operation: z22.discriminatedUnion("type", [
4670
- z22.object({
4671
- type: z22.literal("create_file"),
4672
- path: z22.string(),
4673
- diff: z22.string()
4994
+ z23.object({
4995
+ type: z23.literal("apply_patch_call"),
4996
+ id: z23.string(),
4997
+ call_id: z23.string(),
4998
+ status: z23.enum(["in_progress", "completed"]),
4999
+ operation: z23.discriminatedUnion("type", [
5000
+ z23.object({
5001
+ type: z23.literal("create_file"),
5002
+ path: z23.string(),
5003
+ diff: z23.string()
4674
5004
  }),
4675
- z22.object({
4676
- type: z22.literal("delete_file"),
4677
- path: z22.string()
5005
+ z23.object({
5006
+ type: z23.literal("delete_file"),
5007
+ path: z23.string()
4678
5008
  }),
4679
- z22.object({
4680
- type: z22.literal("update_file"),
4681
- path: z22.string(),
4682
- diff: z22.string()
5009
+ z23.object({
5010
+ type: z23.literal("update_file"),
5011
+ path: z23.string(),
5012
+ diff: z23.string()
4683
5013
  })
4684
5014
  ])
4685
5015
  }),
4686
- z22.object({
4687
- type: z22.literal("shell_call"),
4688
- id: z22.string(),
4689
- call_id: z22.string(),
4690
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4691
- action: z22.object({
4692
- commands: z22.array(z22.string())
5016
+ z23.object({
5017
+ type: z23.literal("shell_call"),
5018
+ id: z23.string(),
5019
+ call_id: z23.string(),
5020
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5021
+ action: z23.object({
5022
+ commands: z23.array(z23.string())
4693
5023
  })
4694
5024
  }),
4695
- z22.object({
4696
- type: z22.literal("shell_call_output"),
4697
- id: z22.string(),
4698
- call_id: z22.string(),
4699
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4700
- output: z22.array(
4701
- z22.object({
4702
- stdout: z22.string(),
4703
- stderr: z22.string(),
4704
- outcome: z22.discriminatedUnion("type", [
4705
- z22.object({ type: z22.literal("timeout") }),
4706
- z22.object({
4707
- type: z22.literal("exit"),
4708
- exit_code: z22.number()
5025
+ z23.object({
5026
+ type: z23.literal("shell_call_output"),
5027
+ id: z23.string(),
5028
+ call_id: z23.string(),
5029
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5030
+ output: z23.array(
5031
+ z23.object({
5032
+ stdout: z23.string(),
5033
+ stderr: z23.string(),
5034
+ outcome: z23.discriminatedUnion("type", [
5035
+ z23.object({ type: z23.literal("timeout") }),
5036
+ z23.object({
5037
+ type: z23.literal("exit"),
5038
+ exit_code: z23.number()
4709
5039
  })
4710
5040
  ])
4711
5041
  })
4712
5042
  )
4713
5043
  }),
4714
- z22.object({
4715
- type: z22.literal("tool_search_call"),
4716
- id: z22.string(),
4717
- execution: z22.enum(["server", "client"]),
4718
- call_id: z22.string().nullable(),
4719
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4720
- arguments: z22.unknown()
5044
+ z23.object({
5045
+ type: z23.literal("tool_search_call"),
5046
+ id: z23.string(),
5047
+ execution: z23.enum(["server", "client"]),
5048
+ call_id: z23.string().nullable(),
5049
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5050
+ arguments: z23.unknown()
4721
5051
  }),
4722
- z22.object({
4723
- type: z22.literal("tool_search_output"),
4724
- id: z22.string(),
4725
- execution: z22.enum(["server", "client"]),
4726
- call_id: z22.string().nullable(),
4727
- status: z22.enum(["in_progress", "completed", "incomplete"]),
4728
- tools: z22.array(z22.record(z22.string(), jsonValueSchema2.optional()))
5052
+ z23.object({
5053
+ type: z23.literal("tool_search_output"),
5054
+ id: z23.string(),
5055
+ execution: z23.enum(["server", "client"]),
5056
+ call_id: z23.string().nullable(),
5057
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5058
+ tools: z23.array(z23.record(z23.string(), jsonValueSchema2.optional()))
4729
5059
  })
4730
5060
  ])
4731
5061
  }),
4732
- z22.object({
4733
- type: z22.literal("response.function_call_arguments.delta"),
4734
- item_id: z22.string(),
4735
- output_index: z22.number(),
4736
- delta: z22.string()
5062
+ z23.object({
5063
+ type: z23.literal("response.function_call_arguments.delta"),
5064
+ item_id: z23.string(),
5065
+ output_index: z23.number(),
5066
+ delta: z23.string()
4737
5067
  }),
4738
- z22.object({
5068
+ z23.object({
4739
5069
  // `name` is documented as required but omitted from live API events:
4740
5070
  // https://github.com/openai/openai-openapi/issues/545
4741
- type: z22.literal("response.function_call_arguments.done"),
4742
- item_id: z22.string(),
4743
- output_index: z22.number(),
4744
- arguments: z22.string()
5071
+ type: z23.literal("response.function_call_arguments.done"),
5072
+ item_id: z23.string(),
5073
+ output_index: z23.number(),
5074
+ arguments: z23.string()
4745
5075
  }),
4746
- z22.object({
4747
- type: z22.literal("response.custom_tool_call_input.delta"),
4748
- item_id: z22.string(),
4749
- output_index: z22.number(),
4750
- delta: z22.string()
5076
+ z23.object({
5077
+ type: z23.literal("response.custom_tool_call_input.delta"),
5078
+ item_id: z23.string(),
5079
+ output_index: z23.number(),
5080
+ delta: z23.string()
4751
5081
  }),
4752
- z22.object({
4753
- type: z22.literal("response.image_generation_call.partial_image"),
4754
- item_id: z22.string(),
4755
- output_index: z22.number(),
4756
- partial_image_b64: z22.string()
5082
+ z23.object({
5083
+ type: z23.literal("response.image_generation_call.partial_image"),
5084
+ item_id: z23.string(),
5085
+ output_index: z23.number(),
5086
+ partial_image_b64: z23.string()
4757
5087
  }),
4758
- z22.object({
4759
- type: z22.literal("response.code_interpreter_call_code.delta"),
4760
- item_id: z22.string(),
4761
- output_index: z22.number(),
4762
- delta: z22.string()
5088
+ z23.object({
5089
+ type: z23.literal("response.code_interpreter_call_code.delta"),
5090
+ item_id: z23.string(),
5091
+ output_index: z23.number(),
5092
+ delta: z23.string()
4763
5093
  }),
4764
- z22.object({
4765
- type: z22.literal("response.code_interpreter_call_code.done"),
4766
- item_id: z22.string(),
4767
- output_index: z22.number(),
4768
- code: z22.string()
5094
+ z23.object({
5095
+ type: z23.literal("response.code_interpreter_call_code.done"),
5096
+ item_id: z23.string(),
5097
+ output_index: z23.number(),
5098
+ code: z23.string()
4769
5099
  }),
4770
- z22.object({
4771
- type: z22.literal("response.output_text.annotation.added"),
4772
- annotation: z22.discriminatedUnion("type", [
4773
- z22.object({
4774
- type: z22.literal("url_citation"),
4775
- start_index: z22.number(),
4776
- end_index: z22.number(),
4777
- url: z22.string(),
4778
- title: z22.string()
5100
+ z23.object({
5101
+ type: z23.literal("response.output_text.annotation.added"),
5102
+ annotation: z23.discriminatedUnion("type", [
5103
+ z23.object({
5104
+ type: z23.literal("url_citation"),
5105
+ start_index: z23.number(),
5106
+ end_index: z23.number(),
5107
+ url: z23.string(),
5108
+ title: z23.string()
4779
5109
  }),
4780
- z22.object({
4781
- type: z22.literal("file_citation"),
4782
- file_id: z22.string(),
4783
- filename: z22.string(),
4784
- index: z22.number()
5110
+ z23.object({
5111
+ type: z23.literal("file_citation"),
5112
+ file_id: z23.string(),
5113
+ filename: z23.string(),
5114
+ index: z23.number()
4785
5115
  }),
4786
- z22.object({
4787
- type: z22.literal("container_file_citation"),
4788
- container_id: z22.string(),
4789
- file_id: z22.string(),
4790
- filename: z22.string(),
4791
- start_index: z22.number(),
4792
- end_index: z22.number()
5116
+ z23.object({
5117
+ type: z23.literal("container_file_citation"),
5118
+ container_id: z23.string(),
5119
+ file_id: z23.string(),
5120
+ filename: z23.string(),
5121
+ start_index: z23.number(),
5122
+ end_index: z23.number()
4793
5123
  }),
4794
- z22.object({
4795
- type: z22.literal("file_path"),
4796
- file_id: z22.string(),
4797
- index: z22.number()
5124
+ z23.object({
5125
+ type: z23.literal("file_path"),
5126
+ file_id: z23.string(),
5127
+ index: z23.number()
4798
5128
  })
4799
5129
  ])
4800
5130
  }),
4801
- z22.object({
4802
- type: z22.literal("response.reasoning_summary_part.added"),
4803
- item_id: z22.string(),
4804
- summary_index: z22.number()
4805
- }),
4806
- z22.object({
4807
- type: z22.literal("response.reasoning_summary_text.delta"),
4808
- item_id: z22.string(),
4809
- summary_index: z22.number(),
4810
- delta: z22.string()
4811
- }),
4812
- z22.object({
4813
- type: z22.literal("response.reasoning_summary_part.done"),
4814
- item_id: z22.string(),
4815
- summary_index: z22.number()
5131
+ z23.object({
5132
+ type: z23.literal("response.reasoning_summary_part.added"),
5133
+ item_id: z23.string(),
5134
+ summary_index: z23.number()
4816
5135
  }),
4817
- z22.object({
4818
- type: z22.literal("response.apply_patch_call_operation_diff.delta"),
4819
- item_id: z22.string(),
4820
- output_index: z22.number(),
4821
- delta: z22.string(),
4822
- obfuscation: z22.string().nullish()
5136
+ z23.object({
5137
+ type: z23.literal("response.reasoning_summary_text.delta"),
5138
+ item_id: z23.string(),
5139
+ summary_index: z23.number(),
5140
+ delta: z23.string()
4823
5141
  }),
4824
- z22.object({
4825
- type: z22.literal("response.apply_patch_call_operation_diff.done"),
4826
- item_id: z22.string(),
4827
- output_index: z22.number(),
4828
- diff: z22.string()
4829
- }),
4830
- openaiResponsesNestedErrorChunkSchema,
4831
- openaiResponsesErrorChunkSchema,
4832
- z22.object({ type: z22.string() }).loose().refine((value) => !isModeledOpenAIResponsesChunk(value), {
4833
- message: "Known response chunk failed schema validation"
4834
- }).transform((value) => ({
4835
- type: "unknown_chunk",
4836
- message: value.type
4837
- }))
4838
- // fallback for unknown chunks
4839
- ])
4840
- )
4841
- );
4842
- var openaiResponsesResponseSchema = lazySchema20(
4843
- () => zodSchema20(
4844
- z22.object({
4845
- id: z22.string().optional(),
4846
- created_at: z22.number().optional(),
4847
- error: z22.object({
4848
- message: z22.string(),
4849
- type: z22.string(),
4850
- param: z22.string().nullish(),
4851
- code: z22.string()
4852
- }).nullish(),
4853
- model: z22.string().optional(),
4854
- output: z22.array(
4855
- z22.discriminatedUnion("type", [
4856
- z22.object({
4857
- type: z22.literal("message"),
4858
- role: z22.literal("assistant"),
4859
- id: z22.string(),
4860
- phase: z22.enum(["commentary", "final_answer"]).nullish(),
4861
- content: z22.array(
4862
- z22.object({
4863
- type: z22.literal("output_text"),
4864
- text: z22.string(),
4865
- logprobs: z22.array(
4866
- z22.object({
4867
- token: z22.string(),
4868
- logprob: z22.number(),
4869
- top_logprobs: z22.array(
4870
- z22.object({
4871
- token: z22.string(),
4872
- logprob: z22.number()
4873
- })
4874
- )
4875
- })
4876
- ).nullish(),
4877
- annotations: z22.array(
4878
- z22.discriminatedUnion("type", [
4879
- z22.object({
4880
- type: z22.literal("url_citation"),
4881
- start_index: z22.number(),
4882
- end_index: z22.number(),
4883
- url: z22.string(),
4884
- title: z22.string()
4885
- }),
4886
- z22.object({
4887
- type: z22.literal("file_citation"),
4888
- file_id: z22.string(),
4889
- filename: z22.string(),
4890
- index: z22.number()
4891
- }),
4892
- z22.object({
4893
- type: z22.literal("container_file_citation"),
4894
- container_id: z22.string(),
4895
- file_id: z22.string(),
4896
- filename: z22.string(),
4897
- start_index: z22.number(),
4898
- end_index: z22.number()
4899
- }),
4900
- z22.object({
4901
- type: z22.literal("file_path"),
4902
- file_id: z22.string(),
4903
- index: z22.number()
4904
- })
4905
- ])
4906
- )
4907
- })
4908
- )
4909
- }),
4910
- z22.object({
4911
- type: z22.literal("web_search_call"),
4912
- id: z22.string(),
4913
- status: z22.string(),
4914
- action: z22.discriminatedUnion("type", [
4915
- z22.object({
4916
- type: z22.literal("search"),
4917
- query: z22.string().nullish(),
4918
- queries: z22.array(z22.string()).nullish(),
4919
- sources: z22.array(
4920
- z22.discriminatedUnion("type", [
4921
- z22.object({ type: z22.literal("url"), url: z22.string() }),
4922
- z22.object({
4923
- type: z22.literal("api"),
4924
- name: z22.string()
4925
- })
4926
- ])
4927
- ).nullish()
4928
- }),
4929
- z22.object({
4930
- type: z22.literal("open_page"),
4931
- url: z22.string().nullish()
4932
- }),
4933
- z22.object({
4934
- type: z22.literal("find_in_page"),
4935
- url: z22.string().nullish(),
4936
- pattern: z22.string().nullish()
4937
- })
4938
- ]).nullish()
4939
- }),
4940
- z22.object({
4941
- type: z22.literal("file_search_call"),
4942
- id: z22.string(),
4943
- queries: z22.array(z22.string()),
4944
- results: z22.array(
4945
- z22.object({
4946
- attributes: z22.record(
4947
- z22.string(),
4948
- z22.union([z22.string(), z22.number(), z22.boolean()])
4949
- ),
4950
- file_id: z22.string(),
4951
- filename: z22.string(),
4952
- score: z22.number(),
4953
- text: z22.string()
4954
- })
4955
- ).nullish()
4956
- }),
4957
- z22.object({
4958
- type: z22.literal("code_interpreter_call"),
4959
- id: z22.string(),
4960
- code: z22.string().nullable(),
4961
- container_id: z22.string(),
4962
- outputs: z22.array(
4963
- z22.discriminatedUnion("type", [
4964
- z22.object({ type: z22.literal("logs"), logs: z22.string() }),
4965
- z22.object({ type: z22.literal("image"), url: z22.string() })
4966
- ])
4967
- ).nullable()
4968
- }),
4969
- z22.object({
4970
- type: z22.literal("image_generation_call"),
4971
- id: z22.string(),
4972
- result: z22.string()
4973
- }),
4974
- openaiResponsesLocalShellCallSchema,
4975
- z22.object({
4976
- type: z22.literal("function_call"),
4977
- call_id: z22.string(),
4978
- name: z22.string(),
4979
- arguments: z22.string(),
4980
- id: z22.string(),
4981
- async: z22.boolean().nullish(),
4982
- namespace: z22.string().nullish()
4983
- }),
4984
- z22.object({
4985
- type: z22.literal("custom_tool_call"),
4986
- call_id: z22.string(),
4987
- name: z22.string(),
4988
- input: z22.string(),
4989
- id: z22.string(),
4990
- async: z22.boolean().nullish()
4991
- }),
4992
- z22.object({
4993
- type: z22.literal("computer_call"),
4994
- id: z22.string(),
4995
- status: z22.string().optional()
4996
- }),
4997
- z22.object({
4998
- type: z22.literal("reasoning"),
4999
- id: z22.string(),
5000
- encrypted_content: z22.string().nullish(),
5001
- summary: z22.array(
5002
- z22.object({
5003
- type: z22.literal("summary_text"),
5004
- text: z22.string()
5005
- })
5006
- )
5007
- }),
5008
- z22.object({
5009
- type: z22.literal("mcp_call"),
5010
- id: z22.string(),
5011
- status: z22.string(),
5012
- arguments: z22.string(),
5013
- name: z22.string(),
5014
- server_label: z22.string(),
5015
- output: z22.string().nullish(),
5016
- error: z22.union([
5017
- z22.string(),
5018
- z22.object({
5019
- type: z22.string().optional(),
5020
- code: z22.union([z22.number(), z22.string()]).optional(),
5021
- message: z22.string().optional()
5022
- }).loose()
5023
- ]).nullish(),
5024
- approval_request_id: z22.string().nullish()
5025
- }),
5026
- z22.object({
5027
- type: z22.literal("mcp_list_tools"),
5028
- id: z22.string(),
5029
- server_label: z22.string(),
5030
- tools: z22.array(
5031
- z22.object({
5032
- name: z22.string(),
5033
- description: z22.string().optional(),
5034
- input_schema: z22.any(),
5035
- annotations: z22.record(z22.string(), z22.unknown()).optional()
5036
- })
5037
- ),
5038
- error: z22.union([
5039
- z22.string(),
5040
- z22.object({
5041
- type: z22.string().optional(),
5042
- code: z22.union([z22.number(), z22.string()]).optional(),
5043
- message: z22.string().optional()
5044
- }).loose()
5045
- ]).optional()
5046
- }),
5047
- z22.object({
5048
- type: z22.literal("mcp_approval_request"),
5049
- id: z22.string(),
5050
- server_label: z22.string(),
5051
- name: z22.string(),
5052
- arguments: z22.string(),
5053
- approval_request_id: z22.string().optional()
5054
- }),
5055
- z22.object({
5056
- type: z22.literal("apply_patch_call"),
5057
- id: z22.string(),
5058
- call_id: z22.string(),
5059
- status: z22.enum(["in_progress", "completed"]),
5060
- operation: z22.discriminatedUnion("type", [
5061
- z22.object({
5062
- type: z22.literal("create_file"),
5063
- path: z22.string(),
5064
- diff: z22.string()
5065
- }),
5066
- z22.object({
5067
- type: z22.literal("delete_file"),
5068
- path: z22.string()
5069
- }),
5070
- z22.object({
5071
- type: z22.literal("update_file"),
5072
- path: z22.string(),
5073
- diff: z22.string()
5074
- })
5075
- ])
5076
- }),
5077
- z22.object({
5078
- type: z22.literal("shell_call"),
5079
- id: z22.string(),
5080
- call_id: z22.string(),
5081
- status: z22.enum(["in_progress", "completed", "incomplete"]),
5082
- action: z22.object({
5083
- commands: z22.array(z22.string())
5084
- })
5085
- }),
5086
- z22.object({
5087
- type: z22.literal("shell_call_output"),
5088
- id: z22.string(),
5089
- call_id: z22.string(),
5090
- status: z22.enum(["in_progress", "completed", "incomplete"]),
5091
- output: z22.array(
5092
- z22.object({
5093
- stdout: z22.string(),
5094
- stderr: z22.string(),
5095
- outcome: z22.discriminatedUnion("type", [
5096
- z22.object({ type: z22.literal("timeout") }),
5097
- z22.object({
5098
- type: z22.literal("exit"),
5099
- exit_code: z22.number()
5100
- })
5101
- ])
5102
- })
5103
- )
5104
- }),
5105
- z22.object({
5106
- type: z22.literal("tool_search_call"),
5107
- id: z22.string(),
5108
- execution: z22.enum(["server", "client"]),
5109
- call_id: z22.string().nullable(),
5110
- status: z22.enum(["in_progress", "completed", "incomplete"]),
5111
- arguments: z22.unknown()
5112
- }),
5113
- z22.object({
5114
- type: z22.literal("tool_search_output"),
5115
- id: z22.string(),
5116
- execution: z22.enum(["server", "client"]),
5117
- call_id: z22.string().nullable(),
5118
- status: z22.enum(["in_progress", "completed", "incomplete"]),
5119
- tools: z22.array(z22.record(z22.string(), jsonValueSchema2.optional()))
5120
- })
5121
- ])
5122
- ).optional(),
5123
- service_tier: z22.string().nullish(),
5124
- reasoning: z22.object({
5125
- context: z22.string().nullish()
5126
- }).nullish(),
5127
- incomplete_details: z22.object({ reason: z22.string() }).nullish(),
5128
- usage: openaiResponsesUsageSchema.nullish()
5129
- })
5130
- )
5131
- );
5132
-
5133
- // src/responses/openai-responses-options.ts
5134
- import {
5135
- lazySchema as lazySchema21,
5136
- zodSchema as zodSchema21
5137
- } from "@ai-sdk/provider-utils";
5138
- import { z as z23 } from "zod/v4";
5139
- var TOP_LOGPROBS_MAX = 20;
5140
- var openaiResponsesReasoningModelIds = [
5141
- "o1",
5142
- "o1-2024-12-17",
5143
- "o3",
5144
- "o3-2025-04-16",
5145
- "o3-mini",
5146
- "o3-mini-2025-01-31",
5147
- "o4-mini",
5148
- "o4-mini-2025-04-16",
5149
- "gpt-5",
5150
- "gpt-5-2025-08-07",
5151
- "gpt-5-codex",
5152
- "gpt-5-mini",
5153
- "gpt-5-mini-2025-08-07",
5154
- "gpt-5-nano",
5155
- "gpt-5-nano-2025-08-07",
5156
- "gpt-5-pro",
5157
- "gpt-5-pro-2025-10-06",
5158
- "gpt-5.1",
5159
- "gpt-5.1-chat-latest",
5160
- "gpt-5.1-codex-mini",
5161
- "gpt-5.1-codex",
5162
- "gpt-5.1-codex-max",
5163
- "gpt-5.2",
5164
- "gpt-5.2-chat-latest",
5165
- "gpt-5.2-pro",
5166
- "gpt-5.2-codex",
5167
- "gpt-5.3-chat-latest",
5168
- "gpt-5.3-codex",
5169
- "gpt-5.4",
5170
- "gpt-5.4-2026-03-05",
5171
- "gpt-5.4-mini",
5172
- "gpt-5.4-mini-2026-03-17",
5173
- "gpt-5.4-nano",
5174
- "gpt-5.4-nano-2026-03-17",
5175
- "gpt-5.4-pro",
5176
- "gpt-5.4-pro-2026-03-05",
5177
- "gpt-5.5",
5178
- "gpt-5.5-2026-04-23",
5179
- "gpt-5.6",
5180
- "gpt-5.6-luna",
5181
- "gpt-5.6-sol",
5182
- "gpt-5.6-terra",
5183
- "gpt-6-astra",
5184
- "gpt-6-luna",
5185
- "gpt-6-sol"
5186
- ];
5187
- var openaiResponsesModelIds = [
5188
- "gpt-4.1",
5189
- "gpt-4.1-2025-04-14",
5190
- "gpt-4.1-mini",
5191
- "gpt-4.1-mini-2025-04-14",
5192
- "gpt-4.1-nano",
5193
- "gpt-4.1-nano-2025-04-14",
5194
- "gpt-4o",
5195
- "gpt-4o-2024-05-13",
5196
- "gpt-4o-2024-08-06",
5197
- "gpt-4o-2024-11-20",
5198
- "gpt-4o-audio-preview",
5199
- "gpt-4o-audio-preview-2024-12-17",
5200
- "gpt-4o-search-preview",
5201
- "gpt-4o-search-preview-2025-03-11",
5202
- "gpt-4o-mini-search-preview",
5203
- "gpt-4o-mini-search-preview-2025-03-11",
5204
- "gpt-4o-mini",
5205
- "gpt-4o-mini-2024-07-18",
5206
- "gpt-3.5-turbo-0125",
5207
- "gpt-3.5-turbo",
5208
- "gpt-3.5-turbo-1106",
5209
- "gpt-5-chat-latest",
5210
- ...openaiResponsesReasoningModelIds
5211
- ];
5212
- var openaiLanguageModelResponsesOptionsSchema = lazySchema21(
5142
+ z23.object({
5143
+ type: z23.literal("response.reasoning_summary_part.done"),
5144
+ item_id: z23.string(),
5145
+ summary_index: z23.number()
5146
+ }),
5147
+ z23.object({
5148
+ type: z23.literal("response.apply_patch_call_operation_diff.delta"),
5149
+ item_id: z23.string(),
5150
+ output_index: z23.number(),
5151
+ delta: z23.string(),
5152
+ obfuscation: z23.string().nullish()
5153
+ }),
5154
+ z23.object({
5155
+ type: z23.literal("response.apply_patch_call_operation_diff.done"),
5156
+ item_id: z23.string(),
5157
+ output_index: z23.number(),
5158
+ diff: z23.string()
5159
+ }),
5160
+ openaiResponsesNestedErrorChunkSchema,
5161
+ openaiResponsesErrorChunkSchema,
5162
+ z23.object({ type: z23.string() }).loose().refine((value) => !isModeledOpenAIResponsesChunk(value), {
5163
+ message: "Known response chunk failed schema validation"
5164
+ }).transform((value) => ({
5165
+ type: "unknown_chunk",
5166
+ message: value.type
5167
+ }))
5168
+ // fallback for unknown chunks
5169
+ ])
5170
+ )
5171
+ );
5172
+ var openaiResponsesResponseSchema = lazySchema21(
5213
5173
  () => zodSchema21(
5214
5174
  z23.object({
5215
- /**
5216
- * The ID of the OpenAI Conversation to continue.
5217
- * You must create a conversation first via the OpenAI API.
5218
- * Cannot be used in conjunction with `previousResponseId`.
5219
- * Defaults to `undefined`.
5220
- * @see https://platform.openai.com/docs/api-reference/conversations/create
5221
- */
5222
- conversation: z23.string().nullish(),
5223
- /**
5224
- * The set of extra fields to include in the response (advanced, usually not needed).
5225
- * Example values: 'reasoning.encrypted_content', 'file_search_call.results', 'web_search_call.results', 'message.output_text.logprobs'.
5226
- */
5227
- include: z23.array(
5228
- z23.enum([
5229
- "reasoning.encrypted_content",
5230
- // handled internally by default, only needed for unknown reasoning models
5231
- "file_search_call.results",
5232
- "web_search_call.results",
5233
- "message.output_text.logprobs"
5175
+ id: z23.string().optional(),
5176
+ created_at: z23.number().optional(),
5177
+ error: z23.object({
5178
+ message: z23.string(),
5179
+ type: z23.string(),
5180
+ param: z23.string().nullish(),
5181
+ code: z23.string()
5182
+ }).nullish(),
5183
+ model: z23.string().optional(),
5184
+ output: z23.array(
5185
+ z23.discriminatedUnion("type", [
5186
+ z23.object({
5187
+ type: z23.literal("message"),
5188
+ role: z23.literal("assistant"),
5189
+ id: z23.string(),
5190
+ phase: z23.enum(["commentary", "final_answer"]).nullish(),
5191
+ content: z23.array(
5192
+ z23.object({
5193
+ type: z23.literal("output_text"),
5194
+ text: z23.string(),
5195
+ logprobs: z23.array(
5196
+ z23.object({
5197
+ token: z23.string(),
5198
+ logprob: z23.number(),
5199
+ top_logprobs: z23.array(
5200
+ z23.object({
5201
+ token: z23.string(),
5202
+ logprob: z23.number()
5203
+ })
5204
+ )
5205
+ })
5206
+ ).nullish(),
5207
+ annotations: z23.array(
5208
+ z23.discriminatedUnion("type", [
5209
+ z23.object({
5210
+ type: z23.literal("url_citation"),
5211
+ start_index: z23.number(),
5212
+ end_index: z23.number(),
5213
+ url: z23.string(),
5214
+ title: z23.string()
5215
+ }),
5216
+ z23.object({
5217
+ type: z23.literal("file_citation"),
5218
+ file_id: z23.string(),
5219
+ filename: z23.string(),
5220
+ index: z23.number()
5221
+ }),
5222
+ z23.object({
5223
+ type: z23.literal("container_file_citation"),
5224
+ container_id: z23.string(),
5225
+ file_id: z23.string(),
5226
+ filename: z23.string(),
5227
+ start_index: z23.number(),
5228
+ end_index: z23.number()
5229
+ }),
5230
+ z23.object({
5231
+ type: z23.literal("file_path"),
5232
+ file_id: z23.string(),
5233
+ index: z23.number()
5234
+ })
5235
+ ])
5236
+ )
5237
+ })
5238
+ )
5239
+ }),
5240
+ z23.object({
5241
+ type: z23.literal("web_search_call"),
5242
+ id: z23.string(),
5243
+ status: z23.string(),
5244
+ action: z23.discriminatedUnion("type", [
5245
+ z23.object({
5246
+ type: z23.literal("search"),
5247
+ query: z23.string().nullish(),
5248
+ queries: z23.array(z23.string()).nullish(),
5249
+ sources: z23.array(
5250
+ z23.discriminatedUnion("type", [
5251
+ z23.object({ type: z23.literal("url"), url: z23.string() }),
5252
+ z23.object({
5253
+ type: z23.literal("api"),
5254
+ name: z23.string()
5255
+ })
5256
+ ])
5257
+ ).nullish()
5258
+ }),
5259
+ z23.object({
5260
+ type: z23.literal("open_page"),
5261
+ url: z23.string().nullish()
5262
+ }),
5263
+ z23.object({
5264
+ type: z23.literal("find_in_page"),
5265
+ url: z23.string().nullish(),
5266
+ pattern: z23.string().nullish()
5267
+ })
5268
+ ]).nullish()
5269
+ }),
5270
+ z23.object({
5271
+ type: z23.literal("file_search_call"),
5272
+ id: z23.string(),
5273
+ queries: z23.array(z23.string()),
5274
+ results: z23.array(
5275
+ z23.object({
5276
+ attributes: z23.record(
5277
+ z23.string(),
5278
+ z23.union([z23.string(), z23.number(), z23.boolean()])
5279
+ ),
5280
+ file_id: z23.string(),
5281
+ filename: z23.string(),
5282
+ score: z23.number(),
5283
+ text: z23.string()
5284
+ })
5285
+ ).nullish()
5286
+ }),
5287
+ z23.object({
5288
+ type: z23.literal("code_interpreter_call"),
5289
+ id: z23.string(),
5290
+ code: z23.string().nullable(),
5291
+ container_id: z23.string(),
5292
+ outputs: z23.array(
5293
+ z23.discriminatedUnion("type", [
5294
+ z23.object({ type: z23.literal("logs"), logs: z23.string() }),
5295
+ z23.object({ type: z23.literal("image"), url: z23.string() })
5296
+ ])
5297
+ ).nullable()
5298
+ }),
5299
+ z23.object({
5300
+ type: z23.literal("image_generation_call"),
5301
+ id: z23.string(),
5302
+ result: z23.string()
5303
+ }),
5304
+ openaiResponsesLocalShellCallSchema,
5305
+ z23.object({
5306
+ type: z23.literal("function_call"),
5307
+ call_id: z23.string(),
5308
+ name: z23.string(),
5309
+ arguments: z23.string(),
5310
+ id: z23.string(),
5311
+ async: z23.boolean().nullish(),
5312
+ namespace: z23.string().nullish()
5313
+ }),
5314
+ z23.object({
5315
+ type: z23.literal("custom_tool_call"),
5316
+ call_id: z23.string(),
5317
+ name: z23.string(),
5318
+ input: z23.string(),
5319
+ id: z23.string(),
5320
+ async: z23.boolean().nullish()
5321
+ }),
5322
+ z23.object({
5323
+ type: z23.literal("computer_call"),
5324
+ id: z23.string(),
5325
+ status: z23.string().optional()
5326
+ }),
5327
+ z23.object({
5328
+ type: z23.literal("reasoning"),
5329
+ id: z23.string(),
5330
+ encrypted_content: z23.string().nullish(),
5331
+ summary: z23.array(
5332
+ z23.object({
5333
+ type: z23.literal("summary_text"),
5334
+ text: z23.string()
5335
+ })
5336
+ )
5337
+ }),
5338
+ z23.object({
5339
+ type: z23.literal("mcp_call"),
5340
+ id: z23.string(),
5341
+ status: z23.string(),
5342
+ arguments: z23.string(),
5343
+ name: z23.string(),
5344
+ server_label: z23.string(),
5345
+ output: z23.string().nullish(),
5346
+ error: z23.union([
5347
+ z23.string(),
5348
+ z23.object({
5349
+ type: z23.string().optional(),
5350
+ code: z23.union([z23.number(), z23.string()]).optional(),
5351
+ message: z23.string().optional()
5352
+ }).loose()
5353
+ ]).nullish(),
5354
+ approval_request_id: z23.string().nullish()
5355
+ }),
5356
+ z23.object({
5357
+ type: z23.literal("mcp_list_tools"),
5358
+ id: z23.string(),
5359
+ server_label: z23.string(),
5360
+ tools: z23.array(
5361
+ z23.object({
5362
+ name: z23.string(),
5363
+ description: z23.string().optional(),
5364
+ input_schema: z23.any(),
5365
+ annotations: z23.record(z23.string(), z23.unknown()).optional()
5366
+ })
5367
+ ),
5368
+ error: z23.union([
5369
+ z23.string(),
5370
+ z23.object({
5371
+ type: z23.string().optional(),
5372
+ code: z23.union([z23.number(), z23.string()]).optional(),
5373
+ message: z23.string().optional()
5374
+ }).loose()
5375
+ ]).optional()
5376
+ }),
5377
+ z23.object({
5378
+ type: z23.literal("mcp_approval_request"),
5379
+ id: z23.string(),
5380
+ server_label: z23.string(),
5381
+ name: z23.string(),
5382
+ arguments: z23.string(),
5383
+ approval_request_id: z23.string().optional()
5384
+ }),
5385
+ z23.object({
5386
+ type: z23.literal("apply_patch_call"),
5387
+ id: z23.string(),
5388
+ call_id: z23.string(),
5389
+ status: z23.enum(["in_progress", "completed"]),
5390
+ operation: z23.discriminatedUnion("type", [
5391
+ z23.object({
5392
+ type: z23.literal("create_file"),
5393
+ path: z23.string(),
5394
+ diff: z23.string()
5395
+ }),
5396
+ z23.object({
5397
+ type: z23.literal("delete_file"),
5398
+ path: z23.string()
5399
+ }),
5400
+ z23.object({
5401
+ type: z23.literal("update_file"),
5402
+ path: z23.string(),
5403
+ diff: z23.string()
5404
+ })
5405
+ ])
5406
+ }),
5407
+ z23.object({
5408
+ type: z23.literal("shell_call"),
5409
+ id: z23.string(),
5410
+ call_id: z23.string(),
5411
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5412
+ action: z23.object({
5413
+ commands: z23.array(z23.string())
5414
+ })
5415
+ }),
5416
+ z23.object({
5417
+ type: z23.literal("shell_call_output"),
5418
+ id: z23.string(),
5419
+ call_id: z23.string(),
5420
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5421
+ output: z23.array(
5422
+ z23.object({
5423
+ stdout: z23.string(),
5424
+ stderr: z23.string(),
5425
+ outcome: z23.discriminatedUnion("type", [
5426
+ z23.object({ type: z23.literal("timeout") }),
5427
+ z23.object({
5428
+ type: z23.literal("exit"),
5429
+ exit_code: z23.number()
5430
+ })
5431
+ ])
5432
+ })
5433
+ )
5434
+ }),
5435
+ z23.object({
5436
+ type: z23.literal("tool_search_call"),
5437
+ id: z23.string(),
5438
+ execution: z23.enum(["server", "client"]),
5439
+ call_id: z23.string().nullable(),
5440
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5441
+ arguments: z23.unknown()
5442
+ }),
5443
+ z23.object({
5444
+ type: z23.literal("tool_search_output"),
5445
+ id: z23.string(),
5446
+ execution: z23.enum(["server", "client"]),
5447
+ call_id: z23.string().nullable(),
5448
+ status: z23.enum(["in_progress", "completed", "incomplete"]),
5449
+ tools: z23.array(z23.record(z23.string(), jsonValueSchema2.optional()))
5450
+ })
5234
5451
  ])
5235
- ).nullish(),
5236
- /**
5237
- * Instructions for the model.
5238
- * They can be used to change the system or developer message when continuing a conversation using the `previousResponseId` option.
5239
- * Defaults to `undefined`.
5240
- */
5241
- instructions: z23.string().nullish(),
5242
- /**
5243
- * Return the log probabilities of the tokens. Including logprobs will increase
5244
- * the response size and can slow down response times. However, it can
5245
- * be useful to better understand how the model is behaving.
5246
- *
5247
- * Setting to true will return the log probabilities of the tokens that
5248
- * were generated.
5249
- *
5250
- * Setting to a number will return the log probabilities of the top n
5251
- * tokens that were generated.
5252
- *
5253
- * @see https://platform.openai.com/docs/api-reference/responses/create
5254
- * @see https://cookbook.openai.com/examples/using_logprobs
5255
- */
5256
- logprobs: z23.union([z23.boolean(), z23.number().min(1).max(TOP_LOGPROBS_MAX)]).optional(),
5257
- /**
5258
- * The maximum number of total calls to built-in tools that can be processed in a response.
5259
- * This maximum number applies across all built-in tool calls, not per individual tool.
5260
- * Any further attempts to call a tool by the model will be ignored.
5261
- */
5262
- maxToolCalls: z23.number().nullish(),
5263
- /**
5264
- * Additional metadata to store with the generation.
5265
- */
5266
- metadata: z23.any().nullish(),
5267
- /**
5268
- * Whether to use parallel tool calls. Defaults to `true`.
5269
- */
5270
- parallelToolCalls: z23.boolean().nullish(),
5271
- /**
5272
- * The ID of the previous response. You can use it to continue a conversation.
5273
- * Defaults to `undefined`.
5274
- */
5275
- previousResponseId: z23.string().nullish(),
5276
- /**
5277
- * Sets a cache key to tie this prompt to cached prefixes for better caching performance.
5278
- */
5279
- promptCacheKey: z23.string().nullish(),
5280
- /**
5281
- * Prompt cache behavior for GPT-5.6 and later models.
5282
- * `mode` controls whether OpenAI also places an implicit breakpoint.
5283
- * `ttl` sets the minimum cache lifetime and currently only supports 30 minutes.
5284
- */
5285
- promptCacheOptions: z23.object({
5286
- mode: z23.enum(["implicit", "explicit"]).optional(),
5287
- ttl: z23.literal("30m").optional()
5288
- }).optional(),
5289
- /**
5290
- * The retention policy for the prompt cache.
5291
- * - 'in_memory': Default. Standard prompt caching behavior.
5292
- * - '24h': Extended prompt caching that keeps cached prefixes active for up to 24 hours.
5293
- * Available for models before GPT-5.6 that support extended caching.
5294
- *
5295
- * @deprecated For GPT-5.6 and later models, use `promptCacheOptions.ttl`.
5296
- *
5297
- * @default 'in_memory'
5298
- */
5299
- promptCacheRetention: z23.enum(["in_memory", "24h"]).nullish(),
5300
- /**
5301
- * Reasoning effort for reasoning models. Defaults to `medium`. If you use
5302
- * `providerOptions` to set the `reasoningEffort` option, this model setting will be ignored.
5303
- * GPT-5.6 supports 'none' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
5304
- * GPT-6 and later models support 'low' | 'medium' | 'high' | 'xhigh' | 'max'.
5305
- * Supported values vary by model.
5306
- */
5307
- reasoningEffort: z23.string().nullish(),
5308
- /**
5309
- * Updates the reasoning effort for GPT-6 and later models starting with this response
5310
- * without changing the request-level reasoning effort. This preserves the
5311
- * request prefix for prompt caching.
5312
- *
5313
- * Only supported by GPT-6 and later models in standard, single-agent mode. Cannot be
5314
- * combined with automatic truncation.
5315
- */
5316
- reasoningEffortUpdate: z23.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
5317
- /**
5318
- * Controls how much model work GPT-5.6 performs before returning a final answer.
5319
- * `standard` is the default. `pro` increases quality, latency, and token usage.
5320
- */
5321
- reasoningMode: z23.enum(["standard", "pro"]).optional(),
5322
- /**
5323
- * Controls which available reasoning items GPT-5.6 can use.
5324
- * `auto` uses the model default, `current_turn` excludes reasoning from earlier
5325
- * turns, and `all_turns` makes compatible earlier reasoning available.
5326
- */
5327
- reasoningContext: z23.enum(["auto", "current_turn", "all_turns"]).optional(),
5328
- /**
5329
- * Controls reasoning summary output from the model.
5330
- * Set to "auto" to automatically receive the richest level available,
5331
- * or "detailed" for comprehensive summaries.
5332
- */
5333
- reasoningSummary: z23.string().nullish(),
5334
- /**
5335
- * The identifier for safety monitoring and tracking.
5336
- */
5337
- safetyIdentifier: z23.string().nullish(),
5338
- /**
5339
- * Service tier for the request.
5340
- * Set to 'flex' for 50% cheaper processing at the cost of increased latency (available for o3, o4-mini, and gpt-5 models).
5341
- * Set to 'priority' for faster processing with Enterprise access (available for gpt-4, gpt-5, gpt-5-mini, o3, o4-mini; gpt-5-nano is not supported).
5342
- * Set to 'fast' for the same tier as 'priority' (OpenAI's newer name for it).
5343
- *
5344
- * Defaults to 'auto'.
5345
- */
5346
- serviceTier: z23.enum(["auto", "flex", "priority", "fast", "default"]).nullish(),
5347
- /**
5348
- * Whether to store the generation. Defaults to `true`.
5349
- */
5350
- store: z23.boolean().nullish(),
5351
- /**
5352
- * Whether to pass through non-image file types as generic input files.
5353
- *
5354
- * By default, inline file inputs are restricted to images and PDFs.
5355
- * Enable this when the target OpenAI Responses model supports additional
5356
- * file media types, such as text/csv.
5357
- */
5358
- passThroughUnsupportedFiles: z23.boolean().optional(),
5359
- /**
5360
- * Whether to use strict JSON schema validation.
5361
- * Defaults to `true`.
5362
- */
5363
- strictJsonSchema: z23.boolean().nullish(),
5364
- /**
5365
- * Controls the verbosity of the model's responses. Lower values ('low') will result
5366
- * in more concise responses, while higher values ('high') will result in more verbose responses.
5367
- * Valid values: 'low', 'medium', 'high'.
5368
- */
5369
- textVerbosity: z23.enum(["low", "medium", "high"]).nullish(),
5370
- /**
5371
- * Controls output truncation. 'auto' (default) performs truncation automatically;
5372
- * 'disabled' turns truncation off.
5373
- */
5374
- truncation: z23.enum(["auto", "disabled"]).nullish(),
5375
- /**
5376
- * A unique identifier representing your end-user, which can help OpenAI to
5377
- * monitor and detect abuse.
5378
- * Defaults to `undefined`.
5379
- * @see https://platform.openai.com/docs/guides/safety-best-practices/end-user-ids
5380
- */
5381
- user: z23.string().nullish(),
5382
- /**
5383
- * Override the system message mode for this model.
5384
- * - 'system': Use the 'system' role for system messages (default for most models)
5385
- * - 'developer': Use the 'developer' role for system messages (used by reasoning models)
5386
- * - 'remove': Remove system messages entirely
5387
- *
5388
- * If not specified, the mode is automatically determined based on the model.
5389
- */
5390
- systemMessageMode: z23.enum(["system", "developer", "remove"]).optional(),
5391
- /**
5392
- * Force treating this model as a reasoning model.
5393
- *
5394
- * This is useful for "stealth" reasoning models (e.g. via a custom baseURL)
5395
- * where the model ID is not recognized by the SDK's allowlist.
5396
- *
5397
- * When enabled, the SDK applies reasoning-model parameter compatibility rules
5398
- * and defaults `systemMessageMode` to `developer` unless overridden.
5399
- */
5400
- forceReasoning: z23.boolean().optional(),
5401
- /**
5402
- * Restrict the callable tools to a subset while keeping the full tools
5403
- * list intact, so prompt caching is preserved across requests with
5404
- * different allowlists.
5405
- *
5406
- * When set, this overrides the request-level `toolChoice` and emits
5407
- * `tool_choice: { type: "allowed_tools", mode, tools }` on the wire.
5408
- *
5409
- * @see https://developers.openai.com/api/reference/resources/responses/methods/create#(resource)%20responses%20%3E%20(model)%20tool_choice_allowed%20%3E%20(schema)
5410
- */
5411
- allowedTools: z23.object({
5412
- toolNames: z23.array(z23.string()).min(1),
5413
- mode: z23.enum(["auto", "required"]).optional()
5414
- }).optional()
5452
+ ).optional(),
5453
+ service_tier: z23.string().nullish(),
5454
+ reasoning: z23.object({
5455
+ context: z23.string().nullish()
5456
+ }).nullish(),
5457
+ incomplete_details: z23.object({ reason: z23.string() }).nullish(),
5458
+ usage: openaiResponsesUsageSchema.nullish()
5415
5459
  })
5416
5460
  )
5417
5461
  );
@@ -5916,6 +5960,18 @@ function extractApprovalRequestIdToToolCallIdMapping(prompt) {
5916
5960
  }
5917
5961
  return mapping;
5918
5962
  }
5963
+ function getConfigurationUpdateUnsupportedReason({
5964
+ modelCapabilities,
5965
+ options
5966
+ }) {
5967
+ if (!modelCapabilities.supportsConfigurationUpdate) {
5968
+ return "reasoningEffortUpdate is only supported by GPT-6 and later models";
5969
+ }
5970
+ if ((options == null ? void 0 : options.reasoningMode) === "pro" || (options == null ? void 0 : options.truncation) === "auto") {
5971
+ return "reasoningEffortUpdate requires standard reasoning mode without automatic truncation";
5972
+ }
5973
+ return void 0;
5974
+ }
5919
5975
  var OpenAIResponsesLanguageModel = class {
5920
5976
  constructor(modelId, config) {
5921
5977
  this.specificationVersion = "v3";
@@ -6023,8 +6079,13 @@ var OpenAIResponsesLanguageModel = class {
6023
6079
  customProviderToolNames,
6024
6080
  supportsAsyncToolCalling: modelCapabilities.supportsAsyncToolCalling
6025
6081
  });
6082
+ const configurationUpdateUnsupportedReason = getConfigurationUpdateUnsupportedReason({
6083
+ modelCapabilities,
6084
+ options: openaiOptions
6085
+ });
6026
6086
  const { input, warnings: inputWarnings } = await convertToOpenAIResponsesInput({
6027
6087
  prompt,
6088
+ configurationUpdateUnsupportedReason,
6028
6089
  toolNameMapping,
6029
6090
  systemMessageMode: (_c = openaiOptions == null ? void 0 : openaiOptions.systemMessageMode) != null ? _c : isReasoningModel ? "developer" : modelCapabilities.systemMessageMode,
6030
6091
  providerOptionsName,
@@ -6042,18 +6103,27 @@ var OpenAIResponsesLanguageModel = class {
6042
6103
  });
6043
6104
  warnings.push(...inputWarnings);
6044
6105
  const reasoningEffortUpdate = openaiOptions == null ? void 0 : openaiOptions.reasoningEffortUpdate;
6045
- const configurationUpdateIsSupported = reasoningEffortUpdate == null || modelCapabilities.supportsConfigurationUpdate && (openaiOptions == null ? void 0 : openaiOptions.reasoningMode) !== "pro" && (openaiOptions == null ? void 0 : openaiOptions.truncation) !== "auto";
6046
- if (reasoningEffortUpdate != null && !configurationUpdateIsSupported) {
6106
+ if (reasoningEffortUpdate != null && configurationUpdateUnsupportedReason != null) {
6047
6107
  warnings.push({
6048
6108
  type: "unsupported",
6049
6109
  feature: "reasoningEffortUpdate",
6050
- details: !modelCapabilities.supportsConfigurationUpdate ? "reasoningEffortUpdate is only supported by GPT-6 and later models" : "reasoningEffortUpdate requires standard reasoning mode without automatic truncation"
6110
+ details: configurationUpdateUnsupportedReason
6051
6111
  });
6052
6112
  } else if (reasoningEffortUpdate != null) {
6053
- input.unshift({
6054
- type: "configuration_update",
6055
- reasoning: { effort: reasoningEffortUpdate }
6056
- });
6113
+ const firstItem = input[0];
6114
+ if ((firstItem == null ? void 0 : firstItem.type) !== "configuration_update" || firstItem.reasoning.effort !== reasoningEffortUpdate) {
6115
+ input.unshift({
6116
+ type: "configuration_update",
6117
+ reasoning: { effort: reasoningEffortUpdate }
6118
+ });
6119
+ }
6120
+ }
6121
+ for (let i = 1; i < input.length; i++) {
6122
+ if (input[i - 1].type === "configuration_update" && input[i].type === "configuration_update") {
6123
+ throw new UnsupportedFunctionalityError6({
6124
+ functionality: "Adjacent reasoning effort configuration updates"
6125
+ });
6126
+ }
6057
6127
  }
6058
6128
  const strictJsonSchema = (_f = openaiOptions == null ? void 0 : openaiOptions.strictJsonSchema) != null ? _f : true;
6059
6129
  let include = openaiOptions == null ? void 0 : openaiOptions.include;
@@ -8260,7 +8330,7 @@ var OpenAITranscriptionModel = class {
8260
8330
  };
8261
8331
 
8262
8332
  // src/version.ts
8263
- var VERSION = true ? "3.0.117" : "0.0.0-test";
8333
+ var VERSION = true ? "3.0.118" : "0.0.0-test";
8264
8334
 
8265
8335
  // src/openai-provider.ts
8266
8336
  function createOpenAI(options = {}) {