pub struct ProviderPreferences {
pub order: Vec<String>,
pub quantizations: Vec<Quantization>,
pub allow_fallbacks: Option<bool>,
pub require_parameters: Option<bool>,
pub data_collection: Option<String>,
pub zdr: Option<bool>,
pub sort: Option<ProviderSort>,
pub ignore: Vec<String>,
}Expand description
Provider-level routing preferences (OpenRouter extension).
Controls which inference providers are selected and how they are ranked. See https://openrouter.ai/docs/features/provider-routing.
Fields§
§order: Vec<String>Preferred provider ordering (e.g. ["DeepInfra", "Together"]).
quantizations: Vec<Quantization>Allowed quantization levels. Empty means no filter.
allow_fallbacks: Option<bool>Whether to fall back to other providers if preferred ones are unavailable.
require_parameters: Option<bool>Only route to providers that support all request parameters.
data_collection: Option<String>Opt out of provider-level data collection ("deny" to opt out).
zdr: Option<bool>Only route to endpoints with zero data retention.
sort: Option<ProviderSort>Sort providers by this criterion before selection.
ignore: Vec<String>Providers to exclude from routing.
Trait Implementations§
Source§impl Clone for ProviderPreferences
impl Clone for ProviderPreferences
Source§impl Debug for ProviderPreferences
impl Debug for ProviderPreferences
Source§impl Default for ProviderPreferences
impl Default for ProviderPreferences
Source§impl<'de> Deserialize<'de> for ProviderPreferences
impl<'de> Deserialize<'de> for ProviderPreferences
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 ProviderPreferences
impl RefUnwindSafe for ProviderPreferences
impl Send for ProviderPreferences
impl Sync for ProviderPreferences
impl Unpin for ProviderPreferences
impl UnsafeUnpin for ProviderPreferences
impl UnwindSafe for ProviderPreferences
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