Skip to content

fix(sdk-bedrock): report a failure in stream chunk timing and the first-chunk update - #190

Merged
aikins01 merged 1 commit into
mainfrom
fix/sdk-bedrock/report-chunk-timing-failures
Nov 3, 2026
Merged

aikins01 merged 1 commit into
mainfrom
fix/sdk-bedrock/report-chunk-timing-failures

Conversation

@aikins01

@aikins01 aikins01 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

The bedrock stream wrappers dropped a failure while they recorded an output-chunk timestamp or the time to first chunk, in TypeScript and Python. The span lost that timing, and nothing reached onError. Both failures now go through the stream's existing reporter, as google-genai and litellm already do. They still don't set telemetry.dev.capture.truncated, cut the output, or raise into the caller's loop.

The reporter keeps one report per stream, so a timing failure that comes first hides a later mapping failure's report. The flag from that later failure is still set. Both READMEs now say this. TypeScript's updateSpan had only this one caller, so it's removed and the update is guarded inline.

Fixes #189

Tests run: vp test run in packages/bedrock (90 passed) and vp check, and in sdks/python-bedrock ruff, pyright, pytest (108 passed) and .github/scripts/python_dependency_bounds.sh. The new rows in each language's stream mapping-failure table fail when their report is removed.

@aikins01 aikins01 self-assigned this Nov 3, 2026
@aikins01
aikins01 merged commit 214999f into main Nov 3, 2026
10 checks passed
@aikins01
aikins01 deleted the fix/sdk-bedrock/report-chunk-timing-failures branch November 3, 2026 21:54
@aikins01 aikins01 mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sdk-bedrock: report a failure in stream chunk timing and the first-chunk update

1 participant