This repository was archived by the owner on May 15, 2026. It is now read-only.
Commit 11e39aa
committed
fix: emit tool_call_end events for any finish_reason, not just tool_calls
This fixes compatibility with OpenAI-compatible servers like ik_llama.cpp
that may send finish_reason values like "stop" instead of "tool_calls"
when tool calls are made.
The change modifies NativeToolCallParser.processFinishReason() to emit
tool_call_end events when ANY finish_reason is present and there are
tracked tool calls that have started, ensuring tool calls are properly
finalized regardless of the specific finish_reason value.
Closes #95511 parent 78dc344 commit 11e39aa
1 file changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
150 | 154 | | |
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
154 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
155 | 162 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
160 | 170 | | |
161 | 171 | | |
162 | 172 | | |
| |||
0 commit comments