-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(openai): treat unknown models as reasoning #9976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f714fdc to
8c60210
Compare
| ['gpt-5-nano-2025-08-07', 'true'], | ||
| ['gpt-5-pro', 'true'], | ||
| ['gpt-5-pro-2025-10-06', 'true'], | ||
| ['new-unknown-model', 'true'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will shorten the list before merging, just wanted to keep it complete for review
|
i like this solution |
|
it changes the defaults for unknown models, so it might be a breaking change for folks who use the openai provider with a different baseurl and provider (instead of openaicompat) for historical reasons. might be good to keep ai sdk 6 only and mention in the migration guide |
Background
Most new models coming from OpenAI are reasoning now
Summary
If a model is not recognized, it is now treated as a reasoning model.
I also refactored the code so that responses and chat models are sharing the same logic.
Manual Verification
tested with
openaiexamplesChecklist
pnpm changesetin the project root)Future Work
Look into adding a flag to manually set if a model is treated as reasoning.
Related Issues