pub struct LlmConfig {
pub protocol: Option<Protocol>,
pub api_key: String,
pub model: String,
pub base_url: String,
pub options: HashMap<String, Value>,
}Expand description
LLM Provider configuration (protocol-agnostic, vendor-agnostic).
Design principles:
- Protocol can be configured (explicit)
- Protocol can be auto-inferred (from URL/model) by the ModelRegistry
- Defaults to OpenAI protocol (fallback)
Fields§
§protocol: Option<Protocol>Protocol (optional, auto-inferred if not set)
If set, overrides all inference (highest priority). If not set, the factory uses ModelRegistry to infer from URL and model name.
api_key: StringAPI Key (required)
Hidden from Debug output — never log a config expecting to see the key.
model: StringModel name (required)
base_url: StringBase URL (required)
options: HashMap<String, Value>Other options
Implementations§
Trait Implementations§
Source§impl Debug for LlmConfig
Debug redacts LlmConfig::api_key so a config cannot leak a credential
through a log line, a panic message, or a test failure dump.
impl Debug for LlmConfig
Debug redacts LlmConfig::api_key so a config cannot leak a credential
through a log line, a panic message, or a test failure dump.
Auto Trait Implementations§
impl Freeze for LlmConfig
impl RefUnwindSafe for LlmConfig
impl Send for LlmConfig
impl Sync for LlmConfig
impl Unpin for LlmConfig
impl UnsafeUnpin for LlmConfig
impl UnwindSafe for LlmConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more