Repository navigation
feat(api): add 30-minute cache-write usage counts - #4111
Conversation
Castiron-Internal-PR: openai/openai-python-internal#293 Castiron-Source-SHA: 3f88414bf1f0e08a64642df215cb99b933363c26 Castiron-Public-Base-SHA: 6eaa90e
Castiron custom codeEvaluated main: Trusted main policy: ✅ No new custom-code files detected. 41 mixed files remain; 0 existing customizations changed. Compared 41 existing customizations unchanged
1 more in the full report. 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 39300344471 --repo openai/openai-python \
--name castiron-custom-code-39300344471-1 --dir /tmp/castiron-custom-code-39300344471-1
git apply --stat /tmp/castiron-custom-code-39300344471-1/custom-code.patch
cat /tmp/castiron-custom-code-39300344471-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 6eaa90ee20b40bbe84a5b1a5031d7cf672c7d368 100fe43e882ab9d7af31322af116b8f8776b807f
python3 scripts/castiron/custom_code_report.py report \
--base 6eaa90ee20b40bbe84a5b1a5031d7cf672c7d368 \
--head 100fe43e882ab9d7af31322af116b8f8776b807f --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-100fe43e882a
cat /tmp/castiron-custom-code-100fe43e882a/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
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. |
markstuart-oai
left a comment
There was a problem hiding this comment.
Reviewed 100fe43e882ab9d7af31322af116b8f8776b807f.
The new cache-write counter stays optional and nullable across the generated response models. The focused tests cover positive, zero, null and omitted values through completions and Decisions, using both sync and async clients while preserving the existing counters.
No blocking findings. Source review only; I did not run the code or tests locally. Observed checks for this commit passed or were skipped.
Summary
Expose 30-minute cache-write token counts in completions and Decisions usage results.
Changes
Validation