Skip to content

Distinguish gpt-5.3-codex-spark from base GPT-5.3 Codex label#539

Merged
iamtoruk merged 1 commit into
getagentseal:mainfrom
ozymandiashh:fix/461-codex-spark-label
Jun 21, 2026
Merged

Distinguish gpt-5.3-codex-spark from base GPT-5.3 Codex label#539
iamtoruk merged 1 commit into
getagentseal:mainfrom
ozymandiashh:fix/461-codex-spark-label

Conversation

@ozymandiashh

Copy link
Copy Markdown
Contributor

Summary

Closes #461 by giving gpt-5.3-codex-spark its own display label instead of collapsing it onto the retired base GPT-5.3 Codex in today/models/status output.

Root cause

getShortModelName (src/models.ts) and the Codex provider's modelDisplayName (src/providers/codex.ts) resolve display names with a longest-key-first startsWith(key + "-") match. That match is intended for reasoning-effort suffixes (-high/-low), which should fold onto the base label. But -spark is a distinct model variant, not a reasoning suffix, and there was no explicit entry for it, so it was swept onto gpt-5.3-codex and rendered as GPT-5.3 Codex. On usage/billing dashboards this makes a distinct, active model look like the retired base and muddies spend attribution.

As confirmed on the issue, pricing was never wrong: LiteLLM has no gpt-5.3-codex-spark entry, so getModelCosts falls back to the base gpt-5.3-codex rate. This is a display-label-only defect.

What changed

  • Add an explicit display entry gpt-5.3-codex-spark -> GPT-5.3 Codex Spark to SHORT_NAMES in src/models.ts.
  • Add the matching entry to modelDisplayNames in src/providers/codex.ts.

Both tables are evaluated longest-key-first (SORTED_SHORT_NAMES in src/models.ts, modelDisplayEntries in src/providers/codex.ts), so the longer, more specific key wins for the exact variant while -high/-low continue to fall through to the base. The change is purely additive: no other model label or code path is touched.

Validation

Concrete before/after via the real getShortModelName resolver:

// origin/main (5fd1160)
gpt-5.3-codex-spark => GPT-5.3 Codex
gpt-5.3-codex-high  => GPT-5.3 Codex
gpt-5.3-codex-low   => GPT-5.3 Codex
gpt-5.3-codex       => GPT-5.3 Codex

// this branch
gpt-5.3-codex-spark => GPT-5.3 Codex Spark
gpt-5.3-codex-high  => GPT-5.3 Codex
gpt-5.3-codex-low   => GPT-5.3 Codex
gpt-5.3-codex       => GPT-5.3 Codex

Only gpt-5.3-codex-spark changes; the reasoning suffixes and the base are untouched.

Checks run (en_US locale):

npm test -- --run tests/models.test.ts tests/providers/codex.test.ts   - 128 tests passed
npm test -- --run                                                      - 1276 tests passed
npx semgrep --config .semgrep/rules/no-bracket-assign-hot-paths.yml src/  - 0 findings (37 files)
npm run build (bundle-litellm + tsup)                                  - build success
Gemini 3.1 Pro (High) review - PASS (sort is order-independent; no collateral relabel:
  `-sparkle` falls through, `-spark-high` maps to Spark; pricing unaffected; no orphaned display paths)

New regression coverage:

  • tests/models.test.ts: gpt-5.3-codex-spark -> distinct label; -high/-low -> base.
  • tests/providers/codex.test.ts: same two assertions through the Codex provider's modelDisplayName.

Notes

  • Pricing/cost is unchanged by design (no LiteLLM key for the variant; base-rate fallback preserved).
  • npm run build regenerated src/data/litellm-snapshot.json and src/data/pricing-fallback.json; both were restored because they are unrelated to this fix. The diff is the two source entries plus tests.

gpt-5.3-codex-spark is a distinct model variant, but the longest-first
startsWith(key+'-') matcher (intended for reasoning suffixes -high/-low)
swept it into the base 'GPT-5.3 Codex' label, making a distinct model look
like the retired base in today/models/status output. Add an explicit
display entry in SHORT_NAMES and the codex provider so the longer key wins;
-high/-low still fall through to the base. Pricing is unaffected (LiteLLM
has no spark entry; cost falls back to the base rate as before).

Fixes getagentseal#461
@iamtoruk iamtoruk merged commit 7c2d36f into getagentseal:main Jun 21, 2026
3 checks passed
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.

Fix display label for gpt-5.3-codex-spark in codex usage output

2 participants