feat: implement strict-client compatible streaming tool calls with index and add Vercel build troubleshooting guide.

This commit is contained in:
CJACK
2026-02-16 17:58:40 +08:00
parent c7ed01bfe7
commit 63ee2e41c2
7 changed files with 111 additions and 1 deletions

View File

@@ -167,6 +167,7 @@ When `tools` is present, DS2API injects a tool prompt and parses tool-call paylo
- Non-stream: if detected, returns `message.tool_calls`, `finish_reason=tool_calls`, and `message.content=null`
- Stream: to avoid leaking raw tool-call JSON, DS2API buffers text first; if tool call is detected, only structured `delta.tool_calls` is emitted
- Stream `delta.tool_calls` is strict-client compatible: each tool call object includes `index` (starting from `0`)
Tool-call response example: