pub struct OpenaiCompatEntry {
pub name: String,
pub base_url: String,
pub model: String,
pub api_key_env: Option<String>,
pub timeout_secs: u64,
}Expand description
OpenAI-compat backend entry inside backends:.
Fields§
§name: StringStable operator-facing identifier, e.g. "anthropic-fallback".
base_url: StringBase URL of the upstream, no trailing slash and no path
(the adapter appends /v1/chat/completions). Examples:
https://api.openai.com, https://api.anthropic.com,
http://localhost:11434.
model: StringUpstream model identifier echoed in the request model field.
Provider-specific (e.g. gpt-4o-mini, claude-opus-4-7,
llama3.1:8b).
api_key_env: Option<String>Name of the env var carrying the bearer token — never the
literal token. Operators set the env separately so secrets
stay out of the config file. When unset, the daemon falls
back to INFERD_OPENAI_API_KEY, then OPENAI_API_KEY, then
skips the Authorization header (some self-hosted endpoints
accept unauthenticated traffic).
timeout_secs: u64Total request timeout in seconds. Default 300 (5 minutes).
Trait Implementations§
Source§impl Clone for OpenaiCompatEntry
impl Clone for OpenaiCompatEntry
Source§fn clone(&self) -> OpenaiCompatEntry
fn clone(&self) -> OpenaiCompatEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more