Skip to content

fix(ai): repin five dead model ids, and stop needing to do this by hand - #394

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/chain-not-a-pin
Aug 26, 2026
Merged

fix(ai): repin five dead model ids, and stop needing to do this by hand#394
github-actions[bot] merged 1 commit into
mainfrom
fix/chain-not-a-pin

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

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.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.

🤖 Generated with Claude Code

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>
@github-actions
github-actions Bot merged commit 3be914c into main Aug 26, 2026
9 checks passed
@github-actions
github-actions Bot deleted the fix/chain-not-a-pin branch August 26, 2026 23:19
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