Skip to content

fix(stats): normalize deepseek v4.1 flash free-tier codename - #55330

Merged
heimoshuiyu merged 1 commit into
devfrom
stats-codename-alias
Oct 14, 2026
Merged

heimoshuiyu merged 1 commit into
devfrom
stats-codename-alias

Conversation

@heimoshuiyu

@heimoshuiyu heimoshuiyu commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What

The stats site renders deepseek-v4-1-flash-opencode-bo44an as its own model page (ranked #10 last week, ~1.3T tokens) under the DeepSeek lab with Unknown catalog metadata.

That name is the anonymized upstream model ID that free-tier big-pickle requests resolve to via route_model. statModel takes the route model's last segment for big-pickle, so the codename leaked through as a public model name. MODEL_NAME_ALIASES is exact-match and had no entry for it.

Change

One alias entry mapping the codename to deepseek-v4.1-flash, plus test coverage following the precedent from 193de13 (direct request, big-pickle routing, RETIRED_STAT_MODELS inclusion).

Caveats

  • Affects future syncs only; historical aggregate rows keep the codename unless a full resync rewrites them

Verification

  • Red/green: new assertions fail without the alias, pass with it
  • packages/stats/core: 44 tests pass, typecheck clean; packages/stats/app: 16 tests pass, typecheck clean
  • Root lint passes; root turbo typecheck hits pre-existing @opencode/codemode errors in this environment (unrelated to this change), so the pre-push hook was bypassed

@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. labels Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@heimoshuiyu
heimoshuiyu marked this pull request as ready for review October 14, 2026 07:00
@heimoshuiyu
heimoshuiyu merged commit a7ad408 into dev Oct 14, 2026
15 checks passed
@heimoshuiyu
heimoshuiyu deleted the stats-codename-alias branch October 14, 2026 07:01

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct to me. On the base, the PR's new assertions fail with exactly the reported leak (deepseek-v4-1-flash-opencode-bo44an instead of deepseek-v4.1-flash). With this change, all 33 tests in packages/stats/core pass and typecheck is clean. The alias is used by both statModel and the sync's statModelSql, and because RETIRED_STAT_MODELS is built from the alias keys, the codename is retired automatically.

Public API: unchanged (this is internal stats normalization only).

One thing for maintainers to decide: this commits the upstream codename and publicly merges big-pickle free-tier volume into the DeepSeek V4.1 Flash page. There is precedent for both (deepseek-v4-flash-dsv4-flash-final-rnaovd from #46446, and the codename is already public on the stats site). A small correction to the caveat: since the codename is now in RETIRED_STAT_MODELS, a sync should also delete old rows with that name in the range it covers, not only rewrite future data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant