lmux-groq
Groq provider for lmux. Talks to the Groq Chat Completions API directly over httpx.
Supports chat completions and streaming.
Part of the lmux ecosystem: standardized interface, cost tracking on every response, and registry-based routing across providers.
Auth
Set GROQ_API_KEY in your environment. The default GroqEnvAuthProvider reads it automatically.
from lmux_groq import GroqProvider
provider = GroqProvider()
Usage
Chat
from lmux import UserMessage
response = provider.chat("llama-3.3-70b-versatile", [UserMessage(content="Hello")])
print(response.content)
print(response.cost)
Streaming
for chunk in provider.chat_stream("llama-3.3-70b-versatile", [UserMessage(content="Hello")]):
if chunk.delta:
print(chunk.delta, end="")
Async
All methods have async variants: achat, achat_stream.
Registry
Use with the lmux registry to route across multiple providers:
from lmux import Registry
registry = Registry()
registry.register("groq", provider)
response = registry.chat("groq/llama-3.3-70b-versatile", messages)
Provider Params
from lmux_groq import GroqParams
response = provider.chat(
"llama-3.3-70b-versatile",
messages,
provider_params=GroqParams(service_tier="flex"),
)
| Parameter | Type | Description |
|---|---|---|
service_tier |
"auto" | "on_demand" | "flex" | "performance" |
Service tier selection |
seed |
int |
Deterministic sampling seed |
user |
str |
End-user identifier |
pricing_as_of |
datetime.date |
Override the date used for dated pricing; defaults to the current date |
Constructor Options
GroqProvider(
auth=..., # AuthProvider[str], default: GroqEnvAuthProvider()
base_url=..., # Optional base URL override
timeout=..., # Request timeout in seconds
max_retries=..., # Max retry attempts
default_headers=..., # Optional headers included with every request
transport=..., # Optional httpx.BaseTransport for the sync client (proxies, testing)
async_transport=..., # Optional httpx.AsyncBaseTransport for the async client
)
default_headers is useful for gateway authentication, tracing, and routing. Groq-managed authorization and
content-type headers take precedence over caller values, case-insensitively.
Metadata
Release files for lmux-groq 0.9.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lmux_groq-0.9.0.tar.gz | 10.7 kB | With provenance | Details for lmux_groq-0.9.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lmux_groq-0.9.0-py3-none-any.whl | Python 3 | none | any | Details for lmux_groq-0.9.0-py3-none-any.whl |
Total release size: 23.8 kB
Release files / lmux_groq-0.9.0.tar.gz
| Download URL | lmux_groq-0.9.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bb98b36874b1ec718e079f5833e5c0f4e969be91188108009fe5ffa2f564eba
|
|
BLAKE2b-256 checksum How to use checksums |
556a6ca40da24a0a5865754845b0b9c51cdffb4eb6dda64a12640bcc49050439
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / lmux_groq-0.9.0-py3-none-any.whl
| Download URL | lmux_groq-0.9.0-py3-none-any.whl |
|---|---|
| Size | 13.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
138ed24f894f673b504eb9999650c18ddfc8dfc8037cce2df6465622907407de
|
|
BLAKE2b-256 checksum How to use checksums |
dae158c562e9653cf00436c0af414964e197aa0ccb7a67244845ec73e6854b05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for lmux-groq 0.9.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lmux_groq-0.9.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.