Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 9.782s · 399.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 27.5s · import 8.966s · 377MB
412MB installed
● package 412MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Groq
✓ from llama_index.llms.groq import Groq
✗ from llama_index.llms.groq import Groq as GroqLLM
Correct import path; the class is named 'Groq' directly.
Groq
✓ from llama_index.llms.groq import Groq
✗ from llama_index.llms.groq import GroqDeprecated
No deprecated alias exists; use the standard import.
Instantiate Groq LLM and call complete()
import os
from llama_index.llms.groq import Groq
api_key = os.environ.get("GROQ_API_KEY", "")
if not api_key:
raise ValueError("Set GROQ_API_KEY environment variable")
llm = Groq(model="mixtral-8x7b-32768", api_key=api_key)
response = llm.complete("What is Groq?")
print(response)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'llama_index'
LlamaIndex core is not installed; 'llama-index-llms-groq' only depends on 'llama-index-core', not the full 'llama-index' meta-package.
fixRun 'pip install llama-index-llms-groq' (installs 'llama-index-core' automatically). Alternatively, install full suite: 'pip install llama-index llama-index-llms-groq'.
ImportError: cannot import name 'Groq' from 'llama_index.llms'
Old-style import path. In LlamaIndex v0.11+, the LLM classes are in subpackages 'llama_index.llms.<provider>'.
fixUse 'from llama_index.llms.groq import Groq'
AuthenticationError: API key not found. Pass your API key via the 'api_key' parameter or set the 'GROQ_API_KEY' environment variable.
Missing API key; the package does not read env vars automatically.
fixSet environment variable 'GROQ_API_KEY' or pass 'api_key' parameter when initializing Groq.
Upgrade
Version history
0.5.0latest on PyPI · released Mar 12, 2026
Audit
Dependencies
llama-index-corerequiredCore LlamaIndex dependency, provides base classes like BaseLLM
groqrequiredOfficial Groq Python client for API calls