1.0.0b5 (2026-04-22)
Features Added
- All HTTP responses now include an
x-request-idheader for request correlation. Value is resolved in priority order: OTEL trace ID → incomingx-request-idheader → new UUID. - Error responses (4xx/5xx) with a JSON
errorbody are automatically enriched witherror.additionalInfo.request_idmatching thex-request-idresponse header, enabling client-side error correlation. - Persistence failure resilience — when storage operations fail, responses now complete gracefully with
status: "failed"anderror.code: "storage_error"instead of crashing or leaving responses permanently stuck atin_progress. Covers all execution modes (streaming, background+streaming, background+non-streaming, synchronous). For streaming responses, terminal SSE events are buffered, persistence is attempted, and on failure the terminal event is replaced withresponse.failedcarryingerror_code="storage_error". Synchronous persistence failures return HTTP 500 with the storage error details. - Foundry storage logging now includes the
traceparentheader (W3C distributed trace ID) in all log messages, enabling correlation between SDK log entries and backend distributed traces.
Bugs Fixed
- Fixed crash in
FoundryStorageLoggingPolicywhen a transport-level failure (DNS resolution, connection refused, timeout) occurs before any HTTP response is received. The policy previously attempted to accessresponse.headersunconditionally, raising an unrelated exception that masked the real transport error. Transport failures are now logged at ERROR level and the original exception propagates cleanly. - Fixed
ResponseContext.get_input_text()andResponseContext.get_input_items()silently dropping text whenItemMessage.contentis a plain string. String content is now correctly expanded intoMessageContentInputTextContent.
Other Changes
- Removed
x-ms-request-idfrom Foundry storage response logging (unused service header).