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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user