Jangada AIJangada AI

Groq

Provider groq. Adapter over the groq SDK, which speaks the same chat.completions dialect as OpenAI — that's why it inherits from _OpenAICompatible.

pip install "jangada-ai[groq]"
  • provider=: "groq"
  • Environment variable: GROQ_API_KEY
  • Difference from OpenAI: supports_parse_helper = False (no native .parse()).
from jangada_ai import LLM
llm = LLM("groq", "llama-3.3-70b-versatile")

What it does

  • Text and streaming — focused on very low latency.
  • Structured output (parse): since there is no .parse helper, it uses response_format={"type":"json_schema",...} and validates with model_validate_json.
  • Vision (images=): supported only on vision-capable models (e.g., the Llama vision family). Text-only models reject images.
  • Documents (files=): local text extraction.
  • Audio transcription (transcribe): dedicated endpoint (compatible with OpenAI's). Models: whisper-large-v3, whisper-large-v3-turbo (fast).

Structure and quirks

  • Parameters: temperature, max_tokens, top_p, stop, seed. No top_k.
  • Same base as OpenAI: message translation, structured, and audio reuse _OpenAICompatible; only sdk_module/sync_class/ async_class/supports_parse_helper change.
  • Response (Completion): same as OpenAI (text, usage, raw).

When to choose Groq

Low inference cost and speed — great for batch transcription (whisper-large-v3-turbo) and low-latency responses. Combine it as a fallback or primary with OpenAI (same dialect). See Audio transcription and Retry and fallback.

What changed in 1.9.0

  • Native tools: on groq/compound* models, web_search(), web_fetch() and code_execution() enable the built-in tools (compound_custom); on openai/gpt-oss-*, web_search() becomes browser_search and code_execution() becomes code_interpreter. Compound doesn't accept user function tools in the same call. See Native tools.
  • Structured output: fields with defaults are now listed in required in strict mode (Groq was rejecting the schema), and the fallback to JSON Object mode triggers on more error messages.

On this page