pub struct ProviderDef {
pub id: String,
pub dialect: Dialect,
pub base_url: String,
pub api_key_env: Option<String>,
pub auth: AuthScheme,
pub region: Option<String>,
pub project: Option<String>,
}Expand description
A model provider a ladder can route to. Declared as [[provider]] in TOML; referenced from a
ladder as <id>/<model> (e.g. groq/llama-3.3-70b-versatile).
Fields§
§id: StringLadder prefix for this provider, e.g. "groq". Overrides a built-in of the same id.
dialect: DialectWhich wire API it speaks.
base_url: StringBase URL, e.g. "https://api.groq.com/openai" or "http://localhost:11434" for Ollama.
Unused for aws_sigv4/gcp_oauth auth (those construct the URL from region/project).
api_key_env: Option<String>Env var the API key is read from at call time, e.g. "GROQ_API_KEY". Omit for a keyless
endpoint (local Ollama / vLLM). Per-request BYOK headers still apply to the built-in
anthropic / openai providers.
auth: AuthSchemeHow this provider’s requests are credentialed. api_key (default) is byte-identical to
today; aws_sigv4 / gcp_oauth are the Bedrock/Vertex auth schemes (ADR 0006).
region: Option<String>Cloud region, e.g. "us-east-1" — required for aws_sigv4 (Bedrock) and gcp_oauth
(Vertex).
project: Option<String>GCP project id — required for gcp_oauth (Vertex).
Trait Implementations§
Source§impl Clone for ProviderDef
impl Clone for ProviderDef
Source§fn clone(&self) -> ProviderDef
fn clone(&self) -> ProviderDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more