1.0.0-beta.4 (2026-04-22)
Features Added
- 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. - All endpoints now return the
x-request-idresponse header for request correlation (via Core
RequestIdMiddleware). Value is resolved from OTEL trace ID → incomingx-request-idheader → GUID. - Error responses (
ApiErrorResponse) are automatically enriched witherror.additionalInfo.request_id
matching thex-request-idresponse header value, enabling client-side error correlation. - Persistence failure resilience — when storage operations fail, responses now complete gracefully
withstatus: "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.failed
carryingerror_code="storage_error". Synchronous persistence failures return HTTP 500 with the
storage error details.
Bugs Fixed
- Fixed
InvalidOperationException: Response was not setcrash inFoundryStorageLoggingPolicywhen
a transport-level failure (DNS resolution, connection refused, timeout) occurs before any HTTP
response is received. These failures are now logged atErrorlevel without triggering the
logging crash, and the original transport exception continues to propagate. - Fixed
GetInputExpandednot normalizing string content shorthand onItemMessage. When
contentis a plain JSON string (e.g.,"Hello"), it is now auto-expanded to the canonical
array form ([{"type":"input_text","text":"Hello"}]) so thatItemMessage.ContentBinaryData
is always consistent regardless of input format.
Other Changes
- Removed
x-ms-request-idfrom Foundry storage logging (unused service header). - Migrated header name constants to use
PlatformHeadersfrom Core package instead of
localprivate constdeclarations.