Skip to content

gpt-5-mini is not persistent set for future sessions #1869

Open

Description

@luis-baquero-dnv

Describe the bug

Model selection not persisted: after running /model gpt-5-mini, the selection is active for the
current session, but after closing and reopening the Copilot CL,I the model reverts to claude-sonnet-4.6 instead of
persisting "gpt-5-mini".has reverted; expected behavior is that the chosen model persists across sessions; it occurs every time.

Affected version

GitHub Copilot CLI 0.0.422.

Steps to reproduce the behavior

(1) run "/model gpt-5-mini"
(2) close the terminal
(3) reopen Copilot

and observe that the model is changed and not gpt-5-miniany longer

Expected behavior

If the user previously selected the gpt-5-mini model using the coman /model command, then for all future Copilot CLI sessions, gpt-5-mini should be set as the default model unless changed again. This ensures continuity in model selection based on the user's last explicit choice.

Additional context

No response

Activity

  1. luis-baquero-dnv commented on Mar 6, 2026

    @luis-baquero-dnv
    Author

    I created a .bat file to launch Copilot with the gpt-5-mini model, so I don't have to switch to a free model manually

    @echo off
    powershell -NoProfile -ExecutionPolicy Bypass -NoExit -Command "copilot -i '/model gpt-5-mini'"
    
  2. tangrufus commented on Mar 11, 2026

    @tangrufus

    Encountering the same issue.

    Steps:

    1. add "model": "gpt-5-mini" in ~/.copilot/config.json.
    2. run $ copilot (without --model gpt-5-mini)

    Expected Behaviors:

    1. Boot with gpt-5-mini
    2. ~/.copilot/config.json remains unchanged

    Actual Behaviors:

    1. Boot with Claude Sonnet 4.6
    2. ~/.copilot/config.json got reverted. model is removed.

    Copilot itself said it's probably because of some sanitation and/or validation, but provided no solutions.

  3. cyberjob001 commented on Mar 17, 2026

    @cyberjob001

    Encountering the same issue.

    added "model": "gpt-5-mini" in ~/.copilot/config.json.
    start copilot (without --model gpt-5-mini)

    Expected Behaviors:
    Boot with gpt-5-mini
    ~/.copilot/config.json remains unchanged

    Actual Behaviors:
    Boot with Claude Sonnet 4.6
    ~/.copilot/config.json is auto updated and the model is being removed.

  4. kennethk-corp commented on Apr 12, 2026

    @kennethk-corp

    Some models persist. Some don't. For instance, if you just type copilot and then within the cli type /model and set to opus 4.6, exit and come back in, it will be persisted. same with opus 4.5. But if you do this with sonnet 4.5, or gpt-5 mini, it won't. I didn't try all of them. after you exit, you can actually verify the .copilot\config.json file that it did get persisted. But once you run copilot, it changes it.

    I could just type: copilot --model gpt-5-mini to get the model i want.
    I can also set the model in an environment variable:
    set COPILOT_MODEL=gpt-5-mini
    before calling copilot.

    This is a bug because the documentation clearly states you should be able to edit the config file and set the default model.

    Design decision:
    I don't know if the requirement is clear as to whether a command such as copilot --model gpt-5-mini should set the default in the config file or not. My thinking is that it shouldn't because command-line options should be treated as "overrides", where as setting it from within the cli using /model one may want to be persisted.

    Alternatively, the design can be that /model from within the cli is for that session only, and if you want the default changed you have to edit the config file directly. I didn't come across anything in the docs on which it is. I'll let smarter those smarter than me decide, but it should be consistent.

  5. added
    area:modelsModel selection, availability, switching, rate limits, and model-specific behavior
    area:configurationConfig files, instruction files, settings, and environment variables
    and removed on Apr 16, 2026
  6. oceanlongnion commented on May 29, 2026

    @oceanlongnion

    +1 on this — same problem here, but with Opus:

    • I select claude-opus-4.7 via /model (or the picker in VS Code's Copilot CLI integration)
    • Within the same conversation, it sometimes silently reverts to claude-sonnet-4.6 mid-session (not just across restarts)
    • Next time I look, I'm back on Sonnet and have to re-select Opus

    Repro: pick Opus, do a few turns, occasionally a system note appears that the model changed. I'd expect my explicit /model choice to persist for the duration of the session at minimum and across sessions ideally.

    Version: GitHub Copilot CLI 1.0.49 (VS Code integration). Would love to see this fixed — having to re-pick the model repeatedly is friction.

  7. patniko commented on Oct 26, 2026

    @patniko
    Collaborator

    Thanks for the report. We've shipped fixes in this area since this was filed (most recently in Copilot CLI v1.0.64), and we believe this may now be resolved. Could you retest on the latest release (Copilot CLI v1.0.103) and let us know whether you still see it? If we don't hear back in a couple of weeks, we may close this issue — you can always reopen it.

    Triaged as part of a Copilot SDK backlog review, with help from GitHub Copilot.

  8. lwbaqueros commented on Oct 27, 2026

    @lwbaqueros

    Hi. Thanks for the update. I confirm that with the latest version I do not see this issue any longer with any of the models. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationConfig files, instruction files, settings, and environment variablesarea:modelsModel selection, availability, switching, rate limits, and model-specific behaviormore-info-needed

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions