Skip to content

Add project rate-limit aliases and readable units - #418

Draft
saioai wants to merge 4 commits into
mainfrom
codex/plan-exp-f32-project-rate-limits
Draft

saioai wants to merge 4 commits into
mainfrom
codex/plan-exp-f32-project-rate-limits

Conversation

@saioai

@saioai saioai commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Project rate-limit commands currently require list-rate-limits and update-rate-limit.
This adds list and update, with clearer rate units and project-specific empty results.

What changes

  • Add friendly verbs across project command routes while preserving both existing names.
  • Label returned limits as requests/minute, tokens/minute, requests/day, images/minute, audio megabytes/minute, and batch input tokens/day.
  • Keep model names, IDs, exact values, nulls, and unfamiliar fields visible.
  • Explain that batch input tokens/day differs from general tokens/day.
  • Add no general daily-token or rate-limit reset flags. Existing model and hosted-tool permission commands remain unchanged.

Readable labels also change in pipes. Explicit machine formats retain API field names and values.

Commands

New convenience names:

openai admin projects rate-limits list --project-id proj_example
openai admin projects rate-limits update --project-id proj_example --rate-limit-id rl_example --max-tokens-per-1-minute 1000

Use a rate-limit ID returned by list, and only apply an approved project change.
The colon route, admin organization projects, and projects shortcut support both verbs.
Existing list-rate-limits and update-rate-limit remain available.
Pagination flags, JSON/JSONL/YAML/raw formats, field extraction, and request overrides retain their behavior.

update --help lists supported fields. Omitted fields remain unchanged; zero and null are not reset shortcuts.

Code

pkg/custom adds command decoration before route cloning and supplies the scoped empty-result message.
pkg/transformers changes readable field labels while preserving values and unfamiliar data.
Generated request handlers, dependencies, and startup wiring remain unchanged.
The synthetic recorder reuses scripts/demos/capture_and_render.sh.

Tested

On macOS arm64, 196 focused test/subtest results passed without skips. Focused race checks, compilation, and module verification passed.
An independent observer passed 123 CLI processes, including machine-output comparisons, combined output/API failures, and copied Bash/zsh help.
Copied scripts/run examples passed twice. Local runtime checks used c900d05; later changes affect only the recorder.
The final build matches the tested binary byte-for-byte.

Required CI, CodeQL, and native help checks passed at fbcae067. The trusted budget check passed at 21/1,000 custom lines.
The local budget reporter stalled; its CI counterpart completed successfully.
Native help covered macOS Bash/zsh, Ubuntu Bash, and Windows cmd/PowerShell/pwsh, with documented platform skips.
F32-specific native Windows workflows, graphical-terminal appearance, and live Admin acceptance remain unverified.
Public daily-token and rate-limit reset contracts remain separate API decisions.

Demo

Real CLI binaries with matching synthetic local responses, recorded as macOS Bash terminal replays.
Baseline: 5739ce0. Runtime: c900d05; later commits only correct the recorder.
Dark and light 100×30, plus narrow 40×36 captures, passed assertions and independent visual inspection.
The demo shows the shorter list command, project-specific empty results, and readable rate units.

Project rate limits before and after

Before:

Before: original commands and field names

After:

After: list alias and explicit rate units

Recording recipe

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Castiron custom code

Evaluated main: 5739ce0f3a6cc5887092554a403bf53357eca9a4.

✅ No new custom-code files detected.

2 mixed files remain; 0 existing customizations changed.

Compared 5739ce0f3a6c → fbcae06752ca. Generated baselines verified.

2 existing customizations unchanged
  • pkg/cmd/adminorganizationcertificate.go
  • pkg/cmd/audiovoice.go

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

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

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

This branch has not been deployed

No deployments
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.

1 participant