[router] move tokenizer, reasoning, tool initialization to server (#9996)

This commit is contained in:
Simo Lin
2025-09-03 22:35:13 -04:00
committed by GitHub
parent de9217334b
commit d966b902af
8 changed files with 119 additions and 63 deletions

View File

@@ -13,12 +13,15 @@ use std::sync::{Arc, Mutex, OnceLock};
/// Helper function to create AppContext for tests
pub fn create_test_context(config: RouterConfig) -> Arc<AppContext> {
Arc::new(AppContext::new(
config.clone(),
reqwest::Client::new(),
config.max_concurrent_requests,
config.rate_limit_tokens_per_second,
))
Arc::new(
AppContext::new(
config.clone(),
reqwest::Client::new(),
config.max_concurrent_requests,
config.rate_limit_tokens_per_second,
)
.expect("Failed to create AppContext in test"),
)
}
// Tokenizer download configuration