You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Streaming responses don't capture response_id or model_version #5812
In streaming.py, the accumulate_streaming_response() function initializes response_id and model to None (lines 53-54) but never populates them from the streaming chunks. The accumulation loop (lines 56-83) never reads chunk.response_id or chunk.model_version.
This means streaming responses will always have null for gen_ai.response.id and gen_ai.response.model.
The non-streaming path correctly captures both in utils.py:886-890:
I'd like to work on this. The fix is straightforward — extract response_id and model_version from streaming chunks in the accumulation loop, using getattr to safely handle missing attributes. I've identified the exact location in sentry_sdk/integrations/google_genai/streaming.py. Happy to submit a PR if this approach looks correct.
Activity
linear-code commentedon Mar 24, 2026
PY-2218
NIK-TIGER-BILL commentedon Mar 30, 2026
Bahtya commentedon Apr 6, 2026
I'd like to work on this. The fix is straightforward — extract
response_idandmodel_versionfrom streaming chunks in the accumulation loop, usinggetattrto safely handle missing attributes. I've identified the exact location insentry_sdk/integrations/google_genai/streaming.py. Happy to submit a PR if this approach looks correct.sentry-junior commentedon Nov 12, 2026
Reproduced in getsentry/repro#71. Draft fix #8260 was closed without merging.