Skip to content

fix(github-copilot): record Messages and Responses packages per model - #9277

Merged
rekram1-node merged 1 commit into
devfrom
copilot-model-packages
Oct 9, 2026
Merged

rekram1-node merged 1 commit into
devfrom
copilot-model-packages

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Copilot serves models on different endpoints, but the catalog only declares the provider-level @ai-sdk/openai-compatible (/chat/completions). Clients that cannot load Copilot's authenticated GET /models (for example behind a proxy that blocks it) fall back to this catalog, so they currently send Claude to /chat/completions and responses-only models to the wrong endpoint.

This adds a per-model [provider] override:

  • Claude (claude-*, 11 models): npm = "@ai-sdk/anthropic", api = "https://api.githubcopilot.com/v1" (Anthropic Messages at /v1/messages).
  • Responses API (gpt-5.3-codex, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.5, gpt-5.6-*, gpt-6-*, gpt-6.1-sol, grok-4.5/4.6/4.7, mai-code-1-flash-picker, mai-code-1.1-flash): npm = "@ai-sdk/openai".
  • Unchanged (chat completions via the provider default): gemini-*, kimi-*, gpt-5-mini.

Evidence

Authenticated GET https://api.githubcopilot.com/models (X-GitHub-Api-Version: 2026-08-01) supported_endpoints, plus a minimal live request per endpoint for each model available to the test account:

models /v1/messages /responses /chat/completions
claude-haiku-4.5, claude-haiku-5.5, claude-sonnet-5, claude-sonnet-5.5 200 400 unsupported_api_for_model 200
claude-opus-4.8, claude-opus-5, claude-opus-5.5, claude-fable-5, claude-fable-5.1 advertised — advertised
gpt-5.3-codex, gpt-5.4-mini, gpt-5.6-luna, gpt-5.6-terra, gpt-6-luna, mai-code-1.1-flash, grok-4.5/4.6/4.7 400 200 400 unsupported_api_for_model
gpt-5.4 400 200 200
gpt-5.5, gpt-5.6-sol, gpt-6-sol, gpt-6.1-sol, gpt-6-astra — advertised (/responses, ws:/responses) not advertised
gemini-3.7-flash, gemini-3.8-flash, kimi-k3 400 400 unsupported_api_for_model 200
gpt-5-mini 400 200 200

"Advertised" rows are policy-disabled on the test account, so only /models metadata was available. claude-opus-4.7, claude-sonnet-4.6, gpt-5.4-nano, and mai-code-1-flash-picker were not in the account's model list; they follow their family. gpt-5.4 accepts both, and Copilot clients use Responses for GPT-5+.

The Copilot sync only updates cost and leaves [provider] intact (github-copilot sync run: 35 unchanged). bun validate passes.

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 9, 2026
@rekram1-node
rekram1-node merged commit b77f954 into dev Oct 9, 2026
2 checks passed
@rekram1-node
rekram1-node deleted the copilot-model-packages branch October 9, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant