Skip to content

Fix: Show correct CTA for anonymous users for BYOK#10609

Merged
tylerlam-warp merged 7 commits intomasterfrom
tlam/get-byok-ready-for-free
May 11, 2026
Merged

Fix: Show correct CTA for anonymous users for BYOK#10609
tylerlam-warp merged 7 commits intomasterfrom
tlam/get-byok-ready-for-free

Conversation

@tylerlam-warp
Copy link
Copy Markdown
Contributor

Description

Anonymous users should not have access to BYOK, and the CTA should accurately reflect that.

Testing

  • Added a unit test in cases where SoloUserByok feature flag is enabled, but the user is anonymous. Checking to make sure that is_byo_api_key_enabled returns false.

  • Did some manual testing for the following few flows:

    • BYOK works correctly for free users without a team
    • BYOK works correctly for free users with a team
    • BYOK doesn't work as intended for anonymous users
  • I have manually tested my changes locally with ./script/run

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 10, 2026
tylerlam-warp and others added 5 commits May 10, 2026 12:27
…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>
@tylerlam-warp tylerlam-warp marked this pull request as ready for review May 10, 2026 20:51
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 10, 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 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

@tylerlam-warp tylerlam-warp merged commit 434e633 into master May 11, 2026
39 of 41 checks passed
@tylerlam-warp tylerlam-warp deleted the tlam/get-byok-ready-for-free branch May 11, 2026 16:45
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