fix(ai): preserve unsigned tool call context for Gemini 3 with anti-mimicry note
Instead of skipping unsigned tool calls entirely (which lobotomizes context), convert them to text with an explicit note telling the model this is historical context from a different model and not a format to mimic. This preserves tool call/result context when switching from providers without thought signatures (e.g. Claude via Antigravity) to Gemini 3.
This commit is contained in:
@@ -63,7 +63,10 @@ describe("google-shared convertMessages", () => {
|
||||
expect(toolTurn?.parts?.some((p) => p.functionCall !== undefined)).toBe(false);
|
||||
|
||||
const text = toolTurn?.parts?.map((p) => p.text ?? "").join("\n");
|
||||
expect(text).toContain("[Tool Call: bash]");
|
||||
// Should contain historical context note to prevent mimicry
|
||||
expect(text).toContain("Historical context");
|
||||
expect(text).toContain("bash");
|
||||
expect(text).toContain("ls -la");
|
||||
expect(text).toContain("Do not mimic this format");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user