Skip to content

fix(openai-compatible): prevent redundant reasoningEffort field - #8392

Merged
gr2m merged 1 commit into
vercel:mainfrom
jessevdp:fix-openai-compatible-duplicate-reasoning-effort
Sep 2, 2025
Merged

gr2m merged 1 commit into
vercel:mainfrom
jessevdp:fix-openai-compatible-duplicate-reasoning-effort

Conversation

@jessevdp

@jessevdp jessevdp commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Prevent redundant reasoningEffort field alongside reasoning_effort in request body.

Fixes #8372

Background

See #8372. Some OpenAI compatible backends (like LiteLLM proxying to Azure, which is what I can personally test) are tripping over the reasoningEffort field with errors like:

AzureException BadRequestError - Unknown parameter: 'reasoningEffort'

Summary

I decided to NOT forward (spread) any of the "known" openaiCompatibleProviderOptions to avoid duplication. The idea is that these are already added to the correct part of the request body anyway. Why else would they be parsed out?

Tasks

  • Tests have been added / updated (for bug fixes / features)
  • Documentation has been added / updated (for bug fixes / features)
  • A patch changeset for relevant packages has been added (for bug fixes / features - run pnpm changeset in the project root)
  • Formatting issues have been fixed (run pnpm prettier-fix in the project root)
  • I have reviewed this pull request (self-review)

Future Work

—

Related Issues

Fixes #8372

@jessevdp

jessevdp commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

Hey @lgrammel could you take a look? I think this is a pretty quick win. Thanks :)

@jessevdp
jessevdp force-pushed the fix-openai-compatible-duplicate-reasoning-effort branch from 4885c1f to 56236a7 Compare September 2, 2025 07:12
@gr2m gr2m self-assigned this Sep 2, 2025
@gr2m

gr2m commented Sep 2, 2025

Copy link
Copy Markdown
Collaborator

Hey Jesse, thanks for the pull request, I'm having a look.

Hey @lgrammel could you take a look? I think this is a pretty quick win. Thanks :)

No need for extra pings, we do what we can 🙏🏼 Lars is out this week for a conference

@jessevdp

jessevdp commented Sep 2, 2025

Copy link
Copy Markdown
Contributor Author

Sorry, my bad!

Thanks for taking a look :)

@gr2m gr2m left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great PR, thank you @jessevdp! 💐 Would merge again 😄

@gr2m
gr2m merged commit 818f021 into vercel:main Sep 2, 2025
@gr2m gr2m added ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider labels Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai/provider related to a provider package. Must be assigned together with at least one `provider/*` label provider/openai-compatible Issues related to the @ai-sdk/openai-compatible provider task-merge-tracking-done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openai-compatible redundant reasoningEffort field in request body

3 participants