Tools
Everything a request can switch on, in the fields the OpenAI SDK already sends.
One request, many switches.
Open cells you switch on per request.Sealed cells every request gets.
- Smart routingPrice and speed weighed together, by default
- Sort providersCheapest or fastest provider first
- Order and fallbacksYour providers first, and only them if you like
- Only and ignoreUse only these providers, or never those
- FailoverThe next provider answers when one fails
- No charge for failuresYou pay nothing for an attempt that failed
- Keep it in the EUThe request and its failover stay in the EU
- Zero retentionOnly providers that keep prompts for 0 days
- No trainingOnly providers that neither train nor keep
- Tool callingLet the model call your functions
- Structured outputAn answer that follows your JSON schema
- ReasoningOne effort setting, every provider's terms
- Web searchAccepted, but llm.buzz runs no search today
- Prompt cachingRepeated prompt prefixes cost less
- SessionsA conversation stays with its cache
- Cache-aware routingA next turn goes first where its cache is
- Safe retriesA retry never runs the request twice
Each switch in code.
A line or two in the OpenAI SDK; nothing else in your code changes.
Sort providers
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"provider": {"sort": "price"}},
)
Order and fallbacks
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"provider": {
Added: "order": ["deepinfra", "novita"],
Added: "allow_fallbacks": False,
Added: }},
)
Only and ignore
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"provider": {"ignore": ["novita"]}},
)
Keep it in the EU
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"provider": {
Added: "only": ["scaleway/eu", "simpleminds-eu/eu"],
Added: }},
)
Zero data retention
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"provider": {"zdr": True}},
)
No training
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"provider": {"data_collection": "deny"}},
)
Tool calling
Added: tools = [{
Added: "type": "function",
Added: "function": {"name": "get_weather", "parameters": {
Added: "type": "object",
Added: "properties": {"city": {"type": "string"}},
Added: }},
Added: }]
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: tools=tools,
)
Structured output
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: response_format={
Added: "type": "json_schema",
Added: "json_schema": {"name": "city", "schema": {
Added: "type": "object",
Added: "properties": {"name": {"type": "string"}},
Added: }},
Added: },
)
Reasoning
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"reasoning": {"effort": "high"}},
)
Web search
reply = client.chat.completions.create(
Added: model="moonshotai/kimi-k3:online",
messages=messages,
)
Prompt caching
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"cache_control": {"type": "ephemeral"}},
)
Sessions
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_body={"session_id": "support-chat-42"},
)
Safe retries
reply = client.chat.completions.create(
model="moonshotai/kimi-k3",
messages=messages,
Added: extra_headers={"Idempotency-Key": "order-7f3a"},
)
Every field, in one place.The API reference lists each request field and what it does.