Skip to content
Source
Sign inSign up
TanStack/schemas

Read Mistral release dates from each model page's markdown twin #713

Mergedtombeckenhammerged 3 commits intomain fromfix/708-mistral-released-atmerged by tombeckenham View on GitHub

tombeckenhamcommented

Fixes #708. Every live Mistral row now gets releasedAt from Mistral's own model page, with factSources.releasedAt saying where it came from. No row needs a source-silent entry.

Why every row was null

GET https://api.mistral.ai/v1/models does return created, but it is the time of the request. All 62 rows in a live listing (2026-11-21) shared one value, 1795228448, one second before the request. The poller drops a release time that is not before now, so nothing was ever stored. The adapter now ignores created for Mistral.

Where the dates come from

Each model page has a markdown twin at https://docs.mistral.ai/models/<slug>.md with a labelled line. For example, https://docs.mistral.ai/models/codestral-25-08.md has - Release date: 2025-07-30, and https://docs.mistral.ai/models/mistral-small-4-0-26-03.md has - Release date: 2026-03-16. The HTML page renders the same date ("July 30, 2025") with no label. The .md line is labelled, so that is the one we parse.

  • loadPage in mistral-pricing.ts already reads each model page. It now always fetches the .md twin. Before, it fetched the twin only for pages with no price. A 404 twin is unread, not dateless: that page's ids get absent.releasedAt: 'unavailable', the same way an unread price twin sets absent.pricing, so the stored values stay.
  • If no page read states a release date, the load throws, like the existing modalities guard. A renamed label then fails loudly under tryDocs instead of nulling every row.
  • parseMistralMarkdownReleaseDate returns null when a page has no line. The Timestral pages state no date, and no listed id uses them. That is read-and-absent, a plain null. It throws on a second line or a value that is not a real YYYY-MM-DD date.
  • The date is mapped to API ids the same way as the other page facts (indexPageField), so an id that two pages date differently gets no date from the pages. releasedAt is now in ALIAS_FACTS, so mutual listing aliases share it, and the listing alias deliberately settles such a page conflict. Live case: voxtral-mini-tts-latest is dated 2026-03-23 by voxtral-tts-26-03.md and 2026-10-20 by voxtral-mini-tts-3-0.md. The listing makes it a mutual alias of voxtral-mini-tts-2603, so it gets 2026-03-23, with that page as sourceUrl. The listing naming the snapshot is better evidence than a page that still names the id. An id with a page conflict and no mutual alias gets no date. A test covers both cases.
  • The .md page does not name mistral-vibe-cli-fast, mistral-code-latest or mistral-medium-2604. Each gets its date from the alias group the listing puts it in.
  • The source is { derivation: 'docs-derived', sourceUrl: '<page>.md', sourceHash, path: 'Release date' }, the same shape Gemini uses.
  • Third-party models hosted by Mistral get the date on Mistral's own page for that hosting, not the maker's date. Examples: zai-glm-5-3 gets 2026-09-15 and deepseek-v4-1-flash-1017 gets 2026-10-28.
  • No date is taken from an id suffix.

Other changes

  • emptySources in fact-sources.ts ignored a releasedAt source. A row whose only source was releasedAt lost its whole factSources (mistral-moderation-2603 in the live run). This also affects Gemini's existing factSources.releasedAt. ModelFactSources gains releasedAt?: FactSource. This changes the TypeScript type only; openapi.json does not change.
  • DOCS_CACHE_VERSION v43 to v44, because #712 took v43. A cached Mistral page entry from before this change has no releasedAt and would otherwise hold the dates back for up to 6 hours.

Cost

When the cache misses, the docs load makes one extra subrequest per model page whose twin was not already fetched (about 30). These are cached like the pages.

Checked

  • Ran the adapter against the live listing (dev key) and live docs: all 62 listed ids (the 55 live rows plus 7 deprecated) got a date and a factSources.releasedAt, with 0 docs failures.
  • pnpm run test (257 files, 2555 tests), pnpm run typecheck, pnpm run lint and pnpm run check all pass. openapi:emit and emit-skill show no drift.
  • The gap report does not score releasedAt, so it is unaffected.
  • The fixture src/server/providers/fixtures/mistral-small-4-0-26-03.md.txt is the live .md page from 2026-11-21.
    1. tombeckenham pushed7de85c4

    2. tombeckenham pushedae44039

    3. tombeckenham merged this31bef86

    4. tombeckenham closed this

Sign in to join this conversation.