pub struct ToolRouterConfig {
pub enabled: bool,
pub model_path: Option<String>,
pub tokenizer_path: Option<String>,
pub arch: String,
pub device: CandleDevicePreference,
pub max_tokens: usize,
pub temperature: f32,
}Expand description
Environment-variable driven configuration for the tool-call router.
Fields§
§enabled: boolWhether the router is active. Default: false.
model_path: Option<String>Filesystem path to the FunctionGemma GGUF model.
tokenizer_path: Option<String>Filesystem path to the matching tokenizer.json.
arch: StringArchitecture hint (default: "gemma3").
device: CandleDevicePreferenceDevice preference (auto / cpu / cuda).
max_tokens: usizeMax tokens for the FunctionGemma response.
FunctionGemma only outputs <tool_call> JSON blocks — 128 is generous.
temperature: f32Temperature for FunctionGemma sampling.
Implementations§
Source§impl ToolRouterConfig
impl ToolRouterConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Build from environment variables.
| Variable | Description |
|---|---|
CODETETHER_TOOL_ROUTER_ENABLED | true / 1 to activate |
CODETETHER_TOOL_ROUTER_MODEL_PATH | Path to .gguf model |
CODETETHER_TOOL_ROUTER_TOKENIZER_PATH | Path to tokenizer.json |
CODETETHER_TOOL_ROUTER_ARCH | Architecture hint (default: gemma3) |
CODETETHER_TOOL_ROUTER_DEVICE | auto / cpu / cuda |
CODETETHER_TOOL_ROUTER_MAX_TOKENS | Max decode tokens (default: 512) |
CODETETHER_TOOL_ROUTER_TEMPERATURE | Sampling temp (default: 0.1) |
CODETETHER_FUNCTIONGEMMA_DISABLED | Emergency kill switch. Defaults to true |
Trait Implementations§
Source§impl Clone for ToolRouterConfig
impl Clone for ToolRouterConfig
Source§fn clone(&self) -> ToolRouterConfig
fn clone(&self) -> ToolRouterConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolRouterConfig
impl Debug for ToolRouterConfig
Auto Trait Implementations§
impl Freeze for ToolRouterConfig
impl RefUnwindSafe for ToolRouterConfig
impl Send for ToolRouterConfig
impl Sync for ToolRouterConfig
impl Unpin for ToolRouterConfig
impl UnwindSafe for ToolRouterConfig
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
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: 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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more