Revert "make all gpt-5 and reasoning models to responses by default" #16841
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
PR #16766 changed
mode: "chat"→mode: "responses"for multiple models (gpt-5, o1, o3, etc.). This causes severe issues:1. Breaks old LiteLLM versions
The
model_prices_and_context_window.jsonfile is fetched dynamically from GitHub, so this change affects all LiteLLM versions, not just new ones. Users running older versions experienced unexpected breakage without updating their library.2. Incomplete bridge implementation
The completion → responses bridge is missing
response_format→text.formatconversion, causing:3. Forces unnecessary API migration
Users who don't need
reasoning_contentare forced to use the responses API, which has different limitations.What this PR does
Reverts the
modefield back to"chat"for models that support both endpoints:Keeps
mode: "responses"only for models that require it:No breaking changes
The
supported_endpointsfield already documents which endpoints each model supports. Models can work with chat/completions without losing functionality - users who want reasoning can explicitly uselitellm.responses().Next Steps
response_format→text.formatconversion in the bridgeRelated Issues