Repository navigation
feat: support named data-residency endpoints - #2393
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ddf043858c
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
jbeckwith-oai
left a comment
There was a problem hiding this comment.
The existing Codex inline comment identifies one confirmed compatibility issue: AzureOpenAI inherits withOptions(Partial<ClientOptions>), so unsupported dataResidency values type-check on Azure clones even though construction always rejects them. Override withOptions with Partial<AzureClientOptions>, matching the existing Bedrock implementation, and add a focused type regression. The remainder of the regional endpoint behavior and exact-head CI are sound. Existing inline: #2393 (comment)
Castiron-Internal-PR: openai/openai-node-internal#64 Castiron-Source-SHA: 0aa6447abd0305530a272747e55e090470a88386 Castiron-Public-Base-SHA: a88c2ca
ddf0438 to
385244b
Compare
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Re-reviewed the updated exact head after the requested Azure typing fix. AzureOpenAI.withOptions now accepts Partial<AzureClientOptions>, matching the existing Bedrock ownership boundary, and the focused public regression proves unsupported regional options fail both TypeScript checking and runtime validation. Regional endpoint selection, provider conflicts, streaming, environment precedence, and client cloning remain sound. Exact-head CI is fully green; no actionable findings.
Summary
Let applications select an OpenAI regional endpoint by name instead of assembling base URLs themselves.
dataResidencysupportsglobal,us,eu, andae, and works consistently when creating or copying a client.Conflicting explicit endpoints and third-party provider combinations fail locally. The selected endpoint does not change project eligibility or provide regional fallback.
The Azure clone-typing review finding is fixed in custom code to unblock merge.
AzureOpenAI.withOptionsnow uses Azure-specific options, matching Bedrock, with a focused compile-time regression. Runtime rejection is unchanged.