From e54a19f27c815a6317689afe1b23428d0c04e57b Mon Sep 17 00:00:00 2001 From: DK-yaniv <164404355+DK-yaniv@users.noreply.github.com> Date: Sun, 9 Aug 2026 17:39:02 +0300 Subject: [PATCH] Update litellm/proxy/guardrails/guardrail_hooks/deepkeep/deepkeep.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- litellm/proxy/guardrails/guardrail_hooks/deepkeep/deepkeep.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/guardrails/guardrail_hooks/deepkeep/deepkeep.py b/litellm/proxy/guardrails/guardrail_hooks/deepkeep/deepkeep.py index 7021e6beffd..b47008884ae 100644 --- a/litellm/proxy/guardrails/guardrail_hooks/deepkeep/deepkeep.py +++ b/litellm/proxy/guardrails/guardrail_hooks/deepkeep/deepkeep.py @@ -259,7 +259,9 @@ class DeepKeepGuardrail(CustomGuardrail): return_inputs["tool_calls"] = response_json["tool_calls"] elif tool_calls is not None: return_inputs["tool_calls"] = tool_calls - if structured_messages is not None: + if response_json.get("structured_messages") is not None: + return_inputs["structured_messages"] = response_json["structured_messages"] + elif structured_messages is not None: return_inputs["structured_messages"] = structured_messages return return_inputs