Skip to content

Commit 8025ed0

Browse files
authored
Fix: remove unset fields from calls to Responses API (#3026)
1 parent ba889de commit 8025ed0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/agents/run_internal/items.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ def run_item_to_input_item(
7272
return None
7373
to_input = getattr(run_item, "to_input_item", None)
7474
input_item = to_input() if callable(to_input) else cast(TResponseInputItem, run_item.raw_item)
75+
if isinstance(input_item, dict) and input_item.get("status") is None:
76+
input_item = {k: v for k, v in input_item.items() if k != "status"}
7577
if (
7678
_should_omit_reasoning_item_ids(reasoning_item_id_policy)
7779
and run_item.type == "reasoning_item"

0 commit comments

Comments
 (0)