Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/groq-migration-deep-dive

@0d57af8
Run it yourself

Use when you are moving a codebase off OpenAI, Anthropic, or another LLM provider onto Groq (or between Groq model generations) and want a zero-downtime, feature-flagged cutover with a benchmark and rollback plan. Trigger with phrases like "migrate to groq", "switch to groq", "groq migration", "openai to groq", "groq replatform".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/groq-migration-deep-dive

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesexamples.md

≈682 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Groq Migration — Worked Examples & Compatibility

Concrete, runnable examples that go with the migration workflow: a side-by-side quality/speed benchmark, and the full feature-compatibility matrix between OpenAI and Groq so you know exactly what carries over and what you must keep on your old provider.

Example: Comparison Benchmark

Run the same prompts through both providers to compare quality AND latency before you shift real traffic. This is how you justify the migration with numbers rather than vibes.

// Run the same prompts through both providers to compare quality + speed
async function migrationBenchmark(prompts: string[]) {
  const groq = new GroqProvider();
  const openai = new OpenAIProvider();

  for (const prompt of prompts) {
    const messages = [{ role: "user" as const, content: prompt }];

    const startGroq = performance.now();
    const groqResult = await groq.complete(messages, "llama-3.3-70b-versatile", 256);
    const groqMs = performance.now() - startGroq;

    const startOAI = performance.now();
    const oaiResult = await openai.complete(messages, "gpt-4o-mini", 256);
    const oaiMs = performance.now() - startOAI;

    console.log(`Prompt: "${prompt.slice(0, 50)}..."`);
    console.log(`  Groq:   ${groqMs.toFixed(0)}ms | ${groqResult.tokens.total} tokens`);
    console.log(`  OpenAI: ${oaiMs.toFixed(0)}ms | ${oaiResult.tokens.total} tokens`);
    console.log(`  Speedup: ${(oaiMs / groqMs).toFixed(1)}x faster with Groq`);
    console.log();
  }
}

Key Differences to Handle

The feature-compatibility matrix. Most chat.completions usage ports 1:1; the rows to watch are embeddings, fine-tuning, and image generation — Groq does not offer these, so keep OpenAI (or a local model) for those paths.

Feature OpenAI Groq
SDK import import OpenAI from "openai" import Groq from "groq-sdk"
Env var OPENAI_API_KEY GROQ_API_KEY
Models gpt-4o, gpt-4o-mini llama-3.3-70b-versatile, llama-3.1-8b-instant
Embeddings openai.embeddings.create() Not available (use OpenAI or local)
Fine-tuning Supported Not available
Image generation openai.images.generate() Not available
Audio (STT) openai.audio.transcriptions groq.audio.transcriptions (faster)
Structured outputs strict: true strict: true (same format)
Tool calling Supported Supported (same format)
JSON mode response_format: { type: "json_object" } Same
Vision gpt-4o with images Llama 4 Scout/Maverick
Streaming Supported Supported (same SSE format)
Response usage Standard fields Adds queue_time, completion_time, total_time

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    This skill facilitates the migration of LLM integrations to Groq by providing abstraction layers, rollout strategies, and assessment scripts. It includes a benign shell command for environment discovery and instructions for scanning codebase migration points. No malicious patterns or security vulnerabilities were identified.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
What it can do
Reads files Edits files Runs commands
version
1.11.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "groq",
  "migration"
]
All 6 allowed tools
ReadWriteEditBash(npm:*)Bash(node:*)Bash(kubectl:*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/groq-migration-deep-dive