Skip to content

feat(api): add OCI external-storage provider support - #4060

Merged
jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-237
Oct 11, 2026
Merged

jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-237

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

Adds OCI to external-storage provider requests and responses.

Changes

  • Configure an OCI provider with its tenancy OCID, region, and bucket.
  • Recognize OCI alongside existing AWS, Azure, and GCP providers.

@jbeckwith-oai
jbeckwith-oai marked this pull request as ready for review October 11, 2026 20:31
@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner October 11, 2026 20:31
@jbeckwith-oai

Copy link
Copy Markdown
Contributor Author

Review follow-up before merge: the OCI response schema currently produces separate endpoint-local classes for configuration responses and external-storage audit events. AWS, Azure, and GCP use shared exported response models. Please assess the requested shared OciExternalStorageProvider model/export for equivalent usability across both surfaces. This remains open; promotion does not treat it as resolved.

Offline checks passed for Python sync/async OCI create requests, configuration response decoding, and audit-log OCI discriminator selection. No runtime or authentication changes are included.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T22:24:30.878310Z 2e46996 New commits
🔒 Security Review ✅ Completed 2026-10-11T22:25:02.796772Z 2e46996 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openai-sdks

openai-sdks Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 9.247s for Python SDK PR #4060.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 260ms
tests/chat-completions-create.test.ts ✅ Passed 211ms
tests/chat-completions-stream.test.ts ✅ Passed 262ms
tests/files-content-binary.test.ts ✅ Passed 220ms
tests/files-create-multipart.test.ts ✅ Passed 237ms
tests/files-list-pagination.test.ts ✅ Passed 294ms
tests/initialize-config.test.ts ✅ Passed 193ms
tests/instance-isolation.test.ts ✅ Passed 164ms
tests/models-list.test.ts ✅ Passed 214ms
tests/responses-background-lifecycle.test.ts ✅ Passed 164ms
tests/responses-body-method-errors.test.ts ✅ Passed 285ms
tests/responses-cancel-timeout.test.ts ✅ Passed 209ms
tests/responses-cancel.test.ts ✅ Passed 185ms
tests/responses-compact-retries.test.ts ✅ Passed 353ms
tests/responses-compact.test.ts ✅ Passed 335ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 231ms
tests/responses-create-advanced.test.ts ✅ Passed 222ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.216s
tests/responses-create-errors.test.ts ✅ Passed 284ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 492ms
tests/responses-create-retries.test.ts ✅ Passed 226ms
tests/responses-create-stream-failures.test.ts ✅ Passed 223ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 235ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.038s
tests/responses-create-stream.test.ts ✅ Passed 389ms
tests/responses-create-terminal-states.test.ts ✅ Passed 253ms
tests/responses-create-timeout.test.ts ✅ Passed 210ms
tests/responses-create.test.ts ✅ Passed 330ms
tests/responses-delete.test.ts ✅ Passed 251ms
tests/responses-input-items-errors.test.ts ✅ Passed 510ms
tests/responses-input-items-list.test.ts ✅ Passed 341ms
tests/responses-input-items-options.test.ts ✅ Passed 275ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 276ms
tests/responses-input-tokens-count.test.ts ✅ Passed 222ms
tests/responses-malformed-inputs.test.ts ✅ Passed 1.042s
tests/responses-not-found-errors.test.ts ✅ Passed 280ms
tests/responses-parse.test.ts ✅ Passed 247ms
tests/responses-retrieve-retries.test.ts ✅ Passed 206ms
tests/responses-retrieve.test.ts ✅ Passed 244ms
tests/responses-stored-method-errors.test.ts ✅ Passed 435ms
tests/retry-behavior.test.ts ✅ Passed 3.061s
tests/sdk-error-shape.test.ts ✅ Passed 273ms

View OkTest run #38180165760

SDK merge (852aa4cbf757) · head (2e469968e0f3) · base (b5702792a0ad) · OkTest (56d7bfc8ad08)

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: b5702792a0adb1e86a8b51709e935c1e0acde727.

✅ No new custom-code files detected.

50 mixed files remain; 0 existing customizations changed; 1 generated baselines changed.

Compared b5702792a0ad → 2e469968e0f3. Generated baselines verified.

