From 585d7bdc9449da918badb01648e178769e4d471d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 13:27:17 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/backend/core/inference/context_compaction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/studio/backend/core/inference/context_compaction.py b/studio/backend/core/inference/context_compaction.py index 68a31d5d41..efce545d30 100644 --- a/studio/backend/core/inference/context_compaction.py +++ b/studio/backend/core/inference/context_compaction.py @@ -330,7 +330,8 @@ class SlidingWindowCompact(CompactStrategy): # Keep the message (multimodal content stays) but strip # tool_calls entries with no surviving tool follow-up. kept_tcs = [ - tc for tc in (m.get("tool_calls") or []) + tc + for tc in (m.get("tool_calls") or []) if isinstance(tc, dict) and isinstance(tc.get("id"), str) and tc["id"] in responded_ids