Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Upgrade groq-sdk versions and handle Groq model deprecations. Use when upgrading SDK versions, detecting deprecated models, or migrating to new Groq model IDs. Trigger with phrases like "upgrade groq", "groq migration", "groq breaking changes", "update groq SDK", "groq deprecated model".
.claude/skills/jeremylongshore-groq-upgrade-migration/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 58% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 102% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 7% | 0% |
!npm list groq-sdk 2>/dev/null | grep groq-sdk || echo 'groq-sdk not installed' !pip show groq 2>/dev/null | grep -E "Name|Version" || echo 'groq not installed (python)'
Guide for upgrading the groq-sdk package and migrating away from deprecated model IDs. It walks a safe upgrade path — branch, bump, scan for deprecated model references, rewrite them, and verify against the live models endpoint before merging.
groq-sdk (or the Python groq package).npm, git, curl, and jq available on PATH.GROQ_API_KEY exported in your shell (or CI secretstore). The SDK constructor new Groq() reads it automatically; the live model check passes it as Authorization: Bearer $GROQ_API_KEY. Get a key at <https://console.groq.com/keys>. See the Authentication section of references/implementation.md.
Groq announces deprecations with advance notice. These models have been deprecated:
| Deprecated Model | Deprecation Date | Replacement | |-----------------|-----------------|-------------| | mixtral-8x7b-32768 | 2025-03-05 | llama-3.3-70b-versatile or llama-3.1-8b-instant | | gemma2-9b-it | 2025-08-08 | llama-3.1-8b-instant | | llama-3.1-70b-versatile | 2024-12-06 | llama-3.3-70b-versatile | | llama-3.1-70b-specdec | 2024-12-06 | llama-3.3-70b-specdec | | playai-tts | 2025-12-23 | Orpheus TTS models | | playai-tts-arabic | 2025-12-23 | Orpheus TTS models | | distil-whisper-large-v3-en | — | whisper-large-v3-turbo |
| Model ID | Type | Context | Speed | |----------|------|---------|-------| | llama-3.1-8b-instant | Text | 128K | ~560 tok/s | | llama-3.3-70b-versatile | Text | 128K | ~280 tok/s | | llama-3.3-70b-specdec | Text | 128K | Faster | | meta-llama/llama-4-scout-17b-16e-instruct | Vision+Text | 128K | ~460 tok/s | | meta-llama/llama-4-maverick-17b-128e-instruct | Vision+Text | 128K | — | | whisper-large-v3 | Audio STT | — | 164x RT | | whisper-large-v3-turbo | Audio STT | — | 216x RT |
Always verify against the live endpoint: GET https://api.groq.com/openai/v1/models.
Work through these six steps. Each has a copy-paste command block in references/implementation.md; the summary here is enough to drive the workflow, then drill in for the exact commands.
groq-sdk version,compare to npm view groq-sdk version, and grep your src/ for every model string reference.
git checkout -b chore/upgrade-groq-sdk, thennpm install groq-sdk@latest.
Read/Edit to fold theMODEL_MIGRATIONS resolver map (below) into your Groq client module, or Write a new groq-migrations.ts helper, so deprecated IDs are rewritten at runtime.
grep sweep in the reference flagsdeprecated model IDs, old @groq/sdk imports, and removed method calls.
npm test, then confirm current IDs against the live/v1/models endpoint and run the SDK integration smoke test.
npm install groq-sdk@0.11.0 --save-exact and re-run tests.
The essential resolver skeleton (full version in the reference):
typescriptconst MODEL_MIGRATIONS: Record<string, string> = { "mixtral-8x7b-32768": "llama-3.3-70b-versatile", "gemma2-9b-it": "llama-3.1-8b-instant", "distil-whisper-large-v3-en": "whisper-large-v3-turbo", // ...full map in references/implementation.md }; function resolveModel(model: string): string { if (model in MODEL_MIGRATIONS) { console.warn(`Model ${model} is deprecated. Using ${MODEL_MIGRATIONS[model]} instead.`); return MODEL_MIGRATIONS[model]; } return model; }
Running this workflow produces:
chore/upgrade-groq-sdk branch with groq-sdk bumped in package.json andthe lockfile.
@groq/sdk imports, or removed method calls — empty under every heading means the code is clean.
resolveModel wrapper) pointing at current model IDs.npm test run plus a live /v1/models listing confirming every modelyour code uses is still served.
| Issue | Symptom | Solution | |-------|---------|----------| | Deprecated model | 400 model_not_found or 400 model_decommissioned | Replace with current model ID | | Type errors after upgrade | TypeScript compilation fails | Check SDK changelog for type changes | | Auth format change | 401 after upgrade | Verify constructor uses apiKey, not key, and GROQ_API_KEY is set | | New required fields | 400 on previously working requests | Check API docs for parameter changes |
Worked before/after migrations — replacing a decommissioned chat model, routing every call through resolveModel, migrating a transcription model, and reading a clean scanner run — are in references/examples.md. Quick example: a call still using mixtral-8x7b-32768 swaps to llama-3.3-70b-versatile per the migration map, clearing the 400 model_decommissioned error.
For CI integration during upgrades, see the groq-ci-integration skill.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 29,819 | 14,919 | -50% | 1 | 1 | 0% | 3,915 | 2,193 | -44% | 0 | 0 | — |
case-21 | pass→pass | 19,078 | 23,372 | +23% | 1 | 1 | 0% | 2,846 | 4,508 | +58% | 0 | 0 | — |
case-02 | fail→fail | 8,197 | 5,648 | -31% | 1 | 1 | 0% | 295 | 2,216 | +651% | 0 | 0 | — |
case-03 | fail→fail | 28,207 | 17,204 | -39% | 1 | 1 | 0% | 3,463 | 2,250 | -35% | 0 | 0 | — |
case-04 | pass→pass | 10,389 | 12,962 | +25% | 1 | 1 | 0% | 1,933 | 3,524 | +82% | 0 | 0 | — |
case-05 | fail→pass | 18,871 | 13,397 | -29% | 1 | 1 | 0% | 2,057 | 3,248 | +58% | 0 | 0 | — |
case-06 | pass→pass | 15,269 | 20,977 | +37% | 1 | 1 | 0% | 1,845 | 3,400 | +84% | 0 | 0 | — |
case-07 | pass→pass | 19,539 | 23,523 | +20% | 1 | 1 | 0% | 2,199 | 3,286 | +49% | 0 | 0 | — |
case-08 | fail→pass | 15,234 | 11,064 | -27% | 1 | 1 | 0% | 2,185 | 3,038 | +39% | 0 | 0 | — |
case-09 | pass→pass | 10,765 | 8,211 | -24% | 1 | 1 | 0% | 1,146 | 2,465 | +115% | 0 | 0 | — |
case-10 | fail→pass | 13,663 | 2,097 | -85% | 1 | 1 | 0% | 1,457 | 2,250 | +54% | 0 | 0 | — |
case-11 | pass→pass | 8,960 | 7,081 | -21% | 1 | 1 | 0% | 713 | 2,266 | +218% | 0 | 0 | — |
case-12 | pass→pass | 17,691 | 12,385 | -30% | 1 | 1 | 0% | 3,519 | 3,866 | +10% | 0 | 0 | — |
case-13 | pass→pass | 11,596 | 9,671 | -17% | 1 | 1 | 0% | 1,138 | 2,718 | +139% | 0 | 0 | — |
case-14 | pass→pass | 12,363 | 14,573 | +18% | 1 | 1 | 0% | 1,794 | 3,920 | +119% | 0 | 0 | — |
case-15 | fail→pass | 7,766 | 4,375 | -44% | 1 | 1 | 0% | 1,333 | 2,690 | +102% | 0 | 0 | — |
case-16 | pass→pass | 13,115 | 3,959 | -70% | 1 | 1 | 0% | 1,439 | 2,665 | +85% | 0 | 0 | — |
case-17 | pass→pass | 17,327 | 8,297 | -52% | 1 | 1 | 0% | 2,330 | 3,468 | +49% | 0 | 0 | — |
case-18 | pass→pass | 25,803 | 22,340 | -13% | 1 | 1 | 0% | 3,638 | 5,225 | +44% | 0 | 0 | — |
case-19 | pass→pass | 18,715 | 18,881 | +1% | 1 | 1 | 0% | 2,378 | 4,521 | +90% | 0 | 0 | — |
case-20 | pass→pass | 18,791 | 21,321 | +13% | 1 | 1 | 0% | 2,964 | 5,069 | +71% | 0 | 0 | — |
case-22 | fail→pass | 16,055 | 7,603 | -53% | 1 | 1 | 0% | 2,206 | 2,350 | +7% | 0 | 0 | — |
case-23 | pass→pass | 16,187 | 11,478 | -29% | 1 | 1 | 0% | 2,198 | 3,088 | +40% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 20 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +22 percentage points is the difference between those two pass rates over the 20 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.