Repository navigation
fix(core): route responses-only Copilot models to the Responses API - #51024
Merged
Merged
Conversation
Copilot serves Grok, Gemini, and MAI Code only on /responses. The model ID fallback only routed gpt-5+ there, so these families hit /chat/completions whenever the live model list had not loaded or omitted supported_endpoints, failing with "model ... is not accessible via the /chat/completions endpoint". Advertised endpoint metadata still takes precedence; this only widens the fallback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Copilot serves Grok, Gemini, and MAI Code only on
/responses, but the model ID fallback only routedgpt-5+there. Whenever the live/modelsmetadata had not loaded (or omittedsupported_endpoints), those families were sent to/chat/completionsand failed withmodel "..." is not accessible via the /chat/completions endpoint.This widens the fallback so
grok-*,gemini-*, andmai-code-*use the Responses API. Advertisedsupported_endpointsmetadata still takes precedence when present.Refs #42759 and #44103. The V2 SDK-selection half of #44103 was already addressed by #44882; this covers the remaining routing fallback.
Testing
packages/core:bun test test/plugin/provider-github-copilot.test.tspackages/core:bun typecheck