fix(ai): the Groq registry was entirely retired, and the check could not see it - #781
Merged
Merged
Conversation
…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>
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): the Groq registry was entirely retired, and the check could not see it
platform-llm.tswas repaired for this on 2026-08-26. Its comment records thedamage precisely — Groq stopped serving
llama-3.3-70b-versatile, everycallPlatformJson caller returned null, and because each is written to degrade
gracefully, eight features degraded gracefully into doing nothing.
src/services/ai/groq.tsis the same outage, in the half nobody looked at.GROQ_MODELSlistedllama-3.3-70b-versatileandllama-3.1-8b-instant— theregistry named two models and served zero — and
DEFAULT_GROQ_MODEL, thebaseline a free non-BYOK user gets, pointed at one of them.
src/lib/ai/form-prefill-service.tsthen carried its OWN literal copy of thesame 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-modelsexists, and this is exactly what it is for. It readtwo 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-instantback into theregistry 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 liveAPI 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:sizesfailed at 507 lines on the first pass — the comments above werelonger 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