Files
Kevin CodexandClaude Fable 5 8b10c43cc6 feat(modelregistry): live models.dev overlay for context limits and pricing
The curated catalog stays the source of truth for model identity (ids,
aliases, match patterns, deprecations, escalation targets), but its
volatile facts went stale between releases. A cached snapshot of
https://models.dev/api.json now overlays context window, max output
tokens, and base per-million pricing onto known entries at registry
construction. The overlay never adds models, never touches curated
tiered pricing (models.dev has no tier data), and never does network on
the registry hot path: fetching happens only in an explicit background
refresh (exec/TUI startup), TTL 24h, atomic write, validated before it
can clobber a good cache, capped at 32MiB.

Opt-in by design: only the CLI entrypoint enables the overlay
(EnableModelsDevOverlay), so library consumers and hermetic tests are
never perturbed by a cache file on the machine. ZERO_MODELS_URL
overrides the source, ZERO_DISABLE_MODELS_FETCH disables fetch+overlay,
ZERO_MODELS_CACHE_PATH relocates the cache. Snapshots older than 7 days
are ignored (the shipped catalog is likely fresher). Parser validated
against the live api.json shape (150 providers).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-05 11:43:48 +08:00
..
2026-06-08 15:37:14 +05:30
2026-06-13 22:20:42 +05:30
2026-06-10 14:54:19 +05:30
2026-06-05 14:03:47 +05:30
2026-06-08 19:03:02 +05:30
2026-06-08 21:07:57 +05:30
2026-06-08 21:07:57 +05:30