From 66a3516c8ffcaf7335044b0977df80e182a4bb12 Mon Sep 17 00:00:00 2001 From: IvanShang <77005282+qdivan@users.noreply.github.com> Date: Mon, 7 Sep 2026 09:57:49 +0800 Subject: [PATCH] style(headroom): format stream options conversion --- litellm/proxy/guardrails/guardrail_hooks/headroom/headroom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/headroom/headroom.py b/litellm/proxy/guardrails/guardrail_hooks/headroom/headroom.py index d68be773457..e48c00c0437 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/headroom/headroom.py +++ b/litellm/proxy/guardrails/guardrail_hooks/headroom/headroom.py @@ -890,7 +890,9 @@ class HeadroomGuardrail(CustomGuardrail): if not has_headroom_retrieve_tool(effective.get("tools")): return base_result return { # mutable-ok: the hook contract is a plain dict the router merges into the request kwargs - **{key: value for key, value in effective.items() if key != "stream_options"}, # mutable-ok: removes stream-only options + **{ + key: value for key, value in effective.items() if key != "stream_options" + }, # mutable-ok: removes stream-only options "stream": False, HEADROOM_CONVERTED_STREAM_KEY: True, }