Skip to main content

ReasoningPlan

Enum ReasoningPlan 

Source
pub enum ReasoningPlan {
    Unset,
    Sent(Reasoning),
    Attempted(Reasoning),
    Unsupported(Reasoning),
}
Expand description

What a configured Reasoning will do on the provider that was selected.

Reasoning tokens are billed, so “asked for, and this provider has nowhere to put it” has to be tellable from “never asked for”. Both used to resolve to the same None on SelectedLlm, which left korps doctor unable to report a setting the run would quietly discard.

Variants§

§

Unset

Nothing was configured; the model’s own default stands.

§

Sent(Reasoning)

Configured, and this provider puts it on the wire.

§

Attempted(Reasoning)

Configured, and this provider sends it — but whether the model accepts it is not known until the first call.

OpenAI’s reasoning_effort and Gemini’s thinkingConfig are refused by the models that do not reason, and which models those are changes with every release. So the parameter is sent, a refusal is recognized from the 400, and the request is retried without it — meaning this setting may still end up dropped, and only the run knows.

§

Unsupported(Reasoning)

Configured, and this provider has no field that carries it. Dropped before any request is made.

Implementations§

Source§

impl ReasoningPlan

Source

pub fn carried(reasoning: Option<Reasoning>) -> Self

The plan for a provider that can carry whatever was configured.

Source

pub fn attempted(reasoning: Option<Reasoning>) -> Self

The plan for a provider that sends it and finds out from the model.

Source

pub fn dropped(reasoning: Option<Reasoning>) -> Self

The plan for a provider with no reasoning field.

Source

pub fn sent(self) -> Option<Reasoning>

What reaches the wire, if anything. A setting dropped before the request reads as nothing here, because nothing is what gets sent; an attempted one reads as sent, because it is on the first request.

Source

pub fn requested(self) -> Option<Reasoning>

What was configured, whether or not it will be sent.

Source

pub fn unsupported(self) -> Option<Reasoning>

What this provider was asked for and will not send. Only the settings answered before a request is made — see Self::attempted for the ones the model gets the last word on.

Source

pub fn attempting(self) -> Option<Reasoning>

What this provider will send and may still have refused. None when the answer is already known either way.

Trait Implementations§

Source§

impl Clone for ReasoningPlan

Source§

fn clone(&self) -> ReasoningPlan

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 Copy for ReasoningPlan

Source§

impl Debug for ReasoningPlan

Source§

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

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

impl Default for ReasoningPlan

Source§

fn default() -> ReasoningPlan

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

impl Display for ReasoningPlan

Source§

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

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

impl Eq for ReasoningPlan

Source§

impl PartialEq for ReasoningPlan

Source§

fn eq(&self, other: &ReasoningPlan) -> 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 ReasoningPlan

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.

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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