Expand description
LLM provider abstraction.
Two wire formats cover the entire ecosystem:
- Anthropic Messages API (Claude models)
- OpenAI Chat Completions (GPT, plus Groq, Together, Ollama, DeepSeek, etc.)
Each provider translates between our unified message types and the provider-specific JSON format for requests and SSE streams.
Structs§
- Provider
Request - A provider-agnostic request.
Enums§
- Provider
Error - Provider-level errors.
- Provider
Kind - Provider kinds.
- Tool
Choice - Tool choice mode for controlling tool usage.
Traits§
- Provider
- Unified provider trait. Both Anthropic and OpenAI-compatible endpoints implement this.
Functions§
- detect_
provider - Detect the right provider from a model name or base URL.