Skip to content

Commit 2aef331

Browse files
committed
Add test for checking if reasoning_content is accepted
1 parent d6e2094 commit 2aef331

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tools/server/tests/unit/test_chat_completion.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,3 +476,17 @@ def make_cmpl_request():
476476
assert last_progress["total"] > 0
477477
assert last_progress["processed"] == last_progress["total"]
478478
assert total_batch_count == batch_count
479+
480+
481+
def test_standalone_reasoning_content_is_accepted():
482+
global server
483+
server.start()
484+
res = server.make_request("POST", "/chat/completions", data={
485+
"max_tokens": 512,
486+
"seed": 42,
487+
"messages": [
488+
{"role": "user", "content": "How much is 102 + 7?"},
489+
{"role": "assistant", "reasoning_content": "I need to calculate the sum of 102 and 7. Respond only with the sum, no other text or formatting."},
490+
]
491+
})
492+
assert res.status_code == 200

0 commit comments

Comments
 (0)