groq-upgrade-migration
БесплатноБез исполняемых скриптовНе проверенUpgrade groq-sdk versions and handle Groq model deprecations. Use when upgrading SDK versions, detecting deprecated models, or migrating to new Groq model…
от jeremylongshore★ 2 961 звезда на GitHubОб этом скилле
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. It walks a safe upgrade path — branch, bump, scan for deprecated
model references, rewrite them, and verify against the live models endpoint
before merging.
Prerequisites
- A Node project that depends on
groq-sdk(or the Pythongroqpackage). npm,git,curl, andjqavailable onPATH.- Authentication:
GROQ_API_KEYexported in your shell (or CI secret store). The SDK constructornew Groq()reads it automatically; the live model check passes it asAuthorization: Bearer $GROQ_API_KEY. Get a key at https://console.groq.com/keys. See the Authentication section of references/implementation.md.
Model Deprecation Timeline
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 |
Current Model IDs (Use These)
| 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.
Instructions
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.
- Check current version and models — read the installed
groq-sdkversion, compare tonpm view groq-sdk version, andgrepyoursrc/for every model string reference. - Upgrade the SDK —
git checkout -b chore/upgrade-groq-sdk, thennpm install groq-sdk@latest. - Find and replace deprecated models — use
Read/Editto fold theMODEL_MIGRATIONSresolver map (below) into your Groq client module, orWritea newgroq-migrations.tshelper, so deprecated IDs are rewritten at runtime. - Run the migration scanner — the
grepsweep in the reference flags deprecated model IDs, old@groq/sdkimports, and removed method calls. - Validate and test —
npm test, then confirm current IDs against the live/v1/modelsendpoint and run the SDK integration smoke test. - Roll back if needed — pin the previous version with
npm install [email protected] --save-exactand re-run tests.
The essential resolver skeleton (full version in the reference):
const 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;
}
Output
Running this workflow produces:
- A
chore/upgrade-groq-sdkbranch withgroq-sdkbumped inpackage.jsonand the lockfile. - A scanner report listing any remaining deprecated model IDs, stale
@groq/sdkimports, or removed method calls — empty under every heading means the code is clean. - Updated call sites (or a
resolveModelwrapper) pointing at current model IDs. - A green
npm testrun plus a live/v1/modelslisting confirming every model your code uses is still served.
Error Handling
| 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 field |
Установить groq-upgrade-migration в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBash(npm:*)Bash(git:*)Вложенные файлы
FAQ
Что делает скилл groq-upgrade-migration?
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".
Как установить скилл groq-upgrade-migration?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл groq-upgrade-migration запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic