Skip to content

Fix ucode revert for legacy Codex shared-config edits#150

Merged
AarushiShah-db merged 2 commits into
mainfrom
fix/codex-legacy-revert
Jun 10, 2026
Merged

Fix ucode revert for legacy Codex shared-config edits#150
AarushiShah-db merged 2 commits into
mainfrom
fix/codex-legacy-revert

Conversation

@AarushiShah-db

Copy link
Copy Markdown
Collaborator

ucode revert only restored the per-profile ~/.codex/ucode.config.toml, so the legacy in-place edits to the user's shared ~/.codex/config.toml (profile = "ucode", [profiles.ucode], [model_providers.ucode-databricks]) were left behind — every bare codex invocation kept routing through the gateway.

  • revert now surgically strips the three ucode-namespaced keys from the shared config (safer than a whole-file backup restore, which would clobber later edits)
  • _remove_legacy_ucode_profile also drops the inert ucode-databricks provider block
  • default_model only considers GPT-parseable ids, so a non-GPT workspace (e.g. moonshotai/kimi-k2.5) no longer pins an unroutable model

Co-authored-by: Isaac

`ucode revert` only restored the per-profile ~/.codex/ucode.config.toml, so
the legacy in-place edits to the user's shared ~/.codex/config.toml (profile
= "ucode", [profiles.ucode], [model_providers.ucode-databricks]) were left
behind — every bare `codex` invocation kept routing through the gateway.

- revert now surgically strips the three ucode-namespaced keys from the shared
  config (safer than a whole-file backup restore, which would clobber later edits)
- _remove_legacy_ucode_profile also drops the inert ucode-databricks provider block
- default_model only considers GPT-parseable ids, so a non-GPT workspace (e.g.
  moonshotai/kimi-k2.5) no longer pins an unroutable model

Co-authored-by: Isaac
@AarushiShah-db AarushiShah-db requested a review from rohita5l June 10, 2026 00:29
@AarushiShah-db AarushiShah-db merged commit ce52ffc into main Jun 10, 2026
2 checks passed
@AarushiShah-db AarushiShah-db deleted the fix/codex-legacy-revert branch June 10, 2026 06:03
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.

2 participants