Distinguish gpt-5.3-codex-spark from base GPT-5.3 Codex label#539
Merged
iamtoruk merged 1 commit intoJun 21, 2026
Merged
Conversation
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
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
Closes #461 by giving
gpt-5.3-codex-sparkits own display label instead of collapsing it onto the retired baseGPT-5.3 Codexintoday/models/statusoutput.Root cause
getShortModelName(src/models.ts) and the Codex provider'smodelDisplayName(src/providers/codex.ts) resolve display names with a longest-key-firststartsWith(key + "-")match. That match is intended for reasoning-effort suffixes (-high/-low), which should fold onto the base label. But-sparkis a distinct model variant, not a reasoning suffix, and there was no explicit entry for it, so it was swept ontogpt-5.3-codexand rendered asGPT-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-sparkentry, sogetModelCostsfalls back to the basegpt-5.3-codexrate. This is a display-label-only defect.What changed
gpt-5.3-codex-spark->GPT-5.3 Codex SparktoSHORT_NAMESinsrc/models.ts.modelDisplayNamesinsrc/providers/codex.ts.Both tables are evaluated longest-key-first (
SORTED_SHORT_NAMESinsrc/models.ts,modelDisplayEntriesinsrc/providers/codex.ts), so the longer, more specific key wins for the exact variant while-high/-lowcontinue 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
getShortModelNameresolver:Only
gpt-5.3-codex-sparkchanges; the reasoning suffixes and the base are untouched.Checks run (en_US locale):
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'smodelDisplayName.Notes
npm run buildregeneratedsrc/data/litellm-snapshot.jsonandsrc/data/pricing-fallback.json; both were restored because they are unrelated to this fix. The diff is the two source entries plus tests.