Commit graph

4 commits

Author SHA1 Message Date
Ishaan Jaffer
e8461b5b97
style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
yuneng-jiang
d16c8c5590 [Fix] BaseModelResponseIterator crashes on non-string stream chunks
The empty-line filter in __next__/__anext__ called .strip() without
checking the type first. When the Responses API yields Pydantic
BaseModel events (e.g. ResponseCreatedEvent), this raises
AttributeError. Add an isinstance(str_line, str) guard so non-string
objects pass through to _handle_string_chunk as intended.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 16:16:32 -07:00
Cesar Garcia
a2f3beb26f
Update tests/test_litellm/llms/base_llm/test_base_model_iterator.py
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-03-03 21:47:55 -03:00
Chesars
8c128edb5d test: add unit tests for BaseModelResponseIterator empty SSE line filtering
Tests verify that empty lines between SSE events are properly filtered
and don't produce extra empty chunks in streaming responses.
2025-11-26 17:05:40 -03:00