pub struct ModelConfig {
pub id: String,
pub provider: ProviderType,
pub model_id: String,
pub base_url: String,
pub api_key_env: Option<String>,
pub context_window: usize,
pub max_tokens: usize,
pub thinking: bool,
pub server_tools: Option<Vec<String>>,
}Fields§
§id: StringUser-facing ID (e.g. “gpt-4o”, “claude-sonnet”)
provider: ProviderType§model_id: StringWire model ID sent to the API
base_url: StringEmpty = use provider default
api_key_env: Option<String>Env var name holding the API key (e.g. “OPENAI_API_KEY”)
context_window: usize§max_tokens: usize§thinking: boolWhether the model supports extended thinking
server_tools: Option<Vec<String>>Provider-managed tools to inject into the request (e.g. xAI’s “web_search”, “x_search”). These are not executed locally — they run on the provider’s servers.
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelConfig
impl Debug for ModelConfig
Source§impl<'de> Deserialize<'de> for ModelConfig
impl<'de> Deserialize<'de> for ModelConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ModelConfig
impl RefUnwindSafe for ModelConfig
impl Send for ModelConfig
impl Sync for ModelConfig
impl Unpin for ModelConfig
impl UnsafeUnpin for ModelConfig
impl UnwindSafe for ModelConfig
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