feat(api): update usage APIs and documentation - #566
Conversation
Castiron-Internal-PR: openai/openai-ruby-internal#70 Castiron-Source-SHA: ace532f27a83980dd9e69e364615e40eb3f3157c Castiron-Public-Base-SHA: 2359a02
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Castiron custom code✅ No new custom-code files detected. 47 mixed files remain; 0 existing customizations changed; 11 generated baselines changed. Compared
36 existing customizations unchanged
A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 33572010913 --repo openai/openai-ruby \
--name castiron-custom-code-33572010913-1 --dir /tmp/castiron-custom-code-33572010913-1
git apply --stat /tmp/castiron-custom-code-33572010913-1/custom-code.patch
cat /tmp/castiron-custom-code-33572010913-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 2359a02dd22fbf599250aaa97e755863562abf53 3390805348c2a68a3f1c821e3edf375b73a682f7
python3 scripts/castiron/custom_code_report.py report \
--base 2359a02dd22fbf599250aaa97e755863562abf53 \
--head 3390805348c2a68a3f1c821e3edf375b73a682f7 --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-3390805348c2
cat /tmp/castiron-custom-code-3390805348c2/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Blocking scope issue: the stated outcome is limited to removing the unlaunched compute_units usage fields, but this exact diff also promotes unrelated schema and public-surface changes—for example, a new organization-cost line_items filter, a new max_messages incomplete-reason value, and broad model/example/documentation updates. Those changes are not narrowly necessary for the field removal and make the patch carry behavior/API surface that the PR does not describe. Please regenerate from a baseline/config containing only the compute_units removal, or split and explicitly document/approve the broader promotion. I understand the compatibility/breaking-change checks triggered by the intentional field removal; that expected break is not this finding.
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Thanks for broadening the description. One public-surface change is still missing from the stated scope: this diff adds max_messages to the Responses/Beta Responses incomplete-reason enum/type in addition to the usage and documentation changes. That is a generated public API change, not merely a documentation refresh. Please explicitly include it in the description (or remove it) so the reviewed scope matches the exact diff.
HAYDEN-OAI
left a comment
There was a problem hiding this comment.
Reviewed the complete diff at 3390805348c2, including the intentional removal of the unlaunched compute_units field, optional organization-cost line_items filtering, stable/beta max_messages reason support, and schema/documentation updates. Checked Ruby/RBI/RBS parity, unknown response-field retention, filter omission/query encoding, admin authentication, and stable/beta reason handling.
No substantive issues found. Static source review only.
Summary
Updates organization usage filtering, Responses and Chat Completions usage types, and API documentation.
Changes
line_itemsfiltering to organization cost usage requests, allowing results to be limited to exact cost line-item namescompute_unitsfield from Responses and Chat Completions usage types