pub struct RouterProvider { /* private fields */ }Expand description
Router provider implementing the Provider trait.
Registers as provider "router" and accepts profile names as model IDs
(e.g. "auto", "budget"). Delegation uses global provider resolution
(get_provider_arc) when use_global_resolution is true.
Implementations§
Source§impl RouterProvider
impl RouterProvider
Sourcepub fn new(
config: &RouterConfig,
registry: Arc<ProviderRegistry>,
) -> RouterProvider
pub fn new( config: &RouterConfig, registry: Arc<ProviderRegistry>, ) -> RouterProvider
Create with an instance-based ProviderRegistry.
Sourcepub fn new_global(config: &RouterConfig) -> RouterProvider
pub fn new_global(config: &RouterConfig) -> RouterProvider
Create with global provider resolution (for CLI use).
Sourcepub fn reload_config(&self, config: &RouterConfig)
pub fn reload_config(&self, config: &RouterConfig)
Hot-reload configuration at runtime.
Sourcepub fn get_snapshot() -> Option<RouterSnapshot>
pub fn get_snapshot() -> Option<RouterSnapshot>
Get the current router state snapshot (global).
Sourcepub fn route_with_vision(
&self,
context: &Context,
profile_name: &str,
tier: RouterTier,
) -> (VisionSignal, RoutedTierConfig)
pub fn route_with_vision( &self, context: &Context, profile_name: &str, tier: RouterTier, ) -> (VisionSignal, RoutedTierConfig)
Route with vision awareness — extracts VisionSignal and adjusts tier/model.
Returns (vision_signal, adjusted_tier_config).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RouterProvider
impl !RefUnwindSafe for RouterProvider
impl !UnwindSafe for RouterProvider
impl Send for RouterProvider
impl Sync for RouterProvider
impl Unpin for RouterProvider
impl UnsafeUnpin for RouterProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.