Feature hasn't been suggested before.
Describe the enhancement you want to request
Request GitHub to grant opencode access to the Copilot auto model routing API (/models/session).
VS Code's Copilot extension has a server-side auto model selection feature that uses ML to classify prompt complexity and route to the best model. The API endpoints are:
POST /models/session — creates an auto-mode session, returns available models and a session token
POST /models/session/intent — per-turn routing, returns ranked candidate models based on prompt analysis
This API is currently restricted to first-party OAuth clients (VS Code's client ID). When opencode's client ID (Ov23li8tweQw6odWQebz) calls these endpoints, it gets a 404.
Why this matters:
What's needed:
The opencode team already has an official partnership with GitHub for Copilot support. Requesting access to the /models/session and /models/session/intent endpoints for opencode's OAuth client ID would enable native auto model selection matching VS Code's experience.
Additionally, a chat.model plugin hook would allow the community to implement model routing as external plugins regardless of API access. Proposed signature:
"chat.model": async (incoming: {
sessionID: string
agent: string
model: Provider.Model
provider: Provider.Info
message: MessageV2.User
}, output: {
model: Provider.Model
}) => void
This would enable auto model selection, cost-based routing, A/B testing, and fallback chains as external plugins.
Feature hasn't been suggested before.
Describe the enhancement you want to request
Request GitHub to grant opencode access to the Copilot auto model routing API (
/models/session).VS Code's Copilot extension has a server-side auto model selection feature that uses ML to classify prompt complexity and route to the best model. The API endpoints are:
POST /models/session— creates an auto-mode session, returns available models and a session tokenPOST /models/session/intent— per-turn routing, returns ranked candidate models based on prompt analysisThis API is currently restricted to first-party OAuth clients (VS Code's client ID). When opencode's client ID (
Ov23li8tweQw6odWQebz) calls these endpoints, it gets a 404.Why this matters:
What's needed:
The opencode team already has an official partnership with GitHub for Copilot support. Requesting access to the
/models/sessionand/models/session/intentendpoints for opencode's OAuth client ID would enable native auto model selection matching VS Code's experience.Additionally, a
chat.modelplugin hook would allow the community to implement model routing as external plugins regardless of API access. Proposed signature:This would enable auto model selection, cost-based routing, A/B testing, and fallback chains as external plugins.