mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 05:02:41 +00:00
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:
parent
1405e30492
commit
5d3e7d5aaa
2 changed files with 6 additions and 2 deletions
|
|
@ -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");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue