Skip to main content

Module provider

Module provider 

Source
Expand description

Model providers.

A provider translates CompletionRequest onto some wire protocol and translates the reply back into CompletionResponse. Everything above this layer — the agent loop, tools, sessions — is provider-agnostic.

Modules§

anthropic
Anthropic Messages API (POST /v1/messages).
openai
OpenAI-compatible /v1/chat/completions.
preflight
One request to a local server, asking it what it is actually serving.
retry
Provider failure classification, and the retry policy over it.

Structs§

Failover
Tries the primary, and on a transient exhaustion tries each fallback in order — turn-local, so the next call starts from the primary again.

Enums§

StreamEvent
Incremental output, emitted only when a sink is supplied.

Traits§

Provider

Functions§

build
Build a provider from a config entry.

Type Aliases§

StreamSink