Skip to content

fix(ai): the Groq registry was entirely retired, and the check could not see it - #781

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

fix(ai): the Groq registry was entirely retired, and the check could not see it#781
github-actions[bot] merged 1 commit into
mainfrom
fix/chain-not-a-pin

Conversation

@catomean

Copy link
Copy Markdown
Collaborator

fix(ai): the Groq registry was entirely retired, and the check could not see it

platform-llm.ts was repaired for this on 2026-08-26. Its comment records the
damage precisely — Groq stopped serving llama-3.3-70b-versatile, every
callPlatformJson caller returned null, and because each is written to degrade
gracefully, eight features degraded gracefully into doing nothing.

src/services/ai/groq.ts is the same outage, in the half nobody looked at.
GROQ_MODELS listed llama-3.3-70b-versatile and llama-3.1-8b-instant — the
registry named two models and served zero — and DEFAULT_GROQ_MODEL, the
baseline a free non-BYOK user gets, pointed at one of them.

src/lib/ai/form-prefill-service.ts then carried its OWN literal copy of the
same dead id, two lines' worth of import away from the constant that already
owned that decision. Its OpenRouter id beside it was correctly sourced from the
registry, which is what made the asymmetry easy to read past. It imports now.

── Why the existing guard stayed green ────────────────────────────────────────

npm run check:ai-models exists, and this is exactly what it is for. It read
two ids: the platform-llm Groq pin and the OpenRouter free default. It reported
"every pinned model is still served" while an entire registry of retired ids sat
beside it, because they were never in its list.

A green check on a two-item list reads exactly like a green check on the repo.
It now reads the registry as a WHOLE — the keys of GROQ_MODELS are every Groq id
this codebase can select — so a model added there is covered without editing the
script. Ids pinned in two places are asked once. An unreadable registry reports
a failure rather than an empty list, since silence was the original bug.

Verified by mutation, not assumed: putting llama-3.1-8b-instant back into the
registry makes the check exit 1 naming that id. Before this change it exited 0.

The script is still not part of npm run verify, deliberately — it needs live
API keys and would fail closed in any environment without them. The fleet-wide
equivalent that does run unattended is dotfiles/scripts/ci/model-pin-audit.mjs,
which asks both vendors daily and now covers this repo properly.

── Detail ─────────────────────────────────────────────────────────────────────

Metadata is Groq's own, from GET /models on 2026-08-27: both replacements report
a 131072 context window and 65536 max completion. The old entries claimed
128000/32768 and 128000/8192 — approximations of ids that no longer existed.

The reasoning behind the default is kept because it survives the ids: take the
most capable free model, since there are no fiat rails to buy a better one, and
accept that a larger model exhausts the daily cap sooner because the chain rolls
to OpenRouter when it does.

check:sizes failed at 507 lines on the first pass — the comments above were
longer than they needed to be. Tightened rather than granted an exception; the
file is now 492, one line below where it started.

verify: docs, accent-ink, type-check, sizes, routes, lint, duplication,
dead-fields, migrations, schema columns, currency units, rpc, mdx,
243 suites / 2386 tests.

🤖 Generated with Claude Code

…not see it

`platform-llm.ts` was repaired for this on 2026-08-26. Its comment records the
damage precisely — Groq stopped serving `llama-3.3-70b-versatile`, every
callPlatformJson caller returned null, and because each is written to degrade
gracefully, eight features degraded gracefully into doing nothing.

`src/services/ai/groq.ts` is the same outage, in the half nobody looked at.
`GROQ_MODELS` listed `llama-3.3-70b-versatile` and `llama-3.1-8b-instant` — the
registry named two models and served zero — and `DEFAULT_GROQ_MODEL`, the
baseline a free non-BYOK user gets, pointed at one of them.

`src/lib/ai/form-prefill-service.ts` then carried its OWN literal copy of the
same dead id, two lines' worth of import away from the constant that already
owned that decision. Its OpenRouter id beside it was correctly sourced from the
registry, which is what made the asymmetry easy to read past. It imports now.

── Why the existing guard stayed green ────────────────────────────────────────

`npm run check:ai-models` exists, and this is exactly what it is for. It read
two ids: the platform-llm Groq pin and the OpenRouter free default. It reported
"every pinned model is still served" while an entire registry of retired ids sat
beside it, because they were never in its list.

A green check on a two-item list reads exactly like a green check on the repo.
It now reads the registry as a WHOLE — the keys of GROQ_MODELS are every Groq id
this codebase can select — so a model added there is covered without editing the
script. Ids pinned in two places are asked once. An unreadable registry reports
a failure rather than an empty list, since silence was the original bug.

Verified by mutation, not assumed: putting `llama-3.1-8b-instant` back into the
registry makes the check exit 1 naming that id. Before this change it exited 0.

The script is still not part of `npm run verify`, deliberately — it needs live
API keys and would fail closed in any environment without them. The fleet-wide
equivalent that does run unattended is dotfiles/scripts/ci/model-pin-audit.mjs,
which asks both vendors daily and now covers this repo properly.

── Detail ─────────────────────────────────────────────────────────────────────

Metadata is Groq's own, from GET /models on 2026-08-27: both replacements report
a 131072 context window and 65536 max completion. The old entries claimed
128000/32768 and 128000/8192 — approximations of ids that no longer existed.

The reasoning behind the default is kept because it survives the ids: take the
most capable free model, since there are no fiat rails to buy a better one, and
accept that a larger model exhausts the daily cap sooner because the chain rolls
to OpenRouter when it does.

`check:sizes` failed at 507 lines on the first pass — the comments above were
longer than they needed to be. Tightened rather than granted an exception; the
file is now 492, one line below where it started.

verify: docs, accent-ink, type-check, sizes, routes, lint, duplication,
dead-fields, migrations, schema columns, currency units, rpc, mdx,
243 suites / 2386 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions
github-actions Bot merged commit 3a64708 into main Aug 26, 2026
7 checks passed
@github-actions
github-actions Bot deleted the fix/chain-not-a-pin branch August 26, 2026 23:27
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