pub trait ProviderModelSupport: AsRef<str> {
// Required methods
fn supports_reasoning_effort(&self, model: &str) -> bool;
fn supports_service_tier(&self, model: &str) -> bool;
// Provided methods
fn supports_reasoning(&self, model: &str) -> bool { ... }
fn supported_reasoning_efforts(
&self,
model: &str,
) -> &'static [&'static str] { ... }
fn supports_service_tier_value(
&self,
model: &str,
tier: OpenAIServiceTier,
) -> bool { ... }
}Expand description
Extension trait on Provider for model-specific capability queries.
These methods require vtcode-config model catalogs and constants,
so they cannot live in vtcode-commons with the core Provider type.
Required Methods§
Sourcefn supports_reasoning_effort(&self, model: &str) -> bool
fn supports_reasoning_effort(&self, model: &str) -> bool
Determine if the provider supports configurable reasoning effort for the model.
Sourcefn supports_service_tier(&self, model: &str) -> bool
fn supports_service_tier(&self, model: &str) -> bool
Determine if the provider supports the service_tier request parameter.
Provided Methods§
Sourcefn supports_reasoning(&self, model: &str) -> bool
fn supports_reasoning(&self, model: &str) -> bool
Determine if the provider/model exposes structured reasoning output.
Catalog metadata is authoritative for curated models. Unknown routes retain the provider’s legacy capability fallback so custom endpoints continue to work without a catalog entry.
Sourcefn supported_reasoning_efforts(&self, model: &str) -> &'static [&'static str]
fn supported_reasoning_efforts(&self, model: &str) -> &'static [&'static str]
Exact effort levels accepted by the provider/model route.
Sourcefn supports_service_tier_value(
&self,
model: &str,
tier: OpenAIServiceTier,
) -> bool
fn supports_service_tier_value( &self, model: &str, tier: OpenAIServiceTier, ) -> bool
Determine if the provider supports a specific service_tier value.
ultrafast is a native-OpenAI-only tier: every other provider,
including OpenAI-compatible gateways that omit it wire-side, reports
false even when it accepts flex/priority.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".