pub struct LlmCallConfig {Show 14 fields
pub model: String,
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
pub tools: Vec<ToolDefinition>,
pub reasoning_effort: Option<String>,
pub speed: Option<String>,
pub verbosity: Option<String>,
pub metadata: HashMap<String, String>,
pub previous_response_id: Option<String>,
pub tool_search: Option<ToolSearchConfig>,
pub prompt_cache: Option<PromptCacheConfig>,
pub openrouter_routing: Option<OpenRouterRoutingConfig>,
pub parallel_tool_calls: Option<bool>,
pub volatile_suffix_len: usize,
}Expand description
Configuration for an LLM call
Fields§
§model: String§temperature: Option<f32>§max_tokens: Option<u32>§tools: Vec<ToolDefinition>§reasoning_effort: Option<String>Reasoning effort level (for models that support it: low, medium, high)
speed: Option<String>Speed (service tier) for this call: “flex”, “default”, or “priority”.
Serialized as OpenAI service_tier; omitted when None so the
provider keeps its default (“auto”) routing.
verbosity: Option<String>Verbosity for this call: “low”, “medium”, or “high”. Serialized as
OpenAI verbosity; omitted when None so the provider keeps its
default (“medium”) output length.
metadata: HashMap<String, String>Metadata to send with the API request for tracking and debugging. Keys and values are strings. Both OpenAI and Anthropic support metadata fields. Typically includes: session_id, agent_id, org_id, turn_id, exec_id.
previous_response_id: Option<String>Previous response ID for stateful continuation (OpenAI Responses API). When set, the provider can skip re-encoding cached context.
tool_search: Option<ToolSearchConfig>Tool search configuration for deferred tool loading
prompt_cache: Option<PromptCacheConfig>Prompt caching configuration for provider-specific cache controls.
openrouter_routing: Option<OpenRouterRoutingConfig>OpenRouter-only model fallback and provider routing controls.
parallel_tool_calls: Option<bool>Request-level parallel tool calling preference (EVE-598).
Serialized onto the provider request when Some(_): OpenAI sets
parallel_tool_calls; Anthropic maps Some(false) →
tool_choice.disable_parallel_tool_use = true. None preserves
provider defaults (no field sent).
volatile_suffix_len: usizeNumber of trailing messages that are volatile (regenerated every turn) and must not anchor a message-level prompt-cache breakpoint.
ReasonAtom sets this to the count of live <facts> messages it appends
at the conversation tail. Drivers that place a message cache breakpoint
on the last block (Anthropic) skip this many trailing messages so the
breakpoint lands on the last stable block — otherwise a tail that
changes each turn would evict the conversation-history cache. 0 (the
default) preserves the previous behavior exactly.
Implementations§
Source§impl LlmCallConfig
impl LlmCallConfig
Sourcepub fn resolved_parallel_tool_calls(&self, supported: bool) -> Option<bool>
pub fn resolved_parallel_tool_calls(&self, supported: bool) -> Option<bool>
Resolve the effective wire value for parallel_tool_calls, gated by
whether the driver/model can express it on the request.
Returns None (omit the field, keep the provider default) when the
preference is unset or supported is false. Drivers call this with
self.supports_parallel_tool_calls(&config.model) so the preference is
only serialized where the provider has a control for it. The local tool
scheduler honors the preference independently, so Some(false) still
serializes execution even when this returns None.
Trait Implementations§
Source§impl Clone for LlmCallConfig
impl Clone for LlmCallConfig
Source§fn clone(&self) -> LlmCallConfig
fn clone(&self) -> LlmCallConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for LlmCallConfig
impl RefUnwindSafe for LlmCallConfig
impl Send for LlmCallConfig
impl Sync for LlmCallConfig
impl Unpin for LlmCallConfig
impl UnsafeUnpin for LlmCallConfig
impl UnwindSafe for LlmCallConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request