Commit Graph

4 Commits

Author SHA1 Message Date
NCBM 366752efb9 core/lmproto: allow null content on stream deltas
OpenAI-compatible and DeepSeek SSE chunks often set content and
reasoning_content to null; accept None so decode does not fail mid-stream.
2026-07-15 14:21:50 +08:00
NCBM d5e7c3aa53 core/lmproto: await async AsyncResponse.content
niquests exposes content as an async property; reading it without await
left a coroutine warning and skipped the body. Only load body on HTTP
errors for streams so SSE is not consumed early.
2026-07-15 10:41:33 +08:00
NCBM a78791b3a9 core/lmproto: extract pure SSE helpers; drop fake response tests
Test sse_data_payload and http_error_message with plain bytes instead
of a cast-heavy AsyncResponse double.
2026-07-15 10:38:17 +08:00
NCBM c5745e0711 core/lmproto: stop SSE stream at data: [DONE]
Previously DONE was skipped with continue, so keep-alive connections
could hang forever after the model finished. Also fail fast on HTTP
error statuses for stream and non-stream completions.
2026-07-15 10:33:47 +08:00