fix(cloud-proxy): parameter compatibility with newest reasoning models#10640
Merged
mudler merged 1 commit intoJul 2, 2026
Merged
Conversation
Newest cloud reasoning models reject two parameters the cloud-proxy
backend currently sends:
- Anthropic (claude-opus-4-x) and OpenAI (gpt-5.x) return 400 when
temperature is present: "'temperature' is deprecated for this model".
OpenAI-compatible clients typically send only the server-side DEFAULT
sampling values rather than user intent, so the translators now forward
neither temperature nor top_p and let the upstream apply its own
defaults.
- OpenAI gpt-5.x rejects max_tokens ("Unsupported parameter: 'max_tokens'
... Use 'max_completion_tokens' instead"). The OpenAI translator now
serializes the token limit as max_completion_tokens, which current
chat-completions models accept.
Verified live against claude-opus-4-8, gpt-5.5 and gemini-3.1-pro
(Gemini OpenAI-compat endpoint). Tests updated to the new contract.
Assisted-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: stefanwalcz <stefan.walcz@walcz.de>
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.
What
The cloud-proxy translate providers currently send two parameters that the newest cloud reasoning models reject:
claude-opus-4-xand OpenAIgpt-5.xreturn 400 whentemperatureis present ("'temperature' is deprecated for this model"). Since OpenAI-compatible clients (chat UIs) typically send only the server-side default sampling values rather than real user intent, the translators now forward neithertemperaturenortop_pand let the upstream apply its own defaults. This extends the existing "drop top_p when both are set" workaround to its logical conclusion.gpt-5.xrejects it ("Unsupported parameter: 'max_tokens' ... Use 'max_completion_tokens' instead"). The OpenAI translator now serializes the token limit asmax_completion_tokens, which current chat-completions models accept.Verification
Verified live against
claude-opus-4-8,gpt-5.5andgemini-3.1-pro(Gemini OpenAI-compat endpoint) through a LocalAI deployment — all three now answer through the cloud-proxy backend where they previously failed with the 400s above.go test ./backend/go/cloud-proxy/...green (tests updated to the new contract).Notes
If per-model explicit sampling control is desired later, a model-config opt-in would be the cleaner path than unconditional forwarding — happy to follow up if wanted.