← Back to PRs

#20947: feat: expand Copilot model catalog with anthropic-messages API

by austenstone open 2026-02-19 13:25 View on GitHub →
size: S
## Summary - Problem: The GitHub Copilot model catalog was outdated (8 models) and used the wrong API type (`claude` instead of `anthropic-messages`) for Claude models. - Why it matters: Using `claude` API type prevented proper Anthropic thinking headers and caused session issues. Missing models meant users couldn't select newer Copilot-hosted models. - What changed: Expanded model catalog from 8 to 25+ models. Switched Claude models to `anthropic-messages` API type. Added vision/reasoning capability sets. All costs set to `ZERO_COST` (Copilot uses premium request units, not per-token pricing). - What did NOT change (scope boundary): No SDK, auth, or session runner changes — those are in separate PRs. Split out from #17333. ## Change Type (select all) - [ ] Bug fix - [x] Feature - [ ] Refactor - [ ] Docs - [ ] Security hardening - [ ] Chore/infra ## Scope (select all touched areas) - [ ] Gateway / orchestration - [ ] Skills / tool execution - [ ] Auth / tokens - [ ] Memory / storage - [x] Integrations - [ ] API / contracts - [ ] UI / DX - [ ] CI/CD / infra ## Linked Issue/PR - Related #17333 - SDK dependency: `discoverCopilotModels()` was removed; re-add once #17333 lands ## User-visible / Behavior Changes - Claude models via GitHub Copilot now use `anthropic-messages` API type instead of `claude`. This enables proper thinking block handling. - 17+ new models available in the Copilot provider catalog. - Cost set to zero (premium request unit tracking is handled separately via `provider-usage.fetch.copilot.ts`). ## Security Impact (required) - New permissions/capabilities? No - Secrets/tokens handling changed? No - New/changed network calls? No (same API endpoints, different request format for Claude) - Command/tool execution surface changed? No - Data access scope changed? No ## Evidence - [x] Build passes - [x] 10 tests pass in `github-copilot-models.test.ts` ## Compatibility / Migration - Backward compatible? Mostly — Claude model API type change from `claude` to `anthropic-messages` may affect existing sessions if users had hardcoded the API type. - Config/env changes? No - Migration needed? No ## Risks and Mitigations - Risk: Claude → anthropic-messages API type change could break existing sessions mid-conversation. - Mitigation: New sessions will use the correct type; existing sessions will adapt on next model resolution. ## Failure Recovery (if this breaks) - Revert this commit; Claude models will revert to `claude` API type and the model catalog will shrink back to 8 models.

Most Similar PRs