#[non_exhaustive]pub struct OpenRouterShared {
pub provider: Option<ProviderPreferences>,
pub models: Option<ModelFallbacks>,
pub plugins: Vec<Value>,
pub session_id: Option<String>,
pub metadata: BTreeMap<String, String>,
pub reasoning: ReasoningExtra,
pub top_k: Option<u32>,
pub min_p: Option<f64>,
pub top_a: Option<f64>,
pub repetition_penalty: Option<f64>,
pub user: Option<String>,
}Expand description
The fields OpenRouter takes on every route.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.provider: Option<ProviderPreferences>Which upstream providers may serve the request, and in what order.
models: Option<ModelFallbacks>The models tried after the request’s own, in order.
plugins: Vec<Value>Plugins such as {"id": "web"}.
session_id: Option<String>Groups requests into one session in OpenRouter’s logs.
metadata: BTreeMap<String, String>String pairs attached to the request.
reasoning: ReasoningExtraReasoning fields sent beside the mapped effort.
top_k: Option<u32>Sample from the k most likely tokens.
min_p: Option<f64>The minimum probability of a token, relative to the most likely one.
top_a: Option<f64>Top-a sampling.
repetition_penalty: Option<f64>Penalizes tokens already in the prompt and the output.
user: Option<String>A stable id of the end user.
Trait Implementations§
Auto Trait Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.