Handle cc-switch model catalog takeover - #1733
Open
Rat0323 wants to merge 2 commits into
Open
Conversation
Rat0323
marked this pull request as ready for review
July 31, 2026 21:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cc-switch-model-catalog.jsonas a catalog managed by cc-switch rather than a user-authored custom catalogRoot cause
cc-switch can leave
model_catalog_json = "cc-switch-model-catalog.json"in~/.codex/config.toml. Codex++ previously treated every catalog outside its ownmodel-catalogs/directory as user-managed and preserved it. As a result, Codex could continue loading cc-switch's model metadata, so the context-window and capability metadata generated by the active Codex++ profile did not take effect.Behavior after this change
When Codex++ applies a profile and finds the known cc-switch catalog filename, it removes the stale pointer and either:
model-catalogs/<profile>.jsonpointer when the profile needs catalog metadata; ormodel_catalog_jsonabsent when the profile does not need a catalog.Other external catalog paths remain untouched.
Validation
cargo test -p codex-plus-core --test relay_config— 110 passed, 0 failedcargo fmt --allgit diff --checkcodex-plus-launcherandcodex-plus-managerCI follow-up
The initial Windows artifacts run failed in the repository's existing byte-exact theme asset test because Windows checkout converted uncovered LF assets to CRLF. The hashes in the failure exactly matched the CRLF-transformed bytes; both macOS artifact jobs and all relay configuration tests passed. This branch now also adds the missing
eol=lfcoverage in.gitattributeswithout changing any theme asset or expected hash.Related repository issue: #1732.
Additional validation:
cargo test -p codex-plus-core --test upstream_theme_assets --test relay_config --locked— 112 passed, 0 failedtext eol=lf