Skip to content

Handle cc-switch model catalog takeover - #1733

Open
Rat0323 wants to merge 2 commits into
BigPizzaV3:mainfrom
Rat0323:fix/cc-switch-catalog-takeover
Open

Handle cc-switch model catalog takeover#1733
Rat0323 wants to merge 2 commits into
BigPizzaV3:mainfrom
Rat0323:fix/cc-switch-catalog-takeover

Conversation

@Rat0323

@Rat0323 Rat0323 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • recognize cc-switch-model-catalog.json as a catalog managed by cc-switch rather than a user-authored custom catalog
  • let Codex++ take over that stale pointer when applying a relay profile
  • preserve unrelated user-defined external model catalogs
  • support relative paths, absolute Windows paths, slash differences, and filename case differences

Root cause

cc-switch can leave model_catalog_json = "cc-switch-model-catalog.json" in ~/.codex/config.toml. Codex++ previously treated every catalog outside its own model-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:

  • writes the Codex++ managed model-catalogs/<profile>.json pointer when the profile needs catalog metadata; or
  • leaves model_catalog_json absent 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 failed
  • cargo fmt --all
  • git diff --check
  • clean locked release build of codex-plus-launcher and codex-plus-manager

CI 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=lf coverage in .gitattributes without 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 failed
  • all 18 byte-exact tested assets resolve to text eol=lf

@Rat0323
Rat0323 marked this pull request as ready for review July 31, 2026 21:29
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.

1 participant