debug(gemini): log raw API response on the server

This commit is contained in:
2026-06-01 13:49:12 -07:00
parent c79f81f3ca
commit 42c46d0f88

View File

@@ -133,6 +133,11 @@ export async function callGeminiChat(opts: {
config,
});
console.log(
"[GeminiChat] Raw Response:",
JSON.stringify(response, null, 2),
);
let text = "";
let thoughts = "";
const toolCalls: ToolCall[] = [];
@@ -205,6 +210,8 @@ export async function* streamGeminiChat(opts: {
config,
});
console.log("[GeminiChat] Stream request initiated");
for await (const chunk of streamResult) {
const parts = chunk.candidates?.[0]?.content?.parts ?? [];
for (const part of parts) {