Repository navigation
fix(agency): launched teams take an environment-routed agent's route, and a seated member keeps its own budget - #622
Conversation
…l team through launch_agency
… beside the launch's
|
Warning Review limit reached
This review includes 11 billable files and costs up to $2.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 17 minutes for your next included review. View limit details
Comment |
Reviewer's GuideThis PR fixes agency launches for environment-routed File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…ment runs on the agent's resolved provider and model
…s own budget beside its team's
…ber's own budget beside its team's
…arged to the member's own budget
…on the member's own budget beside its parent launch's
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. |
PR Summary by QodoFix launched-team routing and persistent member budgets
AI Description
Diagram
High-Level Assessment
Files changed (10)
|
Code Review by Qodo
1.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 010746a5e6
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…hreads # Conflicts: # docs/GMI.md # docs/safety/COST_OPTIMIZATION.md
…get and the member's own share by guard and id
…h bothBudgets, for a call and an outside cost
…, and the launch reports the budget that refused
…ll resolved when the environment comes to prefer another provider
…one guard and id once
…s call as the launch's budget would, and the launch names the budget that refused
… the pair the agent's persona resolved, not the environment's at launch time
Summary
Fixes the findings the automated review of #382 left open, each checked against today's master, and the three the review of this pull request raised.
launch_agencyon agmi()agent whose provider and model come from the environment. The launched team's manager, synthesizers and temporary seats run on the provider and model the agent's persona resolved, the pair its own turns send on. Before, the child agency got no provider and no model, soagency()refused aparallel,debateorhierarchicalteam and the model gotinvalid_arguments. The team stays on that pair when the environment comes to prefer another provider after the agent's first call.sessionSeat(), oragencies.membersthroughlaunch_agency) keeps its ownbudget. Each call of a seat's turn is checked against the member's budget and the budget the team's call carries, and charged to both. A team the member launches from its seat draws on both as well. A budget both draw on, such as a host budget the member's own draws on, is charged once, and so is the one spending total that budgets on one guard and onebudgetIdkeep. Before, the team's budget replaced the member's, so a member's cap was neither checked nor charged on its seat's turns, nor on the teams it launched from them.cut, the launch reportsbudget_exhausted, and itsreasonnames the cap that refused.LaunchStatus,LaunchRefusalCode,LaunchRefusal,LaunchUsageandLaunchSeatRecord.Two of the open threads on #382 were already fixed or do not apply, and are answered there. The public export of
sessionSeat()merged in #533. The abort the launch'sfinallywas asked to add is not reachable, since nothing between the start of the team's run and the abort that follows it can throw.Linked issues
Findings from the automated review of #382. No tracking issue covers them.
Type of change
How this was verified
CI only. The tests came first, in
src/api/__tests__/agency-launch-route-budgets.gmi.e2e.test.tsandsrc/api/runtime/__tests__/spendBudget.test.ts, and CI failed on each for the reason its finding names before its fix was pushed:invalid_arguments: Parallel strategy requires an agency-level model or provider for synthesis, and the seated member's own budget counted 0 tokens where 15 were expected.bothBudgets()for a call and an outside cost); the seat whose member's own token cap refused its call wasfailedwherecutwas expected; and after the environment came to prefer another provider, the team's seats and synthesizer called that provider.Migration notes
None. No public type loses a member and no default changes. A member that sets its own
budgetnow has it applied on its seat's turns and on the teams it launches from them, which is what that option documents. A launch whose seat's call a member's own budget refuses now reportsbudget_exhaustedwhere it reportedfailed.Checklist
!before the colon for a change that breaks users (feat!:orfeat(api)!:).Summary by Sourcery
Fix GMI agency launches to preserve the resolved model route and enforce member and team spending limits consistently.
Bug Fixes:
Enhancements:
Documentation:
Tests: