Skip to content

fix(core): route Copilot fallback models through AI SDK - #44882

Merged
rekram1-node merged 1 commit into
v2from
github-fix
Aug 25, 2026
Merged

rekram1-node merged 1 commit into
v2from
github-fix

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • preserve the aisdk: package discriminator when GitHub Copilot falls back to models.dev catalog entries after model synchronization is unavailable
  • verify fallback Copilot models resolve through the bundled Copilot AI SDK instead of attempting to load a nonexistent native package
  • cover AI SDK package normalization across synchronized Copilot chat and Anthropic models, models.dev model overrides, legacy V1 config migration, and OpenCode remote provider overrides

Context

Copilot prompts were failing before any provider request with Unsupported package for github-copilot/<model>: @ai-sdk/github-copilot whenever remote Copilot model synchronization failed. The fallback catalog transformer omitted the aisdk: prefix required by model resolution.

Native V2 config handling for bare AI SDK package names is tracked separately in #44881.

Verification

  • bun test test/models.test.ts test/model-resolver.test.ts test/config/config.test.ts test/config/provider.test.ts test/plugin/provider-github-copilot.test.ts test/plugin/provider-opencode.test.ts test/github-copilot/models.test.ts from packages/core (127 passing)
  • bun typecheck from packages/core
  • Prettier formatting check for all changed files

@rekram1-node
rekram1-node merged commit 28c1806 into v2 Aug 25, 2026
7 of 9 checks passed
@rekram1-node
rekram1-node deleted the github-fix branch August 25, 2026 05:01
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
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