From 92d22fd69c2ccf553a03ea083d561c76359d8f6a Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Fri, 27 Mar 2026 14:16:10 +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 | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.py
index 40e35cc0f6..8efe6e1699 100644
--- a/studio/backend/routes/inference.py
+++ b/studio/backend/routes/inference.py
@@ -1205,12 +1205,16 @@ async def openai_chat_completions(
# Only strip closed pairs here (not open-ended)
# so legitimate text after a tool block is kept.
cumulative = _re.sub(
- r".*?", "",
- cumulative, flags = _re.DOTALL,
+ r".*?",
+ "",
+ cumulative,
+ flags = _re.DOTALL,
)
cumulative = _re.sub(
- r".*?", "",
- cumulative, flags = _re.DOTALL,
+ r".*?",
+ "",
+ cumulative,
+ flags = _re.DOTALL,
)
new_text = cumulative[len(prev_text) :]
prev_text = cumulative