From 633fc7ab88be7ca1c1c63b634fecabfd3a966605 Mon Sep 17 00:00:00 2001 From: Al Sayed Hoota <78100282+AlsayedHoota@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:11:44 +0400 Subject: [PATCH] fix: don't downgrade xhigh reasoning effort when provider supports it The current code unconditionally downgrades 'xhigh' to 'high' whenever 'high' is in supported_efforts, even if 'xhigh' is also supported. This prevents users from using extended thinking on providers like Copilot that list 'xhigh' in their supported efforts. Fix: only downgrade 'xhigh' to 'high' when 'xhigh' is NOT in the provider's supported efforts list. --- run_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_agent.py b/run_agent.py index 22718eeac406..4d0436247e56 100644 --- a/run_agent.py +++ b/run_agent.py @@ -5568,7 +5568,7 @@ class AIAgent: else: requested_effort = "medium" - if requested_effort == "xhigh" and "high" in supported_efforts: + if requested_effort == "xhigh" and "xhigh" not in supported_efforts and "high" in supported_efforts: requested_effort = "high" elif requested_effort not in supported_efforts: if requested_effort == "minimal" and "low" in supported_efforts: