Expand description
Normalized model access: a provider-agnostic request/response shape, and the two wire
adapters (Anthropic Messages, OpenAI Chat Completions) that speak it. The router
(crate::router) only ever talks to Provider; it never knows which wire format is
behind a given rung.
Structs§
- Anthropic
Provider - Speaks
POST {base}/v1/messages(Anthropic Messages API). - Auth
- BYOK credentials for one request, extracted from headers with env-var fallback.
- Chat
Message - One message in a normalized chat conversation.
- Model
Request - A provider-agnostic model request, built once per incoming call and re-used (with
modelswapped) across every rung of the ladder. - Model
Response - A provider-agnostic model response.
- Open
AiProvider - Speaks
POST {base}/v1/chat/completions(OpenAI Chat Completions API). - Provider
Registry - Lookup from provider id (
"anthropic","openai", …) to theProviderthat serves it.
Enums§
- Provider
Error - Failure modes of a provider call.
Traits§
- Provider
- A normalized model backend. Implementations translate
ModelRequest/ModelResponseto/from one wire API.