[Bugfix] Honor stage selection in online profiler endpoints (#6609)

Signed-off-by: qujing226 <qujing226@gmail.com>
This commit is contained in:
Eugene Zhao authored and GitHub committed 2026-08-28 11:41:47 +08:00
1 parent 6ec5ab11bd
commit f8f8aa8eb7
3 files changed
+56 -6

No files matched your search

@@ -540,6 +540,8 @@ async def omni_run_server_worker(listen_address, sock, args, client_config=None,
stage_configs = engine_client.stage_configs if hasattr(engine_client, "stage_configs") else None
if _should_enable_profiler_endpoints(stage_configs):
logger.warning("Profiler endpoints are enabled. This should ONLY be used for local development!")
_remove_route_from_app(app, "/start_profile", frozenset({"POST"}))
_remove_route_from_app(app, "/stop_profile", frozenset({"POST"}))
app.include_router(profiler_router)
vllm_config = await _get_vllm_config(engine_client)