Skip to main content

ThreadStartParams

Struct ThreadStartParams 

Source
pub struct ThreadStartParams {
Show 25 fields pub allow_provider_model_fallback: Option<bool>, pub approval_policy: Option<AskForApproval>, pub approvals_reviewer: Option<ApprovalsReviewer>, pub base_instructions: Option<String>, pub config: Option<Map<String, Value>>, pub cwd: Option<String>, pub developer_instructions: Option<String>, pub dynamic_tools: Option<Vec<DynamicToolSpec>>, pub environments: Option<Vec<TurnEnvironmentParams>>, pub ephemeral: Option<bool>, pub experimental_raw_events: Option<bool>, pub history_mode: Option<ThreadHistoryMode>, pub mock_experimental_field: Option<String>, pub model: Option<String>, pub model_provider: Option<String>, pub multi_agent_mode: Option<MultiAgentMode>, pub permissions: Option<String>, pub personality: Option<Personality>, pub runtime_workspace_roots: Option<Vec<AbsolutePathBuf>>, pub sandbox: Option<SandboxMode>, pub selected_capability_roots: Option<Vec<SelectedCapabilityRoot>>, pub service_name: Option<String>, pub service_tier: Option<String>, pub session_start_source: Option<ThreadStartSource>, pub thread_source: Option<ThreadSource>,
}
Expand description

ThreadStartParams

JSON schema
{
 "title": "ThreadStartParams",
 "type": "object",
 "properties": {
   "allowProviderModelFallback": {
     "description": "Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default.",
     "type": "boolean"
   },
   "approvalPolicy": {
     "anyOf": [
       {
         "$ref": "#/definitions/AskForApproval"
       },
       {
         "type": "null"
       }
     ]
   },
   "approvalsReviewer": {
     "description": "Override where approval requests are routed for review on this thread and subsequent turns.",
     "anyOf": [
       {
         "$ref": "#/definitions/ApprovalsReviewer"
       },
       {
         "type": "null"
       }
     ]
   },
   "baseInstructions": {
     "type": [
       "string",
       "null"
     ]
   },
   "config": {
     "type": [
       "object",
       "null"
     ],
     "additionalProperties": true
   },
   "cwd": {
     "type": [
       "string",
       "null"
     ]
   },
   "developerInstructions": {
     "type": [
       "string",
       "null"
     ]
   },
   "dynamicTools": {
     "default": null,
     "type": [
       "array",
       "null"
     ],
     "items": {
       "$ref": "#/definitions/DynamicToolSpec"
     }
   },
   "environments": {
     "description": "Optional sticky environments for this thread.\n\nOmitted selects the default environment when environment access is enabled. Empty disables environment access for turns that do not provide a turn override. Non-empty selects the first environment as the current turn environment.",
     "type": [
       "array",
       "null"
     ],
     "items": {
       "$ref": "#/definitions/TurnEnvironmentParams"
     }
   },
   "ephemeral": {
     "type": [
       "boolean",
       "null"
     ]
   },
   "experimentalRawEvents": {
     "description": "If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud).",
     "type": "boolean"
   },
   "historyMode": {
     "description": "Persisted thread history contract to use for this new thread.",
     "anyOf": [
       {
         "$ref": "#/definitions/ThreadHistoryMode"
       },
       {
         "type": "null"
       }
     ]
   },
   "mockExperimentalField": {
     "description": "Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way.",
     "type": [
       "string",
       "null"
     ]
   },
   "model": {
     "type": [
       "string",
       "null"
     ]
   },
   "modelProvider": {
     "type": [
       "string",
       "null"
     ]
   },
   "multiAgentMode": {
     "description": "@deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior.",
     "anyOf": [
       {
         "$ref": "#/definitions/MultiAgentMode"
       },
       {
         "type": "null"
       }
     ]
   },
   "permissions": {
     "description": "Named profile id for this thread. Cannot be combined with `sandbox`.",
     "type": [
       "string",
       "null"
     ]
   },
   "personality": {
     "anyOf": [
       {
         "$ref": "#/definitions/Personality"
       },
       {
         "type": "null"
       }
     ]
   },
   "runtimeWorkspaceRoots": {
     "description": "Replace the thread's runtime workspace roots. Paths must be absolute.",
     "type": [
       "array",
       "null"
     ],
     "items": {
       "$ref": "#/definitions/AbsolutePathBuf"
     }
   },
   "sandbox": {
     "anyOf": [
       {
         "$ref": "#/definitions/SandboxMode"
       },
       {
         "type": "null"
       }
     ]
   },
   "selectedCapabilityRoots": {
     "description": "Capability roots selected for this thread by the hosting platform.",
     "type": [
       "array",
       "null"
     ],
     "items": {
       "$ref": "#/definitions/SelectedCapabilityRoot"
     }
   },
   "serviceName": {
     "type": [
       "string",
       "null"
     ]
   },
   "serviceTier": {
     "type": [
       "string",
       "null"
     ]
   },
   "sessionStartSource": {
     "anyOf": [
       {
         "$ref": "#/definitions/ThreadStartSource"
       },
       {
         "type": "null"
       }
     ]
   },
   "threadSource": {
     "description": "Optional client-supplied analytics source classification for this thread.",
     "anyOf": [
       {
         "$ref": "#/definitions/ThreadSource"
       },
       {
         "type": "null"
       }
     ]
   }
 },
 "$schema": "http://json-schema.org/draft-07/schema#"
}

