File tree Expand file tree Collapse file tree
instrumentation-genai/opentelemetry-instrumentation-openai-v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## Unreleased
99
10+ ### Fixed
11+
12+ - Fix ` AttributeError: 'StreamWrapper' object has no attribute 'headers' ` when
13+ using ` with_raw_response.create(stream=True) ` (e.g. via LiteLLM's Azure provider).
14+ ` _parse_response ` was calling ` .parse() ` on the ` LegacyAPIResponse ` before wrapping
15+ in ` StreamWrapper ` , discarding the raw HTTP headers. ` StreamWrapper ` now captures
16+ headers from the ` LegacyAPIResponse ` before it is parsed and exposes them directly,
17+ and adds a ` parse() ` method returning ` self ` so callers can treat the wrapper as
18+ a drop-in for the raw response. Also adds ` __getattr__ ` to proxy any other unknown
19+ attributes to the underlying stream. Inspired by upstream fix
20+ ([ opentelemetry-python-contrib #4184 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4184 ) ,
21+ fixes [ #4113 ] ( https://github.com/open-telemetry/opentelemetry-python-contrib/issues/4113 ) ).
22+
1023### Added
1124- ** ` SUPPRESS_LANGUAGE_MODEL_INSTRUMENTATION ` env var** — Global alternative to
1225 the per-request ` suppress_language_model_instrumentation ` OTel context key.
You can’t perform that action at this time.
0 commit comments