ta
TanStack
GitHub
ai
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
ai
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
main
c3d4376b fix(ai-bedrock): forward usage from Converse structuredOutputStream() (#1278) * fix(ai-bedrock): forward usage from Converse structuredOutputStream() `BedrockConverseTextAdapter.structuredOutputStream()` iterated the Converse event stream handling only `contentBlockDelta` and `messageStop`. Converse reports token usage on a trailing `metadata` event, after the finish signal, so the terminal RUN_FINISHED was emitted with no `usage` and Bedrock consumers metering cost from it saw successful structured calls with no token signal. Capture usage from the `metadata` event and spread it onto RUN_FINISHED, mirroring `processConverseStream` in converse/stream-processor.ts and the non-stream `structuredOutput()` fixed in #1077. When no metadata event arrives the key stays absent, so unmetered stays distinguishable from zero-cost. Fixes #1276 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RgrmtdYU8TEo2kt59ZkJuY * test(ai-bedrock): cover usage on the Converse structured output stream Two cases in the existing StubAdapter suite, which drives the adapter's `sendStream` seam with canned Converse events. The first asserts that a trailing `metadata` event lands as `usage` on RUN_FINISHED. The second asserts that a stream without that event leaves the `usage` key absent, so an unmetered run stays distinguishable from a zero-cost one. The first case fails on c675499 without the fix in this PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RgrmtdYU8TEo2kt59ZkJuY --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
by Julius
J
Succeeded
main
c3d4376b fix(ai-bedrock): forward usage from Converse structuredOutputStream() (#1278) * fix(ai-bedrock): forward usage from Converse structuredOutputStream() `BedrockConverseTextAdapter.structuredOutputStream()` iterated the Converse event stream handling only `contentBlockDelta` and `messageStop`. Converse reports token usage on a trailing `metadata` event, after the finish signal, so the terminal RUN_FINISHED was emitted with no `usage` and Bedrock consumers metering cost from it saw successful structured calls with no token signal. Capture usage from the `metadata` event and spread it onto RUN_FINISHED, mirroring `processConverseStream` in converse/stream-processor.ts and the non-stream `structuredOutput()` fixed in #1077. When no metadata event arrives the key stays absent, so unmetered stays distinguishable from zero-cost. Fixes #1276 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RgrmtdYU8TEo2kt59ZkJuY * test(ai-bedrock): cover usage on the Converse structured output stream Two cases in the existing StubAdapter suite, which drives the adapter's `sendStream` seam with canned Converse events. The first asserts that a trailing `metadata` event lands as `usage` on RUN_FINISHED. The second asserts that a stream without that event leaves the `usage` key absent, so an unmetered run stays distinguishable from a zero-cost one. The first case fails on c675499 without the fix in this PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RgrmtdYU8TEo2kt59ZkJuY --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
by Julius
J
Succeeded
main
c3d4376b fix(ai-bedrock): forward usage from Converse structuredOutputStream() (#1278) * fix(ai-bedrock): forward usage from Converse structuredOutputStream() `BedrockConverseTextAdapter.structuredOutputStream()` iterated the Converse event stream handling only `contentBlockDelta` and `messageStop`. Converse reports token usage on a trailing `metadata` event, after the finish signal, so the terminal RUN_FINISHED was emitted with no `usage` and Bedrock consumers metering cost from it saw successful structured calls with no token signal. Capture usage from the `metadata` event and spread it onto RUN_FINISHED, mirroring `processConverseStream` in converse/stream-processor.ts and the non-stream `structuredOutput()` fixed in #1077. When no metadata event arrives the key stays absent, so unmetered stays distinguishable from zero-cost. Fixes #1276 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RgrmtdYU8TEo2kt59ZkJuY * test(ai-bedrock): cover usage on the Converse structured output stream Two cases in the existing StubAdapter suite, which drives the adapter's `sendStream` seam with canned Converse events. The first asserts that a trailing `metadata` event lands as `usage` on RUN_FINISHED. The second asserts that a stream without that event leaves the `usage` key absent, so an unmetered run stays distinguishable from a zero-cost one. The first case fails on c675499 without the fix in this PR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RgrmtdYU8TEo2kt59ZkJuY --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
by Julius
J
Succeeded
fix/bedrock-converse-structured-stream-usage
14c109e9 Merge 70fa0d384e3e08b78007ebd27a13bf1b43844e90 into c675499fea8940716338848ef3a9ae22da50c8b9
by Julius
J
Previous
Next