[router] add reasoning and tool parser argument in router (#11290)

This commit is contained in:
Simo Lin
2025-10-07 09:08:32 -04:00
committed by GitHub
parent 1519a89cfd
commit 79d3495177
13 changed files with 188 additions and 20 deletions

View File

@@ -52,6 +52,8 @@ pub struct AppContext {
pub router_manager: Option<Arc<RouterManager>>,
pub response_storage: SharedResponseStorage,
pub load_monitor: Option<Arc<LoadMonitor>>,
pub configured_reasoning_parser: Option<String>,
pub configured_tool_parser: Option<String>,
}
impl AppContext {
@@ -115,6 +117,9 @@ impl AppContext {
router_config.worker_startup_check_interval_secs,
)));
let configured_reasoning_parser = router_config.reasoning_parser.clone();
let configured_tool_parser = router_config.tool_call_parser.clone();
Ok(Self {
client,
router_config,
@@ -127,6 +132,8 @@ impl AppContext {
router_manager,
response_storage,
load_monitor,
configured_reasoning_parser,
configured_tool_parser,
})
}
}