mirror of
https://github.com/Nezumi-2711/9router.git
synced 2026-09-22 20:00:47 +00:00
Apply fix from PR #354 by @tannk4w to properly signal tool_calls finish_reason when model emits tool calls, allowing OpenAI-compatible clients to continue with tool result processing instead of stopping prematurely. Refactored finish_reason logic into computeFinishReason() helper to eliminate duplication and improve maintainability across flush and completion paths. Co-authored-by: tannk4w <tannk@tmi-soft.vn> Thanks to @tannk4w, @trungtq2799, @quanhavn, and @East-rayyy for the thorough review and improvement suggestions on the original PR. Made-with: Cursor