pub struct AutoRouterConfig {
pub provider: Option<String>,
pub model: Option<String>,
pub thinking: Option<String>,
pub timeout_secs: Option<u64>,
pub kind: Option<String>,
pub min_confidence: Option<f64>,
pub base_url: Option<String>,
}Expand description
Explicit classifier route for Auto model mode ([auto.router]).
When provider + model are set, Auto mode’s classifier call goes to that
route. When unset, Auto stays local and free: it uses the heuristic and
makes no classifier call at all.
There is deliberately no implicit default. Holding a DeepSeek key used to
elect deepseek-v4-flash as the classifier for every Auto turn, which spent
a user’s tokens on a route they never chose and privileged one provider over
the rest. Electing a network classifier is now something the operator writes
down.
Fields§
§provider: Option<String>Provider id for the classifier route (e.g. "deepseek", "zai").
model: Option<String>Model id on that provider (e.g. "deepseek-v4-flash").
thinking: Option<String>Thinking tier for the classifier call (e.g. "off"). Defaults to off.
timeout_secs: Option<u64>Classifier call timeout in seconds. Defaults to
DEFAULT_AUTO_ROUTER_TIMEOUT_SECS (4); 0 means “use the default”.
Values above MAX_AUTO_ROUTER_TIMEOUT_SECS (300) are clamped so a
hung local router cannot stall a turn indefinitely.
kind: Option<String>Router kind (#6525): "chat" (default) asks a chat model for JSON;
"decision" asks a System One decision model (Jev) a typed Choice
between the active provider’s fast and strong tiers. Any other value
leaves the router unconfigured (shown as failing, never guessed).
min_confidence: Option<f64>Decision routers only: below this answer confidence (0..=1, default
DEFAULT_AUTO_ROUTER_MIN_CONFIDENCE) the turn takes the local
fallback instead of the decision.
base_url: Option<String>Decision routers only: endpoint override for provider = "typesafe"
(default https://api.typesafe.ai/v1). OpenRouter decision routers use
the configured OpenRouter base URL.
Trait Implementations§
Source§impl Clone for AutoRouterConfig
impl Clone for AutoRouterConfig
Source§impl Debug for AutoRouterConfig
impl Debug for AutoRouterConfig
Source§impl Default for AutoRouterConfig
impl Default for AutoRouterConfig
Source§impl<'de> Deserialize<'de> for AutoRouterConfig
impl<'de> Deserialize<'de> for AutoRouterConfig
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>,
Auto Trait Implementations§
impl Forget for AutoRouterConfig
impl Freeze for AutoRouterConfig
impl Move for AutoRouterConfig
impl RefUnwindSafe for AutoRouterConfig
impl Send for AutoRouterConfig
impl Sync for AutoRouterConfig
impl Unpin for AutoRouterConfig
impl UnsafeUnpin for AutoRouterConfig
impl UnwindSafe for AutoRouterConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.