Skip to content

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

Open
nocmk2 wants to merge 3 commits intoantinomyhq:mainfrom
nocmk2:main
Open

fix(config): update in-memory session config when setting default model#2880
nocmk2 wants to merge 3 commits 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
nocmk2 and others added 2 commits April 8, 2026 14:01
- Resolving conflict in crates/forge_services/src/app_config.rs by accepting upstream's new infrastructure-based configuration service architecture.
- Replaced local Mutex-based session state management with update_config operations.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
- Added 'forge paste-image' subcommand to save clipboard images and output @[path].
- Added /paste-image (/pv) REPL command to save image and add to prompt buffer.
- Added Ctrl-X Ctrl-V shortcut to ZSH plugin for easy image pasting.
- Integrated with arboard and image crates for cross-platform support.

Co-Authored-By: ForgeCode <noreply@forgecode.dev>
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