Artifact 6026664a53f2dfb07194d9f3b62514bf68142d163fa0b20c734dbe34ade091f9:
- File
test/pic/gemini-streams/thinking_text.sse
— part of check-in
[1011fc8472]
at
2026-11-19 23:29:07
on branch gemini
— A Google Gemini provider, as Pi's
The google-generative-ai API: streamGenerateContent over SSE with GEMINI_API_KEY, native parts replayed per conversation, tool calls and results, usage, and Pi's thinking mapping (thinkingLevel for Gemini 3 and later, a token budget for 2.5, 0 for off). A conversation can move between Gemini and the other providers turn by turn. Recorded streams cover text, thinking, tools, parallel calls, safety blocks, truncation and errors. (user: dmestas, size: 1051) [annotate] [blame] [check-ins using] [more...]
data: {"candidates":[{"content":{"role":"model","parts":[{"text":"**Plan**\n","thought":true}]}}],"usageMetadata":{"promptTokenCount":30,"totalTokenCount":30},"modelVersion":"gemini-2.5-flash","responseId":"resp-aaa"} data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Check the file.","thought":true,"thoughtSignature":"c2lnLXRob3VnaHQ="}]}}],"usageMetadata":{"promptTokenCount":30,"totalTokenCount":30},"modelVersion":"gemini-2.5-flash","responseId":"resp-aaa"} data: {"candidates":[{"content":{"role":"model","parts":[{"text":"Hello, "}]}}],"usageMetadata":{"promptTokenCount":30,"totalTokenCount":30},"modelVersion":"gemini-2.5-flash","responseId":"resp-aaa"} data: {"candidates":[{"content":{"role":"model","parts":[{"text":"\"world\"\n"},{"text":"","thoughtSignature":"c2lnLXRleHQ="}]},"finishReason":"STOP","index":0}],"usageMetadata":{"promptTokenCount":30,"candidatesTokenCount":5,"totalTokenCount":47,"cachedContentTokenCount":10,"thoughtsTokenCount":12},"modelVersion":"gemini-2.5-flash","responseId":"resp-aaa"}