From f88cac71bc9576bed1d51eced6bf45ac59cb6c7c Mon Sep 17 00:00:00 2001 From: kshitijk4poor <82637225+kshitijk4poor@users.noreply.github.com> Date: Tue, 14 Jul 2026 23:46:08 +0530 Subject: [PATCH] fix(upstage): map 'ultra' reasoning effort to Solar's high Main added max/ultra effort levels (#62650) after this PR branched; without the mapping 'ultra' silently fell through to the medium default. Matches the xhigh/max collapse-to-strongest convention used by other profiles. --- plugins/model-providers/upstage/__init__.py | 5 +++-- tests/plugins/model_providers/test_upstage_profile.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/model-providers/upstage/__init__.py b/plugins/model-providers/upstage/__init__.py index 7bc202d4bf6a..d36c0734a3a9 100644 --- a/plugins/model-providers/upstage/__init__.py +++ b/plugins/model-providers/upstage/__init__.py @@ -75,8 +75,8 @@ class UpstageProfile(ProviderProfile): if reasoning_config.get("enabled") is False: return {}, top_level - # Map Hermes' effort vocabulary onto Solar's accepted set. xhigh/max - # collapse to high (Solar's strongest). minimal → off (omit). An + # Map Hermes' effort vocabulary onto Solar's accepted set. xhigh/max/ + # ultra collapse to high (Solar's strongest). minimal → off (omit). An # enabled request with no recognised effort uses the default effort. effort = (reasoning_config.get("effort") or "").strip().lower() mapped = { @@ -86,6 +86,7 @@ class UpstageProfile(ProviderProfile): "high": "high", "xhigh": "high", "max": "high", + "ultra": "high", }.get(effort, _DEFAULT_REASONING_EFFORT) if mapped: diff --git a/tests/plugins/model_providers/test_upstage_profile.py b/tests/plugins/model_providers/test_upstage_profile.py index f37971f2f791..257900aed198 100644 --- a/tests/plugins/model_providers/test_upstage_profile.py +++ b/tests/plugins/model_providers/test_upstage_profile.py @@ -78,7 +78,7 @@ class TestUpstageReasoning: assert extra_body == {} assert top_level == {"reasoning_effort": effort} - @pytest.mark.parametrize("effort", ["xhigh", "max"]) + @pytest.mark.parametrize("effort", ["xhigh", "max", "ultra"]) def test_pro_strong_efforts_collapse_to_high(self, upstage_profile, effort): _, top_level = upstage_profile.build_api_kwargs_extras( reasoning_config={"enabled": True, "effort": effort}, model="solar-pro2"