Skip to content

Tell admins when a model in use is being retired - #389

Merged
dillonstreator merged 2 commits into
mainfrom
feat/model-retirements
Nov 27, 2026
Merged

dillonstreator merged 2 commits into
mainfrom
feat/model-retirements

Conversation

@dillonstreator

Copy link
Copy Markdown
Member

What

  • The model catalog keeps the retirement data each provider's model list already carries: OpenAI shutdown_date, Anthropic lifecycle / retires_at, OpenRouter-style expiration_date, and deprecated_at from the Vercel AI Gateway's public model list (the gateway SDK's /config drops it).
  • ai/retirement.ts checks the models in use (language, transcription, align, judge) against those lists, decides retired / soon (≤ 30 days) / scheduled / deprecated from plain data and now, and caches the answer for 6 hours (5 minutes when a provider could not be listed; a model change is looked up at once).
  • Web (admins): a chip in the top bar (HeaderAlerts, red when retired or within 30 days, links to Settings → System → Models), a dot on the System tab and its Models section, a line under each model picker, and a label on retiring rows in the picker.
  • Surfaces on the same service: admin.models.lifecycle (tRPC), check_model_retirements (MCP; list_models rows also carry retirement), reelsaw models retirements (exits 2 when a model has retired or retires within 30 days) and a line in reelsaw version.
  • A provider that publishes no dates (Google, Groq, Deepgram, AssemblyAI, OpenCode, self-hosted servers) shows as "no dates published", never as safe.
  • README, deploy/README and the generated MCP/CLI tables updated; minor changeset.

Why

Providers retire models on a schedule (OpenAI's deprecations page lists gpt-4o-mini, the default AI_MODEL, for Jan 14, 2027, and whisper-1, the default TRANSCRIPTION_MODEL, for Feb 26, 2027). A retired model fails every stage that uses it, and nothing in the app said so ahead of time. The dates were already in the listings the model picker fetches.

Reviewer notes

  • Coverage is only as good as the providers' data. The AI Gateway's public list dates 5 models today (whisper-1 among them, matching OpenAI's date) but not openai/gpt-4o-mini, so a gateway setup gets no chip for that model until the gateway adds one. deprecated_at is undocumented; it is read as the stop date because it matches OpenAI's on whisper-1.
  • No provider names a replacement in its list today, so replacement stays null rather than guessed.
  • The gateway's public list is fetched without a key, only when a gateway key is configured; a failed fetch logs a warning and lists the models without dates.
  • New strings are in the catalogues; no Russian translations added. Website copy unchanged.
  • scripts/lint-baseline.json: knip/types went down by one, so the baseline is lowered as the ratchet requires.
  • Checked: pnpm format && pnpm lint, pnpm guards, tsc --noEmit for server and web, pnpm docs:check, i18n:check (server, web), pnpm --filter @reelsaw/web build, eval:offline, test:unit (new model-retirement.test.ts 9/9 and mcp-definitions.test.ts pass; the only other failures are scene-steps.test.ts ×3, #!/bin/sh stubs on Windows, and one resources.test.ts case that passes alone, both untouched here). The parsers were run against the live OpenRouter list (19 of 477 models dated) and the AI Gateway's public list (5 dated).
  • Not checked: the screens in a browser (a local Ollama/Speaches stack publishes no dates, so there was nothing to render), stack tests that need Postgres, phone width, and the OpenAI/Anthropic listings with real keys.

Providers retire models on a schedule, and a model that stops being served
fails every project that uses it. Several providers publish the date in their
model lists: OpenAI (shutdown_date), Anthropic (lifecycle, retires_at),
OpenRouter (expiration_date) and the Vercel AI Gateway's public list
(deprecated_at). The picker already fetches those lists and dropped the fields.

The catalog now keeps them on each model, and ai/retirement.ts checks the models
in use (language, transcription, align, judge) against them, cached for six
hours. Admins see it as a chip in the top bar, a dot on Settings -> System and
its Models section, a line under each picker and a label on the picker rows.
check_model_retirements (MCP), `reelsaw models retirements` and
`reelsaw version` report the same state through the same service. A provider
that publishes no dates shows as "no dates published", not as safe.

Signed-off-by: dillonstreator <dillonstreator@gmail.com>
@vercel

vercel Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
reelsaw-website Ready Ready Preview Nov 27, 2026 5:01pm UTC

Request Review

The retirement code read listing fields through its own Reflect.get getter and
parsed dates with a local isoOrNull, both private to one module. The same class
was elsewhere: clamp written seven times, chunk, escapeRegExp, escapeHtml, four
sleep helpers (two with abort handling that disagreed), another field getter,
and hand-rolled day arithmetic.

- lodash-es (get with paths, type guards, clamp, chunk, escape, escapeRegExp,
  pick, uniqBy) and date-fns (isValid, isAfter, differenceInCalendarDays in UTC
  via @date-fns/utc, addDays, subDays/subHours, differenceInHours) replace them;
  waits use node:timers/promises.
- providerOf moves to @reelsaw/shared with modelOf, so the web stops splitting
  "provider:model" ids by hand.
- shared-helpers-guard.test.ts fails on a new local copy of those helpers or a
  two-argument Reflect.get; PRINCIPLES names the libraries.

Mail HTML now escapes apostrophes too (&#39;), which renders the same.

Signed-off-by: dillonstreator <dillonstreator@gmail.com>
@dillonstreator
dillonstreator marked this pull request as ready for review November 27, 2026 17:20
@dillonstreator
dillonstreator merged commit fd1839b into main Nov 27, 2026
16 checks passed
@dillonstreator dillonstreator mentioned this pull request Nov 27, 2026
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