pub struct ModelEntry {
pub model: Model,
pub api_key: Option<String>,
pub headers: HashMap<String, String>,
pub auth_header: bool,
pub compat: Option<CompatConfig>,
pub oauth_config: Option<OAuthConfig>,
}Fields§
§model: Model§api_key: Option<String>§headers: HashMap<String, String>§auth_header: bool§compat: Option<CompatConfig>§oauth_config: Option<OAuthConfig>OAuth config for extension-registered providers that require browser-based auth.
Implementations§
Source§impl ModelEntry
impl ModelEntry
Sourcepub fn supports_xhigh(&self) -> bool
pub fn supports_xhigh(&self) -> bool
Whether this model supports xhigh thinking level.
Sourcepub fn supports_max(&self) -> bool
pub fn supports_max(&self) -> bool
Whether this model supports the max thinking level (gh #139).
max is the top effort tier, above xhigh:
- Anthropic adaptive-thinking models accept
output_config.effort: "max"on every effort-capable family — including Opus 4.6 and Sonnet 4.6, which supportmaxbut NOTxhigh(thexhightier arrived with Opus 4.7). Ref: https://platform.claude.com/docs/en/build-with-claude/effort - DeepSeek reasoning models document
reasoning_effort: "max"as their top thinking tier (previously reachable only by pi’sxhigh).
OpenAI-family models are deliberately excluded: their transports have
no max wire value above what xhigh already emits, so Max clamps
down to XHigh there. A catalog thinkingLevelMap override can still
re-map levels per model.
Sourcepub fn available_thinking_levels(&self) -> Vec<ThinkingLevel>
pub fn available_thinking_levels(&self) -> Vec<ThinkingLevel>
Return the thinking levels that should be exposed for this model.
Sourcepub fn clamp_thinking_level(&self, thinking: ThinkingLevel) -> ThinkingLevel
pub fn clamp_thinking_level(&self, thinking: ThinkingLevel) -> ThinkingLevel
Clamp a requested thinking level to the model’s capabilities.
Non-reasoning models always return Off. Models without max support
downgrade Max to XHigh (or High if xhigh is also unsupported);
models without xhigh support downgrade XHigh to High. All other
levels pass through unchanged.
Trait Implementations§
Source§impl Clone for ModelEntry
impl Clone for ModelEntry
Source§fn clone(&self) -> ModelEntry
fn clone(&self) -> ModelEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ModelEntry
impl RefUnwindSafe for ModelEntry
impl Send for ModelEntry
impl Sync for ModelEntry
impl Unpin for ModelEntry
impl UnsafeUnpin for ModelEntry
impl UnwindSafe for ModelEntry
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
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>
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>
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 more