Skip to content

Fix for broken Codex model selection for 'Text Generation Model'#1543

Merged
juliusmarminge merged 1 commit intopingdotgg:mainfrom
Alexx999:pr-fix-sticky-settings-2
Mar 29, 2026
Merged

Fix for broken Codex model selection for 'Text Generation Model'#1543
juliusmarminge merged 1 commit intopingdotgg:mainfrom
Alexx999:pr-fix-sticky-settings-2

Conversation

@Alexx999
Copy link
Copy Markdown
Contributor

@Alexx999 Alexx999 commented Mar 29, 2026

What Changed

Treat textGenerationModelSelection as a atomic block

Why

Broken switching between Codex models, only 'GPT 5.4 Mini' was selectable

Checklist

  • This PR is small and focused
  • I explained what changed and why

Note

Medium Risk
Touches settings persistence logic used for writing settings.json; a mistake could cause incorrect config serialization or unexpected resets of user selections. Change is small and covered by a new regression test around provider/model switching.

Overview
Fixes a persistence bug where stripDefaultServerSettings could partially strip nested fields inside textGenerationModelSelection, causing the chosen Codex model to be dropped when switching providers.

Adds ATOMIC_SETTINGS_KEYS (currently just textGenerationModelSelection) so those settings are compared and retained as a whole using Equal.equals, and adds a regression test ensuring provider/model switching preserves the selected model.

Written by Cursor Bugbot for commit 943d121. This will update automatically on new commits. Configure here.

Note

Fix textGenerationModelSelection being partially stripped when switching to Codex provider

When switching providers, stripDefaultServerSettings in serverSettings.ts was recursively stripping nested fields from textGenerationModelSelection, causing the model to be dropped.

  • Introduces ATOMIC_SETTINGS_KEYS, a set of keys that must be preserved or omitted as a whole rather than recursively stripped field-by-field.
  • textGenerationModelSelection is added to this set; its value is now compared against defaults using full-object equality, and the entire value is kept or dropped based on that comparison.
  • Behavioral Change: nested fields under atomic keys are no longer individually compared to defaults — the entire object is preserved if any part differs.

Macroscope summarized 943d121.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 29, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7711c8f1-4101-4da3-a478-5b4d80d5ebdb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 29, 2026
@Alexx999 Alexx999 force-pushed the pr-fix-sticky-settings-2 branch from 3f42f25 to 943d121 Compare March 29, 2026 17:37
@github-actions github-actions bot added size:S 10-29 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). labels Mar 29, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like the entire function could be simplified now that i read it 😭😭

@juliusmarminge juliusmarminge merged commit 40e7dbd into pingdotgg:main Mar 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants