fix(ai): repin five dead model ids, and stop needing to do this by hand - #394
Merged
Conversation
Five of this repo's model ids were retired by their vendors. Four of them at
once, in the same file.
`src/lib/ai/providers.ts` had the Groq default, the large-context fallback, the
OpenRouter default and the OpenRouter vision model all dead — the entire cascade
except the Groq vision model. `src/lib/hirn/providers/groq.ts` and
`openrouter.ts` carried two more, so both of this repo's AI layers were down.
The history matters more than the repin. This block has now been repinned three
times and the previous two are still legible in its own comments: Llama-4-Scout
was decommissioned, so it moved to `llama-3.3-70b-versatile`, and Groq then
retired the entire llama-3.x family. The comment in `hirn/openrouter.ts` even
predicted its own death — "free catalogues rot, so replace it with another
`:free` id" — and was right, and nothing acted on it.
So the durable part of this change is not the new ids. It is that two checks now
run without being asked:
- dotfiles/scripts/ci/model-pin-audit.mjs asks Groq and OpenRouter DAILY
whether these exact ids are still listed. It is the one that catches NEW
rot, because it talks to the vendor rather than to a list. It did not catch
these: `src/lib/hirn/providers/` was never opened, because nothing in that
path said "ai" loudly enough. That gap is fixed and tested.
- a new test here catches the cheaper mistake — a dead id reintroduced by
copying an old line, reverting a file or merging a stale branch. It matches
FAMILIES rather than individual ids, because what happened twice was a whole
lineage withdrawn at once, not one model being deprecated.
That test strips comments before matching, deliberately. The comments above
these constants name every retired id on purpose — that history is the most
useful thing on the page — and a sibling repo already shipped a guard that
grepped a function body and failed on a COMMENT, reporting on prose instead of
behaviour. A self-test asserts the stripper still finds a genuinely present id,
so the sweep cannot pass on an empty haystack.
Every replacement was verified against the live catalogue on 2026-08-27. The
vision id was chosen on three properties rather than on name: `:free` with
`pricing.prompt = 0`, `image` among its input modalities, and tool support.
── One thing fixed that was not a model id ────────────────────────────────────
`npm run verify` could not pass on a clean checkout. ESLint was linting
`.claude/worktrees/` — complete copies of this repo living inside it — and
reported 641 errors, every single one from those copies. The real tree had zero.
CI checks out without the worktrees, so CI was green while every developer's
local verify was red. That is the failure mode this fleet has already been
bitten by: a gate that fails on good code teaches people to reach for
--no-verify, and then the day it means something nobody reads it. Ignored by
family, so a new worktree needs no new line.
── Noted, not fixed ───────────────────────────────────────────────────────────
This repo has TWO independent AI provider layers, `src/lib/ai` and
`src/lib/hirn/providers`, each with its own Groq and OpenRouter client and its
own model ids. That duplication is why five ids needed changing instead of two,
and it will cause the same work again. Merging them is a design decision with
real consequences for the Hirn feature, so it belongs to a human rather than to
this PR.
verify: lint (0 errors), typecheck, 538 suites / 7766 tests, build.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.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.
fix(ai): repin five dead model ids, and stop needing to do this by hand
Five of this repo's model ids were retired by their vendors. Four of them at
once, in the same file.
src/lib/ai/providers.tshad the Groq default, the large-context fallback, theOpenRouter default and the OpenRouter vision model all dead — the entire cascade
except the Groq vision model.
src/lib/hirn/providers/groq.tsandopenrouter.tscarried two more, so both of this repo's AI layers were down.The history matters more than the repin. This block has now been repinned three
times and the previous two are still legible in its own comments: Llama-4-Scout
was decommissioned, so it moved to
llama-3.3-70b-versatile, and Groq thenretired the entire llama-3.x family. The comment in
hirn/openrouter.tsevenpredicted its own death — "free catalogues rot, so replace it with another
:freeid" — and was right, and nothing acted on it.So the durable part of this change is not the new ids. It is that two checks now
run without being asked:
whether these exact ids are still listed. It is the one that catches NEW
rot, because it talks to the vendor rather than to a list. It did not catch
these:
src/lib/hirn/providers/was never opened, because nothing in thatpath said "ai" loudly enough. That gap is fixed and tested.
copying an old line, reverting a file or merging a stale branch. It matches
FAMILIES rather than individual ids, because what happened twice was a whole
lineage withdrawn at once, not one model being deprecated.
That test strips comments before matching, deliberately. The comments above
these constants name every retired id on purpose — that history is the most
useful thing on the page — and a sibling repo already shipped a guard that
grepped a function body and failed on a COMMENT, reporting on prose instead of
behaviour. A self-test asserts the stripper still finds a genuinely present id,
so the sweep cannot pass on an empty haystack.
Every replacement was verified against the live catalogue on 2026-08-27. The
vision id was chosen on three properties rather than on name:
:freewithpricing.prompt = 0,imageamong its input modalities, and tool support.── One thing fixed that was not a model id ────────────────────────────────────
npm run verifycould not pass on a clean checkout. ESLint was linting.claude/worktrees/— complete copies of this repo living inside it — andreported 641 errors, every single one from those copies. The real tree had zero.
CI checks out without the worktrees, so CI was green while every developer's
local verify was red. That is the failure mode this fleet has already been
bitten by: a gate that fails on good code teaches people to reach for
--no-verify, and then the day it means something nobody reads it. Ignored by
family, so a new worktree needs no new line.
── Noted, not fixed ───────────────────────────────────────────────────────────
This repo has TWO independent AI provider layers,
src/lib/aiandsrc/lib/hirn/providers, each with its own Groq and OpenRouter client and itsown model ids. That duplication is why five ids needed changing instead of two,
and it will cause the same work again. Merging them is a design decision with
real consequences for the Hirn feature, so it belongs to a human rather than to
this PR.
verify: lint (0 errors), typecheck, 538 suites / 7766 tests, build.
🤖 Generated with Claude Code