pub struct ModelLimits {
pub context_window: u32,
pub max_output_tokens: u32,
pub max_thinking_budget: Option<u32>,
}Fields§
§context_window: u32§max_output_tokens: u32§max_thinking_budget: Option<u32>Maximum extended-thinking / reasoning budget (in tokens) the upstream
accepts for this model. None means the provider validates the budget
itself (Anthropic) or maps it to an effort bucket (OpenAI); set it for
providers that reject an out-of-range numeric budget (Gemini: 24576 for
flash, 32768 for pro). The gateway clamps the requested budget to this.
Trait Implementations§
Source§impl Clone for ModelLimits
impl Clone for ModelLimits
Source§fn clone(&self) -> ModelLimits
fn clone(&self) -> ModelLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelLimits
impl Debug for ModelLimits
Source§impl Default for ModelLimits
impl Default for ModelLimits
Source§fn default() -> ModelLimits
fn default() -> ModelLimits
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelLimits
impl<'de> Deserialize<'de> for ModelLimits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 JsonSchema for ModelLimits
impl JsonSchema for ModelLimits
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for ModelLimits
impl Serialize for ModelLimits
impl Copy for ModelLimits
Auto Trait Implementations§
impl Freeze for ModelLimits
impl RefUnwindSafe for ModelLimits
impl Send for ModelLimits
impl Sync for ModelLimits
impl Unpin for ModelLimits
impl UnsafeUnpin for ModelLimits
impl UnwindSafe for ModelLimits
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