Fix gpt-5-chat-latest model not supported error#2171
Closed
yunus25jmi1 wants to merge 1 commit intodocker:mainfrom
Closed
Fix gpt-5-chat-latest model not supported error#2171yunus25jmi1 wants to merge 1 commit intodocker:mainfrom
yunus25jmi1 wants to merge 1 commit intodocker:mainfrom
Conversation
Exclude gpt-5-chat-latest variants from reasoning model detection to prevent sending unsupported reasoning.summary parameter. The gpt-5-chat-latest model variant does not support the reasoning.summary parameter, causing 400 Bad Request errors when the Responses API is used. Fixes: docker#2166 Signed-off-by: Md Yunus <admin@yunuscollege.eu.org>
d043d19 to
3ca8c33
Compare
Contributor
Author
|
Closing to recreate with proper attribution details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes issue #2166 where the
gpt-5-chat-latestmodel was incorrectly treated as a reasoning model, causing a 400 Bad Request error due to the unsupportedreasoning.summaryparameter.Root Cause
The
isOpenAIReasoningModel()function inpkg/model/provider/openai/client.gowas returningtruefor all models starting withgpt-5, but the-chat-latestvariants are non-reasoning models that don't support thereasoning.summaryparameter.Changes
pkg/model/provider/openai/client.go
isOpenAIReasoningModel()to exclude models containing-chat-latestin their namepkg/model/provider/openai/thinking_budget_test.go
gpt-5-chat-latestand similar variants to ensure they're correctly identified as non-reasoning modelsVerification
gpt-5-chat-latestvariants passgo test -race)Testing
The fix was verified with:
TestIsOpenAIReasoningModelincluding new test casesgo test ./... -short)go test -race)Related Issue
Fixes #2166