Skip to content

Commit 8d297ae

Browse files
committed
🐛 await init_app_state
Signed-off-by: Joe Runde <[email protected]>
1 parent 384b732 commit 8d297ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vllm_tgis_adapter/http.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import inspect
34
from typing import TYPE_CHECKING, Callable
45

56
from vllm.entrypoints.launcher import serve_http
@@ -46,7 +47,9 @@ async def set_correlation_id(request: Request, call_next: Callable) -> Response:
4647
return await call_next(request)
4748

4849
model_config = await engine.get_model_config()
49-
init_app_state(engine, model_config, app.state, args)
50+
maybe_coroutine = init_app_state(engine, model_config, app.state, args)
51+
if inspect.isawaitable(maybe_coroutine):
52+
await maybe_coroutine
5053

5154
serve_kwargs = {
5255
"host": args.host,

0 commit comments

Comments
 (0)