Add explicit LLM stream lifecycle events (#26722)

This commit is contained in:
Kit Langton
2026-05-10 12:19:13 -04:00
committed by GitHub
parent 3b8790e034
commit ce061bf661
16 changed files with 201 additions and 126 deletions
+3 -3
View File
@@ -204,9 +204,9 @@ describe("Gemini route", () => {
totalTokens: 7,
})
expect(response.events).toEqual([
{ type: "reasoning-delta", text: "thinking" },
{ type: "text-delta", text: "Hello" },
{ type: "text-delta", text: "!" },
{ type: "reasoning-delta", id: "reasoning-0", text: "thinking" },
{ type: "text-delta", id: "text-0", text: "Hello" },
{ type: "text-delta", id: "text-0", text: "!" },
{
type: "request-finish",
reason: "stop",