Skip to content

feat(api): type Managed Agents budget events - #4284

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

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

Conversation

@markstuart-oai

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

Copy link
Copy Markdown
Contributor

Summary

Adds typed budget notifications to Managed Agents session streams.

Changes

  • Accept None for spend_control.limit on uncapped sessions.
  • Expose AgentSessionBudgetReachedEvent and the budget_reached session status.
  • Result collection has been stopping at a matching budget event before the first root turn or after a finished root turn. During an active root turn it has been continuing to read.

Verification

The offline replay has been covering sync and async creation and subscription with named and unnamed SSE frames. Each stream has been yielding the typed error followed by agent.session.budget_reached. The tests have been checking both numeric and explicit-null limits. The sync and async result tests have been checking that collection stops at the budget event after an error, before reading the next event.

@markstuart-oai
markstuart-oai requested a review from a team as a code owner November 17, 2026 20:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 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-17T20:23:24.882004Z 7262ccb Draft marked ready
🔒 Security Review ✅ Completed 2026-11-17T20:23:38.619100Z 7262ccb 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 marked this pull request as draft November 17, 2026 20:15
Castiron-Internal-PR: openai/openai-python-internal#433
Castiron-Source-SHA: a19949c27880a103333743f8228d3475eb2f1151
Castiron-Public-Base-SHA: 793cb76
@markstuart-oai
markstuart-oai force-pushed the castiron/promotions/pr-433 branch from c7975d7 to 7262ccb Compare November 17, 2026 20:19
@markstuart-oai
markstuart-oai marked this pull request as ready for review November 17, 2026 20:22

@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 the typed budget event, nullable spending limit, session filtering, and creation/follow-up result boundaries. Matching budget pauses terminate observation before the first turn or after a terminal turn; active-turn snapshots continue collecting. The public changed files match the corrected internal candidate. No findings.

Hosted checks at review: 9 skipped, 17 success. Static review with independent subagent review; no candidate code or local tests executed.

@markstuart-oai
markstuart-oai added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit c5da68a Nov 17, 2026
26 checks passed
@markstuart-oai
markstuart-oai deleted the castiron/promotions/pr-433 branch November 17, 2026 22:30
@openai-sdks openai-sdks Bot mentioned this pull request Nov 17, 2026
gh-actions-shared Bot pushed a commit to xf-qubit/openai-python that referenced this pull request Nov 17, 2026
Automated Release PR
---


##
[3.54.0](openai/openai-python@v3.53.0...v3.54.0)
(2026-11-17)


### Features

* **api:** type Managed Agents budget events
([openai#4284](openai#4284))
([c5da68a](openai@c5da68a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
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