curl -v -X POST http://localhost:30000/v1/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen2.5-7B-Instruct",
"prompt": ["列出5个深度学习框架"],
"max_tokens": 100
}'
< HTTP/1.1 400 Bad Request
< content-length: 794
< date: Mon, 21 Jul 2025 03:28:10 GMT
<
* Connection #0 to host localhost left intact
{"object":"error","message":"[{'type': 'missing', 'loc': ('body', 'prompt'), 'msg': 'Field required', 'input': {'bootstrap_host': ['192.168.0.151'], 'bootstrap_port': [None], 'bootstrap_room': [3282254548847947510], 'input_ids': None, 'model': 'Qwen/Qwen2.5-7B-Instruct', 'parameters': {'max_new_tokens': 100}, 'stream': False, 'text': ['列出5个深度学习框架']}}, {'type': 'string_type', 'loc': ('body', 'bootstrap_host'), 'msg': 'Input should be a valid string', 'input': ['192.168.0.151']}, {'type': 'int_type', 'loc': ('body', 'bootstrap_port'), 'msg': 'Input should be a valid integer', 'input': [None]}, {'type': 'int_type', 'loc': ('body', 'bootstrap_room'), 'msg': 'Input should be a valid integer', 'input': [3282254548847947510]}]","type":"Bad Request","param":null,"code":400}%
Checklist
Describe the bug
sgl-router work fine in PD mode when using api
/v1/chat/completions. But fails on/v1/completions.I have some questions about this:
GenerateReqInputmodel to request /v1/completions here?sglang/sgl-router/src/routers/pd_router.rs
Lines 1305 to 1309 in c9e8613
Reproduction
sgl-router branch and commit: main(# 429bb0e)
run curl :
get error response :
Environment
not need