Skip to content

Allow AI for all plans provided they have autoreload enabled#11420

Merged
tylerlam-warp merged 12 commits into
masterfrom
tlam/fix-any-ai-remaining-state
May 20, 2026
Merged

Allow AI for all plans provided they have autoreload enabled#11420
tylerlam-warp merged 12 commits into
masterfrom
tlam/fix-any-ai-remaining-state

Conversation

@tylerlam-warp
Copy link
Copy Markdown
Contributor

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.

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 20, 2026
Comment thread app/src/ai/request_usage_model.rs Outdated
/// 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
Copy link
Copy Markdown
Contributor Author

@tylerlam-warp tylerlam-warp May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@tylerlam-warp tylerlam-warp marked this pull request as ready for review May 20, 2026 16:30
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 20, 2026

@tylerlam-warp

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / Videos section 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

@tylerlam-warp tylerlam-warp enabled auto-merge (squash) May 20, 2026 16:42
@tylerlam-warp tylerlam-warp disabled auto-merge May 20, 2026 16:51
@tylerlam-warp tylerlam-warp enabled auto-merge (squash) May 20, 2026 20:27
@tylerlam-warp tylerlam-warp merged commit 94faa69 into master May 20, 2026
25 checks passed
@tylerlam-warp tylerlam-warp deleted the tlam/fix-any-ai-remaining-state branch May 20, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants