fix: empty stdout/stderr produces str(content) instead of empty logs
When both stdout and stderr are empty strings, the `if parts else str(content)` fallback produced the raw dict representation as logs. Drop the fallback so logs is correctly empty.
This commit is contained in:
parent
2bf8751f6b
commit
4be1d76fd7
@ -711,7 +711,7 @@ class ModelResponseIterator:
|
||||
parts.append(content["stdout"])
|
||||
if content.get("stderr"):
|
||||
parts.append(f"STDERR: {content['stderr']}")
|
||||
logs = "".join(parts) if parts else str(content)
|
||||
logs = "".join(parts)
|
||||
else:
|
||||
logs = str(content)
|
||||
tool_input = self._server_tool_inputs.get(call_id, {})
|
||||
|
||||
@ -1775,7 +1775,7 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
|
||||
parts.append(content["stdout"])
|
||||
if content.get("stderr"):
|
||||
parts.append(f"STDERR: {content['stderr']}")
|
||||
logs = "".join(parts) if parts else str(content)
|
||||
logs = "".join(parts)
|
||||
else:
|
||||
logs = str(content)
|
||||
code_interpreter_results.append(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user