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
The Copilot provider has several interrelated issues that prevent it from working correctly with account-specific models (e.g. claude-opus-4.6-1m with 1M context) and enterprise Copilot subscriptions.
Problems
Hardcoded context windows from models.dev: The context window resolution for Copilot models falls back to static models.dev data, which does not reflect per-account model availability. For example, claude-opus-4.6-1m (available on some Copilot plans) reports an incorrect context window because models.dev does not list it.
No token exchange: Raw GitHub tokens (ghu_* from device flow) are sent directly to the Copilot API. However, accessing the full model catalog (including internal-only models) requires exchanging these tokens for Copilot API JWTs via the /copilot_internal/v2/token endpoint — the same flow used by VS Code, Copilot CLI, and other first-party clients.
Wrong OAuth Client ID: The current OAuth client ID limits the visible model catalog. VS Code's client ID (Iv1.b507a08c87ecfe98) exposes the full set of models available to the account, including preview and internal-only models.
No enterprise endpoint support: The Copilot base URL is always hardcoded to api.githubcopilot.com. Enterprise Copilot users whose traffic should route through a different endpoint (derivable from the proxy-ep field in the exchanged JWT) cannot use the provider at all. Related: [Feature]: Add support for Github Copilot though Github Enterprise subscription #6455
Expected Behavior
Context windows should reflect the actual values from the Copilot /models API for the authenticated account
Token exchange should happen transparently so internal-only models are accessible
The OAuth client ID should match VS Code's to expose the full model catalog
Enterprise Copilot endpoints should be derived automatically from the exchanged token
Steps to Reproduce
Set up Copilot provider via hermes setup
Switch to an account-specific model like claude-opus-4.6-1m using /model
Observe: model may not appear in the catalog, or if manually set, reports wrong context window (128K instead of 1M)
For enterprise users: API calls fail because the wrong base URL is used
Environment
Hermes Agent v0.8.0
Ubuntu 24.04
GitHub Copilot Individual plan (also affects Business/Enterprise)
Bug Description
The Copilot provider has several interrelated issues that prevent it from working correctly with account-specific models (e.g.
claude-opus-4.6-1mwith 1M context) and enterprise Copilot subscriptions.Problems
Hardcoded context windows from models.dev: The context window resolution for Copilot models falls back to static models.dev data, which does not reflect per-account model availability. For example,
claude-opus-4.6-1m(available on some Copilot plans) reports an incorrect context window because models.dev does not list it.No token exchange: Raw GitHub tokens (
ghu_*from device flow) are sent directly to the Copilot API. However, accessing the full model catalog (including internal-only models) requires exchanging these tokens for Copilot API JWTs via the/copilot_internal/v2/tokenendpoint — the same flow used by VS Code, Copilot CLI, and other first-party clients.Wrong OAuth Client ID: The current OAuth client ID limits the visible model catalog. VS Code's client ID (
Iv1.b507a08c87ecfe98) exposes the full set of models available to the account, including preview and internal-only models.No enterprise endpoint support: The Copilot base URL is always hardcoded to
api.githubcopilot.com. Enterprise Copilot users whose traffic should route through a different endpoint (derivable from theproxy-epfield in the exchanged JWT) cannot use the provider at all. Related: [Feature]: Add support for Github Copilot though Github Enterprise subscription #6455Expected Behavior
/modelsAPI for the authenticated accountSteps to Reproduce
hermes setupclaude-opus-4.6-1musing/modelEnvironment
Related