pub struct LlmCallConfigBuilder { /* private fields */ }Expand description
Builder for LlmCallConfig with fluent API
Chain methods like reasoning_effort(), temperature(), etc. and call
build() to get the final config. To start from a core RuntimeAgent, use
everruns_core::llm_conversions::llm_call_config_builder_from_agent.
Implementations§
Source§impl LlmCallConfigBuilder
impl LlmCallConfigBuilder
Sourcepub fn from_config(config: LlmCallConfig) -> LlmCallConfigBuilder
pub fn from_config(config: LlmCallConfig) -> LlmCallConfigBuilder
Construct a builder wrapping an existing config.
Sourcepub fn reasoning_effort(self, effort: impl Into<String>) -> LlmCallConfigBuilder
pub fn reasoning_effort(self, effort: impl Into<String>) -> LlmCallConfigBuilder
Set reasoning effort level (for models that support it: low, medium, high)
Sourcepub fn speed(self, speed: impl Into<String>) -> LlmCallConfigBuilder
pub fn speed(self, speed: impl Into<String>) -> LlmCallConfigBuilder
Set speed (service tier): “flex”, “default”, or “priority”
Sourcepub fn verbosity(self, verbosity: impl Into<String>) -> LlmCallConfigBuilder
pub fn verbosity(self, verbosity: impl Into<String>) -> LlmCallConfigBuilder
Set verbosity: “low”, “medium”, or “high”
Sourcepub fn model(self, model: impl Into<String>) -> LlmCallConfigBuilder
pub fn model(self, model: impl Into<String>) -> LlmCallConfigBuilder
Set the model
Sourcepub fn temperature(self, temp: f32) -> LlmCallConfigBuilder
pub fn temperature(self, temp: f32) -> LlmCallConfigBuilder
Set temperature
Sourcepub fn max_tokens(self, tokens: u32) -> LlmCallConfigBuilder
pub fn max_tokens(self, tokens: u32) -> LlmCallConfigBuilder
Set max tokens
Sourcepub fn tools(self, tools: Vec<ToolDefinition>) -> LlmCallConfigBuilder
pub fn tools(self, tools: Vec<ToolDefinition>) -> LlmCallConfigBuilder
Set tools
Sourcepub fn metadata(self, metadata: HashMap<String, String>) -> LlmCallConfigBuilder
pub fn metadata(self, metadata: HashMap<String, String>) -> LlmCallConfigBuilder
Set metadata for API tracking
This metadata is sent to the LLM provider for tracking and debugging. Typically includes session_id, agent_id, org_id, turn_id, exec_id.
Sourcepub fn with_metadata(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> LlmCallConfigBuilder
pub fn with_metadata( self, key: impl Into<String>, value: impl Into<String>, ) -> LlmCallConfigBuilder
Add a single metadata key-value pair
Sourcepub fn previous_response_id(self, id: Option<String>) -> LlmCallConfigBuilder
pub fn previous_response_id(self, id: Option<String>) -> LlmCallConfigBuilder
Set previous response ID for stateful continuation
Sourcepub fn provider_opaque_context(
self,
context: Option<ProviderOpaqueContext>,
) -> LlmCallConfigBuilder
pub fn provider_opaque_context( self, context: Option<ProviderOpaqueContext>, ) -> LlmCallConfigBuilder
Set standalone provider-owned compact context for the request.
Sourcepub fn tool_search(self, config: ToolSearchConfig) -> LlmCallConfigBuilder
pub fn tool_search(self, config: ToolSearchConfig) -> LlmCallConfigBuilder
Set tool_search configuration
Sourcepub fn prompt_cache(self, config: PromptCacheConfig) -> LlmCallConfigBuilder
pub fn prompt_cache(self, config: PromptCacheConfig) -> LlmCallConfigBuilder
Set prompt caching configuration
Sourcepub fn openrouter_routing(
self,
config: OpenRouterRoutingConfig,
) -> LlmCallConfigBuilder
pub fn openrouter_routing( self, config: OpenRouterRoutingConfig, ) -> LlmCallConfigBuilder
Set OpenRouter model fallback and provider routing controls.
Sourcepub fn parallel_tool_calls(
self,
parallel_tool_calls: Option<bool>,
) -> LlmCallConfigBuilder
pub fn parallel_tool_calls( self, parallel_tool_calls: Option<bool>, ) -> LlmCallConfigBuilder
Set the request-level parallel tool calling preference (EVE-598).
Sourcepub fn volatile_suffix_len(self, len: usize) -> LlmCallConfigBuilder
pub fn volatile_suffix_len(self, len: usize) -> LlmCallConfigBuilder
Set the number of trailing volatile messages that must not anchor a
message-level prompt-cache breakpoint (see
LlmCallConfig::volatile_suffix_len).
Sourcepub fn build(self) -> LlmCallConfig
pub fn build(self) -> LlmCallConfig
Build the configuration
Auto Trait Implementations§
impl Freeze for LlmCallConfigBuilder
impl RefUnwindSafe for LlmCallConfigBuilder
impl Send for LlmCallConfigBuilder
impl Sync for LlmCallConfigBuilder
impl Unpin for LlmCallConfigBuilder
impl UnsafeUnpin for LlmCallConfigBuilder
impl UnwindSafe for LlmCallConfigBuilder
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> 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