Skip to content

Copilot CLI incorrectly switches back to previous model after switching to BYOK #3978

Description

@doggy8088

Describe the bug

I ran out of AIC while using claude-sonnet-4.6. After exiting GitHub Copilot and resuming my session using BYOK, the Copilot CLI automatically switched back to claude-sonnet-4.6, despite having supposedly switched to the BYOK configuration.

Affected version

No response

Steps to reproduce the behavior

  1. Run out of AIC while using claude-sonnet-4.6.
  2. Exit GitHub Copilot.
  3. Resume session using BYOK.
  4. Observe that Copilot CLI automatically switches back to claude-sonnet-4.6 or showing this:
Model 'glm-5.2:cloud' not found on provider at https://ollama.com/v1 (HTTP 404).
  Check that the model is available on your provider. 
Image

Expected behavior

The CLI should respect the BYOK configuration and not revert to the previously used model after a session restart.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions