Skip to content

fix(copilot): honor catalog-supported xhigh instead of unconditional downgrade (salvage #62028) - #65727

Merged
teknium1 merged 4 commits into
mainfrom
fix/copilot-xhigh-preserve
Jul 16, 2026
Merged

fix(copilot): honor catalog-supported xhigh instead of unconditional downgrade (salvage #62028)#65727
teknium1 merged 4 commits into
mainfrom
fix/copilot-xhigh-preserve

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Copilot reasoning-effort negotiation now honors the model's supported-effort set instead of unconditionally collapsing xhigh/max/ultra to high — downgrade happens only when the requested level is genuinely unsupported, choosing the nearest weaker supported level.

Salvage of #62028 by @hydraxman (which itself preserved commits from #10391/#51480 by @AlsayedHoota and @arminanton — all three authorships preserved via cherry-pick).

Behavior today is unchanged: the static effort lists cap at high, so nothing currently reports xhigh as supported. The fix removes the silent cap so the moment live catalog resolution (#51953) supplies richer per-model sets, higher levels are honored automatically.

Changes

  • plugins/model-providers/copilot/__init__.py: replace the unconditional {xhigh,max,ultra}→high map with membership-driven nearest-down clamping (@AlsayedHoota, @arminanton)
  • run_agent.py _github_models_reasoning_extra_body: same fix on the core GitHub Responses path — downgrade xhigh only when the supported set lacks it (@arminanton)
  • tests/plugins/model_providers/test_copilot_profile.py (new) + tests/run_agent/test_run_agent.py: pins the contract on both request paths with a stubbed catalog (@hydraxman)
  • scripts/release.py: AUTHOR_MAP entry for the test commit's bare-noreply git identity

Validation

requested catalog supports before after
xhigh includes xhigh high (silent cap) xhigh
xhigh caps at high high high
minimal lacks minimal low (nearest-down)

Targeted: test_copilot_profile.py + test_run_agent.py — 438 passed.

Closes #62028. Refs #51953 (live catalog resolution — separate review), #52384.

Infographic

copilot-xhigh-preserve

AlsayedHoota and others added 4 commits July 16, 2026 07:42
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.
…not xhigh->high

The Copilot provider profile unconditionally mapped ``xhigh`` to ``high`` before
checking the model's catalog, so models that DO support ``xhigh`` (e.g. the
gpt-5.x family per the live /models catalog) were silently capped one level
down.

Honor the requested effort when the catalog lists it as supported, and only
downgrade when it does not, choosing the nearest weaker supported level
(xhigh->high, minimal->low, else medium, else the first supported level). This
matches the nearest-down clamp behavior used elsewhere for the ``max`` effort.

Adds tests/plugins/model_providers/test_copilot_profile.py covering forward,
downgrade, and fallback paths (catalog lookup stubbed).
Add current-main regression coverage for both the registered provider
profile and core GitHub Responses path while leaving live catalog loading
to the complementary catalog-resolution work in #51953.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/plugins Plugin system and bundled plugins provider/copilot GitHub Copilot (ACP + Chat) labels Jul 16, 2026
@teknium1
teknium1 merged commit 8462764 into main Jul 16, 2026
33 checks passed
@teknium1
teknium1 deleted the fix/copilot-xhigh-preserve branch July 16, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have provider/copilot GitHub Copilot (ACP + Chat) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants