Problem
When adding new GitHub Copilot models via config (e.g., gpt-5.3-codex), they fail with "model not supported" error even though the model works in VS Code Copilot.
{
"provider": {
"github-copilot": {
"models": {
"gpt-5.3-codex": {
"modalities": {
"input": ["text", "image"],
"output": ["text"]
}
}
}
}
}
}
Root Cause
Two issues compound to cause this:
-
Wrong SDK package: Config-defined models fall back to @ai-sdk/openai-compatible which lacks the responses() method needed for /responses endpoint. Models like gpt-5.3-codex require this endpoint, not /chat/completions.
-
Plugin loading blocked: External auth plugins (like opencode-copilot-auth) that use the correct GitHub App client ID (Iv1.b507a08c87ecfe98) were explicitly skipped from loading in plugin/index.ts.
Technical Details
- The bundled
@ai-sdk/github-copilot SDK in ./sdk/copilot/ has the responses() method
- The npm package
@ai-sdk/openai-compatible does not
- The npm override in
provider.ts ran BEFORE config processing, so config-defined models never got the correct SDK
- Line 56 in
plugin/index.ts contained: if (plugin.includes("opencode-copilot-auth")) continue which prevented external plugins from loading
Related
Fix
Problem
When adding new GitHub Copilot models via config (e.g.,
gpt-5.3-codex), they fail with "model not supported" error even though the model works in VS Code Copilot.{ "provider": { "github-copilot": { "models": { "gpt-5.3-codex": { "modalities": { "input": ["text", "image"], "output": ["text"] } } } } } }Root Cause
Two issues compound to cause this:
Wrong SDK package: Config-defined models fall back to
@ai-sdk/openai-compatiblewhich lacks theresponses()method needed for/responsesendpoint. Models likegpt-5.3-codexrequire this endpoint, not/chat/completions.Plugin loading blocked: External auth plugins (like
opencode-copilot-auth) that use the correct GitHub App client ID (Iv1.b507a08c87ecfe98) were explicitly skipped from loading inplugin/index.ts.Technical Details
@ai-sdk/github-copilotSDK in./sdk/copilot/has theresponses()method@ai-sdk/openai-compatibledoes notprovider.tsran BEFORE config processing, so config-defined models never got the correct SDKplugin/index.tscontained:if (plugin.includes("opencode-copilot-auth")) continuewhich prevented external plugins from loadingRelated
Fix