pub struct BetaHeader {
pub key: String,
pub value: String,
pub max_output_tokens: Option<usize>,
pub input_context: Option<usize>,
}Expand description
HTTP header that, when sent on a request, unlocks enhanced limits for a model.
A BetaHeader is a leaf of a ModelSpec: it names the header to
send (key/value) and records the new ceiling for max_output_tokens
and/or input_context that the header makes available. An absent
override field means that header does not move that limit; the model’s
base value still applies. Callers consult these via
ModelRegistry::get_max_output_tokens_with_beta and
ModelRegistry::get_input_context_with_beta.
Fields§
§key: StringHTTP header name (e.g., “anthropic-beta”).
value: StringHeader value (e.g., “context-1m-2025-08-07”).
max_output_tokens: Option<usize>Overridden max output tokens when this header is active.
input_context: Option<usize>Overridden input context when this header is active.
Trait Implementations§
Source§impl Clone for BetaHeader
impl Clone for BetaHeader
Source§fn clone(&self) -> BetaHeader
fn clone(&self) -> BetaHeader
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 BetaHeader
impl Debug for BetaHeader
Source§impl<'de> Deserialize<'de> for BetaHeader
impl<'de> Deserialize<'de> for BetaHeader
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
Auto Trait Implementations§
impl Freeze for BetaHeader
impl RefUnwindSafe for BetaHeader
impl Send for BetaHeader
impl Sync for BetaHeader
impl Unpin for BetaHeader
impl UnsafeUnpin for BetaHeader
impl UnwindSafe for BetaHeader
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