Repository navigation
fix: keep reasoning_effort xhigh on Gemini and suffixed Claude ids - #47086
seonghobae wants to merge 1 commit into
Conversation
Gemini has no thinking level above high, so xhigh was a 400. Claude ids with an effort suffix such as claude-sonnet-5-5-high now inherit the base model's xhigh flag.
BrickerP
left a comment
There was a problem hiding this comment.
Nice coverage for bare …-high / Gemini xhigh→high. One gap in _model_map_lookup_candidates: the suffix transforms are applied independently to each primary candidate, not composed.
So claude-sonnet-5-5-20260219-high yields …-20260219-high and …-20260219, but never the undated base claude-sonnet-5-5 that actually owns supports_xhigh_reasoning_effort. Dated + effort-alias ids therefore still miss the capability flag this PR is trying to preserve.
Same shape already exists for other pairs (e.g. date + bedrock version), but this PR is specifically about effort aliases — worth either chaining effort-strip then re-running the other normalizers on that result, or adding a regression test for a dated …-YYYYMMDD-high / …-xhigh id.
| _BEDROCK_VERSION_SUFFIX_RE.sub("", cand), | ||
| _INFERENCE_PROFILE_MINOR_RE.sub("", cand), | ||
| _DATED_RELEASE_SUFFIX_RE.sub("", cand), | ||
| _EFFORT_ALIAS_SUFFIX_RE.sub("", cand), |
There was a problem hiding this comment.
Effort strip here is only applied to primary candidates. After this produces claude-sonnet-5-5-20260219 from …-20260219-high, nothing runs _DATED_RELEASE_SUFFIX_RE on that result, so the cost-map base never appears. Consider composing (effort → then date/bedrock/etc.) or at least a test for dated+effort aliases.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Now the hydrogen is out. The support for the xhigh is still missing. Any update on this? |
Summary
reasoning_effort=xhighwithUnsupportedParamsError, even though the API has no level abovehigh. Mapxhighto that ceiling instead of failing the request.claude-sonnet-5-5-high, missed the base entry'ssupports_xhigh_reasoning_effortflag and raisedeffort='xhigh' is not supported. Look that suffix up against the base id so the flag is inherited. Models that still do not advertisexhigh, includingclaude-sonnet-4-6, keep the existing rejection.Test plan
pytest tests/unit/llms/vertex_ai/gemini/test_vertex_and_google_ai_studio_gemini.py::test_reasoning_effort_maps_to_thinking_level_gemini_3pytest tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py::test_effort_alias_suffix_inherits_base_model_xhighpytest tests/unit/llms/anthropic/chat/test_anthropic_chat_transformation.py::test_validate_effort_for_model_centralises_per_model_gatingMade with Cursor