[router] allow user to specify chat template path (#11549)

This commit is contained in:
Simo Lin
2025-10-13 13:47:57 -04:00
committed by GitHub
parent 7b59b0b8b0
commit 728af88781
13 changed files with 159 additions and 32 deletions

View File

@@ -30,6 +30,7 @@ impl TestContext {
async fn new(worker_configs: Vec<MockWorkerConfig>) -> Self {
// Create default router config
let config = RouterConfig {
chat_template: None,
mode: RoutingMode::Regular {
worker_urls: vec![],
},
@@ -1365,6 +1366,7 @@ mod error_tests {
async fn test_payload_too_large() {
// Create context with small payload limit
let config = RouterConfig {
chat_template: None,
mode: RoutingMode::Regular {
worker_urls: vec![],
},
@@ -1723,6 +1725,7 @@ mod pd_mode_tests {
.unwrap_or(9000);
let config = RouterConfig {
chat_template: None,
mode: RoutingMode::PrefillDecode {
prefill_urls: vec![(prefill_url, Some(prefill_port))],
decode_urls: vec![decode_url],
@@ -1888,6 +1891,7 @@ mod request_id_tests {
async fn test_request_id_with_custom_headers() {
// Create config with custom request ID headers
let config = RouterConfig {
chat_template: None,
mode: RoutingMode::Regular {
worker_urls: vec![],
},