From bd758c2276b51d43e0caf191c6dd019f9e744f0b Mon Sep 17 00:00:00 2001 From: yair Date: Mon, 30 Jun 2025 12:13:09 +0300 Subject: [PATCH 1/2] fix empty args for tool call --- src/handlers/anthropic-vertex.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/handlers/anthropic-vertex.ts b/src/handlers/anthropic-vertex.ts index 1bb1134..f5c5221 100644 --- a/src/handlers/anthropic-vertex.ts +++ b/src/handlers/anthropic-vertex.ts @@ -178,7 +178,16 @@ export async function* createCompletionResponseStreaming( index: 0, finish_reason: finishReason, logprobs: null, - delta, + delta: finishReason === "tool_calls" ? { + tool_calls: [ + { + index: 0, + function: { + arguments: '{}', + }, + }, + ], + } : delta, } yield { From 21e3171fa254210053e1a6066a05d5807c93260e Mon Sep 17 00:00:00 2001 From: codota-builder Date: Mon, 30 Jun 2025 09:16:09 +0000 Subject: [PATCH 2/2] 0.16.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b97cd5c..e3d6784 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codota/token.js", - "version": "0.15.0", + "version": "0.16.0", "repository": { "type": "git", "url": "https://github.com/codota/token.js"