Skip to content

chore(api): document throttling and model overload responses — SDK-235 - #158

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

markstuart-oai merged 1 commit into
mainfrom
castiron/promotions/pr-62

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Summary

Document client throttling and model overload responses for moderation and video commands.

Changes

  • Clarify the 429 slow_down and 503 server_is_overloaded response contracts
  • Document the optional minimum wait before retrying

Castiron-Internal-PR: openai/openai-cli-internal#62
Castiron-Source-SHA: af96ac4f9d371fda0775c8acea9493215d8785a6
Castiron-Public-Base-SHA: bf513cb
Copilot AI lite review requested due to automatic review settings September 5, 2026 07:34
@github-actions

github-actions Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Castiron custom code

✅ No new custom-code files detected.

5 mixed files remain; 0 existing customizations changed.

Compared bf513cb5a3b4 → a79f39b94e69. Generated baselines verified.

5 existing customizations unchanged
  • pkg/cmd/adminorganizationcertificate.go
  • pkg/cmd/cmd.go
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.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 33954005851 --repo openai/openai-cli \
  --name castiron-custom-code-33954005851-1 --dir /tmp/castiron-custom-code-33954005851-1
git apply --stat /tmp/castiron-custom-code-33954005851-1/custom-code.patch
cat /tmp/castiron-custom-code-33954005851-1/custom-code.patch

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

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

Copilot AI 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.

🟢 Approval recommended

The spec changes consistently reference existing shared response components and appear to align with the PR’s documentation goal without introducing code-impacting changes.

Pull request overview

Updates the OpenAPI reference used by the CLI/docs to explicitly describe throttling (429 slow_down) and model overload (503 server_is_overloaded) behaviors for Moderations and legacy Videos endpoints via shared response components.

Changes:

  • Switch Moderations and Videos endpoints’ 429 response to #/components/responses/InferenceRateLimited.
  • Add explicit 503 responses referencing #/components/responses/InferenceServiceUnavailable.
  • Refresh Castiron generation metadata to match the updated spec artifact.
File summaries
File Description
api_reference/openapi.transformed.yml Updates specific endpoints to reference the documented inference throttling and overload response components (429/503).
.castiron.stats.yml Updates generation IDs/hashes to reflect the regenerated OpenAPI artifacts.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

chatgpt-codex-connector Bot commented Sep 5, 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-05T07:43:27.704614Z a79f39b Draft marked ready
🔒 Security Review ✅ Completed 2026-09-05T07:44:29.796312Z a79f39b 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.

@markstuart-oai markstuart-oai changed the title chore(api): document throttling and model overload responses chore(api): document throttling and model overload responses — SDK-235 Sep 5, 2026

@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 exact head a79f39b against the SDK-235 scope. The change is limited to Castiron generation metadata and the transformed API reference: exactly the five intended Moderations/Videos POST operations now use InferenceRateLimited for 429 and InferenceServiceUnavailable for 503. No runtime or retry behavior changes. The CLI public/internal pair is aligned with counterpart head af96ac4f9d371fda0775c8acea9493215d8785a6; CI has no failures and no unresolved in-scope review threads.

@markstuart-oai
markstuart-oai added this pull request to the merge queue Sep 5, 2026
Merged via the queue into main with commit 76d3959 Sep 5, 2026
19 checks passed
@markstuart-oai
markstuart-oai deleted the castiron/promotions/pr-62 branch September 5, 2026 16:14
@openai-sdks openai-sdks Bot mentioned this pull request Sep 5, 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