Skip to content

feat(sdks): support x-request-id#453

Merged
hittyt merged 1 commit intoalibaba:mainfrom
ninan-nn:feature/x-request-id-sdks
Mar 17, 2026
Merged

feat(sdks): support x-request-id#453
hittyt merged 1 commit intoalibaba:mainfrom
ninan-nn:feature/x-request-id-sdks

Conversation

@ninan-nn
Copy link
Collaborator

@ninan-nn ninan-nn commented Mar 16, 2026

Summary

  • Add end-to-end X-Request-ID support in SDK error surfaces so users can correlate client exceptions with server-side logs/traces.
  • Propagate request ID from HTTP response headers into SandboxApiException (and base exception where applicable) across Kotlin / Python / JavaScript / C# SDKs.
  • Align Code Interpreter SDKs to consume the updated sandbox SDK behavior.
  • Update docs and add/adjust unit + e2e tests for request-id passthrough scenarios.

Scope

  • Kotlin sandbox/code-interpreter:
    • Include requestId in API exceptions from adapters.
    • Extend exception models while keeping constructor compatibility.
    • Add compatibility and adapter tests.
  • Python sandbox/code-interpreter:
    • Add extract_request_id(...) helper and wire into API/streaming/error-conversion paths.
    • Extend exception models with request_id.
    • Bump code-interpreter dependency to opensandbox>=0.1.5.
    • Add converter/error-handling and e2e passthrough tests.
  • JavaScript sandbox:
    • Move requestId to base SandboxException and keep passthrough via SandboxApiException options.
    • Add e2e passthrough test and README examples.
  • C# sandbox:
    • Add RequestId to base SandboxException and keep derived-property compatibility on SandboxApiException.
    • Add tests and README examples.

Testing

  • Not run (explain why)
    • Local test execution was skipped in this pass; verification will be done by branch owner/CI.
  • Unit tests
  • Integration tests
  • e2e / manual verification

Breaking Changes

  • None
  • Yes (describe impact and migration path)

Checklist

  • Linked Issue or clearly described motivation
  • Added/updated docs (if needed)
  • Added/updated tests (if needed)
  • Security impact considered
  • Backward compatibility considered

Linked Issue

Follow-up

  • execd side still needs X-Request-ID support to complete end-to-end propagation consistency across all layers.

Reference

@ninan-nn ninan-nn force-pushed the feature/x-request-id-sdks branch 3 times, most recently from c129e76 to 5d3d55e Compare March 16, 2026 08:01
@ninan-nn ninan-nn marked this pull request as ready for review March 16, 2026 08:02
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d3d55e737

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@ninan-nn ninan-nn force-pushed the feature/x-request-id-sdks branch from 5d3d55e to 33427ed Compare March 16, 2026 08:32
Pangjiping
Pangjiping previously approved these changes Mar 16, 2026
Copy link
Collaborator

@Pangjiping Pangjiping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Pangjiping Pangjiping added feature New feature or request sdks labels Mar 16, 2026
Copy link
Collaborator

@hittyt hittyt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hittyt hittyt merged commit cac4950 into alibaba:main Mar 17, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request sdks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants