[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

@@ -15,12 +15,15 @@ pub fn create_test_app(
router_config: &RouterConfig,
) -> Router {
// Create AppContext
let app_context = Arc::new(AppContext::new(
router_config.clone(),
client,
router_config.max_concurrent_requests,
router_config.rate_limit_tokens_per_second,
));
let app_context = Arc::new(
AppContext::new(
router_config.clone(),
client,
router_config.max_concurrent_requests,
router_config.rate_limit_tokens_per_second,
)
.expect("Failed to create AppContext in test"),
);
// Create AppState with the test router and context
let app_state = Arc::new(AppState {