NCBM
38edc09854
core/lmproto: move Responses API into openai package
...
openai_compatible stays chat-completions-only; OpenAI provider uses lmproto.openai.OpenAIClient.
2026-07-15 20:52:17 +08:00
NCBM
3e20b1559c
core/lmproto: add OpenAI Responses API models and client
...
POST/GET/DELETE /responses with stream events; helpers for output_text and function_call items.
2026-07-15 20:43:11 +08:00
NCBM
e1ea43cb8f
core/lmproto: add OpenAI-compatible models() list API
...
Decode GET /models into ModelsResponse and return sorted unique ids.
2026-07-15 17:31:57 +08:00
NCBM
9cc2216807
core/lmproto: allow null logprobs and usage on stream chunks
...
Providers send logprobs=null (and sometimes usage=null) on SSE choices;
accept None so decode does not fail mid-stream.
2026-07-15 14:23:23 +08:00
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