feat: expose request IDs - #352
Merged
Merged
Conversation
jbeckwith-oai
marked this pull request as ready for review
August 10, 2026 18:57
Contributor
apcha-oai
reviewed
Aug 10, 2026
apcha-oai
reviewed
Aug 10, 2026
apcha-oai
approved these changes
Aug 10, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
x-request-idas_request_idon successful typed model and paginated responsesrequest_idon API errorsWhy
The Ruby SDK retained response headers at the transport boundary but discarded them while coercing successful responses into typed objects. Errors retained their headers but required callers to inspect the header hash manually. This left Ruby behind the other official SDKs for request-ID convenience and made production troubleshooting harder.
Request IDs are response metadata, so they are attached only to the top-level returned object and are excluded from
to_h, JSON, and YAML serialization.Validation
./scripts/teston Ruby 4.0.6 — 518 runs, 1702 assertions./scripts/teston Ruby 3.3.12 — 518 runs, 1702 assertionsbundle exec rake lint:rubocop— 2596 files, no offensesbundle exec rake typecheck:sorbetbundle exec rake validate:rbs— 1211 filesbundle exec rake build:gemSurface gap: https://openai-sdk-surface-atlas.openai.chatgpt.site/?capability=request-id#matrix