Skip to content

Fireworks-hosted models (accounts/fireworks/models/*) display as raw path/slug instead of friendly names #779

Description

@therickfactr

Summary

Fireworks-hosted models (id form accounts/fireworks/models/<slug>) display as a
raw path/slug instead of a friendly name, unlike every other provider. In the
codeburn dashboard By Model panel they show as fireworks/mode… (truncated
raw path); in codeburn models they show as glm-5p2, qwen3p7-plus,
kimi-k2p7-code, deepseek-v4-pro, deepseek-v4-flash.

These arrive via the OpenCode provider (an opencode-format session log written
by a Fireworks-backed fleet driver).

Environment

  • codeburn 0.9.16 (Homebrew) — note the behavior is the same on current main.
  • Provider: OpenCode; models hosted on Fireworks AI.
  • macOS.

Root cause

  • getShortModelName's path-style fallback returns the last path segment
    verbatim, and there is no SHORT_NAMES entry for these Fireworks slugs, so the
    bare slug leaks (glm-5p2 rather than GLM-5.2).
  • Separately, the dashboard By Model panel renders the cached modelBreakdown
    key directly (no getShortModelName pass), so an old/un-normalized cached key
    leaks the full raw path (accounts/fireworks/models/… → truncated fireworks/mode)
    until the session cache is rebuilt.

Proposed fix

Display-only (pricing via getModelCosts is untouched, so no dollar amounts move):

  1. getShortModelName path fallback: take the last path segment and re-resolve
    it
    through the normal name resolution, so a known slug earns a friendly name
    and an unmapped slug still falls through to the raw segment.
  2. Add SHORT_NAMES entries for the Fireworks slugs (glm-5p2GLM-5.2,
    qwen3p7-plusQwen 3.7 Plus, kimi-k2p7-codeKimi K2.7 Code;
    deepseek-v4-* already resolve).
  3. Route the dashboard By Model render through getShortModelName (matching
    overview's "Top models") so already-cached raw keys normalize without a rebuild.

Verified locally against real data: codeburn models now shows GLM-5.2 / DeepSeek
v4 Pro / Kimi K2.7 Code / Qwen 3.7 Plus / DeepSeek v4 Flash with unchanged costs;
tests/models.test.ts extended (the existing last-segment fallback assertion is kept
for a still-unmapped id); full suite shows no new failures.

I have a branch ready and can open a PR if the approach looks right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions