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

29
package-lock.json generated
View file

@ -634,9 +634,9 @@
}
},
"node_modules/@google/genai": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.14.0.tgz",
"integrity": "sha512-jirYprAAJU1svjwSDVCzyVq+FrJpJd5CSxR/g2Ga/gZ0ZYZpcWjMS75KJl9y71K1mDN+tcx6s21CzCbB2R840g==",
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.15.0.tgz",
"integrity": "sha512-4CSW+hRTESWl3xVtde7pkQ3E+dDFhDq+m4ztmccRctZfx1gKy3v0M9STIMGk6Nq0s6O2uKMXupOZQ1JGorXVwQ==",
"license": "Apache-2.0",
"dependencies": {
"google-auth-library": "^9.14.2",
@ -654,15 +654,6 @@
}
}
},
"node_modules/@google/generative-ai": {
"version": "0.24.1",
"resolved": "https://registry.npmjs.org/@google/generative-ai/-/generative-ai-0.24.1.tgz",
"integrity": "sha512-MqO+MLfM6kjxcKoy0p1wRzG3b4ZZXtPI+z2IE26UogS2Cm/XHO+7gGRBh6gcJsOiIVoH93UwKvW4HdgiOZCy9Q==",
"license": "Apache-2.0",
"engines": {
"node": ">=18.0.0"
}
},
"node_modules/@mariozechner/ai": {
"resolved": "packages/ai",
"link": true
@ -1051,9 +1042,9 @@
}
},
"node_modules/openai": {
"version": "5.12.2",
"resolved": "https://registry.npmjs.org/openai/-/openai-5.12.2.tgz",
"integrity": "sha512-xqzHHQch5Tws5PcKR2xsZGX9xtch+JQFz5zb14dGqlshmmDAFBFEWmeIpf7wVqWV+w7Emj7jRgkNJakyKE0tYQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/openai/-/openai-5.15.0.tgz",
"integrity": "sha512-kcUdws8K/A8m02I+IqFBwO51gS+87GP89yWEufGbzEi8anBz4FB/bti2QxaJdGwwY4mwJGzx85XO7TuL/Tpu1w==",
"license": "Apache-2.0",
"bin": {
"openai": "bin/cli"
@ -1611,13 +1602,11 @@
"version": "0.5.8",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "0.60.0",
"@google/genai": "1.14.0",
"@google/generative-ai": "^0.24.1",
"@anthropic-ai/sdk": "^0.60.0",
"@google/genai": "^1.15.0",
"chalk": "^5.5.0",
"openai": "5.12.2"
"openai": "^5.15.0"
},
"devDependencies": {},
"engines": {
"node": ">=20.0.0"
}