Skip to content

fix(migration): stop rewriting explicit gpt-5.3-codex to gpt-5.4 (#3777)#4263

Open
YOMXXX wants to merge 1 commit into
code-yeongyu:devfrom
YOMXXX:fix/gpt-5-3-codex-migration
Open

fix(migration): stop rewriting explicit gpt-5.3-codex to gpt-5.4 (#3777)#4263
YOMXXX wants to merge 1 commit into
code-yeongyu:devfrom
YOMXXX:fix/gpt-5-3-codex-migration

Conversation

@YOMXXX
Copy link
Copy Markdown

@YOMXXX YOMXXX commented May 22, 2026

Summary

Closes #3777.

openai/gpt-5.3-codex is the codex-series model still recommended in docs/guide/agent-model-matching.md ("Still the deep-coding powerhouse. Kept as an explicit override option.") and listed in the default fallback chain in docs/reference/configuration.md. It is not a deprecated alias for gpt-5.4 — the two are different products (one is codex-tuned, the other is the newer general model).

MODEL_VERSION_MAP in src/shared/migration/model-versions.ts carried "openai/gpt-5.3-codex": "openai/gpt-5.4", so migrateConfigFile() silently rewrote any user that picked gpt-5.3-codex for its token efficiency on every config load. The owner's confirmation comment on #3777 already noted "the bug is in config migration rather than runtime model resolution" — runtime can still accept gpt-5.3-codex when passed through directly, the migration was rewriting it before runtime ever saw it.

Changes

  • Drop the bogus gpt-5.3-codex → gpt-5.4 entry from MODEL_VERSION_MAP.
  • Add a comment at the top of the map explaining the rule: only retired/superseded model IDs go here, current user-selectable variants do not.
  • Flip the existing assertion MAP["openai/gpt-5.3-codex"] === "openai/gpt-5.4" into a .toBeUndefined() regression guard, plus a positive assertion that gpt-5.4 → gpt-5.5 still maps.
  • Add a migrateModelVersions test that explicit gpt-5.3-codex selections (including in nested fallback_models) survive migration.

Compatibility

  • Users that were never migrated keep their explicit gpt-5.3-codex.
  • Users that were already auto-migrated and reverted by hand keep their revert — sidecar/legacy _migrations entries still match by string and the existing fix: normalize runtime agent names in delegate-task #3263 sidecar tests (migration.test.ts 1374–1499) cover this path without change. I re-ran them: all green.

Test plan

  • bun test src/shared/migration.test.ts — 86 pass / 0 fail
  • bun test src/shared/migration/config-migration.test.ts src/shared/migration/migrations-sidecar.test.ts src/shared/migration/agent-names.test.ts — 24 pass / 0 fail
  • bun test src/plugin-config.test.ts — 40 pass / 0 fail
  • Manually verified compiled migrateModelVersions behaviour:
    • MODEL_VERSION_MAP["openai/gpt-5.3-codex"] is undefined
    • explicit openai/gpt-5.3-codex configs pass through unchanged
    • anthropic/claude-opus-4-5 still migrates to anthropic/claude-opus-4-7

Summary by cubic

Stop rewriting explicit openai/gpt-5.3-codex selections to openai/gpt-5.4 during config migration so users keep the codex variant they chose. Fixes #3777.

  • Bug Fixes
    • Removed the openai/gpt-5.3-codexopenai/gpt-5.4 entry from MODEL_VERSION_MAP.
    • Added a comment clarifying that only retired/superseded models should be mapped.
    • Added tests to ensure gpt-5.3-codex is preserved (including in nested fallback_models) and that openai/gpt-5.4 still migrates to openai/gpt-5.5.

Written for commit d788c3d. Summary will update on new commits. Review in cubic

…e-yeongyu#3777)

`openai/gpt-5.3-codex` is the codex-series powerhouse still recommended
in docs/guide/agent-model-matching.md and listed in the default
fallback chain in docs/reference/configuration.md, not a deprecated
alias for `gpt-5.4`. The migration entry silently rewrote any user
config that picked `gpt-5.3-codex` for its token efficiency, sending
agents to a non-codex model on every startup.

Drop the bogus mapping from MODEL_VERSION_MAP and add a regression
test that explicit `gpt-5.3-codex` selections (including in nested
fallback_models) survive `migrateModelVersions`. Users already
auto-migrated previously can revert to `gpt-5.3-codex` by hand and it
will now stick on subsequent loads regardless of the sidecar history.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

@YOMXXX
Copy link
Copy Markdown
Author

YOMXXX commented May 22, 2026

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request May 22, 2026
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: This PR removes a single incorrect mapping from MODEL_VERSION_MAP that was silently rewriting explicit user selections of gpt-5.3-codex to gpt-5.4, and all 150+ existing tests plus new regression tests pass, making it impossible for this change to introduce any regressions.

Re-trigger cubic

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.

[Bug]: openai/gpt-5.3-codex can never be loaded

1 participant