From a0506e1e7c3dc753d83bbc44aa735cf58ffa7494 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 16 Apr 2026 11:32:12 +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 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py index ea4bc28bc7..3db56b9c6b 100644 --- a/studio/backend/routes/inference.py +++ b/studio/backend/routes/inference.py @@ -1312,7 +1312,9 @@ async def openai_chat_completions( # result, nudge the model to synthesise a final answer. # Large models handle multi-step tool use well, so this # is gated to small models only. - if _is_small_model and _has_successful_tool_result_in_current_turn(chat_messages): + if _is_small_model and _has_successful_tool_result_in_current_turn( + chat_messages + ): _nudge += _TOOL_SYNTHESISE_NUDGE # Append nudge to system prompt (preserve user's prompt) if system_prompt: @@ -2547,7 +2549,9 @@ async def anthropic_messages( # /chat/completions for rationale. (The OpenAI-compat schema # does not yet accept role="tool", so this branch is currently # unreachable; kept for when the schema is extended.) - if _is_small_model and _has_successful_tool_result_in_current_turn(openai_messages): + if _is_small_model and _has_successful_tool_result_in_current_turn( + openai_messages + ): _nudge += _TOOL_SYNTHESISE_NUDGE # Inject into system prompt if openai_messages and openai_messages[0].get("role") == "system":