mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-08 02:36:43 +00:00
When a function call was already registered under its output_index key via response.output_item.added, the synthetic events built from the terminal response.completed output carry no output_index and resolve to a different item-based key. ensureToolForEvent then created a second tool index and resent the full arguments, so Chat Completions clients received the same tool call twice. Reuse the tool registered under itemIDToKey/callIDToKey before creating a new one, and alias the new key to the existing tool. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>