pub struct SpawnConfig {
pub model: Option<String>,
pub reasoning: Option<String>,
pub permission_policy: Option<PermissionPolicy>,
pub env: Vec<(String, String)>,
pub context_window_override_tokens: Option<u32>,
}Expand description
Runtime configuration applied when spawning or resuming a session.
Values in this struct are unified overrides. Each executor translates them to provider-specific settings at call time.
§Examples
use unified_agent_sdk::{PermissionPolicy, executor::SpawnConfig};
let config = SpawnConfig {
model: Some("gpt-5-codex".to_string()),
reasoning: Some("medium".to_string()),
permission_policy: Some(PermissionPolicy::Prompt),
env: vec![("RUST_LOG".to_string(), "debug".to_string())],
context_window_override_tokens: Some(128_000),
};
assert_eq!(config.context_window_override_tokens, Some(128_000));Fields§
§model: Option<String>Optional model override.
reasoning: Option<String>Optional reasoning level/effort override.
permission_policy: Option<PermissionPolicy>Optional permission policy override.
env: Vec<(String, String)>Extra environment variables to forward to the executor process.
context_window_override_tokens: Option<u32>Optional context window capacity override (tokens) used for unified context usage events.
Trait Implementations§
Source§impl Clone for SpawnConfig
impl Clone for SpawnConfig
Source§fn clone(&self) -> SpawnConfig
fn clone(&self) -> SpawnConfig
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 SpawnConfig
impl Debug for SpawnConfig
Source§impl Default for SpawnConfig
impl Default for SpawnConfig
Source§fn default() -> SpawnConfig
fn default() -> SpawnConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SpawnConfig
impl RefUnwindSafe for SpawnConfig
impl Send for SpawnConfig
impl Sync for SpawnConfig
impl Unpin for SpawnConfig
impl UnsafeUnpin for SpawnConfig
impl UnwindSafe for SpawnConfig
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