Create an input-item view of this run. ``mode="preserve_all"`` keeps the historical behavior of converting ``new_items`` into a full plain-item history. ``mode="normalized"`` prefers the canonical continuation input when handoff filtering rewrote model history, while remaini
(
self,
*,
mode: ToInputListMode = "preserve_all",
)
| 285 | return cast(T, self.final_output) |
| 286 | |
| 287 | def to_input_list( |
| 288 | self, |
| 289 | *, |
| 290 | mode: ToInputListMode = "preserve_all", |
| 291 | ) -> list[TResponseInputItem]: |
| 292 | """Create an input-item view of this run. |
| 293 | |
| 294 | ``mode="preserve_all"`` keeps the historical behavior of converting ``new_items`` into a |
| 295 | full plain-item history. ``mode="normalized"`` prefers the canonical continuation input |
| 296 | when handoff filtering rewrote model history, while remaining identical for ordinary runs. |
| 297 | """ |
| 298 | original_items: list[TResponseInputItem] = ItemHelpers.input_to_new_input_list(self.input) |
| 299 | reasoning_item_id_policy = getattr(self, "_reasoning_item_id_policy", None) |
| 300 | replay_items = _input_items_for_result( |
| 301 | self, |
| 302 | mode=mode, |
| 303 | reasoning_item_id_policy=reasoning_item_id_policy, |
| 304 | ) |
| 305 | return original_items + replay_items |
| 306 | |
| 307 | @property |
| 308 | def agent_tool_invocation(self) -> AgentToolInvocation | None: |
no test coverage detected