mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-17 00:26:01 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user