pub struct RunProfile { /* private fields */ }Expand description
Immutable overrides for one run minted from a Workspace.
A default profile says nothing and preserves every workspace default. Builder methods return a new value, so a host may keep a common profile and derive narrower variants without shared mutation.
Reasoning is decided by
with_provider_request_options, and
only there: the complete options carry reasoning beside every other
provider field, so a profile that states them has stated it. That decision
outranks legacy RunSpec::with_effort
regardless of which builder method was called later — the profile is the
complete contract, while effort is its compatibility fallback.
Implementations§
Source§impl RunProfile
impl RunProfile
Sourcepub fn with_resolved_model(self, model: ModelInfo) -> Self
pub fn with_resolved_model(self, model: ModelInfo) -> Self
Uses complete, already-resolved model metadata for this run.
No model listing is performed. The model must name the runtime’s
registered provider; Workspace::prepare
and Workspace::resume reject a mismatch
before minting or resuming a session.
Sourcepub fn with_tool_roster(self, tool_roster: ToolRoster) -> Self
pub fn with_tool_roster(self, tool_roster: ToolRoster) -> Self
Offers this exact base roster for the run.
A roster says what this workspace offers of what it can reach, and naming a sibling workspace’s declared or MCP tool does not make it reachable: those are registered for that workspace’s own tool audience, and mentra resolves a foreign audience’s name as hidden.
Sourcepub fn with_provider_request_options(
self,
options: ProviderRequestOptions,
) -> Self
pub fn with_provider_request_options( self, options: ProviderRequestOptions, ) -> Self
Replaces the complete provider-specific request options for this run.
This call is also the last word on reasoning for the run, including when
options.reasoning is None: a stated contract is complete, so the
legacy RunSpec::with_effort fallback
does not fill the gap back in.
Nonempty options.session.extra_headers are accepted only when the
runtime was explicitly built with
RuntimeBuilder::with_ephemeral_history:
Mentra persists the complete options inside its agent config, so a
durable runtime is refused before mint rather than writing a possible
credential to disk.
Sourcepub fn with_max_output_tokens(self, max_output_tokens: Option<u32>) -> Self
pub fn with_max_output_tokens(self, max_output_tokens: Option<u32>) -> Self
Sets the provider’s maximum output tokens, or explicitly clears the
workspace value with None.
Sourcepub fn with_compaction(self, compaction: Compaction) -> Self
pub fn with_compaction(self, compaction: Compaction) -> Self
Replaces the workspace’s compaction posture for this run.
Sourcepub fn with_tool_result_paging(
self,
tool_result_paging: Option<ToolResultPagingConfig>,
) -> Self
pub fn with_tool_result_paging( self, tool_result_paging: Option<ToolResultPagingConfig>, ) -> Self
Enables tool-result paging with exact settings, or explicitly disables
an inherited paging posture with None.
Sourcepub fn with_system_prompt(self, system_prompt: SystemPrompt) -> Self
pub fn with_system_prompt(self, system_prompt: SystemPrompt) -> Self
Replaces or appends to the workspace’s rendered system prompt for this
run, according to SystemPrompt.
Trait Implementations§
Source§impl Clone for RunProfile
impl Clone for RunProfile
Source§impl Debug for RunProfile
Hand-written because provider request options can contain credentials in
session.extra_headers, while a system prompt can contain arbitrary host
data. Presence and set/clear posture are enough to diagnose composition;
neither payload belongs in logs.
impl Debug for RunProfile
Hand-written because provider request options can contain credentials in
session.extra_headers, while a system prompt can contain arbitrary host
data. Presence and set/clear posture are enough to diagnose composition;
neither payload belongs in logs.