Skip to content

Replace decommissioned Groq model, add CI - #3

Merged
anishkb-dev merged 4 commits into
mainfrom
fix/dead-groq-model-and-ci
Aug 28, 2026
Merged

Replace decommissioned Groq model, add CI#3
anishkb-dev merged 4 commits into
mainfrom
fix/dead-groq-model-and-ci

Conversation

@anishkb-dev

Copy link
Copy Markdown
Owner

What

Groq retired llama-3.3-70b-versatile. The three routes using it — goal-plan, voice-pep, weekly-insight — returned 500 with "The model llama-3.3-70b-versatile does not exist or you do not have access to it."

Switched them to openai/gpt-oss-20b, which coach, daily-plan and weekly-dungeon were already using successfully.

Also adds a CI workflow: npm citsc --noEmitlintbuild, on push and PR to main.

Why the CI matters

Production was broken for ~32 days and nothing surfaced it. Three stacked causes, each hiding the next:

  1. The Groq API key had been revoked — 401 on every call.
  2. The Snyk bump (next → 16.2.9 plus a postcss override) left node_modules drifted from package-lock.json, so every build failed. Vercel reported this as a "git provider server error", which sent the diagnosis the wrong way. npm ci fixed it.
  3. This dead model.

CI uses npm ci specifically because it installs strictly from the lockfile — exactly the drift that caused #2.

Verification

All six routes probed against production after the model change:

Route Status
coach 200 — 41 SSE events, zero error frames
daily-plan 200
goal-plan 200
weekly-insight 200
weekly-dungeon 200
voice-pep 200

Locally: tsc --noEmit exit 0, lint exit 0, build ✓ compiled, 10/10 static pages.

Notes

  • voice-pep and weekly-insight were written for a 70B model; their prompts ask for prose with specific texture. Output on a 20B model may read flatter and the prompts may need tightening.
  • Model IDs are hardcoded across six files. The next deprecation breaks this again — worth pulling into one constant or an env var.
  • ELEVENLABS_API_KEY is not set in production, so voice-pep returns audioBase64: null. It degrades gracefully.

🤖 Generated with Claude Code

Anish KB and others added 4 commits August 28, 2026 15:52
Groq retired llama-3.3-70b-versatile. The three routes using it
(goal-plan, voice-pep, weekly-insight) returned 500 with "model does
not exist or you do not have access to it". Switched them to
openai/gpt-oss-20b, which coach, daily-plan and weekly-dungeon were
already using successfully.

All six routes verified live against production after this change.

Also adds a CI workflow (npm ci, tsc --noEmit, lint, build) on push and
PR to main. The production build was silently broken for ~32 days after
the Snyk bump to next 16.2.9 left node_modules drifted from the
lockfile; nothing surfaced it. npm ci in CI catches exactly that.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ai-sdk/gateway, @ai-sdk/groq and @ai-sdk/provider all declare
"node": ">=22". On Node 20 the install emitted EBADENGINE for each, and
npm 10 (bundled with Node 20) installed @ai-sdk/*@4.0.0 — versions the
committed lockfile does not contain — which broke the build with
"The export serializeModelOptions was not found".

A fresh clone of this branch on Node 22 with npm 11 installs exactly
what the lockfile pins (@ai-sdk/groq@3.0.38) and builds clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Two Snyk changes on main contradict each other:

  - PR #2 bumped @ai-sdk/groq to ^4.0.0. groq@4.0.0 depends on
    @ai-sdk/provider-utils 5.0.0.
  - An earlier SSRF fix added overrides["@ai-sdk/provider-utils"]="^4.0.41".

The override caps provider-utils below what groq@4 needs. 4.0.41 does not
export serializeModelOptions, which groq@4.0.0 imports, so every build
since a899a87 failed with:

  The export serializeModelOptions was not found in module
  @ai-sdk/provider-utils

This is why the last successful Vercel deploy was 32 days ago.

Lifting the override to ^5.0.0 resolves provider-utils@5.0.32, which
groq@4 requires. npm audit confirms the ai-sdk and undici advisories the
override was protecting against remain resolved — a newer version
supersedes the pin, so no security regression.

Verified: tsc --noEmit exit 0, next build compiles all six routes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@anishkb-dev
anishkb-dev force-pushed the fix/dead-groq-model-and-ci branch from 61ba7f2 to 389546c Compare August 28, 2026 10:25
@anishkb-dev
anishkb-dev merged commit 2f71c0b into main Aug 28, 2026
2 checks passed
@anishkb-dev
anishkb-dev deleted the fix/dead-groq-model-and-ci branch August 28, 2026 10:34
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