[router] Configure experimental sgl-router via CLI flags instead of a config file (#27073)
Signed-off-by: Kangyan Zhou <zky314343421@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
631db6c757
commit
bcf89928b4
@@ -65,20 +65,18 @@ async fn zmq_indexer_routes_to_publishing_worker_e2e() {
|
||||
port: 0,
|
||||
},
|
||||
observability: Default::default(),
|
||||
models: vec![sgl_router::config::ModelConfig {
|
||||
model: sgl_router::config::ModelConfig {
|
||||
id: "tiny".into(),
|
||||
tokenizer_path: "tests/fixtures/tiny_tokenizer.json".into(),
|
||||
policy: sgl_router::config::PolicyKind::CacheAwareZmq,
|
||||
circuit_breaker: None,
|
||||
cache_aware: None,
|
||||
}],
|
||||
discovery: sgl_router::config::DiscoveryConfig {
|
||||
backend: sgl_router::config::DiscoveryBackend::StaticUrls(
|
||||
sgl_router::config::StaticUrlsDiscoveryConfig {
|
||||
urls: vec!["http://placeholder:0".into()],
|
||||
},
|
||||
),
|
||||
},
|
||||
discovery: sgl_router::config::DiscoveryBackend::StaticUrls(
|
||||
sgl_router::config::StaticUrlsDiscoveryConfig {
|
||||
urls: vec!["http://placeholder:0".into()],
|
||||
},
|
||||
),
|
||||
proxy: ProxyConfig::default(),
|
||||
active_load: ActiveLoadConfig::default(),
|
||||
};
|
||||
@@ -127,6 +125,7 @@ async fn zmq_indexer_routes_to_publishing_worker_e2e() {
|
||||
topic: String::new(),
|
||||
block_size,
|
||||
dp_size: 1,
|
||||
is_bigram: false,
|
||||
};
|
||||
kv_index.add_worker(url_a, Some(preresolved.clone())).await;
|
||||
kv_index.add_worker(url_b, Some(preresolved)).await;
|
||||
|
||||
@@ -41,6 +41,7 @@ async fn two_independent_subscribers_converge_to_same_tree_state() {
|
||||
topic: String::new(),
|
||||
block_size,
|
||||
dp_size: 1,
|
||||
is_bigram: false,
|
||||
};
|
||||
|
||||
// 2. Two independent router-process surrogates, each with its own
|
||||
@@ -173,6 +174,7 @@ async fn two_subscribers_merge_events_from_two_publishers() {
|
||||
topic: String::new(),
|
||||
block_size,
|
||||
dp_size: 1,
|
||||
is_bigram: false,
|
||||
};
|
||||
let cfg_y = EventConfig {
|
||||
host: "127.0.0.1".into(),
|
||||
@@ -180,6 +182,7 @@ async fn two_subscribers_merge_events_from_two_publishers() {
|
||||
topic: String::new(),
|
||||
block_size,
|
||||
dp_size: 1,
|
||||
is_bigram: false,
|
||||
};
|
||||
|
||||
// Both routers subscribe to BOTH workers — the production fan-out.
|
||||
|
||||
Reference in New Issue
Block a user