Skip to content

feat(api): expose image tool call metadata - #3826

Open
markstuart-oai wants to merge 1 commit into
mainfrom
castiron/promotions/pr-92
Open

feat(api): expose image tool call metadata#3826
markstuart-oai wants to merge 1 commit into
mainfrom
castiron/promotions/pr-92

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Add typed access to image tool call metadata and service-account API-key expiry.

Changes

  • Expose optional, nullable action, background, output format, and revised prompt on image tool calls.
  • Preserve existing quality, custom dimensions, and legacy image-call input types.
  • Add optional service-account API-key expiry controls and expiry timestamps.
  • Refresh API documentation links.

Castiron-Internal-PR: openai/openai-python-internal#92
Castiron-Source-SHA: fdee0afe5445a2fa9587c4a89791ba78beae306a
Castiron-Public-Base-SHA: 8011140
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

36 mixed files remain; 0 existing customizations changed; 20 generated baselines changed.

Compared 8011140bbeb72ddc679c56a2. Generated baselines verified.

File Result Current custom patch
src/openai/resources/audio/transcriptions.py Generated baseline changed +145 / −52
src/openai/resources/audio/translations.py Generated baseline changed +143 / −39
src/openai/resources/beta/responses/responses.py Generated baseline changed +12 / −11
src/openai/resources/beta/threads/runs/runs.py Generated baseline changed +1290 / −181
src/openai/resources/beta/threads/threads.py Generated baseline changed +390 / −7
src/openai/resources/chat/completions/completions.py Generated baseline changed +600 / −1
src/openai/resources/embeddings.py Generated baseline changed +27 / −21
src/openai/resources/files.py Generated baseline changed +26 / −0
src/openai/resources/realtime/realtime.py Generated baseline changed +65 / −32
src/openai/resources/responses/responses.py Generated baseline changed +851 / −18
src/openai/resources/uploads/uploads.py Generated baseline changed +221 / −0
src/openai/resources/vector_stores/file_batches.py Generated baseline changed +242 / −3
src/openai/resources/vector_stores/files.py Generated baseline changed +179 / −1
src/openai/types/responses/response.py Generated baseline changed +15 / −0
src/openai/types/responses/response_function_web_search.py Generated baseline changed +3 / −3
src/openai/types/responses/response_function_web_search_param.py Generated baseline changed +3 / −3
src/openai/types/responses/responses_client_event.py Generated baseline changed +30 / −0
src/openai/types/responses/responses_client_event_param.py Generated baseline changed +30 / −0
src/openai/types/responses/tool.py Generated baseline changed +5 / −0
src/openai/types/responses/tool_param.py Generated baseline changed +9 / −0
16 existing customizations unchanged
  • api.md
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • src/openai/init.py
  • src/openai/_client.py
  • src/openai/resources/beta/beta.py
  • src/openai/resources/videos.py
  • src/openai/resources/webhooks/init.py
  • src/openai/resources/webhooks/webhooks.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/responses/init.py
  • src/openai/types/webhooks/init.py
  • tests/api_resources/test_videos.py

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 34317506408 --repo openai/openai-python \
  --name castiron-custom-code-34317506408-1 --dir /tmp/castiron-custom-code-34317506408-1
git apply --stat /tmp/castiron-custom-code-34317506408-1/custom-code.patch
cat /tmp/castiron-custom-code-34317506408-1/custom-code.patch

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

git fetch --no-tags origin 8011140bbeb771d56425602950875bf87beae39e 2ddc679c56a22fb10c3b2f163daad483d9edcfcc
python3 scripts/castiron/custom_code_report.py report \
  --base 8011140bbeb771d56425602950875bf87beae39e \
  --head 2ddc679c56a22fb10c3b2f163daad483d9edcfcc --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-2ddc679c56a2
cat /tmp/castiron-custom-code-2ddc679c56a2/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

@markstuart-oai
markstuart-oai marked this pull request as ready for review September 9, 2026 06:04
@markstuart-oai
markstuart-oai requested a review from a team as a code owner September 9, 2026 06:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 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-09-09T06:07:29.608950Z 2ddc679 Draft marked ready
🔒 Security Review Completed 2026-09-09T06:09:46.259110Z 2ddc679 Draft marked ready
ℹ️ 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 Sep 9, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

236/236 SDK tests passed in 11.287s for Python SDK PR #3826.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 167ms
tests/chat-completions-create.test.ts ✅ Passed 280ms
tests/chat-completions-stream.test.ts ✅ Passed 199ms
tests/files-content-binary.test.ts ✅ Passed 188ms
tests/files-create-multipart.test.ts ✅ Passed 196ms
tests/files-list-pagination.test.ts ✅ Passed 149ms
tests/initialize-config.test.ts ✅ Passed 140ms
tests/instance-isolation.test.ts ✅ Passed 193ms
tests/models-list.test.ts ✅ Passed 278ms
tests/responses-background-lifecycle.test.ts ✅ Passed 228ms
tests/responses-body-method-errors.test.ts ✅ Passed 319ms
tests/responses-cancel-timeout.test.ts ✅ Passed 189ms
tests/responses-cancel.test.ts ✅ Passed 288ms
tests/responses-compact-retries.test.ts ✅ Passed 301ms
tests/responses-compact.test.ts ✅ Passed 203ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 123ms
tests/responses-create-advanced.test.ts ✅ Passed 355ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.18s
tests/responses-create-errors.test.ts ✅ Passed 167ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 226ms
tests/responses-create-retries.test.ts ✅ Passed 194ms
tests/responses-create-stream-failures.test.ts ✅ Passed 614ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 231ms
tests/responses-create-stream-wire.test.ts ✅ Passed 3.618s
tests/responses-create-stream.test.ts ✅ Passed 172ms
tests/responses-create-terminal-states.test.ts ✅ Passed 244ms
tests/responses-create-timeout.test.ts ✅ Passed 196ms
tests/responses-create.test.ts ✅ Passed 545ms
tests/responses-delete.test.ts ✅ Passed 217ms
tests/responses-input-items-errors.test.ts ✅ Passed 389ms
tests/responses-input-items-list.test.ts ✅ Passed 361ms
tests/responses-input-items-options.test.ts ✅ Passed 257ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 258ms
tests/responses-input-tokens-count.test.ts ✅ Passed 235ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.75s
tests/responses-not-found-errors.test.ts ✅ Passed 252ms
tests/responses-parse.test.ts ✅ Passed 385ms
tests/responses-retrieve-retries.test.ts ✅ Passed 294ms
tests/responses-retrieve.test.ts ✅ Passed 242ms
tests/responses-stored-method-errors.test.ts ✅ Passed 554ms
tests/retry-behavior.test.ts ✅ Passed 3.014s
tests/sdk-error-shape.test.ts ✅ Passed 276ms

View OkTest run #34317481313

SDK merge (3b5b9394adcf) · head (2ddc679c56a2) · base (8011140bbeb7) · OkTest (08ec4299e769)

@jbeckwith-oai jbeckwith-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 exact public promotion. Its SDK content matches the already-reviewed internal candidate, apart from the expected public generation marker. Legacy required fields and input bindings remain intact; new image metadata preserves optional/null behavior and custom sizes, service-account expiry remains optional, and exact-head CI is green.

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.

2 participants