@ai-sdk/[email protected]
@ai-sdk/[email protected]
ai
Release Notes
Patch Changes
77775a4: feat(mcp): expose
statusCode,url, andresponseBodyonMCPClientErrorfor HTTP transport failuresMCPClientErrornow carries structured HTTP context when it originates from the streamable HTTP transport. This lets downstream consumers (e.g. agent frameworks that need to decide whether to fall back from streamable HTTP to legacy SSE transport per the MCP spec) branch on the actual response status without parsing the error message string.Fields are optional — they remain
undefinedfor stdio transport errors and for non-response failures (network errors, aborts).