File Result Current custom patch
api.md Generated baseline changed +119 / −0
49 existing customizations unchanged
  • scripts/castiron/custom_code_budget.py
  • scripts/castiron/test_custom_code_github.py
  • scripts/castiron/test_custom_code_publication.py
  • scripts/castiron/test_custom_code_report.py
  • src/openai/init.py
  • src/openai/_client.py
  • src/openai/resources/audio/transcriptions.py
  • src/openai/resources/audio/translations.py
  • src/openai/resources/beta/agents/environments/files.py
  • src/openai/resources/beta/agents/sessions/artifacts.py
  • src/openai/resources/beta/agents/sessions/sessions.py
  • src/openai/resources/beta/beta.py
  • src/openai/resources/beta/responses/responses.py
  • src/openai/resources/beta/threads/runs/runs.py
  • src/openai/resources/beta/threads/threads.py
  • src/openai/resources/chat/completions/completions.py
  • src/openai/resources/embeddings.py
  • src/openai/resources/files.py
  • src/openai/resources/live/forks.py
  • src/openai/resources/live/live.py
  • src/openai/resources/live/sideband.py
  • src/openai/resources/realtime/api.md
  • src/openai/resources/realtime/realtime.py
  • src/openai/resources/responses/responses.py
  • src/openai/resources/uploads/uploads.py
  • src/openai/resources/vector_stores/file_batches.py
  • src/openai/resources/vector_stores/files.py
  • src/openai/resources/videos.py
  • src/openai/resources/webhooks/init.py
  • src/openai/resources/webhooks/webhooks.py
  • src/openai/types/beta/agent_session_message.py
  • src/openai/types/chat/init.py
  • src/openai/types/chat/chat_completion_message_tool_call.py
  • src/openai/types/fine_tuning/fine_tuning_job_integration.py
  • src/openai/types/realtime/conversation_item_input_audio_transcription_delta_event.py
  • src/openai/types/realtime/realtime_error_event.py
  • src/openai/types/responses/init.py
  • src/openai/types/responses/response.py
  • src/openai/types/responses/response_function_web_search.py
  • src/openai/types/responses/response_function_web_search_param.py

9 more in the full report.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download the exact patch produced by this run (requires repository access):

gh run download 38180190669 --repo openai/openai-python \
  --name castiron-custom-code-38180190669-1 --dir /tmp/castiron-custom-code-38180190669-1
git apply --stat /tmp/castiron-custom-code-38180190669-1/custom-code.patch
cat /tmp/castiron-custom-code-38180190669-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin b5702792a0adb1e86a8b51709e935c1e0acde727 2e469968e0f38b7d71df1c403f5ed0c839e9e297
python3 scripts/castiron/custom_code_report.py report \
  --base b5702792a0adb1e86a8b51709e935c1e0acde727 \
  --head 2e469968e0f38b7d71df1c403f5ed0c839e9e297 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-2e469968e0f3
cat /tmp/castiron-custom-code-2e469968e0f3/custom-code.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

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

Copy link
Copy Markdown

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: 2cf249792d

ℹ️ 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".

Comment thread src/openai/types/admin/organization/external_storage_configuration.py Outdated

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed all 5 changed files at 2cf249792d64bf02fb2f412a64e0bae7bf70dbf0. Approval withheld for the response-model split.

The OCI configuration and audit-log response unions use two different Python classes for the same response schema. I independently confirmed the existing P2 finding: a handler typed for the configuration provider, or an isinstance check against its OCI class, cannot handle the OCI audit provider as it handles AWS, Azure, and GCP. Generate and export one shared OCI response model and use it in both unions; keep the request TypedDict separate. I have not duplicated the inline comment.

Request fields, discriminator values, sync/async transform paths, and existing providers otherwise match the schema.

I verified the full diff, immutable source hashes, merge base, and matching schema changes across all four SDK candidates. Exact-head CI reports 18 successful and 10 skipped checks, with no failing or pending checks reported. This was a source-only review; I did not run tests, builds, generation, or SDK execution.

@yoni-oai yoni-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the complete change; the existing OCI response-model compatibility finding remains actionable, so approval is withheld.

@jbeckwith-oai
jbeckwith-oai force-pushed the castiron/promotions/pr-237 branch from 2cf2497 to f2f2323 Compare October 11, 2026 20:43
@jbeckwith-oai

Copy link
Copy Markdown
Contributor Author

