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. |
|
Convert a domain message into Anthropic 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 |
|
Public constant or type alias. |
|
Normalize a typed image source into an OpenAI-compatible content block. |
|
Normalize token usage returned by OpenAI-compatible chat APIs. |
|
Stream DeepSeek through its OpenAI-compatible protocol. |
|
Map official Google GenAI SDK streams and preserve signed replay parts. |
|
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 Ollama SDK events without buffering the entire HTTP response. |
|
Map OpenAI-compatible chat streams to provider-neutral model events. |
|
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. |