Providers#
Connect a provider and configure retries, credentials, and transport.
Read the walkthrough before consulting individual signatures.
Interface |
Purpose |
|---|---|
Map Anthropic SDK streams, including signed thinking and tool blocks. |
|
Stream a service that speaks the Anthropic Messages protocol. |
|
Convert a typed image source into a Messages content block. |
|
Name the |
|
Render server tools using their versioned native schemas. |
|
Render local tools, deferring the ones tool search is meant to load. |
|
Turn a local tool search result into |
|
Convert a message into Messages content blocks. |
|
Raised when a remote provider rejects the configured credentials. |
|
Base error for provider adapter failures. |
|
The provider answered with an HTTP failure, or with something that was not an API reply. |
|
A request was refused before the model produced any output. |
|
Raised when provider responses do not satisfy the expected stream protocol. |
|
The provider stayed silent for longer than |
|
Normalize token usage returned by OpenAI-compatible chat APIs. |
|
Stream DeepSeek through its Anthropic Messages protocol. |
|
Stream DeepSeek through its OpenAI-compatible protocol. |
|
Stream GLM through its Anthropic Messages protocol. |
|
Stream GLM through its OpenAI-compatible protocol. |
|
Return the |
|
Stream a model served by Cerebras Inference. |
|
Map official Google GenAI SDK streams and preserve signed replay parts. |
|
Stream a model served by Groq. |
|
Stream a model hosted by DeepInfra. |
|
Stream a model hosted by Fireworks AI. |
|
Stream a model hosted by SiliconFlow. |
|
Stream a model hosted by Together AI. |
|
What an HTTP error response or a response that was not an API reply turned out to say. |
|
Return one sentence that says what the provider answered and what that usually means. |
|
Work out what a failed or unexpected response body is. |
|
Stream Kimi through its Anthropic Messages protocol. |
|
Stream Kimi through its OpenAI-compatible protocol. |
|
Stream MiniMax through its Anthropic Messages protocol. |
|
Stream MiniMax through its OpenAI-compatible protocol. |
|
Stream a Mistral model. |
|
Stream Ollama SDK events without buffering the entire HTTP response. |
|
Map OpenAI-compatible chat streams to provider-neutral model events. |
|
What one streamed |
|
Stream a service that speaks the OpenAI Chat Completions protocol. |
|
Render an image source as a Chat Completions |
|
Render one message as a Chat Completions message, without any vendor extension. |
|
Render opaque server tools without treating them as local functions. |
|
Render function tools in Chat Completions format. |
|
Map a provider-neutral level onto |
|
Stream any model OpenRouter serves. |
|
Stream Grok through Chat Completions, or through Responses with |
|
Return the refusal a failed OpenAI Responses stream describes, or None for a plain failure. |
|
Return the refusal an HTTP error response describes, or None when it is something else. |
|
Drop the replay blocks that are client tool calls. |