The previous external compatibility failure was before any SDK test: OkTest run 38172542979 could not retrieve public metadata for annotated-types during image setup. The trusted policy explicitly approves that package; this PR changed neither pyproject.toml nor uv.lock. The error comes from the metadata-fetch exception path (URLError/TimeoutError), with a 60-second timeout and a 60.56-second observed failure. The underlying exception is hidden, so a transient timeout is plausible but not proven.

The test-only correction superseded the failed subject: current head is f2f232340f9464d17d887616a8cb568fea03e8e3. No manual CI retry was issued, and no approval policy, dependency, firewall, credential, allowlist, or cache was changed. The old failed report is stale for this head; the normal compatibility run for the updated head should be used.

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

Copy link
Copy Markdown

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: f2f232340f

ℹ️ 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".

Comment thread src/openai/types/admin/organization/audit_log_list_response.py Outdated
Castiron-Internal-PR: openai/openai-python-internal#237
Castiron-Source-SHA: 3f7192fdd149a176d1412b7dfe6febbeb273bb3f
Castiron-Public-Base-SHA: b570279
@jbeckwith-oai
jbeckwith-oai force-pushed the castiron/promotions/pr-237 branch from f2f2323 to 2e46996 Compare October 11, 2026 22:22
@jbeckwith-oai
jbeckwith-oai requested a review from a team October 11, 2026 22:27

@markstuart-oai markstuart-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed all nine changed files at 2e469968e0f38b7d71df1c403f5ed0c839e9e297. The earlier shared-model and audit-test findings are addressed. No actionable findings remain in this review.

Both response unions now use the same exported OciExternalStorageProvider; the request TypedDict remains separate. The committed synchronous and asynchronous transport tests cover OCI create serialization, strict configuration and audit-event parsing, concrete provider identity, admin authentication, and unknown-field round trips. Existing provider and pagination coverage remains intact.

I verified the complete diff and pinned source hashes. This was a source-only review; I did not execute tests, builds, or generation.

At inspection, the current head had 17 successful and 9 skipped checks. The current-head OkTest report also showed 236/236 SDK tests passing.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit 9eb83fe Oct 11, 2026
26 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the castiron/promotions/pr-237 branch October 11, 2026 22:45
@openai-sdks openai-sdks Bot mentioned this pull request Oct 11, 2026
@jbeckwith-oai

Copy link
Copy Markdown
Contributor Author

Post-merge CI diagnosis for main 9eb83fe4649af0104d22da460007773a6c07119e:

The failing assertion is the fixture cleanup's len(sockets) == 1 (observed 0), not a new unexpected WebSocket send error. The RuntimeError("...not active") is explicitly expected by the test after closing during paused serialization.

The fixture records connections only when its server handler begins; the client closes as soon as the iterable pauses, without a handler-entry barrier. In the pinned websockets 15.0.1 server, the handshake completes before the OPEN-state assertion and handler invocation. A close/handler-start scheduling race is consistent with the zero recorded connections. This is a supported hypothesis, not a proven exact interleaving.

Evidence: the test and runtime blobs match pre-OCI main byte-for-byte (f5fe69dd585644dbd3b89bb4daaeeaf7fd52d2d5, 3b8bac95c657b4b977477c1330a4356fdae9c57e). The same merged commit's queue job passed: https://github.com/openai/openai-python/actions/runs/38181385935/job/114594542217 . Both jobs used Python 3.10.22, Pydantic 1.10.26 in the v1 pass, websockets 15.0.1, four pytest workers, and the same runner image version. The focused unchanged test also passed locally once on Python 3.10.16/Pydantic 2.12.5/websockets 15.0.1; that local environment does not reproduce the full CI setup.

Requested one retry of only the failed Python 3.10 job: https://github.com/openai/openai-python/actions/runs/38181680650/job/114595428732 . No code, assertions, timing thresholds, dependencies, credentials, or policies changed. If the failure recurs, stop for separate concurrency/test scope instead of retrying again.

@jbeckwith-oai

Copy link
Copy Markdown
Contributor Author

The single targeted retry passed on unchanged main commit 9eb83fe4649af0104d22da460007773a6c07119e: https://github.com/openai/openai-python/actions/runs/38181680650/job/114596863498 (job 114596863498, completed 2026-10-11T22:56:54Z). Only the failed Python 3.10 job was requested for rerun; previously successful job results were retained. No code/test changes or further retries were made. This is consistent with the scheduling-sensitive fixture diagnosis above; the exact failing interleaving was not proven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants