Skip to content

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

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

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

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Expose image tool call metadata through model accessors and support 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-ruby-internal#99
Castiron-Source-SHA: 55d93127d5463681e582bdf4f07676b087b26720
Castiron-Public-Base-SHA: acf5db8
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

Mixed files: 65 → 68

3 newly customized · 0 customizations removed · 0 existing customizations changed · 40 generated baselines changed

Compared acf5db808c5210c23430a98b. Generated baselines verified.

File Result Current custom patch
lib/openai/models/beta/beta_response_input_item.rb Generated baseline changed +9 / −0
lib/openai/models/beta/beta_response_item.rb Generated baseline changed +9 / −0
lib/openai/models/beta/beta_response_output_item.rb Generated baseline changed +9 / −0
lib/openai/models/chat/chat_completion_message.rb Generated baseline changed +8 / −0
lib/openai/models/chat/chat_completion_message_function_tool_call.rb Generated baseline changed +8 / −0
lib/openai/models/chat/completion_create_params.rb Generated baseline changed +21 / −5
lib/openai/models/image_edit_completed_event.rb Generated baseline changed +8 / −2
lib/openai/models/image_edit_partial_image_event.rb Generated baseline changed +8 / −2
lib/openai/models/image_gen_completed_event.rb Generated baseline changed +8 / −2
lib/openai/models/image_gen_partial_image_event.rb Generated baseline changed +8 / −2
lib/openai/models/images_response.rb Generated baseline changed +8 / −2
lib/openai/models/response_format_json_schema.rb Generated baseline changed +10 / −2
lib/openai/models/responses/function_tool.rb Generated baseline changed +8 / −1
lib/openai/models/responses/response.rb Generated baseline changed +21 / −0
lib/openai/models/responses/response_create_params.rb Generated baseline changed +9 / −1
lib/openai/models/responses/response_format_text_config.rb Generated baseline changed +6 / −0
lib/openai/models/responses/response_format_text_json_schema_config.rb Generated baseline changed +11 / −3
lib/openai/models/responses/response_function_tool_call.rb Generated baseline changed +8 / −0
lib/openai/models/responses/response_function_web_search.rb Generated baseline changed +5 / −5
lib/openai/models/responses/response_output_text.rb Generated baseline changed +8 / −0
lib/openai/models/responses/tool.rb Generated baseline changed +2 / −0
lib/openai/resources/beta/threads.rb Generated baseline changed +4 / −0
lib/openai/resources/chat/completions.rb Generated baseline changed +42 / −0
lib/openai/resources/containers/files.rb Generated baseline changed +1 / −0
lib/openai/resources/files.rb Generated baseline changed +39 / −0
lib/openai/resources/responses.rb Generated baseline changed +201 / −2
lib/openai/resources/vector_stores/file_batches.rb Generated baseline changed +185 / −1
lib/openai/resources/vector_stores/files.rb Generated baseline changed +195 / −1
rbi/openai/models/chat/chat_completion_message.rbi Generated baseline changed +4 / −0
rbi/openai/models/chat/completion_create_params.rbi Generated baseline changed +79 / −41
rbi/openai/models/response_format_json_schema.rbi Generated baseline changed +24 / −11
rbi/openai/models/responses/response.rbi Generated baseline changed +5 / −0
rbi/openai/models/responses/response_create_params.rbi Generated baseline changed +10 / −1
rbi/openai/models/responses/response_function_tool_call.rbi Generated baseline changed +4 / −0
rbi/openai/models/responses/response_function_web_search.rbi Generated baseline changed +23 / −27
rbi/openai/resources/chat/completions.rbi Generated baseline changed +26 / −17
rbi/openai/resources/files.rbi Generated baseline changed +18 / −0
rbi/openai/resources/responses.rbi Generated baseline changed +301 / −16
rbi/openai/resources/vector_stores/file_batches.rbi Generated baseline changed +93 / −0
rbi/openai/resources/vector_stores/files.rbi Generated baseline changed +113 / −0
28 existing customizations unchanged
  • lib/openai.rb
  • lib/openai/client.rb
  • lib/openai/models/audio/transcription_create_response.rb
  • lib/openai/resources/webhooks.rb
  • rbi/openai/client.rbi
  • rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi
  • rbi/openai/models/image_edit_completed_event.rbi
  • rbi/openai/models/image_edit_partial_image_event.rbi
  • rbi/openai/models/image_gen_completed_event.rbi
  • rbi/openai/models/image_gen_partial_image_event.rbi
  • rbi/openai/models/images_response.rbi
  • rbi/openai/models/responses/response_output_text.rbi
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py
  • sig/openai/client.rbs
  • sig/openai/models/image_edit_completed_event.rbs
  • sig/openai/models/image_edit_partial_image_event.rbs
  • sig/openai/models/image_gen_completed_event.rbs
  • sig/openai/models/image_gen_partial_image_event.rbs
  • sig/openai/models/images_response.rbs
  • sig/openai/models/responses/response.rbs
  • sig/openai/models/responses/response_function_web_search.rbs
  • sig/openai/resources/files.rbs
  • sig/openai/resources/responses.rbs
  • sig/openai/resources/vector_stores/file_batches.rbs
  • sig/openai/resources/vector_stores/files.rbs
  • test/openai/resources/containers/files_test.rb

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

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

git fetch --no-tags origin acf5db808c521a1793439fe4e2975c78a9e9e73b 10c23430a98bf3ab1bb70d66a479a3c8bd813a22
python3 scripts/castiron/custom_code_report.py report \
  --base acf5db808c521a1793439fe4e2975c78a9e9e73b \
  --head 10c23430a98bf3ab1bb70d66a479a3c8bd813a22 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-10c23430a98b
cat /tmp/castiron-custom-code-10c23430a98b/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:08:42.348626Z 10c2343 Draft marked ready
🔒 Security Review Completed 2026-09-09T06:08:52.346625Z 10c2343 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 9.241s for Ruby SDK PR #690.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 182ms
tests/chat-completions-create.test.ts ✅ Passed 233ms
tests/chat-completions-stream.test.ts ✅ Passed 152ms
tests/files-content-binary.test.ts ✅ Passed 212ms
tests/files-create-multipart.test.ts ✅ Passed 147ms
tests/files-list-pagination.test.ts ✅ Passed 174ms
tests/initialize-config.test.ts ✅ Passed 94ms
tests/instance-isolation.test.ts ✅ Passed 168ms
tests/models-list.test.ts ✅ Passed 169ms
tests/responses-background-lifecycle.test.ts ✅ Passed 239ms
tests/responses-body-method-errors.test.ts ✅ Passed 402ms
tests/responses-cancel-timeout.test.ts ✅ Passed 227ms
tests/responses-cancel.test.ts ✅ Passed 234ms
tests/responses-compact-retries.test.ts ✅ Passed 234ms
tests/responses-compact.test.ts ✅ Passed 256ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 145ms
tests/responses-create-advanced.test.ts ✅ Passed 227ms
tests/responses-create-disconnect.test.ts ✅ Passed 152ms
tests/responses-create-errors.test.ts ✅ Passed 333ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 174ms
tests/responses-create-retries.test.ts ✅ Passed 156ms
tests/responses-create-stream-failures.test.ts ✅ Passed 166ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 220ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.04s
tests/responses-create-stream.test.ts ✅ Passed 114ms
tests/responses-create-terminal-states.test.ts ✅ Passed 359ms
tests/responses-create-timeout.test.ts ✅ Passed 252ms
tests/responses-create.test.ts ✅ Passed 238ms
tests/responses-delete.test.ts ✅ Passed 150ms
tests/responses-input-items-errors.test.ts ✅ Passed 187ms
tests/responses-input-items-list.test.ts ✅ Passed 196ms
tests/responses-input-items-options.test.ts ✅ Passed 129ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 258ms
tests/responses-input-tokens-count.test.ts ✅ Passed 275ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.248s
tests/responses-not-found-errors.test.ts ✅ Passed 353ms
tests/responses-parse.test.ts ✅ Passed 175ms
tests/responses-retrieve-retries.test.ts ✅ Passed 235ms
tests/responses-retrieve.test.ts ✅ Passed 269ms
tests/responses-stored-method-errors.test.ts ✅ Passed 785ms
tests/retry-behavior.test.ts ✅ Passed 3.224s
tests/sdk-error-shape.test.ts ✅ Passed 408ms

View OkTest run #34317487348

SDK merge (e2848631ce2d) · head (10c23430a98b) · base (acf5db808c52) · 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. Existing required fields remain required; new metadata preserves optional/nil behavior and custom size strings, 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