Skip to main content

OpenAIReasoningConfig

Struct OpenAIReasoningConfig 

Source
pub struct OpenAIReasoningConfig { /* private fields */ }
Expand description

Exact OpenAI reasoning and closely related response controls.

Every field is optional. Self::new therefore preserves the model’s server-side defaults until a builder is called.

Implementations§

Source§

impl OpenAIReasoningConfig

Source

pub const fn new() -> Self

Create a config that preserves every model/API default.

Source

pub const fn with_effort(self, effort: OpenAIReasoningEffort) -> Self

Set the exact reasoning effort.

Source

pub const fn with_mode(self, mode: OpenAIReasoningMode) -> Self

Set the GPT-5.6 reasoning execution mode.

Source

pub const fn with_context(self, context: OpenAIReasoningContext) -> Self

Select which persisted reasoning context the Responses API may reuse.

Source

pub const fn with_summary(self, summary: OpenAIReasoningSummary) -> Self

Request a user-visible reasoning summary.

Source

pub const fn with_verbosity(self, verbosity: OpenAITextVerbosity) -> Self

Set final-answer verbosity.

Source

pub const fn with_api_surface(self, api_surface: OpenAIApiSurface) -> Self

Select the API surface used by the general OpenAI provider.

Source

pub const fn with_prompt_cache_mode( self, prompt_cache_mode: OpenAIPromptCacheMode, ) -> Self

Select implicit or explicit prompt-cache breakpoint creation.

Source

pub const fn with_prompt_cache_ttl( self, prompt_cache_ttl: OpenAIPromptCacheTtl, ) -> Self

Set GPT-5.6’s exact prompt-cache retention window.

Source

pub const fn with_store(self, store: bool) -> Self

Select whether OpenAI stores the response as application state.

Source

pub const fn with_parallel_tool_calls(self, enabled: bool) -> Self

Enable or disable parallel function calls.

Source

pub fn with_tool_choice(self, tool_choice: OpenAIToolChoice) -> Self

Set the complete OpenAI function-tool choice policy.

Source

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

Set a stable, privacy-preserving identifier for end-user safety controls.

Source

pub const fn effort(&self) -> Option<OpenAIReasoningEffort>

Configured exact reasoning effort, if any.

Source

pub const fn mode(&self) -> Option<OpenAIReasoningMode>

Configured reasoning execution mode, if any.

Source

pub const fn context(&self) -> Option<OpenAIReasoningContext>

Configured persisted-reasoning context policy, if any.

Source

pub const fn summary(&self) -> Option<OpenAIReasoningSummary>

Configured reasoning summary detail, if any.

Source

pub const fn verbosity(&self) -> Option<OpenAITextVerbosity>

Configured final-answer verbosity, if any.

Source

pub const fn api_surface(&self) -> OpenAIApiSurface

Selected API surface.

Source

pub const fn prompt_cache_mode(&self) -> Option<OpenAIPromptCacheMode>

Configured prompt-cache mode, if any.

Source

pub const fn prompt_cache_ttl(&self) -> Option<OpenAIPromptCacheTtl>

Configured exact prompt-cache TTL, if any.

Source

pub const fn store(&self) -> Option<bool>

Explicit response-storage preference, if configured.

Source

pub const fn parallel_tool_calls(&self) -> Option<bool>

Explicit parallel-tool preference, if configured.

Source

pub const fn tool_choice(&self) -> Option<&OpenAIToolChoice>

Provider-owned tool-choice policy, if configured.

Source

pub fn safety_identifier(&self) -> Option<&str>

Stable safety identifier, if configured.

Source

pub const fn requires_responses_api(&self) -> bool

Whether this config uses controls that only the Responses API accepts.

Trait Implementations§

Source§

impl Clone for OpenAIReasoningConfig

Source§

fn clone(&self) -> OpenAIReasoningConfig

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 OpenAIReasoningConfig

Source§

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

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

impl Default for OpenAIReasoningConfig

Source§

fn default() -> OpenAIReasoningConfig

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

impl Eq for OpenAIReasoningConfig

Source§

impl PartialEq for OpenAIReasoningConfig

Source§

fn eq(&self, other: &OpenAIReasoningConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for OpenAIReasoningConfig

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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