Repository navigation
fix(stats): normalize deepseek v4.1 flash free-tier codename - #55330
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
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. |
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
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.
What
The stats site renders
deepseek-v4-1-flash-opencode-bo44anas 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-picklerequests resolve to viaroute_model.statModeltakes the route model's last segment forbig-pickle, so the codename leaked through as a public model name.MODEL_NAME_ALIASESis 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-picklerouting,RETIRED_STAT_MODELSinclusion).Caveats
Verification
packages/stats/core: 44 tests pass, typecheck clean;packages/stats/app: 16 tests pass, typecheck clean@opencode/codemodeerrors in this environment (unrelated to this change), so the pre-push hook was bypassed