fix(models): keep gpt-5.3-codex-spark on its own display line (fix #461)#481
Open
fightingst wants to merge 1 commit into
Open
fix(models): keep gpt-5.3-codex-spark on its own display line (fix #461)#481fightingst wants to merge 1 commit into
fightingst wants to merge 1 commit into
Conversation
…tagentseal#461) gpt-5.3-codex-spark is a distinct Codex model variant, but both getShortModelName() and Codex's own modelDisplayName() collapsed it into the base "GPT-5.3 Codex" label via the longest-prefix fallback (longest-first sort + "key + '-'" boundary match). Add explicit gpt-5.3-codex-spark entries to both SHORT_NAMES and Codex's modelDisplayNames, sorted before gpt-5.3-codex so the more specific id wins. Regression tests cover both the shared resolver and the Codex provider's per-provider display name.
b3ed53d to
8e6c6c9
Compare
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
gpt-5.3-codex-sparkis a distinct Codex model variant, but bothgetShortModelName()and Codex's ownmodelDisplayName()collapsedit into the base
GPT-5.3 Codexlabel via the longest-prefixfallback (longest-first sort +
key + '-'boundary match).gpt-5.3-codex-sparkentries to bothSHORT_NAMESand Codex's
modelDisplayNames, sorted beforegpt-5.3-codexsothe more specific id wins.
Repro (before fix)
After fix, the same fixture produces two independent line items:
Changes
src/models.tsgpt-5.3-codex-sparktoSHORT_NAMES(sorted longest-first, automatically wins)src/providers/codex.tsgpt-5.3-codex-sparkto per-providermodelDisplayNamestests/models.test.tsgetShortModelName('gpt-5.3-codex-spark')→'GPT-5.3 Codex Spark'tests/providers/codex.test.tsprovider.modelDisplayName('gpt-5.3-codex-spark')→'GPT-5.3 Codex Spark'Testing
npm test -- tests/models.test.ts tests/providers/codex.test.ts— 126/126 pass~/.codex/sessions/2026/06/12/rollout-*.jsonlwithgpt-5.3-codex-sparkmodel and rancodeburn today --provider codex --format json; confirmed spark and base now appear as separate lineitems with correct per-model cost attribution
(
usage-aggregator,cli-proxy-path,cli-json-daily) also fail onmainwithout this change — not introduced by this PRFixes #461