[Fix Telemetry for tool calls, PR 1/n] Propagate tool reported errors via ToolCallResponseInfo and ToolResult (#5222)

This commit is contained in:
Silvio Junior
2025-08-01 11:20:08 -04:00
committed by GitHub
parent e126d2fcd9
commit 7748e56153
14 changed files with 224 additions and 25 deletions

View File

@@ -8,6 +8,7 @@ import {
Config,
executeToolCall,
ToolRegistry,
ToolErrorType,
shutdownTelemetry,
GeminiEventType,
ServerGeminiStreamEvent,
@@ -161,6 +162,7 @@ describe('runNonInteractive', () => {
};
mockCoreExecuteToolCall.mockResolvedValue({
error: new Error('Tool execution failed badly'),
errorType: ToolErrorType.UNHANDLED_EXCEPTION,
});
mockGeminiClient.sendMessageStream.mockReturnValue(
createStreamFromEvents([toolCallEvent]),