@ai-sdk/openai 4.0.77 → 4.0.78

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 4.0.78
4
+
5
+ ### Patch Changes
6
+
7
+ - 94d5d6d: Support `reasoningEffortUpdate: 'none'` for GPT-6 Sol and Luna in request-level options and positioned system messages. Validate update efforts against the model's supported efforts, warning and omitting unsupported request-level updates and rejecting unsupported historical updates.
8
+
3
9
  ## 4.0.77
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1515,7 +1515,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
1515
1515
  } | undefined;
1516
1516
  promptCacheRetention?: "in_memory" | "24h" | null | undefined;
1517
1517
  reasoningEffort?: string | null | undefined;
1518
- reasoningEffortUpdate?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1518
+ reasoningEffortUpdate?: "none" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1519
1519
  reasoningMode?: "standard" | "pro" | undefined;
1520
1520
  reasoningContext?: "auto" | "current_turn" | "all_turns" | undefined;
1521
1521
  reasoningSummary?: string | null | undefined;
@@ -1541,7 +1541,7 @@ declare const openaiLanguageModelResponsesOptionsSchema: _ai_sdk_provider_utils.
1541
1541
  }>;
1542
1542
  type OpenAILanguageModelResponsesOptions = InferSchema<typeof openaiLanguageModelResponsesOptionsSchema>;
1543
1543
  declare const openaiResponsesSystemMessageOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
1544
- reasoningEffortUpdate?: "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1544
+ reasoningEffortUpdate?: "none" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
1545
1545
  }>;
1546
1546
  type OpenAIResponsesSystemMessageOptions = InferSchema<typeof openaiResponsesSystemMessageOptionsSchema>;
1547
1547
 
package/dist/index.js CHANGED
@@ -5070,8 +5070,9 @@ var openaiLanguageModelResponsesOptionsSchema = lazySchema25(
5070
5070
  *
5071
5071
  * Only supported by GPT-6 and later models in standard, single-agent mode. Cannot be
5072
5072
  * combined with automatic compaction or automatic truncation.
5073
+ * Supported efforts vary by model; 'none' is supported by GPT-6 Sol and Luna.
5073
5074
  */
5074
- reasoningEffortUpdate: z26.enum(["low", "medium", "high", "xhigh", "max"]).optional(),
5075
+ reasoningEffortUpdate: z26.enum(["none", "low", "medium", "high", "xhigh", "max"]).optional(),
5075
5076
  /**
5076
5077
  * Controls how much model work GPT-5.6 performs before returning a final answer.
5077
5078
  * `standard` is the default. `pro` increases quality, latency, and token usage.
@@ -5199,7 +5200,7 @@ var openaiResponsesSystemMessageOptionsSchema = lazySchema25(
5199
5200
  *
5200
5201
  * @see https://developers.openai.com/api/docs/guides/reasoning#change-reasoning-mid-conversation
5201
5202
  */
5202
- reasoningEffortUpdate: z26.enum(["low", "medium", "high", "xhigh", "max"]).optional()
5203
+ reasoningEffortUpdate: z26.enum(["none", "low", "medium", "high", "xhigh", "max"]).optional()
5203
5204
  })
5204
5205
  )
5205
5206
  );
@@ -7232,12 +7233,27 @@ var OpenAIResponsesLanguageModel = class _OpenAIResponsesLanguageModel {
7232
7233
  outputSchemaToolNames: outputSchemaToolNames.size > 0 ? outputSchemaToolNames : void 0
7233
7234
  });
7234
7235
  warnings.push(...inputWarnings);
7236
+ const getUpdateEffortUnsupportedReason = (effort) => effort != null && modelCapabilities.supportedReasoningEfforts?.includes(effort) === false ? `${modelId} only supports the following reasoning efforts: ${modelCapabilities.supportedReasoningEfforts.join(", ")}` : void 0;
7237
+ for (const item of input) {
7238
+ if (item.type === "configuration_update") {
7239
+ const unsupportedReason = getUpdateEffortUnsupportedReason(
7240
+ item.reasoning.effort
7241
+ );
7242
+ if (unsupportedReason != null) {
7243
+ throw new UnsupportedFunctionalityError7({
7244
+ functionality: "Message-level reasoningEffortUpdate",
7245
+ message: unsupportedReason
7246
+ });
7247
+ }
7248
+ }
7249
+ }
7235
7250
  const reasoningEffortUpdate = openaiOptions?.reasoningEffortUpdate;
7236
- if (reasoningEffortUpdate != null && configurationUpdateUnsupportedReason != null) {
7251
+ const requestUpdateUnsupportedReason = configurationUpdateUnsupportedReason ?? getUpdateEffortUnsupportedReason(reasoningEffortUpdate);
7252
+ if (reasoningEffortUpdate != null && requestUpdateUnsupportedReason != null) {
7237
7253
  warnings.push({
7238
7254
  type: "unsupported",
7239
7255
  feature: "reasoningEffortUpdate",
7240
- details: configurationUpdateUnsupportedReason
7256
+ details: requestUpdateUnsupportedReason
7241
7257
  });
7242
7258
  } else if (reasoningEffortUpdate != null) {
7243
7259
  const firstItem = input[0];
@@ -12012,7 +12028,7 @@ var OpenAISkills = class {
12012
12028
  };
12013
12029
 
12014
12030
  // src/version.ts
12015
- var VERSION = true ? "4.0.77" : "0.0.0-test";
12031
+ var VERSION = true ? "4.0.78" : "0.0.0-test";
12016
12032
 
12017
12033
  // src/openai-provider.ts
12018
12034
  function createOpenAI(options = {}) {