Repository navigation
Tell admins when a model in use is being retired - #389
Merged
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 ('), which renders the same. Signed-off-by: dillonstreator <dillonstreator@gmail.com>
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.
What
shutdown_date, Anthropiclifecycle/retires_at, OpenRouter-styleexpiration_date, anddeprecated_atfrom the Vercel AI Gateway's public model list (the gateway SDK's/configdrops it).ai/retirement.tschecks the models in use (language, transcription, align, judge) against those lists, decidesretired/soon(≤ 30 days) /scheduled/deprecatedfrom plain data andnow, and caches the answer for 6 hours (5 minutes when a provider could not be listed; a model change is looked up at once).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.admin.models.lifecycle(tRPC),check_model_retirements(MCP;list_modelsrows also carryretirement),reelsaw models retirements(exits 2 when a model has retired or retires within 30 days) and a line inreelsaw version.minorchangeset.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 defaultTRANSCRIPTION_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
openai/gpt-4o-mini, so a gateway setup gets no chip for that model until the gateway adds one.deprecated_atis undocumented; it is read as the stop date because it matches OpenAI's on whisper-1.replacementstays null rather than guessed.scripts/lint-baseline.json: knip/types went down by one, so the baseline is lowered as the ratchet requires.pnpm format && pnpm lint,pnpm guards,tsc --noEmitfor server and web,pnpm docs:check,i18n:check(server, web),pnpm --filter @reelsaw/web build,eval:offline,test:unit(newmodel-retirement.test.ts9/9 andmcp-definitions.test.tspass; the only other failures arescene-steps.test.ts×3,#!/bin/shstubs on Windows, and oneresources.test.tscase 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).