close
Skip to content

fix(models): rank a version bump above a dated snapshot - #32

Open
bsamek wants to merge 1 commit into
fw-ai:mainfrom
bsamek:fix/model-version-date-ranking
Open

fix(models): rank a version bump above a dated snapshot#32
bsamek wants to merge 1 commit into
fw-ai:mainfrom
bsamek:fix/model-version-date-ranking

Conversation

@bsamek

@bsamek bsamek commented Sep 11, 2026

Copy link
Copy Markdown

Problem

fireconnect model list fetched deepseek-v4p1-flash but never showed it as the newest model, and deepseek-flash-latest stayed pinned to the older deepseek-v4-flash-0731.

Root cause

stripVersionSegments folded release stamps into the version tuple, so:

  • deepseek-v4p1-flash[4, 1]
  • deepseek-v4-flash-0731[4, 731]

731 > 1, so the dated v4 build won the "newest" comparison. newestModelsByFamily then dropped v4.1 from INDIVIDUAL MODELS, and ROUTER_SPEC_ALIASES/candidate lists kept the alias on 0731.

Fix

  • stripVersionSegments now returns a separate date tuple for release stamps (0731, 0813, 20250731).
  • New compareVersionKeys compares the version tuple first, using the date only as a tie-breaker:
    • deepseek-v4p1-flash [4,1] beats deepseek-v4-flash-0731 [4] + date [731]
    • deepseek-v4-flash-0731 still beats deepseek-v4-flash (dated build > undated base)
    • deepseek-v4-pro-0813 still beats deepseek-v4-pro
  • Retargeted deepseek-flash-latest at deepseek-v4p1-flash (alias + candidate list) and added its static spec. The live catalog reports this model vision-capable, so its capability list is text, image.

Documented limitation: date stamps aren't normalized across formats, so an 8-digit YYYYMMDD value always compares above a 4-digit MMDD value. No family mixes formats today; a test pins the behavior.

Tests

  • Added regression tests for version-bump-vs-date, date-vs-base, and the mixed-format behavior.
  • Added alias-resolution coverage for a catalog holding both v4.1 and the dated v4 build.
  • Updated Claude harness/CLI tests that assumed deepseek-flash-latest was text-only and labeled 0731.

npm test: 1820 tests, all pass except a pre-existing Azure/Foundry failure (codex on routes through the configured Foundry endpoint) that also fails on clean main.

Release stamps like deepseek-v4-flash-0731 were folded into the version tuple, producing [4, 731] against deepseek-v4p1-flash's [4, 1]. The larger date then won, so model list hid the v4.1 model and pinned deepseek-flash-latest to the older build.

Treat MMDD/YYYYMMDD segments as release dates: compare the version tuple first and use the date only as a tie-breaker. This keeps a dated snapshot ahead of its own undated base while letting v4.1 outrank v4 + 0731.

Retarget deepseek-flash-latest at deepseek-v4p1-flash and add its static spec (the live catalog reports it vision-capable).
@bsamek
bsamek force-pushed the fix/model-version-date-ranking branch from 300ce08 to 2172864 Compare September 11, 2026 14:49
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