Skip to content

fix(core): route responses-only Copilot models to the Responses API - #51024

Merged
rekram1-node merged 1 commit into
v2from
copilot-endpoint-routing
Sep 24, 2026
Merged

rekram1-node merged 1 commit into
v2from
copilot-endpoint-routing

Conversation

@rekram1-node

Copy link
Copy Markdown
Contributor

Summary

Copilot serves Grok, Gemini, and MAI Code only on /responses, but the model ID fallback only routed gpt-5+ there. Whenever the live /models metadata had not loaded (or omitted supported_endpoints), those families were sent to /chat/completions and failed with model "..." is not accessible via the /chat/completions endpoint.

This widens the fallback so grok-*, gemini-*, and mai-code-* use the Responses API. Advertised supported_endpoints metadata 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.ts
  • packages/core: bun typecheck

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant