Skip to content

feat(api): correct function argument completion event fields (openapi-545) - #622

Merged
markstuart-oai merged 1 commit into
mainfrom
castiron/promotions/pr-84
Sep 4, 2026
Merged

feat(api): correct function argument completion event fields (openapi-545)#622
markstuart-oai merged 1 commit into
mainfrom
castiron/promotions/pr-84

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Removes the name model attribute from response.function_call_arguments.done to match the API response.

Changes

  • Remove the name attribute and constructor keyword from stable and beta Responses function argument completion models.
  • Update code using the removed attribute or keyword to read name from the function-call item matched by item_id.

Castiron-Internal-PR: openai/openai-ruby-internal#84
Castiron-Source-SHA: 931278fbe721d2a51987552f7bb1a31f0e3ab21c
Castiron-Public-Base-SHA: 347e659
@markstuart-oai
markstuart-oai marked this pull request as ready for review September 4, 2026 19:04
@markstuart-oai
markstuart-oai requested a review from a team as a code owner September 4, 2026 19:04
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 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-04T19:06:32.134478Z 0484d8f Draft marked ready
🔒 Security Review Completed 2026-09-04T19:06:55.636645Z 0484d8f 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.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

47 mixed files remain; 0 existing customizations changed.

Compared 347e659404bd0484d8f1a0fd. Generated baselines verified.

47 existing customizations unchanged
  • lib/openai.rb
  • lib/openai/client.rb
  • lib/openai/models/chat/chat_completion_message.rb
  • lib/openai/models/chat/chat_completion_message_function_tool_call.rb
  • lib/openai/models/chat/completion_create_params.rb
  • lib/openai/models/response_format_json_schema.rb
  • lib/openai/models/responses/function_tool.rb
  • lib/openai/models/responses/response.rb
  • lib/openai/models/responses/response_create_params.rb
  • lib/openai/models/responses/response_format_text_config.rb
  • lib/openai/models/responses/response_format_text_json_schema_config.rb
  • lib/openai/models/responses/response_function_tool_call.rb
  • lib/openai/models/responses/response_function_web_search.rb
  • lib/openai/models/responses/response_output_text.rb
  • lib/openai/models/responses/tool.rb
  • lib/openai/resources/beta/threads.rb
  • lib/openai/resources/chat/completions.rb
  • lib/openai/resources/files.rb
  • lib/openai/resources/responses.rb
  • lib/openai/resources/vector_stores/file_batches.rb
  • lib/openai/resources/vector_stores/files.rb
  • lib/openai/resources/webhooks.rb
  • rbi/openai/client.rbi
  • rbi/openai/models/chat/chat_completion_message.rbi
  • rbi/openai/models/chat/chat_completion_message_function_tool_call.rbi
  • rbi/openai/models/chat/completion_create_params.rbi
  • rbi/openai/models/response_format_json_schema.rbi
  • rbi/openai/models/responses/response.rbi
  • rbi/openai/models/responses/response_create_params.rbi
  • rbi/openai/models/responses/response_function_tool_call.rbi
  • rbi/openai/models/responses/response_function_web_search.rbi
  • rbi/openai/models/responses/response_output_text.rbi
  • rbi/openai/resources/chat/completions.rbi
  • rbi/openai/resources/files.rbi
  • rbi/openai/resources/responses.rbi
  • rbi/openai/resources/vector_stores/file_batches.rbi
  • rbi/openai/resources/vector_stores/files.rbi
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py

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

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

git fetch --no-tags origin 347e659404bd7a13de57604e325c4432c875ee60 0484d8f1a0fdf1a6999e0803fdf488fb1882c3db
python3 scripts/castiron/custom_code_report.py report \
  --base 347e659404bd7a13de57604e325c4432c875ee60 \
  --head 0484d8f1a0fdf1a6999e0803fdf488fb1882c3db --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-0484d8f1a0fd
cat /tmp/castiron-custom-code-0484d8f1a0fd/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

@openai-sdks

openai-sdks Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 12.662s for Ruby SDK PR #622.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 268ms
tests/chat-completions-create.test.ts ✅ Passed 378ms
tests/chat-completions-stream.test.ts ✅ Passed 240ms
tests/files-content-binary.test.ts ✅ Passed 342ms
tests/files-create-multipart.test.ts ✅ Passed 408ms
tests/files-list-pagination.test.ts ✅ Passed 192ms
tests/initialize-config.test.ts ✅ Passed 281ms
tests/instance-isolation.test.ts ✅ Passed 332ms
tests/models-list.test.ts ✅ Passed 411ms
tests/responses-background-lifecycle.test.ts ✅ Passed 312ms
tests/responses-body-method-errors.test.ts ✅ Passed 703ms
tests/responses-cancel-timeout.test.ts ✅ Passed 315ms
tests/responses-cancel.test.ts ✅ Passed 375ms
tests/responses-compact-retries.test.ts ✅ Passed 373ms
tests/responses-compact.test.ts ✅ Passed 379ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 191ms
tests/responses-create-advanced.test.ts ✅ Passed 272ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.096s
tests/responses-create-errors.test.ts ✅ Passed 326ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 248ms
tests/responses-create-retries.test.ts ✅ Passed 606ms
tests/responses-create-stream-failures.test.ts ✅ Passed 270ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 264ms
tests/responses-create-stream-wire.test.ts ✅ Passed 2.641s
tests/responses-create-stream.test.ts ✅ Passed 143ms
tests/responses-create-terminal-states.test.ts ✅ Passed 462ms
tests/responses-create-timeout.test.ts ✅ Passed 347ms
tests/responses-create.test.ts ✅ Passed 456ms
tests/responses-delete.test.ts ✅ Passed 406ms
tests/responses-input-items-errors.test.ts ✅ Passed 255ms
tests/responses-input-items-list.test.ts ✅ Passed 210ms
tests/responses-input-items-options.test.ts ✅ Passed 317ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 436ms
tests/responses-input-tokens-count.test.ts ✅ Passed 375ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.379s
tests/responses-not-found-errors.test.ts ✅ Passed 473ms
tests/responses-parse.test.ts ✅ Passed 240ms
tests/responses-retrieve-retries.test.ts ✅ Passed 457ms
tests/responses-retrieve.test.ts ✅ Passed 357ms
tests/responses-stored-method-errors.test.ts ✅ Passed 1.041s
tests/retry-behavior.test.ts ✅ Passed 3.112s
tests/sdk-error-shape.test.ts ✅ Passed 482ms

View OkTest run #33909270853

SDK merge (8bfed50a55d0) · head (0484d8f1a0fd) · base (347e659404bd) · OkTest (2b1bdfd25e98)

@sylvesterkaczmarek sylvesterkaczmarek 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.

The generated Ruby surface is internally consistent: the runtime models, websocket/server-event wrappers, RBI signatures, and RBS signatures all drop name together. That matters because leaving the field in only the static or wrapper layer would still make a valid terminal arguments event unusable for some consumers. item_id remains sufficient to recover the corresponding function-call identity.

@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 head. The stable and beta Responses models, websocket unions, RBI, and RBS stay consistent with the corrected contract, while function-call item and Realtime names remain unchanged. CI is green.

@markstuart-oai markstuart-oai changed the title feat(api): correct function argument completion event fields feat(api): correct function argument completion event fields (openapi-545) Sep 4, 2026
@markstuart-oai
markstuart-oai added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit 06e2c91 Sep 4, 2026
24 checks passed
@markstuart-oai
markstuart-oai deleted the castiron/promotions/pr-84 branch September 4, 2026 21:08
@openai-sdks openai-sdks Bot mentioned this pull request Sep 4, 2026
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