fix(api-server): 'max' and 'ultra' reasoning efforts no longer silently ignored (salvage #78216 api_server hunk) - #90558
Merged
Merged
Conversation
…lently ignored on API/browser requests _request_reasoning_config() whitelisted none..xhigh, so a client sending max or ultra (valid /reasoning + config.yaml levels) fell through to the default effort with no error. The server now accepts the full internal ladder (hermes_constants.VALID_REASONING_EFFORTS); per-provider wire clamping happens downstream via agent.reasoning_effort, same as every other entry surface. Salvages the api_server hunk of #78216 (credit @snowzlmbot); the un-clamping half of that PR was rejected separately.
Contributor
૮ >ﻌ< ა ci reviewran on 7ec75b6 — fix(api-server): 'max' and 'ultra' reasoning efforts are no
|
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.
Summary
API/browser requests with
reasoning_effort: maxorultraare no longer silently ignored — the API server now accepts the full internal ladder, matching every other entry surface (/reasoning, config.yaml, dashboard)._request_reasoning_config()whitelistednone..xhigh, so a client sendingmax/ultrafell through to the default effort with no error. Wire clamping to each provider's vocabulary happens downstream viaagent.reasoning_effort(#90350/#90441), so the entry gate has no reason to be narrower than the ladder.Changes
gateway/platforms/api_server.py:_REASONING_EFFORTSwidened to the full ladder +noneVALID_REASONING_EFFORTSlevel as accepted; bespoke levels still ignoredSalvages the api_server hunk of #78216 (credit @snowzlmbot). That PR's other hunks — removing the transport-level
ultraclamp and the terminal_tool lifecycle bypass — were declined separately.Validation
113 API-server tests green (new ladder test + full test_api_server.py).
Infographic