Skip to content

Persist target default reasoning on model upgrade#19085

Merged
shijie-oai merged 1 commit intomainfrom
codex/upgrade-default-reasoning
Apr 23, 2026
Merged

Persist target default reasoning on model upgrade#19085
shijie-oai merged 1 commit intomainfrom
codex/upgrade-default-reasoning

Conversation

@shijie-oai
Copy link
Copy Markdown
Collaborator

@shijie-oai shijie-oai commented Apr 23, 2026

Why

When the TUI upgrade flow moves a user to a newer model, the accepted migration should also persist the target model's default reasoning effort. That keeps the upgraded model and reasoning setting aligned instead of carrying forward a stale previously saved effort from the old model.

What changed

  • The accepted model migration path now updates in-memory config, TUI state, and persisted model selection with the target preset's default_reasoning_effort.
  • The upgrade destructuring keeps reasoning_effort_mapping explicitly unused because mappings are no longer consulted on accepted migrations.
  • Added a catalog test that starts with a pre-existing saved reasoning effort and verifies the accepted upgrade overwrites it with the target model default and emits the expected persistence events.
  • Rebasing onto current main also updates a TUI thread-session test helper for the latest permission_profile field and ApprovalsReviewer::AutoReview rename so CI compiles on the new base.

Verification

  • cargo test -p codex-tui model_catalog
  • cargo test -p codex-tui permission_settings_sync_updates_active_snapshot_without_rewriting_side_thread

@shijie-oai shijie-oai changed the title Persist upgrade target default reasoning Persist target default reasoning on model upgrade Apr 23, 2026
@shijie-oai shijie-oai marked this pull request as ready for review April 23, 2026 05:48
Comment thread codex-rs/tui/src/app/startup_prompts.rs
Comment thread codex-rs/tui/src/app/startup_prompts.rs Outdated
@shijie-oai shijie-oai force-pushed the codex/upgrade-default-reasoning branch from 225addc to dc14777 Compare April 23, 2026 05:54
@shijie-oai shijie-oai force-pushed the codex/upgrade-default-reasoning branch from dc14777 to 031608e Compare April 23, 2026 06:06
@shijie-oai shijie-oai merged commit 993e3f4 into main Apr 23, 2026
25 checks passed
@shijie-oai shijie-oai deleted the codex/upgrade-default-reasoning branch April 23, 2026 06:36
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants