@ai-sdk/openai 4.0.89 → 4.0.90

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/openai",
3
- "version": "4.0.89",
3
+ "version": "4.0.90",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -259,7 +259,7 @@ export class OpenAIChatLanguageModel implements LanguageModelV4 {
259
259
  // remove unsupported settings for reasoning models
260
260
  // see https://platform.openai.com/docs/guides/reasoning#limitations
261
261
  if (isReasoningModel) {
262
- // when reasoning effort is none, gpt-5.1 models allow temperature, topP, logprobs
262
+ // supported models allow temperature, topP, and logprobs when reasoning effort is none
263
263
  // https://platform.openai.com/docs/guides/latest-model#gpt-5-1-parameter-compatibility
264
264
  if (
265
265
  resolvedReasoningEffort !== 'none' ||
@@ -45,12 +45,14 @@ export function getOpenAILanguageModelCapabilities(
45
45
  (gptVersion != null && gptVersion.major >= 5 && !isGptChatModel);
46
46
 
47
47
  // https://platform.openai.com/docs/guides/latest-model#gpt-5-1-parameter-compatibility
48
- // GPT-5.1 and later model families support temperature, topP, logProbs when reasoningEffort is none.
48
+ // GPT-5.1 through GPT-5.x and GPT-6 Sol/Luna support temperature,
49
+ // topP, and logProbs when reasoningEffort is none.
49
50
  const supportsNonReasoningParameters =
50
- !isGpt6OrLaterModel &&
51
- gptVersion != null &&
52
- (gptVersion.major > 5 ||
53
- (gptVersion.major === 5 && (gptVersion.minor ?? 0) >= 1));
51
+ isGpt6SolOrLuna ||
52
+ (!isGpt6OrLaterModel &&
53
+ gptVersion != null &&
54
+ (gptVersion.major > 5 ||
55
+ (gptVersion.major === 5 && (gptVersion.minor ?? 0) >= 1)));
54
56
 
55
57
  const systemMessageMode = isReasoningModel ? 'developer' : 'system';
56
58
 
@@ -685,11 +685,19 @@ export class OpenAIResponsesLanguageModel implements LanguageModelV4 {
685
685
  // remove unsupported settings for reasoning models
686
686
  // see https://platform.openai.com/docs/guides/reasoning#limitations
687
687
  if (isReasoningModel) {
688
- // when reasoning effort is none, gpt-5.1 models allow temperature, topP, logprobs
688
+ // Input updates change the effort used to validate sampling parameters.
689
+ let effectiveReasoningEffort = resolvedReasoningEffort;
690
+ for (const item of input) {
691
+ if (item.type === 'configuration_update') {
692
+ effectiveReasoningEffort = item.reasoning.effort;
693
+ }
694
+ }
695
+
696
+ // supported models allow temperature, topP, and logprobs when reasoning effort is none
689
697
  // https://platform.openai.com/docs/guides/latest-model#gpt-5-1-parameter-compatibility
690
698
  if (
691
699
  !(
692
- resolvedReasoningEffort === 'none' &&
700
+ effectiveReasoningEffort === 'none' &&
693
701
  modelCapabilities.supportsNonReasoningParameters
694
702
  )
695
703
  ) {