Skip to content
groq-upgrade-migration logo

Groq Upgrade & Migration

groq-upgrade-migration

Upgrade groq-sdk versions and handle Groq model deprecations.

SKILL.md

Full skill instructions

Groq Upgrade & Migration

Current State

!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)'

Overview

Guide for upgrading the groq-sdk package and migrating away from deprecated model IDs. Groq regularly deprecates older models in favor of newer, faster alternatives.

Model Deprecation Timeline

Groq announces deprecations with advance notice. These models have been deprecated:

Deprecated ModelDeprecation DateReplacement
mixtral-8x7b-327682025-03-05llama-3.3-70b-versatile or llama-3.1-8b-instant
gemma2-9b-it2025-08-08llama-3.1-8b-instant
llama-3.1-70b-versatile2024-12-06llama-3.3-70b-versatile
llama-3.1-70b-specdec2024-12-06llama-3.3-70b-specdec
playai-tts2025-12-23Orpheus TTS models
playai-tts-arabic2025-12-23Orpheus TTS models
distil-whisper-large-v3-en—whisper-large-v3-turbo

Current Model IDs (Use These)

Model IDTypeContextSpeed
llama-3.1-8b-instantText128K~560 tok/​s
llama-3.3-70b-versatileText128K~280 tok/​s
llama-3.3-70b-specdecText128KFaster
meta-llama/​llama-4-scout-17b-16e-instructVision+Text128K~460 tok/​s
meta-llama/​llama-4-maverick-17b-128e-instructVision+Text128K—
whisper-large-v3Audio STT—164x RT
whisper-large-v3-turboAudio STT—216x RT

Always verify at: GET https://api.groq.com/​openai/​v1/​models

Instructions

Step 1: Check Current Version and Models

set -euo pipefail
# SDK version
npm list groq-sdk 2>/​dev/​null
npm view groq-sdk version  # latest on npm

# Find all model references in your code
grep -rn "model.*['\"]" src/ --include="*.ts" --include="*.js" | grep -i "groq\|llama\|mixtral\|gemma\|whisper"

Step 2: Upgrade SDK

set -euo pipefail
# Create upgrade branch
git checkout -b chore/​upgrade-groq-sdk

# Update to latest
npm install groq-sdk@latest

# Check for breaking changes
npm ls groq-sdk

Step 3: Find and Replace Deprecated Models

// Find-and-replace map for deprecated model IDs
const MODEL_MIGRATIONS: Record<string, string> = {
  "mixtral-8x7b-32768": "llama-3.3-70b-versatile",
  "gemma2-9b-it": "llama-3.1-8b-instant",
  "llama-3.1-70b-versatile": "llama-3.3-70b-versatile",
  "llama-3.1-70b-specdec": "llama-3.3-70b-specdec",
  "llama3-70b-8192": "llama-3.3-70b-versatile",
  "llama3-8b-8192": "llama-3.1-8b-instant",
  "distil-whisper-large-v3-en": "whisper-large-v3-turbo",
};

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;
}

Step 4: Run Migration Scanner

set -euo pipefail
# Automated scan for deprecated patterns
echo "=== Deprecated Model IDs ==="
grep -rn "mixtral-8x7b\|gemma2-9b\|llama-3.1-70b-versatile\|llama3-70b\|llama3-8b\|distil-whisper" \
  src/ --include="*.ts" --include="*.js" --include="*.py" || echo "None found"

echo ""
echo "=== Old Import Patterns ==="
grep -rn "from '@groq/​sdk'\|from \"@groq/​sdk\"\|require('@groq/​sdk')" \
  src/ --include="*.ts" --include="*.js" || echo "None found (correct import is 'groq-sdk')"

echo ""
echo "=== Deprecated Method Calls ==="
grep -rn "\.ping()\|\.healthCheck()\|GroqClient\|GroqError" \
  src/ --include="*.ts" --include="*.js" || echo "None found"

Step 5: Validate and Test

set -euo pipefail
# Run tests
npm test

# Verify models are current
curl -s https://api.groq.com/​openai/​v1/​models \
  -H "Authorization: Bearer $GROQ_API_KEY" | \
  jq -r '.data[].id' | sort

# Integration test
node -e "
const Groq = require('groq-sdk').default;
const g = new Groq();
g.chat.completions.create({
  model: 'llama-3.1-8b-instant',
  messages: [{role: 'user', content: 'ping'}],
  max_tokens: 5
}).then(r => console.log('OK:', r.choices[0].message.content));
"

Step 6: Rollback If Needed

set -euo pipefail
# Pin to previous version
npm install [email protected] --save-exact
npm test

SDK Changelog Highlights

The groq-sdk package mirrors the OpenAI SDK structure. Key changes to watch:

  • New model IDs added to type definitions
  • Response type changes (e.g., new usage fields)
  • Constructor options changes
  • New endpoint support (vision, audio, TTS)

Always check the GitHub releases.

Error Handling

IssueSymptomSolution
Deprecated model400 model_not_found or 400 model_decommissionedReplace with current model ID
Type errors after upgradeTypeScript compilation failsCheck SDK changelog for type changes
Auth format change401 after upgradeVerify constructor uses apiKey, not key
New required fields400 on previously working requestsCheck API docs for parameter changes

Resources

Next Steps

For CI integration during upgrades, see groq-ci-integration.

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View