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

/groq-reference-architecture

@0d57af8
Run it yourself

Implement Groq reference architecture with model routing, streaming pipelines, and fallbacks. Use when designing new Groq integrations, reviewing project structure, or establishing architecture standards for Groq applications. Trigger with phrases like "groq architecture", "groq best practices", "groq project structure", "how to organize groq", "groq design".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/groq-reference-architecture

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

referencesarchitecture.md

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

Groq Reference Architecture — Layer Diagram

The system splits into an application layer and a Groq service layer. The service layer is the reusable core this skill builds: a model router that picks the right model per request, a middleware band (cache, rate guard, metrics, logging, retry), and a fallback chain that degrades gracefully when the primary model is rate-limited or erroring.

┌──────────────────────────────────────────────────────────────┐
│                     Application Layer                         │
│  Chat UI  │  API Backend  │  Batch Processor  │  Agent       │
└─────┬─────┴──────┬────────┴────────┬──────────┴──────┬───────┘
      │            │                 │                 │
      ▼            ▼                 ▼                 ▼
┌──────────────────────────────────────────────────────────────┐
│                    Groq Service Layer                         │
│  ┌─────────────┐  ┌────────────┐  ┌─────────────────────┐   │
│  │ Model Router │  │ Middleware │  │ Fallback Chain      │   │
│  │             │  │            │  │                     │   │
│  │ speed →     │  │ Cache      │  │ Groq (primary)      │   │
│  │   8b-instant│  │ Rate Guard │  │   ↓ 429/5xx         │   │
│  │ quality →   │  │ Metrics    │  │ Groq (fallback model)│  │
│  │   70b-versa.│  │ Logging    │  │   ↓ still failing    │   │
│  │ vision →    │  │ Retry      │  │ OpenAI (backup)     │   │
│  │   llama-4   │  │            │  │   ↓ also failing     │   │
│  │ audio →     │  │            │  │ Graceful degrade    │   │
│  │   whisper   │  │            │  │                     │   │
│  └─────────────┘  └────────────┘  └─────────────────────┘   │
└──────────────────────────────────────────────────────────────┘

How the layers interact

  1. An application-layer caller (chat UI, API backend, batch processor, or agent) describes its request in terms of requirements — latency budget, whether it needs vision/tools/JSON, cost sensitivity — not a hardcoded model id.
  2. The Model Router (selectModel) maps those requirements to the cheapest model that satisfies them: 8b-instant for latency-critical or cost-sensitive paths, 70b-versatile for tools/JSON quality work, llama-4-scout for vision, whisper-large-v3-turbo for audio.
  3. The Middleware band wraps every call with an LRU cache (deterministic requests only), latency + token metrics, and a pluggable metrics sink.
  4. The Fallback Chain attempts the primary model, drops to a different model in a separate rate-limit pool on 429/5xx, and finally returns a graceful degradation payload rather than throwing to the user.

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

    The skill provides a reference architecture and implementation templates for integrating Groq's LPU inference API. It follows best practices by using environment variables for API keys and provides standard patterns for model routing, caching, and error handling. No malicious patterns or security vulnerabilities were detected.

  • 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
version
1.11.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "groq",
  "groq-reference"
]
All 2 allowed tools
ReadGrep
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/groq-reference-architecture