WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 215184c

Browse files
committed
fix(openai): fix parameter exclusion logic
1 parent 4194e18 commit 215184c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.changeset/mean-pants-rhyme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ai-sdk/openai': patch
3+
---
4+
5+
fix(openai): fix parameter exclusion logic

packages/openai/src/responses/openai-responses-language-model.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,11 @@ export class OpenAIResponsesLanguageModel implements LanguageModelV3 {
271271
};
272272

273273
if (
274-
modelCapabilities.isReasoningModel ||
275-
(openaiOptions?.reasoningEffort === 'none' &&
276-
modelCapabilities.supportsNonReasoningParameters)
274+
modelCapabilities.isReasoningModel &&
275+
!(
276+
openaiOptions?.reasoningEffort === 'none' &&
277+
modelCapabilities.supportsNonReasoningParameters
278+
)
277279
) {
278280
// remove unsupported settings for reasoning models
279281
// see https://platform.openai.com/docs/guides/reasoning#limitations

0 commit comments

Comments
 (0)