mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 15:01:26 +00:00
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:
parent
289e60ab88
commit
7a6852081d
7 changed files with 463 additions and 88 deletions
|
|
@ -24,14 +24,13 @@ const options: GeminiLLMOptions = {
|
|||
onText: (t, complete) => process.stdout.write(t + (complete ? "\n" : "")),
|
||||
onThinking: (t, complete) => process.stdout.write(chalk.dim(t + (complete ? "\n" : ""))),
|
||||
toolChoice: "auto",
|
||||
// Enable thinking for Gemini 2.5 models
|
||||
thinking: {
|
||||
enabled: true,
|
||||
budgetTokens: -1 // Dynamic thinking
|
||||
enabled: true,
|
||||
budgetTokens: -1 // Dynamic thinking
|
||||
}
|
||||
};
|
||||
|
||||
const ai = new GeminiLLM("gemini-2.5-flash", process.env.GEMINI_API_KEY || "fake-api-key-for-testing");
|
||||
const ai = new GeminiLLM("gemini-2.5-flash", process.env.GEMINI_API_KEY);
|
||||
const context: Context = {
|
||||
systemPrompt: "You are a helpful assistant that can use tools to answer questions.",
|
||||
messages: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue