From 9f14c228bfa4d3ebfe2bb06c548d2912807780d9 Mon Sep 17 00:00:00 2001 From: Tin Chi Lo Date: Fri, 21 Aug 2026 14:10:36 -0700 Subject: [PATCH] test(proxy): cursor variant matrix covers ultra and max levels --- .../response_api_endpoints/test_endpoints.py | 4 +++- .../src/components/llm_calls/fetch_models.tsx | 15 +++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/test_litellm/proxy/response_api_endpoints/test_endpoints.py b/tests/test_litellm/proxy/response_api_endpoints/test_endpoints.py index 9177944df2d..a906b0e638f 100644 --- a/tests/test_litellm/proxy/response_api_endpoints/test_endpoints.py +++ b/tests/test_litellm/proxy/response_api_endpoints/test_endpoints.py @@ -1352,7 +1352,9 @@ class TestParseCursorModelVariant: ("gemini-3.0-pro-thinking-low", "gemini-3.0-pro", "low"), ("claude-opus-5-fast", "claude-opus-5", None), ("gpt-5.6-sol", "gpt-5.6-sol", None), - ("foo-thinking-ultra-fast", "foo-thinking-ultra", None), + ("gpt-5.6-thinking-ultra-fast", "gpt-5.6", "ultra"), + ("gpt-5.6-thinking-max", "gpt-5.6", "max"), + ("foo-thinking-mega-fast", "foo-thinking-mega", None), ("-thinking-high", "-thinking-high", None), ], ) diff --git a/ui/litellm-dashboard/src/components/llm_calls/fetch_models.tsx b/ui/litellm-dashboard/src/components/llm_calls/fetch_models.tsx index 0827a006ed7..93f89a44813 100644 --- a/ui/litellm-dashboard/src/components/llm_calls/fetch_models.tsx +++ b/ui/litellm-dashboard/src/components/llm_calls/fetch_models.tsx @@ -19,12 +19,15 @@ interface AvailableModel { supported_reasoning_efforts?: string[] | null; } -const toModelGroup = (item: AvailableModel): ModelGroup => ({ - model_group: item.model_group || item.id || item.model_name || "", - ...(item.mode && { mode: item.mode }), - ...(item.supports_reasoning === true && { supports_reasoning: true }), - ...(item.supported_reasoning_efforts && { supported_reasoning_efforts: item.supported_reasoning_efforts }), -}); +const toModelGroup = (item: AvailableModel): ModelGroup => { + const groupName = (item.model_group || item.id || item.model_name) ?? ""; + return { + model_group: groupName, + ...(item.mode && { mode: item.mode }), + ...(item.supports_reasoning === true && { supports_reasoning: true }), + ...(item.supported_reasoning_efforts && { supported_reasoning_efforts: item.supported_reasoning_efforts }), + }; +}; /** * /models carries no capability metadata, so the team-allowed names are joined against