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.parsehelper, it usesresponse_format={"type":"json_schema",...}and validates withmodel_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. Notop_k. - Same base as OpenAI: message translation, structured, and audio
reuse
_OpenAICompatible; onlysdk_module/sync_class/async_class/supports_parse_helperchange. - 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()andcode_execution()enable the built-in tools (compound_custom); onopenai/gpt-oss-*,web_search()becomesbrowser_searchandcode_execution()becomescode_interpreter. Compound doesn't accept user function tools in the same call. See Native tools. - Structured output: fields with defaults are now listed in
requiredin strict mode (Groq was rejecting the schema), and the fallback to JSON Object mode triggers on more error messages.