Fix malformed native Responses tool output

Keep Agent Zero wrapper examples out of native function descriptions and expose the response text schema.\n\nRoute concatenated tool envelopes through repair before the plain response hook can render them as final text.
This commit is contained in:
Alessandro 2026-07-28 12:52:11 +02:00
parent 63a52b3a4a
commit 4b0feac1f4
8 changed files with 39 additions and 5 deletions

View file

@ -23,7 +23,10 @@ class LogPlainResponses(Extension):
message = call_args[1]
if not isinstance(message, str) or not message:
return
if extract_tools.extract_tool_request(message) is not None:
if (
extract_tools.extract_tool_request(message) is not None
or extract_tools.is_misformatted_tool_request(message)
):
return
params = getattr(getattr(self.agent, "loop_data", None), "params_temporary", None)