mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-03-02 04:24:11 +08:00
f4007f53ba
Some OpenAI-compatible providers (like GitHub Copilot) may send tool_calls in the first streaming chunk without including the role field. The previous implementation only emitted message_start when the first chunk contained role="assistant", causing Anthropic protocol violations when tool calls arrived first. This fix ensures message_start is always emitted on the very first chunk, preventing 'content_block_start before message_start' errors in clients that strictly validate Anthropic SSE event ordering.
f4007f53ba
ยท
2025-12-16 13:01:09 +07:00
History