mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +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:
parent
2bf8751f6b
commit
4be1d76fd7
2 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue