feat: implement Stream Spoofing interceptor and robust format preservation patches

This commit is contained in:
lingyuzeng
2026-03-22 17:55:47 +08:00
parent ebd73e1c69
commit ce99e8b418
12 changed files with 426 additions and 11 deletions

21
test/fixtures/vllm-xml-response.json vendored Executable file
View File

@@ -0,0 +1,21 @@
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1715012345,
"model": "Qwen3.5-27B",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "<function=read>\n<parameter=path>\n/tmp/test.txt\n</parameter>\n</function>"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 56,
"completion_tokens": 31,
"total_tokens": 87
}
}