Fix: Show correct CTA for anonymous users for BYOK#10609
Merged
Conversation
…r test - Refactor add_request_usage_model to register AuthStateProvider by default - Add add_request_usage_model_without_auth for tests needing custom auth state - Add AuthState::new_anonymous_for_test and AuthStateProvider::new_anonymous_for_test - Split anonymous user test into logged-out and anonymous Firebase user variants Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Contributor
|
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 |
Contributor
There was a problem hiding this comment.
Overview
This PR gates BYO API key availability on non-anonymous auth state, updates BYOK call sites to use the auth-aware check, adds anonymous-user coverage, and changes the AI settings BYOK CTA to prompt anonymous users to create an account.
Concerns
- Manual testing is required for changes that can be manually tested. Please include screenshots or a screen recording that show the anonymous-user CTA and signup flow working end to end, or justify why visual evidence is not possible.
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
IsaiahWitzke
approved these changes
May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Anonymous users should not have access to BYOK, and the CTA should accurately reflect that.
Testing
Added a unit test in cases where
SoloUserByokfeature flag is enabled, but the user is anonymous. Checking to make sure thatis_byo_api_key_enabledreturns false.Did some manual testing for the following few flows:
I have manually tested my changes locally with
./script/runAgent Mode