Skip to content

fix: clean model names in reports and re-hydrate daily cache for new providers#550

Merged
iamtoruk merged 1 commit into
mainfrom
fix-model-names-cache-refresh
Jun 22, 2026
Merged

fix: clean model names in reports and re-hydrate daily cache for new providers#550
iamtoruk merged 1 commit into
mainfrom
fix-model-names-cache-refresh

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Two post-0.9.12 cleanups.

Report model names

getShortModelName runs resolveAlias before looking up a display name, so a model priced via a sibling alias resolves to the internal pricing key, and with no SHORT_NAMES entry that key leaks as the model name in report --format json and the menubar model breakdown:

  • ZCode / Hermes run GLM-5.2 (priced via glm-5p1) and showed glm-5p1.
  • Grok Build (priced via grok-build-0.1) showed grok-build-0.1.
  • Grok Composer was simply unmapped and showed grok-composer-2.5-fast 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; 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). Bump DAILY_CACHE_VERSION and MIN_SUPPORTED_VERSION to 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 to tests/models.test.ts).
  • Live report --provider zcode/grok --format json now shows GLM-5.2, Grok Build, Grok Composer 2.5 Fast instead of the pricing keys.

…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.
@iamtoruk iamtoruk merged commit 71b1a9e into main Jun 22, 2026
3 checks passed
@iamtoruk iamtoruk deleted the fix-model-names-cache-refresh branch June 22, 2026 01:38
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.

1 participant