From 867fbc8badd45b157ae32c55f7836dc34584a1bc Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Fri, 7 Aug 2026 01:11:58 -0300 Subject: [PATCH] fix(changelog): remove YAML frontmatter from 9571 fragment The changelog fragment format requires the first non-empty line to be a markdown bullet ("- "). YAML frontmatter was the first non-empty line, causing the integrity check to fail. --- .../9571-plugin-streaming-usage-timing.md | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/changelog.d/features/9571-plugin-streaming-usage-timing.md b/changelog.d/features/9571-plugin-streaming-usage-timing.md index d14ea459d8..84720d2df5 100644 --- a/changelog.d/features/9571-plugin-streaming-usage-timing.md +++ b/changelog.d/features/9571-plugin-streaming-usage-timing.md @@ -1,20 +1,11 @@ ---- -kind: feature -ref: "#9571" ---- +- **feat(plugins):** add onStreamComplete built-in event exposing streaming usage and timing (#9571) -feat(plugins): add onStreamComplete built-in event exposing streaming usage and timing (#9571) + Adds a new `onStreamComplete` plugin event that fires after an SSE stream is fully + consumed, carrying usage token counts and timing metrics (latency, TTFT). Built-in + events now include `onStreamComplete` as a fire-and-forget lifecycle hook. -Adds a new `onStreamComplete` plugin event that fires after an SSE stream is fully -consumed, carrying usage token counts and timing metrics (latency, TTFT). Built-in -events now include "onStreamComplete" as a fire-and-forget lifecycle hook. + Payload: `status`, `usage` (prompt_tokens, completion_tokens, reasoning_tokens, + cache_read_input_tokens, cache_creation_input_tokens), `timing` (latencyMs, ttft), + `model`, `provider`, `errorCode`. -The payload shape: - -- `status` — HTTP status of the stream -- `usage.prompt_tokens`, `.completion_tokens`, `.reasoning_tokens`, - `.cache_read_input_tokens`, `.cache_creation_input_tokens` -- `timing.latencyMs`, `.ttft` -- `model`, `provider`, `errorCode` - -Non-breaking — existing `onResponse` hooks with `{ streamed: true }` remain unchanged. + Non-breaking — existing `onResponse` hooks with `{ streamed: true }` remain unchanged.