From c584dd7c1d7ad6ab428afa2b102394ee7cfee5ef Mon Sep 17 00:00:00 2001 From: TJ Miller Date: Sun, 25 Jan 2026 10:01:23 -0500 Subject: [PATCH] Set tool call ID --- src/Providers/Gemini/Maps/ToolCallMap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Providers/Gemini/Maps/ToolCallMap.php b/src/Providers/Gemini/Maps/ToolCallMap.php index 151af95e0..a450697b5 100644 --- a/src/Providers/Gemini/Maps/ToolCallMap.php +++ b/src/Providers/Gemini/Maps/ToolCallMap.php @@ -4,6 +4,7 @@ namespace Prism\Prism\Providers\Gemini\Maps; +use Prism\Prism\Streaming\EventID; use Prism\Prism\ValueObjects\ToolCall; class ToolCallMap @@ -21,7 +22,7 @@ public static function map(array $toolCalls): array $filteredToolCalls = array_filter($toolCalls, fn (array $item): bool => isset($item['functionCall'])); return array_map(fn (array $toolCall): ToolCall => new ToolCall( - id: data_get($toolCall, 'functionCall.name'), + id: EventID::generate('gm'), name: data_get($toolCall, 'functionCall.name'), arguments: data_get($toolCall, 'functionCall.args'), reasoningId: data_get($toolCall, 'thoughtSignature'),