[router] allow one router to support different model families and serving mode (#10244)
This commit is contained in:
@@ -128,6 +128,7 @@ def _popen_launch_router_only(
|
||||
timeout: float = 120.0,
|
||||
*,
|
||||
dp_aware: bool = False,
|
||||
enable_igw: bool = False,
|
||||
api_key: str | None = None,
|
||||
) -> subprocess.Popen:
|
||||
host, port = _parse_url(base_url)
|
||||
@@ -146,6 +147,8 @@ def _popen_launch_router_only(
|
||||
]
|
||||
if dp_aware:
|
||||
cmd += ["--dp-aware"]
|
||||
if enable_igw:
|
||||
cmd += ["--enable-igw"]
|
||||
if api_key is not None:
|
||||
cmd += ["--api-key", api_key]
|
||||
cmd += [
|
||||
|
||||
@@ -35,7 +35,7 @@ def test_retry_reroutes_to_healthy_worker(router_manager, mock_workers):
|
||||
)
|
||||
assert r.status_code == 200
|
||||
wid = r.headers.get("X-Worker-Id") or r.json().get("worker_id")
|
||||
assert wid == id_b # should have retried onto healthy worker
|
||||
assert wid in [id_b, id_c] # should have retried onto a healthy worker (B or C)
|
||||
# mock_workers fixture handles cleanup
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user