Prerequisites
Describe the bug
The /v1/chat/completions endpoint of areno serve does not support stream=true and directly returns a 400 error. As a result, any Agent framework that relies on the SSE streaming protocol (such as OpenAI SDK, LangChain, AutoGen, CrewAI, etc.) cannot use the areno service as a backend.
Currently, this limit is explicitly hardcoded in the codebase:
areno/cli/serve.py (line 433):
if request.stream:
raise HTTPException(status_code=400, detail="stream=true is not supported")
areno/api/agentic.py (line 456):
if body.get("stream"):
_write_json(handler, 400, {"error": {"message": "streaming chat completions are not supported yet"}})
Why it is needed:
- Evaluating Agent Model Performance: Mainstream Agent frameworks drive multi-turn conversations and tool usage via
client.chat.completions.create(stream=True). Lack of streaming support prevents downstream evaluation of trained models.
- Agentic Training (Tool-Use RL): During the rollout phase, agentic training loops rely on SSE streaming to dynamically parse incremental
tool_calls and delta payloads. Non-streaming responses freeze the whole execution loop.
Expected behavior
When receiving stream=true, the /v1/chat/completions endpoint of areno serve should return an SSE event stream (text/event-stream) compliant with the OpenAI streaming specification:
- Begins with
delta.role = "assistant"
- Incrementally emits text or
tool_calls deltas
- Concludes with
finish_reason, usage, and data: [DONE]
Note: Streaming support for /v1/chat/completions is target for the serve layer in this PR; areno/api/agentic.py is currently out of scope.
Full logs
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"detail": "stream=true is not supported"
}
Reproduction
import openai
client = openai.OpenAI(
base_url="http://localhost:8000/v1",
api_key="empty",
)
# This call will fail with a 400 Bad Request error
response = client.chat.completions.create(
model="my-model",
messages=[{"role": "user", "content": "Hello"}],
stream=True,
)
for chunk in response:
print(chunk)
Exact command
areno serve --model-path ling_v3_tiny_f16 --tp-size 1 --world-size 1 --port 8000
Full traceback
Environment
- OS: *
- Python: *
- CUDA: *
- PyTorch: *
- AReno: *
- GPU model: *
Install mode
editable source / pip install -e .
Was ARENO_BUILD_EXT=0 used?
Not sure
areno env --json
areno check
Additional context
No response
Prerequisites
Describe the bug
The
/v1/chat/completionsendpoint ofareno servedoes not supportstream=trueand directly returns a400error. As a result, any Agent framework that relies on the SSE streaming protocol (such as OpenAI SDK, LangChain, AutoGen, CrewAI, etc.) cannot use thearenoservice as a backend.Currently, this limit is explicitly hardcoded in the codebase:
areno/cli/serve.py(line 433):areno/api/agentic.py(line 456):Why it is needed:
client.chat.completions.create(stream=True). Lack of streaming support prevents downstream evaluation of trained models.tool_callsanddeltapayloads. Non-streaming responses freeze the whole execution loop.Expected behavior
When receiving
stream=true, the/v1/chat/completionsendpoint ofareno serveshould return an SSE event stream (text/event-stream) compliant with the OpenAI streaming specification:delta.role = "assistant"tool_callsdeltasfinish_reason,usage, anddata: [DONE]Note: Streaming support for
/v1/chat/completionsis target for the serve layer in this PR;areno/api/agentic.pyis currently out of scope.Full logs
Reproduction
Exact command
Full traceback
Environment
Install mode
editable source / pip install -e .
Was ARENO_BUILD_EXT=0 used?
Not sure
areno env --json
areno check
Additional context
No response