Skip to content

feat(api): add billing_not_active session error code - #2911

Merged
jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-262
Oct 10, 2026
Merged

jbeckwith-oai merged 1 commit into
mainfrom
castiron/promotions/pr-262

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

Adds billing_not_active to session-turn error codes.

Changes

  • Recognize the session error code for accounts whose billing is not active.

Castiron-Internal-PR: openai/openai-node-internal#262
Castiron-Source-SHA: e6736fc76585545378390f293ba03bcdabac4161
Castiron-Public-Base-SHA: b5c7300
@jbeckwith-oai
jbeckwith-oai marked this pull request as ready for review October 10, 2026 22:34
@jbeckwith-oai
jbeckwith-oai requested a review from a team as a code owner October 10, 2026 22:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 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-10-10T22:36:05.563174Z c9c4230 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-10T22:37:30.024442Z c9c4230 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 Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: b5c73007569ec7aa3654a35e6693e8725a40545a.

✅ No new custom-code files detected.

50 mixed files remain; 0 existing customizations changed; 1 generated baselines changed.

Compared b5c73007569e → c9c423025284. Generated baselines verified.

File Result Current custom patch
src/resources/beta/agents/agents.ts Generated baseline changed +10 / −7
49 existing customizations unchanged
  • api.md
  • scripts/castiron/CUSTOM_CODE.md
  • scripts/castiron/custom_code_budget.py
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_budget.py
  • src/client.ts
  • src/resources/audio/transcriptions.ts
  • src/resources/audio/translations.ts
  • src/resources/beta/agents/environments/environments.ts
  • src/resources/beta/agents/environments/files.ts
  • src/resources/beta/agents/sessions/artifacts.ts
  • src/resources/beta/agents/sessions/sessions.ts
  • src/resources/beta/assistants.ts
  • src/resources/beta/beta.ts
  • src/resources/beta/index.ts
  • src/resources/beta/responses/internal-base.ts
  • src/resources/beta/responses/responses.ts
  • src/resources/beta/responses/ws-base.ts
  • src/resources/beta/responses/ws.ts
  • src/resources/beta/threads/index.ts
  • src/resources/beta/threads/runs/index.ts
  • src/resources/beta/threads/runs/runs.ts
  • src/resources/beta/threads/threads.ts
  • src/resources/chat/completions/completions.ts
  • src/resources/chat/completions/index.ts
  • src/resources/conversations/index.ts
  • src/resources/embeddings.ts
  • src/resources/files.ts
  • src/resources/fine-tuning/checkpoints/permissions.ts
  • src/resources/images.ts
  • src/resources/live/forks/ws-base.ts
  • src/resources/live/forks/ws.ts
  • src/resources/live/sideband/ws-base.ts
  • src/resources/live/sideband/ws.ts
  • src/resources/live/ws-base.ts
  • src/resources/live/ws.ts
  • src/resources/responses/internal-base.ts
  • src/resources/responses/responses.ts
  • src/resources/responses/ws-base.ts
  • src/resources/responses/ws.ts

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

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

git fetch --no-tags origin b5c73007569ec7aa3654a35e6693e8725a40545a c9c423025284addf9f9981341b6c71af0993b311
python3 scripts/castiron/custom_code_report.py report \
  --base b5c73007569ec7aa3654a35e6693e8725a40545a \
  --head c9c423025284addf9f9981341b6c71af0993b311 --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-c9c423025284
cat /tmp/castiron-custom-code-c9c423025284/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 Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 6.159s for Node SDK PR #2911.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 128ms
tests/chat-completions-create.test.ts ✅ Passed 123ms
tests/chat-completions-stream.test.ts ✅ Passed 100ms
tests/files-content-binary.test.ts ✅ Passed 76ms
tests/files-create-multipart.test.ts ✅ Passed 74ms
tests/files-list-pagination.test.ts ✅ Passed 84ms
tests/initialize-config.test.ts ✅ Passed 82ms
tests/instance-isolation.test.ts ✅ Passed 56ms
tests/models-list.test.ts ✅ Passed 73ms
tests/responses-background-lifecycle.test.ts ✅ Passed 95ms
tests/responses-body-method-errors.test.ts ✅ Passed 163ms
tests/responses-cancel-timeout.test.ts ✅ Passed 179ms
tests/responses-cancel.test.ts ✅ Passed 92ms
tests/responses-compact-retries.test.ts ✅ Passed 125ms
tests/responses-compact.test.ts ✅ Passed 114ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 82ms
tests/responses-create-advanced.test.ts ✅ Passed 87ms
tests/responses-create-disconnect.test.ts ✅ Passed 980ms
tests/responses-create-errors.test.ts ✅ Passed 103ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 82ms
tests/responses-create-retries.test.ts ✅ Passed 161ms
tests/responses-create-stream-failures.test.ts ✅ Passed 72ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 2.107s
tests/responses-create-stream-wire.test.ts ✅ Passed 950ms
tests/responses-create-stream.test.ts ✅ Passed 70ms
tests/responses-create-terminal-states.test.ts ✅ Passed 143ms
tests/responses-create-timeout.test.ts ✅ Passed 197ms
tests/responses-create.test.ts ✅ Passed 104ms
tests/responses-delete.test.ts ✅ Passed 168ms
tests/responses-input-items-errors.test.ts ✅ Passed 112ms
tests/responses-input-items-list.test.ts ✅ Passed 114ms
tests/responses-input-items-options.test.ts ✅ Passed 113ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 170ms
tests/responses-input-tokens-count.test.ts ✅ Passed 109ms
tests/responses-malformed-inputs.test.ts ✅ Passed 571ms
tests/responses-not-found-errors.test.ts ✅ Passed 196ms
tests/responses-parse.test.ts ✅ Passed 106ms
tests/responses-retrieve-retries.test.ts ✅ Passed 124ms
tests/responses-retrieve.test.ts ✅ Passed 122ms
tests/responses-stored-method-errors.test.ts ✅ Passed 304ms
tests/retry-behavior.test.ts ✅ Passed 2.749s
tests/sdk-error-shape.test.ts ✅ Passed 111ms

View OkTest run #38091955826

SDK merge (6573c7988865) · head (c9c423025284) · base (b5c73007569e) · OkTest (57341bb8c17e)

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Oct 10, 2026

@markstuart-oai markstuart-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 all 3 changed files at c9c423025284addf9f9981341b6c71af0993b311 against b5c73007569ec7aa3654a35e6693e8725a40545a. No actionable findings.

The change adds billing_not_active and its description while preserving all 22 existing error codes. The TypeScript union and documentation match the updated schema. Static comparisons confirm that the remaining schema and declarations are unchanged, and the transformed-schema hashes match.

Current-head CI is green. Validation used source inspection, static comparisons and hosted CI. I did not run repository tests or generation.

Merged via the queue into main with commit ee3f743 Oct 10, 2026
63 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the castiron/promotions/pr-262 branch October 10, 2026 22:46
@openai-sdks openai-sdks Bot mentioned this pull request Oct 10, 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