fix: clean model names in reports and re-hydrate daily cache for new providers#550
Merged
Conversation
…providers Two post-0.9.12 cleanups. Report model names: getShortModelName resolves a model's pricing alias before looking up its display name, so models priced via a sibling alias (ZCode/Hermes GLM-5.2 via glm-5p1, Grok Build via grok-build-0.1) leaked the internal pricing key as the model name in report --format json and the menubar model breakdown. Grok Composer was unmapped and showed raw. Add SHORT_NAMES entries so each resolves to its real name (GLM-5.2, Grok Build, Grok Composer 2.5 Fast). The models command was already correct because it uses each provider's own modelDisplayName. Daily cache: providers added since the v8 rollup (Grok, Hermes, ZCode) parse usage that older binaries skipped, so days cached at v8 omit them and report 0 across history. Bump DAILY_CACHE_VERSION and MIN_SUPPORTED_VERSION to 9 to force a one-time full re-hydration so new providers backfill without a manual cache clear.
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.
Two post-0.9.12 cleanups.
Report model names
getShortModelNamerunsresolveAliasbefore looking up a display name, so a model priced via a sibling alias resolves to the internal pricing key, and with noSHORT_NAMESentry that key leaks as the model name inreport --format jsonand the menubar model breakdown:glm-5p1) and showedglm-5p1.grok-build-0.1) showedgrok-build-0.1.grok-composer-2.5-fastraw.Add
SHORT_NAMESentries so each resolves to its real name: GLM-5.2, Grok Build, Grok Composer 2.5 Fast. Themodelscommand was already correct because it uses each provider's ownmodelDisplayName; this brings the global resolver in line.Daily cache
Providers added since the v8 rollup (Grok, Hermes, ZCode) parse usage that older binaries skipped, so days cached at v8 omit them and report $0 for those providers across history (the bug that previously required
rm -rf ~/.cache/codeburn). BumpDAILY_CACHE_VERSIONandMIN_SUPPORTED_VERSIONto 9 to force a one-time full re-hydration so newly supported providers backfill automatically.Verification
npx vitest run: 1300/1300 pass (added 6 assertions totests/models.test.ts).report --provider zcode/grok --format jsonnow showsGLM-5.2,Grok Build,Grok Composer 2.5 Fastinstead of the pricing keys.