Files
1553126902 7b7e5cc510 test(sdk-python): cover orphan function_call stripping through the wrap path
Add two request-scoped regressions for #6676 beyond the unit tests:

- test_replayed_cancelled_turn_strips_orphan_function_call_blocks: the
  poisoned-checkpoint shape (run cancelled mid-turn, function_call blocks
  persisted with no ToolMessages and no intercept state) driven through
  wrap_model_call/awrap_model_call — the model must receive a history
  with no orphaned blocks and no unanswered tool_calls, which is what
  keeps langchain-openai from re-emitting them as Responses input items
  without a matching function_call_output.
- test_next_model_call_keeps_answered_function_call_blocks_on_restore:
  the legitimate resume path — restored frontend call with its synthetic
  result plus the answered backend call keep their function_call blocks,
  proving the sanitizer does not over-strip the orphan-handoff contract.
2026-08-29 22:22:48 +08:00
..