Allow AI for all plans provided they have autoreload enabled#11420
Conversation
| /// 3. user has bonus grants (either team grants or user grants) | ||
| /// 4. user's team plan has pay-as-you-go enabled (enterprise only) | ||
| /// 5. user's team is on enterprise with bonus grants auto-reload enable (enterprise only) | ||
| /// 5. user's team has bonus grants auto-reload enabled |
There was a problem hiding this comment.
I'm not exactly sure why this was enterprise only in the past but I think this was much less of a issue in the past because a admin can buy team scoped credits and the whole team can drain from that, so a non-admin trying to autoreload was less likely? But now that non-admins have user scoped credits, all non-admins will likely need to autoreload at some point
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR broadens has_any_ai_remaining so an enabled auto-reload policy allows AI usage regardless of customer type, and updates the related test/name/comment. I did not find correctness, security, or spec-alignment issues in the changed code.
Concerns
- The PR changes user-facing AI availability behavior, but the
Screenshots / Videossection is empty. For this user-facing change, please include screenshots or a screen recording demonstrating a non-enterprise/Build plan with auto-reload enabled successfully triggering AI end to end.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
This reverts commit 022e9c0.
Description
I noticed a bug where we were preventing AI usage if the user had no credits remaining even if they had autoreload enabled on the client.
Left a comment in the code
Testing
Confirmed that a Build plan non-admin can trigger autoreload if they have no credits remaining.
./script/runScreenshots / Videos
Agent Mode