pub struct StructuredParams {
pub schema: Value,
pub schema_name: String,
pub max_tokens: u32,
pub disable_reasoning: bool,
pub require_parameters: bool,
pub reasoning_max_tokens: Option<u32>,
}Expand description
Parameters shared by every request in one structured batch. One schema per batch is mandatory on Google-backed routes (quickstart), so the schema lives here, at batch level, not per item.
Fields§
§schema: ValueThe strict JSON Schema for response_format.
schema_name: StringThe response_format schema name.
max_tokens: u32§disable_reasoning: boolEmit "reasoning": {"enabled": false} in every body. Reasoner models
otherwise burn the token budget on thinking and answer with
content: null and finish_reason: "length" (verified gotcha).
require_parameters: boolEmit "provider": {"require_parameters": true} in every body so
OpenRouter routes only to providers that honor every request
parameter, including response_format strict mode. Opt-in: the eval
harness uses it to pin strict-mode behavior; production leaves it off.
reasoning_max_tokens: Option<u32>Cap the model’s reasoning tokens via "reasoning": {"max_tokens": N},
leaving the rest of max_tokens for the JSON body. Counter to the
measured reasoning squeeze where reasoner slugs burn the whole budget
before emitting (isolated replay V1-cap512: wire-verified).
Trait Implementations§
Source§impl Clone for StructuredParams
impl Clone for StructuredParams
Source§fn clone(&self) -> StructuredParams
fn clone(&self) -> StructuredParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more