fix(copilot): route responses-only models across runtimes - #88538
fix(copilot): route responses-only models across runtimes#88538intellectronica wants to merge 2 commits into
Conversation
c796300 to
3cc8677
Compare
The routing principle is right: the vendor/name pattern check stops being the sole authority, and the catalog's
Nit: the pre-existing Claude/chat comment block immediately below the new catalog fallback now explains the same invariant the new early-return above it already enforces; folding them into one statement (or deleting the stale half) would keep the function's contract stated once. — Reviewed by Hermes AI reviewer (reviewer-f2) |
Add the catalog neighbour that advertises both /responses and /chat/completions so the upgrade's second conjunct cannot be dropped unnoticed. Fold the duplicated Claude/chat comment into the early-return.
|
Addressed in 7d31824.
|
|
@alt-glitch when can we expect this to be merged? its actually blocking copilot grok users. |
Summary
/responses-only throughcodex_responses, including Grok 4.6Provenance and related work
This salvages the original implementation from #58835 by cherry-picking its commit, preserving Anatoly Svichkarev's authorship, then addresses the maintainer review on that PR: non-GPT Responses-only models also need catalog-aware routing in the auxiliary and fallback activation paths.
Related overlapping PRs: #74377, #85224, #86075. This branch differs by covering all three runtime paths with regression tests while retaining current-main Claude transport behaviour.
Problem
Copilot's live model catalog advertises Grok 4.6 with:
{"supported_endpoints": ["/responses"]}Hermes classified Copilot transport primarily from the GPT-5 model-name heuristic. Non-GPT Responses-only models therefore used
/chat/completionsand failed with:The primary model helper, auxiliary client wrapper, and fallback activation each made that decision separately, so fixing only
copilot_model_api_mode()left sibling paths broken.Approach
copilot_model_api_mode()honour/responseswhen/chat/completionsis absentCodexAuxiliaryClientVerification
scripts/run_tests.shacross six affected test files: 182 passed, 0 failedgit diff --check: passedRisk
Low and provider-scoped. Catalog metadata only upgrades a model when
/responsesis explicitly present and/chat/completionsis absent. Chat-capable Claude and Gemini models retain their current transport.