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
gpt-5-mini is not persistent set for future sessions #1869
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.
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.
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.
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.
Activity
luis-baquero-dnv commentedon Mar 6, 2026
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
tangrufus commentedon Mar 11, 2026
Encountering the same issue.
Steps:
"model": "gpt-5-mini"in~/.copilot/config.json.$ copilot(without--model gpt-5-mini)Expected Behaviors:
~/.copilot/config.jsonremains unchangedActual Behaviors:
~/.copilot/config.jsongot reverted.modelis removed.Copilot itself said it's probably because of some sanitation and/or validation, but provided no solutions.
cyberjob001 commentedon Mar 17, 2026
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.
kennethk-corp commentedon Apr 12, 2026
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-minito 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-minishould 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.
oceanlongnion commentedon May 29, 2026
+1 on this — same problem here, but with Opus:
claude-opus-4.7via/model(or the picker in VS Code's Copilot CLI integration)claude-sonnet-4.6mid-session (not just across restarts)Repro: pick Opus, do a few turns, occasionally a system note appears that the model changed. I'd expect my explicit
/modelchoice 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.
patniko commentedon Oct 26, 2026
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.
lwbaqueros commentedon Oct 27, 2026
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.