fix(models): sync bundled offline fallback data with models.dev (2026-09-08) - #225
Merged
Merged
Conversation
…-09-08) Three drift classes fixed in the offline-only tables: 1. Context limits — kimi-k2.7-code 256K -> 262,144; minimax-m3, qwen3.6-plus, qwen3.7-plus -> 1M. models.dev now differentiates Go vs Zen per model and the bundled Go values matched the Zen ones (issue #2 contamination pattern); qwen3.7-plus was a copy-paste, never verified. Deliberate deviations kept: deepseek-v4-flash 131,072 output cap (#171), Go minimax-m2.5 65,536 output. 2. Usage tracker pricing — table rewritten from the current Go snapshot: mimo-v2.5-pro / deepseek-v4-pro were 2-4x over-reported, mimo-v2-omni / deepseek-v4-flash under-reported, kimi-k3 ($3/$15) fell back to a 6x-under-estimating generic price. 15 new models added, minimax-m2.1/m2 removed, hy3-preview -> hy3. 3. Go fallbackModels catalog refreshed to the 27-model curated active set (still listed hy3-preview + pre-June models). Stale tests referencing hy3-preview updated; goUsageTracker and metadata unit-test locks updated to the corrected values. Doc: docs/issues/100-20260908-bundled-model-data-sync.md
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.
Summary
Full audit of the bundled offline fallback tables against the live models.dev registry (
api.json, fetched 2026-09-08) found three drift classes. All of these tables only matter when the live models.dev fetch and the gateway/modelsendpoint are unavailable, but some wrong values were large enough to matter anyway (up to 6x cost under-reporting).Every drifted value was traced with
git log -Sbefore changing it, to separate stale snapshots from deliberate deviations.1. Context limits (
src/models/modelTables.ts)kimi-k2.7-codeminimax-m3qwen3.6-plusqwen3.7-plusqwen3.6-plusin1c26fd1(2026-08-13), never verifiedThe key signal: models.dev now differentiates Go vs Zen per model, and the bundled Go values exactly matched the Zen ones. That is the same cross-provider contamination pattern fixed in
docs/issues/02.Kept as-is (deliberate, verified against the gateway):
deepseek-v4-flashoutput cap 131,072 (#171) and Gominimax-m2.5output 65,536.2. Usage tracker pricing (
src/usage/pricing.ts)The static
GO_MODEL_PRICINGfallback had drifted badly from the registry:mimo-v2.5-prodeepseek-v4-promimo-v2-omnideepseek-v4-flashminimax-m3kimi-k3Table rewritten from the current Go snapshot: 15 new models added,
minimax-m2.1/minimax-m2removed (no longer served),hy3-previewrenamed tohy3with the corrected price.3. Go fallback catalog (
src/provider/definitions.ts)fallbackModelsstill listed the retiredhy3-preview, omittedkimi-k2.7-codeand everything added after June, and included deprecated models, contradicting the README's deprecated-filtering promise. Refreshed to the 27-model curated active set.4. Stale tests
metadata.test.ts,registry.test.ts,thinking.test.tsstill referencedhy3-preview(passing only because the routing catch-all treats both ids the same). Updated tohy3. ThegoUsageTrackerandmetadataunit-test locks that pinned the old pricing/context values were updated as part of the sync.Verification
npm run lint: all 7 checks pass, 462/462 unit testsCaveats
DEFAULT_INLINE_MODELis stillqwen3.5-plus, which is upstream-deprecated. Left unchanged; worth a follow-up.Doc:
docs/issues/100-20260908-bundled-model-data-sync.md