test(ai): Add comprehensive E2E tests for all AI providers

- Add multi-turn test to verify thinking and tool calling work together
- Test thinkingSignature handling for proper multi-turn context
- Fix Gemini provider to generate base64 thinkingSignature when needed
- Handle multiple rounds of tool calls in tests (Gemini behavior)
- Make thinking tests more robust for model-dependent behavior
- All 18 tests passing across 4 providers
This commit is contained in:
Mario Zechner 2025-08-25 15:54:26 +02:00
parent 289e60ab88
commit 7a6852081d
7 changed files with 463 additions and 88 deletions

View file

@ -137,6 +137,9 @@ export class OpenAIResponsesLLM implements LLM<OpenAIResponsesLLMOptions> {
// Map status to stop reason
stopReason = this.mapStopReason(response?.status);
if (toolCalls.length > 0 && stopReason === "stop") {
stopReason = "toolUse";
}
}
// Handle errors
else if (event.type === "error") {