You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: Request GitHub Copilot auto model routing API access + chat.model plugin hook #20235
I have verified this feature I'm about to request 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.
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:
This would enable auto model selection, cost-based routing, A/B testing, and fallback chains as external plugins.
Reacted by Peter L Jones, Ajay Mamtora, Sablinova, Ricky, Sudarshan Padubidre, Victor Lobato, Lluís Vilanova, Tarik, baterja, Johann Brancourt and 20 more
Reacted by Tarik, matthew-halpern and Rodolfo Ghiggi
Reacted by Julien Caillon, matthew-halpern, Kadu Diógenes, Rodolfo Ghiggi and ftorto
changed the title [-][FEATURE]: Add chat.model plugin hook for dynamic model selection[/-][+][FEATURE]: Request GitHub Copilot auto model routing API access + chat.model plugin hook[/+]on Mar 31, 2026
I'd expect this to be beneficial to the provider, too -- reducing unnecessary load on expensive models, so long as the "Auto" pre-filter load isn't overly expensive and the ML review is accurate.
Ideally, this would be available to free tier users, too, for the same reason.
@fastdrumr Thanks for adding and looking at this. I'd love to use GitHub Copilot "Auto" with Opencode. Indeed, that's one main reason I've been testing copilot-cli since they added it there, but I just like Opencode more!
Activity
[-][FEATURE]: Add chat.model plugin hook for dynamic model selection[/-][+][FEATURE]: Request GitHub Copilot auto model routing API access + chat.model plugin hook[/+]pljones commentedon Apr 4, 2026
I'd expect this to be beneficial to the provider, too -- reducing unnecessary load on expensive models, so long as the "Auto" pre-filter load isn't overly expensive and the ML review is accurate.
Ideally, this would be available to free tier users, too, for the same reason.
mathomp4 commentedon Apr 21, 2026
@fastdrumr Thanks for adding and looking at this. I'd love to use GitHub Copilot "Auto" with Opencode. Indeed, that's one main reason I've been testing copilot-cli since they added it there, but I just like Opencode more!
tarizer commentedon Apr 26, 2026
This is more important now that GitHub copilot has a weekly limit that can only be bypassed by using auto mode.
notcooler commentedon Apr 26, 2026
Is this added or not
Johannbr commentedon Apr 27, 2026
Yes, this feature is getting important when using Github Copilot provider, because of the weekly limit.
Thijmen commentedon Jun 3, 2026
@thdxr Is the project open to receive a PR that enables this?
m0wer commentedon Jun 11, 2026
Here's a (temporary) alternative: #25239 (comment)
github-actions commentedon Aug 30, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
mu88 commentedon Aug 31, 2026
this is still an issue, please reopen
SebbeJohansson commentedon Aug 31, 2026
+1 on reopen