diff --git a/api/config.py b/api/config.py index 7d21d214..f50032fa 100644 --- a/api/config.py +++ b/api/config.py @@ -3340,10 +3340,17 @@ def resolve_model_reasoning_efforts( provider = _resolve_provider_alias(provider) + # IDE-copilot providers never expose reasoning effort options. + # Guard early so a stray config entry can't override this. + if provider in {"cursor-acp", "copilot-acp"}: + return [] + # 0. Provider config: providers..reasoning_efforts # When the user has explicitly listed valid efforts for a provider, # return that list directly — no heuristics, no models.dev lookup. # Handles both custom: and bare registered provider names (e.g. wandb). + # Only short-circuits when the filtered list is non-empty; an all-invalid + # list (e.g. typos) falls through to heuristics instead of hiding reasoning. _prov_name = None if provider and provider.startswith("custom:"): _prov_name = provider.split(":", 1)[1] @@ -3362,9 +3369,6 @@ def resolve_model_reasoning_efforts( except Exception: pass - if provider in {"cursor-acp", "copilot-acp"}: - return [] - hinted_model = _strip_provider_hint_for_reasoning(model) if _nested_route_reasoning_denied(hinted_model):