Skip to content

feat(api): hide Managed Agents session budget controls and events - #1414

Merged
markstuart-oai merged 1 commit into
mainfrom
castiron/promotions/pr-488
Nov 18, 2026
Merged

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

Conversation

@markstuart-oai

@markstuart-oai markstuart-oai commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The SDK has been exposing Managed Agents session budget controls as public types. This update removes the alpha budget API from those types.

This is an alpha breaking change for a minor release. If your application depends on these members, stay on the previous SDK until you can remove those references. There is no replacement typed budget API in this release.

Changes

  • Session requests and responses no longer declare spend_control.
  • The public event and status types no longer declare agent.session.budget_reached or budget_reached. Code that names these members needs to change before upgrading.

This also includes the turn-error code removal from #1413. This PR supersedes that narrower change; the old PR does not need to land first.

Verification

All 139 focused Java tests and Kotlin lint have been passing. The ten open-stream probes have been covering closure after an opaque budget event for sync, async and handler callers; unrelated or malformed events have not been ending the wait. Reflection has been confirming that the former public budget event, status member and spend-control accessors are absent.

@markstuart-oai
markstuart-oai requested a review from a team as a code owner November 18, 2026 04:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T08:00:08.828353Z 3a88df0 New commits
🔒 Security Review ✅ Completed 2026-11-18T08:01:12.609957Z 3a88df0 New commits
ℹ️ 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 fix(api): hide Managed Agents session budget controls and events feat(api): hide Managed Agents session budget controls and events Nov 18, 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.

No actionable code findings at this commit. Reviewed the intentional removal of the alpha spending controls, budget event/status types, and turn-error member across generated models, request surfaces, schema, and exports. Unknown union values preserve their raw JSON. The stream support and collector recognize opaque budget frames using nonempty matching session IDs, retain selected-turn ordering, and preserve incomplete-stream handling across sync, async, and handler surfaces. Reviewed the relevant regression coverage and verified generated hashes and public/internal changed-file parity.

Hosted CI at publication: 4 success, 2 in_progress. Static review with independent review; no candidate code or local tests executed.

Copy link
Copy Markdown
Contributor Author

SDK-owner compatibility review: the API compatibility job has been compiling historical callers. Its errors all trace to the intentionally removed session spendControl fields/types or the named budgetReached event/status; no unrelated removed API surfaced. The current SDK build, 139 focused tests, and ten open-stream probes have been passing.

This is an intentional alpha break, not a claim of binary/source compatibility. I haven't been altering the trusted baseline policy or skipping the check. Please advise whether this should wait on a separately reviewed exception.

Copy link
Copy Markdown
Contributor Author

@jbeckwith-oai @yoni-oai — now that OkTest has passed, could an SDK owner please explicitly approve or decline a one-time compatibility exception for fe81e248? This would cover only the historical compilation failure and its CI / required rollup. All 123 diagnostics traced to the intentionally removed alpha spendControl and budgetReached APIs or follow-on type errors; the current SDK tests passed. Existing callers of those APIs will stop compiling.

Please record the decision here without merging yet. If this change needs a separate policy PR, please say so; we can preserve coverage for the rest of the SDK. This request does not extend to any new failure or changed head.

Copy link
Copy Markdown
Contributor Author

There is now a path to a normal green compatibility check, without force-merging: #1416. That PR asks the SDK owners to accept this exact alpha API migration. It leaves compilation enabled, and falls back to the original historical callers for any other test-tree pair. I ran the compatibility check locally against fe81e248: it passed with that policy, while an unrelated broken caller still failed to compile.

Please review the exception on #1416. Once it lands, #1414 needs to pick up the policy and pass CI before merging. The green local run doesn't change this PR's current red GitHub check.

Castiron-Internal-PR: openai/openai-java-internal#488
Castiron-Source-SHA: ffed27f4cdbfaeb810580ad2acbddb3ca53b25bb
Castiron-Public-Base-SHA: 30b0997

@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.

Re-review: approved at 3a88df08039b4916ae367766875fa7a3310c402c. The budget-removal runtime and test blobs are unchanged from the prior reviewed revision. The refresh incorporates the landed CSAM models and compatibility policy; verified the actual before/after test-tree IDs match that policy exactly. Public and internal changes have identical file blobs. Schema and generated-manifest additions preserve the reviewed rollback. Consolidated an independent static review; no new actionable findings.

This remains the documented intentional alpha source break. The separately landed policy supplies the narrowly scoped historical-test migration; this review does not waive normal checks.

Hosted checks at publication: {'in_progress': 7, 'queued': 1, 'success': 5}. Unfinished checks remain pending. Static review only; no candidate code or local tests executed.

VitorEAFeliciano pushed a commit to Navegos/openai-java that referenced this pull request Nov 18, 2026
…penai#1416)

Old callers of the alpha session-budget API will stop compiling after
openai#1414. That break is intentional; this PR asks the SDK owners to accept
**only that migration**. It does not make the removed methods backward
compatible.

The detector normally compiles test sources from the target branch
against the proposed SDK. For openai#1414 it uses the reviewed replacements
only when **both** the old and new test directories match their recorded
Git tree IDs. Exactly 16 test files differ, all under `beta/agents`. If
another test changes, Git's archive rules change, or the rollback is
already on the base branch, the exception does not apply. The detector
still compiles the tests and runs the signature checks. No SDK code or
CI workflow changes.

I ran the full compatibility check locally against openai#1414: it passed. The
compiler still rejected a deliberately broken call in the unrelated
`FunctionDefinition` test. I also verified that changing another test or
adding an `export-ignore` rule kept the original baseline, and that the
exception stopped applying after the rollback.

**Merge order:** review and land this policy first, then refresh openai#1414
and require its GitHub check to pass. CI loads its policy from the
target branch, so openai#1414 cannot exempt itself. Keep the rule through
openai#1414. Removing it in that PR would make CI also run the unmodified
detector against the old tests and fail again. Once openai#1414 lands, the new
baseline stops matching and a follow-up can delete the rule.

Co-authored-by: markstuart-oai <[email protected]>
@markstuart-oai
markstuart-oai added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 65fa4b4 Nov 18, 2026
14 checks passed
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