Ignore non-string background stream deltas (#1549)

This commit is contained in:
red person
2026-06-03 08:11:45 +03:00
committed by GitHub
parent 708ac19f28
commit db8c0b3dac
2 changed files with 42 additions and 1 deletions
+3 -1
View File
@@ -53,7 +53,9 @@ async def _drain_agent(sess, messages):
if not isinstance(d, dict):
continue
if "delta" in d:
full += d["delta"]
delta = d.get("delta")
if isinstance(delta, str):
full += delta
elif d.get("type") == "agent_step":
round_num = d.get("round", round_num)
elif d.get("type") == "tool_output":