pub struct AnthropicConfig {
pub api_key: String,
pub model: String,
pub base_url: String,
pub max_tokens: u32,
pub api_version: String,
pub timeout: Option<Duration>,
pub client: Option<Client>,
}Expand description
Configuration for the Anthropic provider.
Use struct update syntax with Default for ergonomic construction:
use llm_stack_anthropic::AnthropicConfig;
let config = AnthropicConfig {
api_key: "sk-ant-...".into(),
model: "claude-sonnet-4-20250514".into(),
..Default::default()
};Fields§
§api_key: StringAnthropic API key. Required.
model: StringModel identifier (e.g. "claude-sonnet-4-20250514").
base_url: StringBase URL for the API. Override for proxies or testing.
max_tokens: u32Default max tokens for responses when not specified in ChatParams.
api_version: StringAnthropic API version header.
timeout: Option<Duration>Request timeout. None uses reqwest’s default.
client: Option<Client>Pre-configured HTTP client for connection pooling across providers.
When None, a new client is created.
Trait Implementations§
Source§impl Clone for AnthropicConfig
impl Clone for AnthropicConfig
Source§fn clone(&self) -> AnthropicConfig
fn clone(&self) -> AnthropicConfig
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 AnthropicConfig
impl Debug for AnthropicConfig
Auto Trait Implementations§
impl Freeze for AnthropicConfig
impl !RefUnwindSafe for AnthropicConfig
impl Send for AnthropicConfig
impl Sync for AnthropicConfig
impl Unpin for AnthropicConfig
impl !UnwindSafe for AnthropicConfig
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