Fields§

§allow_provider_model_fallback: Option<bool>

Allow a provider with an authoritative static model catalog to replace an unavailable requested model with its default.

§approval_policy: Option<AskForApproval>§approvals_reviewer: Option<ApprovalsReviewer>

Override where approval requests are routed for review on this thread and subsequent turns.

§base_instructions: Option<String>§config: Option<Map<String, Value>>§cwd: Option<String>§developer_instructions: Option<String>§dynamic_tools: Option<Vec<DynamicToolSpec>>§environments: Option<Vec<TurnEnvironmentParams>>

Optional sticky environments for this thread.

Omitted selects the default environment when environment access is enabled. Empty disables environment access for turns that do not provide a turn override. Non-empty selects the first environment as the current turn environment.

§ephemeral: Option<bool>§experimental_raw_events: Option<bool>

If true, opt into emitting raw Responses API items on the event stream. This is for internal use only (e.g. Codex Cloud).

§history_mode: Option<ThreadHistoryMode>

Persisted thread history contract to use for this new thread.

§mock_experimental_field: Option<String>

Test-only experimental field used to validate experimental gating and schema filtering behavior in a stable way.

§model: Option<String>§model_provider: Option<String>§multi_agent_mode: Option<MultiAgentMode>

@deprecated Ignored. Use Ultra reasoning effort for proactive multi-agent behavior.

§permissions: Option<String>

Named profile id for this thread. Cannot be combined with sandbox.

§personality: Option<Personality>§runtime_workspace_roots: Option<Vec<AbsolutePathBuf>>

Replace the thread’s runtime workspace roots. Paths must be absolute.

§sandbox: Option<SandboxMode>§selected_capability_roots: Option<Vec<SelectedCapabilityRoot>>

Capability roots selected for this thread by the hosting platform.

§service_name: Option<String>§service_tier: Option<String>§session_start_source: Option<ThreadStartSource>§thread_source: Option<ThreadSource>

Optional client-supplied analytics source classification for this thread.

Implementations§

Source§

impl ThreadStartParams

Source

pub fn new() -> Self

Source

pub fn model(self, model: impl Into<String>) -> Self

Source

pub fn cwd(self, cwd: impl Into<String>) -> Self

Source

pub fn ephemeral(self, ephemeral: bool) -> Self

Source

pub fn developer_instructions(self, instructions: impl Into<String>) -> Self

Trait Implementations§

Source§

impl Clone for ThreadStartParams

Source§

fn clone(&self) -> ThreadStartParams

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ThreadStartParams

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ThreadStartParams

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ThreadStartParams

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ThreadStartParams

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,