test(responses): return a new inputs mapping from the tool-dropping guardrail

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-09-01 21:54:52 +00:00
parent 7f03c27a2c
commit d54386740a

View file

@ -1245,8 +1245,10 @@ class ToolDroppingGuardrail(CustomGuardrail):
input_type: Literal["request", "response"],
logging_obj: Optional[Any] = None,
) -> GenericGuardrailAPIInputs:
inputs["tools"] = [t for t in inputs.get("tools") or [] if t["function"]["name"] != self.drop]
return inputs
return {
**inputs,
"tools": [t for t in inputs.get("tools") or [] if t["function"]["name"] != self.drop],
}
CODEX_NAMESPACE_TOOL = {