Skip to content

fix(config): update in-memory session config when setting default model#2880

Open
nocmk2 wants to merge 1 commit intoantinomyhq:mainfrom
nocmk2:main
Open

fix(config): update in-memory session config when setting default model#2880
nocmk2 wants to merge 1 commit intoantinomyhq:mainfrom
nocmk2:main

Conversation

@nocmk2
Copy link
Copy Markdown

@nocmk2 nocmk2 commented Apr 7, 2026

set_default_provider_and_model() only persisted the new provider/model to disk via update_environment() but did not update the in-memory self.config. This caused subsequent get_default_model() and get_default_provider() calls within the same process to return stale values.

After switching models via /model (which crosses providers), the TUI and zsh rprompt would still show the old model until the process was restarted. Now the in-memory config is updated immediately after the disk write, matching the behavior of set_default_model() and set_default_provider().

…vider and model

set_default_provider_and_model() only persisted the new provider/model
to disk via update_environment() but did not update the in-memory
self.config. This caused subsequent get_default_model() and
get_default_provider() calls within the same process to return stale
values.

After switching models via /model (which crosses providers), the TUI
and zsh rprompt would still show the old model until the process was
restarted. Now the in-memory config is updated immediately after the
disk write, matching the behavior of set_default_model() and
set_default_provider().

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 7, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the type: fix Iterations on existing features or infrastructure. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants