litellm/tests/claude_code/_driver_unit_tests
Cursor Agent a1f0ef2a99
fix(claude_code): verify streaming wire in basic_messaging_streaming cells
Address the Greptile concern that basic_messaging_streaming and
basic_messaging_non_streaming used the same implementation, so a proxy
that buffered the upstream stream would silently show green for the
streaming row.

The fix:

- _basic_messaging.run_basic_messaging_cell accepts verify_streaming=True,
  which passes --include-partial-messages to the claude CLI. That flag
  causes the CLI to emit one stream_event record per upstream SSE event
  (message_start, content_block_delta, message_stop, ...). A buffering
  proxy collapses the stream to a single non-streaming response, so
  zero stream_event records are emitted.

- The cell rejects any model whose stream_event count is below
  MIN_STREAM_DELTA_EVENTS (2) -- safely above the buffered case for any
  non-trivial reply. Same all-must-pass shape as the existing
  tool_use_streaming row.

- All five basic_messaging_streaming/test_*.py per-provider cells now
  pass verify_streaming=True; the non-streaming variants are unchanged.

- New unit tests cover the helper, the partial-messages flag wiring,
  the streamed/buffered branching, and the all-models-must-stream
  contract.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-05-17 22:47:47 +00:00
..
__init__.py RALPH: tracer-bullet for Claude Code compatibility matrix (#26477, PRD #26476) 2026-05-06 23:27:05 +00:00
conftest.py compat-matrix: parallel-fanout refactor + 5 new feature dirs + rate limiter 2026-05-06 23:31:19 +00:00
test_basic_messaging.py fix(claude_code): verify streaming wire in basic_messaging_streaming cells 2026-05-17 22:47:47 +00:00
test_cli_driver.py fix(claude_code): harden parallel runner + de-dup basic_messaging cells 2026-05-17 06:35:15 +00:00
test_compat_result.py compat-matrix: parallel-fanout refactor + 5 new feature dirs + rate limiter 2026-05-06 23:31:19 +00:00
test_rate_limiter.py compat-matrix: parallel-fanout refactor + 5 new feature dirs + rate limiter 2026-05-06 23:31:19 +00:00