mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
StreamEmitter::test_channel() helper: returns a live mpsc receiver so tests can assert which agent_message_chunk messages were emitted, unlike noop() which drops the receiver. Chunk-emission (2 tests): verify one chunk per text delta with correct content, and that empty/absent text emits nothing. Auto→Responses upgrade (2 tests): verify that Auto mode retries on /responses when /chat/completions returns a 400 with an is_responses_required body, and that the sticky auto_upgraded flag causes subsequent calls to skip /chat/completions entirely. Both tests assert which paths the fake server saw — the discriminating assertion per Thufir's review. Config validation (2 tests): stream_chunk_timeout=0 and llm_body_chunk_timeout=0 both rejected with the documented error message. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>