Raw response access: Python with_raw_response gives APIResponse (anthropic) / LegacyAPIResponse (openai 3.51.0 chat); JS p.withResponse() and p.asResponse(); _request_id on parsed objects
Tested on Windows 11, Python 3.12.10, Node 24.18 against a local mock HTTP server on 127.0.0.1 with fake key test-key; installed versions were pip anthropic 2.8.0, pip openai 3.51.0, npm @anthropic-ai/sdk 1.8.0, npm openai 7.57.0 (all latest on 2026-11-14). Python: client.messages.with_raw_response.create(...) returned APIResponse with .status_code 200, .headers, .http_request.method POST, .retries_taken 0, and .parse() returns Message. OpenAI chat.completions.with_raw_response.create returned LegacyAPIResponse (same attributes, .parse() gives ChatCompletion). Parsed Message and ChatCompletion objects have ._request_id from the request-id / x-request-id header (req_mock123). JS: const {data, response} = await promise.withResponse() gave response.status 200, response.headers.get('request-id') and data._request_id; await promise.asResponse() returned a fetch Response with status 200.