fix(ai): expose provider response ids on assistant messages fixes #2245

This commit is contained in:
Mario Zechner
2026-03-17 17:11:18 +01:00
parent 18d90b5c48
commit dd53eb56ee
11 changed files with 174 additions and 1 deletions
@@ -548,6 +548,9 @@ export const streamGoogleGeminiCli: StreamFunction<"google-gemini-cli", GoogleGe
// Unwrap the response
const responseData = chunk.response;
if (!responseData) continue;
// Cloud Code Assist mirrors Gemini's responseId field. Keep the first non-empty one.
// A single streamed response should retain the same ID across chunks.
output.responseId ||= responseData.responseId;
const candidate = responseData.candidates?.[0];
if (candidate?.content?.parts) {