Skip to content

Commit ab4ebac

Browse files
ericdalloeca-agent
andcommitted
Fix stale tool-call atom with Copilot encrypted IDs
Copilot API returns different encrypted item IDs in streaming events vs response.completed output. The selective dissoc only removed the output ID, leaving the streaming ID (with arguments) in the atom. Replace with a full reset before the recursive request. 🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca <git@eca.dev>
1 parent 16c62d3 commit ab4ebac

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/eca/llm_providers/openai.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@
277277
:input-cache-read-tokens input-cache-read-tokens}))
278278
(if (seq tool-calls)
279279
(when-let [{:keys [new-messages tools]} (on-tools-called tool-calls)]
280-
(doseq [tool-call tool-calls]
281-
(swap! tool-call-by-item-id* dissoc (:item-id tool-call)))
280+
(reset! tool-call-by-item-id* {})
282281
(base-responses-request!
283282
{:rid (llm-util/gen-rid)
284283
:body (assoc body

0 commit comments

Comments
 (0)