From 315f3d7f81831a87228922fb07f7a04b2f51acbb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:44:36 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/routes/inference.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py index 97f5358121..eef44ba9c8 100644 --- a/studio/backend/routes/inference.py +++ b/studio/backend/routes/inference.py @@ -1853,9 +1853,12 @@ async def openai_completions( is_stream = body.get("stream", False) if is_stream: + async def _stream(): async with httpx.AsyncClient() as client: - async with client.stream("POST", target_url, json = body, timeout = 600) as resp: + async with client.stream( + "POST", target_url, json = body, timeout = 600 + ) as resp: async for chunk in resp.aiter_bytes(): yield chunk @@ -1923,6 +1926,7 @@ class _ResponsesInputMessage(BaseModel): class ResponsesRequest(BaseModel): """Minimal OpenAI Responses API request.""" + model: str = "default" input: Union[str, list[_ResponsesInputMessage]] = [] instructions: Optional[str] = None