Repository navigation
馃挕 Model Catalog Sync: Auto-Detect New and Retiring Models via the Models API and Scaffold the Onboarding #2097
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Add a scheduled, read-only model catalog sync. It polls Anthropic's
GET /v1/models(and Gemini's model list) and diffs the result against the chainsscripts/lib/engine-models.shresolves for every task key (triage,deep,audit,action,single,duck). Three kinds of event come out of the diff: a new model in a line we use, a configured model that is deprecated or has aretires_atdate, and a capability mismatch between a chain and the flagsengine.shsends to it. Each event opens one scaffolded onboarding issue with a pre-filled pricing row, a compatibility report, themodel-abcommand to run, and the ring-promotion checklist. Model enablement becomes a repeatable pipeline instead of a hand-written plan per release.This is a direct answer to the maintainer's question on #2095: "Enabling new models is an ongoing concern. Thoughts on how to make this faster, easier and more predictable?"
Market Signal
GET /v1/modelsreturnslifecycle(active/deprecated/retired),deprecated_at,retires_at,line(haiku/sonnet/opus/fable/mythos),max_input_tokens,max_tokensand acapabilitiesobject. That object coverseffort.{low,medium,high,xhigh,max},thinking.types.{adaptive,enabled,disabled},structured_outputsandbatch(Models API reference). The docs also say "do not infer a line from theid", and today we infer it from the id.model-pricing.tsvhas no column for this, so the token reports will under-price any Haiku 5.5 triage call above 100K tokens by 5x.temperature/top_p/top_k(deprecations).engine.shleaves effort at the CLI default fortriage/action(see the effort-pin comment near line 1730), so swapping Haiku in changes triage cost and latency without anyone choosing to.claude-haiku-4-5-20251001, the first model of the defaulttriagechain, as "not sooner than October 15, 2026". Anthropic gives at least 60 days' notice, so nothing breaks next week. But aretires_atwill appear on the API before any human reads an email, and a sync job would catch it the same day.claude-sonnet-4-5-20250929is already deprecated (retires Nov 30, 2026); the sync would confirm no chain or env override still names it.User Signal
ai_models_fable_deprecationmisses tab-prefixed chains. Deprecation detection is hand-coded per family (engine-models.sh:252) and string-matched, so the next deprecation needs another hand-written function.config/ai-engines.jsonas the single source of truth, with per-task provider preference. The sync job is the natural reader and checker for that file.Technical Opportunity
Nearly every part already exists. What's missing is the trigger and the glue:
scripts/lib/engine-models.sh(ai_model_for_family,AI_MODELS_*parsing)scripts/lib/model-pricing.tsv+tests/model_pricing.batsscripts/check-model-pins.sh(#1979)scripts/evals/model-ab.sh,model-ab.yml,evals/triage,evals/deep-reviewpr_review_canary.shProposed shape:
scripts/model-catalog-sync.sh(pure core). Input: the/v1/modelsJSON plus the resolved chain table. Output: a JSON list of events:new_in_linedeprecatedretires_at_setcapability_mismatch, for exampledeeppins--effort highand the model haseffort.high.supported=false, or a chain model hasthinking.types.disabled=falsewhile a tier needs thinking offpricing_row_missing, for any configured or newly listed model with no matchingmodel-pricing.tsvglobprompt_tokens_overthreshold column, so that a second row for the same glob covers the >100K tier. Price selection then also keys on the record's prompt size. This is append-only and backward compatible.model-abdispatch command, and the ring checklist (v1-next canary, then the [Phase 2] Canary go/no-go report: compare deep-tier cost, cache-read cost and latency by model from token-usage artifacts聽#1951 report, then stable).Assessment
Adversarial Review
Strongest objection: Three model launches of toil don't justify a platform. A human reading the changelog is cheaper than another scheduled job, and the hard part of onboarding, judging whether the new model reviews as well, can't be automated.
Rebuttal: The job does not try to judge quality. That stays with
model-aband the canary ring, where it belongs. It automates the mechanical steps that keep failing in practice: finding every chain and override that names a model (#1900), detecting deprecation without per-family string matching (#1981), keeping a pricing row in step with each release, and catching capability mismatches before a production run 400s. The Haiku 5.5 price tier is a concrete case: once Haiku 5.5 is enabled, the cost observatory will be wrong unless the schema changes, whether or not anyone builds the sync. The read-only first phase costs one API call a day.Other risks: the
/v1/modelscapability schema could change, so pin theanthropic-versionheader and fail open with a warning. Gemini has no equivalentretires_at, so its side starts as presence-only.Suggested Next Step
scripts/model-catalog-sync.sh(pure diff plus bats fixtures built from a captured/v1/modelsresponse) and run it read-only in the daily health check for two weeks. It writes its event list to the step summary.model-pricing.tsvwith the prompt-length tier and adds the two Haiku 5.5 rows. That unblocks Enable Haiku 5.5聽#2095's Phase 1 on the right footing.All reactions