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>
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| req_helpers.go | Loading commit data... | |
| to_claude_messages_req.go | Loading commit data... | |
| to_gemini_chat_req.go | Loading commit data... | |
| to_gemini_chat_req_preprocess.go | Loading commit data... | |
| to_oai_chat_req.go | Loading commit data... | |
| to_oai_chat_req_test.go | Loading commit data... | |
| to_oai_chat_resp.go | Loading commit data... | |
| to_oai_chat_resp_test.go | Loading commit data... | |
| to_oai_chat_stream_resp.go | Loading commit data... |