mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 18:02:11 +00:00
fix(ai): correct Google thinking detection and remove unsupported id fields
- isThinkingPart now only checks thought === true, not thoughtSignature - thoughtSignature is for context replay and can appear on any part type - Store thoughtSignature on text blocks as textSignature for proper replay - Remove id from functionCall/functionResponse (unsupported by Vertex/Cloud Code Assist) Refs: https://ai.google.dev/gemini-api/docs/thought-signatures Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
parent
f5e97427ce
commit
4f757fbe23
5 changed files with 33 additions and 22 deletions
|
|
@ -511,6 +511,12 @@ export const streamGoogleGeminiCli: StreamFunction<"google-gemini-cli"> = (
|
|||
});
|
||||
} else {
|
||||
currentBlock.text += part.text;
|
||||
if (part.thoughtSignature) {
|
||||
currentBlock.textSignature = retainThoughtSignature(
|
||||
currentBlock.textSignature,
|
||||
part.thoughtSignature,
|
||||
);
|
||||
}
|
||||
stream.push({
|
||||
type: "text_delta",
|
||||
contentIndex: blockIndex(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue