mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
* fix(provider): add missing index field to streaming tool_call deltas - Fix #6661: Streaming tool_call arguments lost when OpenAI-compatible proxy omits index field - Gemini and some proxies (e.g. Continue) don't include index field in tool_call deltas - Add default index=0 when missing to prevent ChatCompletionStreamState.handle_chunk() from rejecting chunks Fixes #6661 * fix(provider): use enumerate for multi-tool-call index assignment - Use enumerate() to assign correct index based on list position - Iterate over all choices (not just the first) for completeness - Addresses review feedback from sourcery-ai and gemini-code-assist --------- Co-authored-by: Yaohua-Leo <3067173925@qq.com> Co-authored-by: Soulter <905617992@qq.com>