Skip to content

Preserve configured model options missing from preset catalog#237

Open
garrza wants to merge 1 commit into
zed-industries:mainfrom
garrza:fix-preserve-raw-model-options
Open

Preserve configured model options missing from preset catalog#237
garrza wants to merge 1 commit into
zed-industries:mainfrom
garrza:fix-preserve-raw-model-options

Conversation

@garrza
Copy link
Copy Markdown

@garrza garrza commented Apr 24, 2026

Summary

  • Preserve raw configured or selected model IDs when the active preset catalog does not have metadata for them
  • Keep known hidden presets hidden unless they are the current model
  • Use a single preset snapshot for legacy model list state

Fixes #236

Testing

  • cargo test
  • cargo clippy --all-targets -- -D warnings

@garrza
Copy link
Copy Markdown
Author

garrza commented Apr 24, 2026

TLDR

The bug was this:

  1. The session starts with config.model = "gpt-5.5".
  2. ACP asks the model catalog for presets.
  3. If the catalog does not contain a preset for gpt-5.5, ACP still shows it because it is the current model.
  4. User switch to an older model.
  5. Now gpt-5.5 is no longer current.
  6. The old picker code only showed:
    • models with show_in_picker = true
    • plus the current model
  7. So gpt-5.5 disappeared.

The PR adds a small session memory:

  remembered_raw_models: Vec<String>

It is seeded from the configured model when the thread starts. So if the thread starts with gpt-5.5, ACP remembers that raw model ID.

The core fix is the picker logic so Codex ACP does not lose a valid configured model just because that model is missing from the current UI preset catalog. The bug happened when source 1 had gpt-5.5, but source 2 did not.

Important guardrail: if a model does exist in the preset catalog but has show_in_picker = false, we still hide it after switching away. So the PR does not bypass intentional hidden model behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Newly configured Codex model disappears from picker after switching to an older model

1 participant