mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 22:32:12 +03:00
OmniRoute's GitHub Copilot sanitizer stripped reasoning_effort for every
Claude model (regex /(claude|haiku|oswe)/i), so Claude Opus 4.6 and
Sonnet 4.6 via Copilot never received extended-thinking configuration
even though their backend honors it (3× token increase between
low/medium/high, verified upstream).
Add a granular opt-in for Copilot's Claude routing:
- Pass through reasoning_effort for Claude Opus 4.6 / Sonnet 4.6
- Still strip for Haiku 4.5 / Opus 4.7 (rejected upstream), older
Sonnet/Opus variants, and the oswe-* family
Order matters: the opt-in match runs BEFORE the broad strip pattern.
Notes:
- OmniRoute's openai→claude translator already maps reasoning_effort →
thinking.budget_tokens far more richly than upstream's tiny mapping
table (handles max, xhigh, adaptive models, fits to max_tokens via
fitThinkingToMaxTokens), so only the github-executor half of upstream
PR #791 is ported here.
- "none" is intentionally NOT stripped universally: GPT-5.x treats
reasoning_effort=none as a real value (the non-reasoning mode that
unlocks sampling params, see gpt5SamplingGuard.ts) — stripping it
would break GPT-5 callers.
Co-authored-by: Manuel <baslr@users.noreply.github.com>
Inspired-by: https://github.com/decolua/9router/pull/791