Repository navigation
Copilot should use the appropriate subscription-based routing within /model experience #346
Copy link
Copy link
Closed
Closed
Copy link
Description
Describe the bug
I'm unable to select models since v0.0.330 using the /model command in the Copilot CLI.
I'm accessing copilot via my organization account.
I've confirmed in my GitHub Copilot settings the following:
Copilot CLIis enabledAnthropic Claude Sonnet 4is enabledAnthropic Claude Sonnet 4.5is enabledOpenAI GPT-5is enabled
I've included my reproduction steps for v0.0.330, v0.0.331, v0.0.343
Affected version
0.0.343 Commit: 5847051
Steps to reproduce the behavior
v0.0.330
- Run copilot v0.0.330
npx -y @github/copilot@0.0.330 - Type
/modelinto the input window - See:
Select Model
Choose the AI model to use for Copilot CLI. The selected model will be persisted and used for future sessions.
❯ 1. Claude Sonnet 4 (default)
2. GPT-5
3. Claude Sonnet 4.5 (current)
4. Cancel (Esc)
Use ↑/↓ to navigate, Enter to select, Esc to cancel
v0.0.331
- Run copilot v0.0.331
npx -y @github/copilot@0.0.331 - Type
/modelinto the input window - See:
ERROR No supported model available
file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:1548:603
- QWe (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:1548:603)
- jEt (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:1548:1087)
- (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:1885:55527)
- FG (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:138:8647)
- VN (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:138:8831)
- Object.useState (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:228:2823)
- process.env.NODE_ENV.vr.useState (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:47:12332)
- JLt (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:1885:55522)
- react-stack-bottom-frame (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:228:12762)
- z2 (file:///Users/[username]/.npm/_npx/8cc353b481bea4e6/node_modules/@github/copilot/index.js:138:807)
v0.0.343
- Run copilot v0.0.343
npx -y @github/copilot@0.0.343 - Type
/modelinto the input window - See:
Select Model Choose the AI model to use for Copilot CLI. The selected model will be persisted and used for future sessions.
Some models are not available due to configured policy.
❯ 1. Cancel (Esc)
Confirm with number keys or ↑↓ keys and Enter, Cancel with Esc
Expected behavior
I expect to see a model selector with similar functionality as in v0.0.330
Select Model
Choose the AI model to use for Copilot CLI. The selected model will be persisted and used for future sessions.
Some models are not available due to configured policy.
❯ 1. Claude Sonnet 4 (default)
2. GPT-5
3. Claude Sonnet 4.5 (current)
4. Cancel (Esc)
Confirm with number keys or ↑↓ keys and Enter, Cancel with Esc
Additional context
- MacOS 15.6.1
- Apple M2 chip
- Nodejs v24.10.0
- Terminal
- zsh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
andyfeller commentedon Oct 17, 2025
Thank you for raising this concern, @johnsockwell-tributetech! 🙇
I'm still trying to figure out what is going on here, but first I wanted to demonstrate what should be shown via the latest release:
$ npx -y @github/copilot@latest ┌── ──┐ │ ▄██████▄ │ Welcome to GitHub ▄█▀▀▀▀▀██▀▀▀▀▀█▄ █████┐ █████┐ █████┐ ██┐██┐ █████┐ ██████┐ ▐█ ▐▌ █▌ ██┌───┘██┌──██┐██┌─██┐██│██│ ██┌──██┐└─██┌─┘ ▐█▄ ▄██▄ ▄█▌ ██│ ██│ ██│█████┌┘██│██│ ██│ ██│ ██│ ▄▄███████▀▀███████▄▄ ██│ ██│ ██│██┌──┘ ██│██│ ██│ ██│ ██│ ████ ▄ ▄ ████ └█████┐└█████┌┘██│ ██│██████┐└█████┌┘ ██│ ████ █ █ ████ └────┘ └────┘ └─┘ └─┘└─────┘ └────┘ └─┘ ▀███▄ ▄███▀ │ CLI Version 0.0.343 ▀▀████████████▀▀ │ └── ──┘ Version 0.0.343 · Commit 5847051 Copilot can write, test and debug code right from your terminal. Describe a task to get started or enter ? for help. Copilot uses AI, check for mistakes. ● Logged in with gh as user: andyfeller ● Connected to GitHub MCP Server Select Model Choose the AI model to use for Copilot CLI. The selected model will be persisted and used for future sessions. ❯ 1. Claude Sonnet 4.5 (1x) (default) (current) 2. Claude Sonnet 4 (1x) 3. Claude Haiku 4.5 (0.33x) 4. GPT-5 (1x) 5. Cancel (Esc) Confirm with number keys or ↑↓ keys and Enter, Cancel with EscOutside of whether you see any useful information in
~/.copilot/logs, I'm gonna see if I can reproduce this or at least figure out why all options are coming up blank 🤔andyfeller commentedon Oct 17, 2025
@johnsockwell-tributetech : I'd like to try increasing the log level using
--log-level allto see what is going on here. While I understand 3 of 4 supported models are enabled by policy, I wonder about the new Haiku model but also if there's something else going on here.mkeesey commentedon Oct 20, 2025
I'm seeing the same thing.
My log with
--log-level allenabled looks like this. I'm using Fedora 42 with node 24 installed via nvm.jianie365 commentedon Oct 20, 2025
Have the same issue here since v.0.0.330
johnsockwell-tributetech commentedon Oct 20, 2025
@andyfeller Below are logs captured using
npx -y @github/copilot@0.0.xxx --log-level allwith the three versions. I started each version & attempted the/modelcommand then exited.v0.0.330
v0.0.331
v0.0.343
andyfeller commentedon Oct 21, 2025
@johnsockwell-tributetech @jianie365 @mkeesey : thank you all for the follow up and additional logs; this is exactly what I needed and will help me get to the bottom of this! 🙇
I want to assure you this is my priority to get to the bottom today.
andyfeller commentedon Oct 21, 2025
My working theory is the
421 Misdirect Requestresponse stems fromcopilotresolving a different subscription API endpoint than the Copilot license you have:This endpoint is resolved via GraphQL based on how you are authenticated:
I'm going to continue investigating what would have changed between
0.0.330and0.0.331to affect the endpoint 🤔For more information, see Managing GitHub Copilot access to your enterprise's network
andyfeller commentedon Oct 21, 2025
@johnsockwell-tributetech : I'd like to ask you to
/logoutand/loginto ensure you are authenticated against the GitHub Copilot CLI OAuth app and your business account.johnsockwell-tributetech commentedon Oct 21, 2025
@andyfeller : below are the steps I performed & associated log.
npx -y @github/copilot@0.0.343 --log-level all/logoutcommand/logincommand & authenticated with GitHub.com/modelcommandBelow are the logs from this session:
andyfeller commentedon Oct 21, 2025
Thanks, @johnsockwell-tributetech. I have a suspicion that
copilotis picking up on multiple authentication tokens while trying to resolve the Copilot API to talk with. This information is currently only displayed in the console and not the logs, so I'm working on a hotfix to capture more information about what is going on and provide better guidance to resolve.7 remaining items
andyfeller commentedon Oct 24, 2025
@johnsockwell-tributetech : When it is convenient, I would appreciate your help testing out the logging changes in
0.0.350. Meanwhile, I'm working to put more logging in place and investigating howcopilotis being told to hitapi.individual.githubcopilot.com. 🙇andyfeller commentedon Oct 24, 2025
@johnsockwell-tributetech : Outside of
copilot, I would like to enable a feature flag that affects how we resolve Copilot information around your account if you are okay with it.johnsockwell-tributetech commentedon Oct 27, 2025
@andyfeller I took a pass at my tests using the latest copilot version. Steps & logs are below:
npx -y @github/copilot@latest --log-level all/logoutcommand & exitnpx -y @github/copilot@latest --log-level all/modelcommandSee:
/logincommand & successfully authenticate (use Github.com account.)/modelcommandSee:
2025-10-27T17:33:15.236Z [INFO] Starting Copilot CLI: 0.0.351
Commit: 90770bc
2025-10-27T17:33:15.236Z [INFO] Node.js version: v24.10.0
2025-10-27T17:33:15.274Z [INFO] Login status unknown
2025-10-27T17:33:15.291Z [ERROR] Error checking for updates: TypeError: Cannot read properties of undefined (reading 'paths')
2025-10-27T17:33:15.313Z [LOG] Starting MCP client for Docker_MCP_Toolkit with command: docker and args: mcp,gateway,run
2025-10-27T17:33:15.313Z [LOG] Starting MCP client for Docker_MCP_Toolkit with command: docker and args: mcp,gateway,run
2025-10-27T17:33:15.314Z [LOG] Creating MCP client for Docker_MCP_Toolkit...
2025-10-27T17:33:15.317Z [LOG] Connecting MCP client for Docker_MCP_Toolkit...
2025-10-27T17:33:15.320Z [ERROR] Failed to start MCP client for Docker_MCP_Toolkit: Error: spawn docker ENOENT
2025-10-27T17:33:15.321Z [START-GROUP] gh auth token --hostname github.com
2025-10-27T17:33:15.323Z [ERROR] Error: spawn gh ENOENT
2025-10-27T17:33:15.323Z [END-GROUP]
2025-10-27T17:33:15.324Z [DEBUG] Error checking GitHub CLI: Error: spawn gh ENOENT (stderr: )
2025-10-27T17:33:15.328Z [INFO] Logged out
2025-10-27T17:33:15.350Z [LOG] MCP transport for Docker_MCP_Toolkit closed
2025-10-27T17:33:15.351Z [START-GROUP] gh auth token --hostname github.com
2025-10-27T17:33:15.353Z [ERROR] Error: spawn gh ENOENT
2025-10-27T17:33:15.353Z [END-GROUP]
2025-10-27T17:33:15.353Z [DEBUG] Error checking GitHub CLI: Error: spawn gh ENOENT (stderr: )
2025-10-27T17:40:04.917Z [DEBUG] Fetched Copilot URL: 200 https://api.individual.githubcopilot.com
2025-10-27T17:40:04.918Z [LOG] Starting remote MCP client for github-mcp-server with url: https://api.individual.githubcopilot.com/mcp/readonly
2025-10-27T17:40:04.919Z [LOG] Creating MCP client for github-mcp-server...
2025-10-27T17:40:04.922Z [LOG] Connecting MCP client for github-mcp-server...
2025-10-27T17:40:05.322Z [LOG] MCP transport for github-mcp-server closed
2025-10-27T17:40:05.322Z [ERROR] Failed to start MCP client for remote server github-mcp-server: TypeError: fetch failed
2025-10-27T17:40:05.322Z [LOG] GitHub MCP server configured after authentication
2025-10-27T17:40:05.336Z [INFO] Logged in as user: johnsockwell-tributetech
2025-10-27T17:40:05.500Z [DEBUG] Fetched Copilot URL: 200 https://api.individual.githubcopilot.com
2025-10-27T17:40:05.501Z [DEBUG] Creating copilot-client for integration ID copilot-developer-cli with token authentication. User-agent: copilot/0.0.351 (darwin v24.10.0) OpenAI/5.20.1
2025-10-27T17:40:06.867Z [ERROR] Failed to list models: 421 : Misdirected Request
2025-10-27T17:40:06.867Z [ERROR] Verify the authenticated user against subscription-based Copilot API endpoint used: https://api.individual.githubcopilot.com
johnsockwell-tributetech commentedon Oct 27, 2025
I approve.
andyfeller commentedon Oct 28, 2025
@johnsockwell-tributetech : I've toggled the feature flag and appreciate if you let me know if that has made any change here. 🙇
MarsonShine commentedon Oct 29, 2025
thanks, this working for me
johnsockwell-tributetech commentedon Oct 29, 2025
@andyfeller : I've encountered some conflicting results:
/modelcommand I saw the expected list of models including Haiku-4.5./modelcommand I encounter the behavior described below.gh&copilot& logging in with each individually with no change.I'm unable to identify what changed between my attempts yesterday & today.
Below are the steps I performed & logs:
npx -y @github/copilot@latest --log-level all/logoutcommand/logincommand & authenticate/modelcommand & see:Below are the logs from this session:
gridsandspaces commentedon Oct 29, 2025
I finally resolved this for myself by generating a fine-grained access token on my business account, selecting all of the copilot-related permissions. Once this was set in my .zshrc file, the Copilot CLI correctly detected my business settings and loaded all the models. When trying to sign in using
gh auth loginandcopilot /loginit would always attempt to usehttps://api.individual.githubcopilot.com/and failed with the 421 misdirected error.andyfeller commentedon Oct 29, 2025
Providing an update:
I'm hopeful tomorrow that we will have a more concrete update of what is going on and what we need to resolve. 🙇
UPDATE: There is a prerelease with some final client-side logging changes I'd love for you to test out in
0.0.354-0johnsockwell-tributetech commentedon Oct 30, 2025
@andyfeller : With the prerelease version
0.0.354-0, I'm now seeing the expected model list. Notably, I seeClaude Haiku 4.5 (0.33x)listed in the model selector whenAnthropic Claude Haiku 4.5is disabled in my GitHub>settings>copilot>features. Is this expected?I'm unable to test conversations with the models until my quota resets, but
I've included my test steps & logs starting from a logged out state:
npx -y @github/copilot@v0.0.354-0 --log-level all/modelcommand & see:/logincommand & authenticate/modelcommand & see:Claude Sonnet 4.5 (1x) (default) (current)Logs from this session below:
johnsockwell-tributetech commentedon Nov 3, 2025
@andyfeller I've followed up my earlier tests now that my quota has reset. In summary, v0.0.354-0 displays the models as I'm expecting & I can successfully query. However, I suspect there may still be an issue with model permissions.
Below is a screenshot of my Settings->Copilot->Features screen:
Below are my testing steps beginning from a logged out state:
npx -y @github/copilot@v0.0.354-0 --log-level all& see "Please use /login to sign in to use Copilot"/modelcommand & see:/logincommand & successfully authenticate./modelcommand & see:hello worldin the input field & see:/modelcommand & select3. Claude Haiku 4.5 (0.33x)hello worldin the input field & see:I expected to see an error when selecting or using
Claude Haiku 4.5as it is disabled in my Copilot Features.Logs from this session are attached. Apologies for all the MCP noise.
session-0548ef35-4d82-4567-84e8-bd22ca1907cb.log
andyfeller commentedon Nov 4, 2025
@johnsockwell-tributetech : Nice work! I would like to pull this into a separate issue as I believe you found a legitimate issue where a model that is unconfigured at both the enterprise and organization levels is not being removed as an option in
copilot.Yesterday evening, we shipped some enhancements to GitHub Copilot API resolution that I have opted you into. I think you were fortunate yesterday with the current behavior completing at a reasonable time to move things along, so I'd like your help vetting these enhancements. 🙇
If there's anyone else still having issues retrieving
/modellisting, please mention me and I'll be happy to work with you to enable this and verify it addresses the concern.UPDATE: Created #473 for this follow up
[-]Cannot select models since v.0.0.330[/-][+]Copilot should use the appropriate subscription-based routing within `/model` experience[/+]andyfeller commentedon Nov 6, 2025
This week, we've rolled out changes on GitHub.com to ensure Copilot integrations like GitHub Copilot CLI can reliably resolve subscription-based routing. Thanks to everyone who has been patient and contributed to this issue! 🙇
Prior to
0.0.330release, users were presented a static, hardcoded list of models to choose from. This prevented users from taking advantage of new models while preventing organizations and enterprises from managing model policies effectively.What's next?
I'm going to close this issue as I've confirmed the GitHub.com changes appear to have addressed the 421 Misdirected Request error we've been seeing in GitHub Copilot CLI logs.
I'd like to ask folks to upgrade to the latest version of GitHub Copilot CLI to ensure this issue is fully addressed for them. Again, using older versions will prevent users from picking up new models, features, bug fixes, and more.
Please follow up here or open a new issue if you continue to see 421 Misdirected Request error! 💪