Skip to content

feat(chat): improve chat plan pricing & funnel - #2845

Merged
smakosh merged 2 commits into
mainfrom
feat/chat-plans-conversion
Jun 28, 2026
Merged

smakosh merged 2 commits into
mainfrom
feat/chat-plans-conversion

Conversation

@smakosh

@smakosh smakosh commented Jun 28, 2026 •

Copy link
Copy Markdown
Member

Why

Diagnosed why the chat plans offer (Starter $9 / Plus $19 / Pro $49, shipped Jun 8) wasn't converting. Real data (PostHog, LLMGateway project): 7 conversions in ~3 weeks — 4 Plus, 3 Starter, 0 Pro against ~106 monthly active playground users.

Running the value equation, the binding constraint was perceived likelihood: the offer asked buyers to value abstract "credits / 2.5× multiplier" with no proof, no guarantee, and use-it-or-lose-it expiry framing. The funnel was also blind — chat pricing clicks and paywall impressions weren't tracked, so there was no way to see where it leaked.

What changed

Make the value believable (the #1 lever)

  • Translate each plan's credit allowance into concrete "≈ N messages" on frontier and fast models, e.g. Plus ≈ 3,000 frontier / 9,000 fast; Pro ≈ 9,300 / 28,000. New estimateChatPlanMessages() in @llmgateway/shared.
  • Estimates are conservative: anchored to the priciest model in each class (Claude Sonnet for frontier, Haiku for fast), so GPT-5 / Gemini / Flash all yield more messages than shown — never overstated.
  • Add a "Replaces ~$60/mo of ChatGPT Plus + Claude Pro + Gemini" anchor on frontier tiers; lead the page/paywall copy with the dream outcome instead of "credits."

Risk reversal + expiry reframe

  • 7-day money-back guarantee (refund if the plan is barely used — conditioned to avoid credit arbitrage, since credits are worth more than the price).
  • Reframe credit expiry from "don't roll over" → "your allowance refills in full every cycle."

Sharpen the tier ladder

  • Starter copy is now accurate: it advertises the fast models it actually allows (Claude Sonnet, Haiku, Gemini Flash) and no longer claims GPT-5-mini, which is gated. Pro now has a tangible differentiator — the message-count jump over Plus.

Instrument the funnel

  • Fire pricing_plan_clicked with app: "chat" on CTA clicks (mirrors the existing dev-plans event, so chat joins the same funnel).
  • New chat_pricing_viewed event on pricing-page and paywall views (source distinguishes them), making paywall impressions measurable for the first time.

Out of scope (flagged for a product decision)

  • Credit rollover — reframed in copy, but the actual cycle-boundary mechanic is a billing change left untouched.
  • Dropping / repricing tiers — positioning only; no price or entitlement changes.
  • Starter gpt-5-mini gating — the blocked-pattern "gpt-5" also blocks gpt-5-mini/gpt-5-nano by substring. Copy is now accurate; whether to grant those cheap models to Starter is a product call.

Testing

  • turbo run build --filter=playground ✅ (builds @llmgateway/shared first)
  • pnpm format ✅ · pre-commit lint-staged ✅

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Refreshed pricing and paywall copy with clearer “one subscription” positioning for frontier models.
    • Added “≈ messages/mo” allowances and updated plan coverage wording.
    • Introduced a visible 7-day money-back guarantee.
  • Analytics

    • Enhanced pricing-page and plan interaction tracking for viewing and tier selection.
  • Bug Fixes

    • Updated “How it works” allowance language (fresh cycle/credit behavior) and revised plan details to better match the current offering.

Diagnosis found the chat plans offer's binding constraint was perceived
likelihood: abstract "credits/multiplier" copy, no proof, no guarantee,
and use-it-or-lose-it framing. The funnel was also blind — chat pricing
clicks and paywall impressions weren't tracked.

- Translate the credit allowance into concrete "~ N messages" on
  frontier and fast models via estimateChatPlanMessages() in
  @llmgateway/shared (estimate anchored to the priciest model in each
  class, so it's a conservative floor)
- Add "Replaces ~$60/mo of ChatGPT Plus + Claude Pro + Gemini" anchor on
  frontier tiers; lead pricing copy with the dream outcome
- Add a 7-day money-back guarantee (refund if barely used — safe against
  credit arbitrage); reframe credit expiry as "refills every cycle"
- Sharpen the tier ladder: accurate Starter model copy (it does not
  include the GPT-5 family) and a tangible Pro message-count jump
- Instrument the funnel: fire pricing_plan_clicked (app:"chat") on CTA
  clicks and a new chat_pricing_viewed on pricing-page/paywall views

Out of scope (flagged for product decision): actual credit rollover,
dropping/repricing tiers, and the Starter gpt-5-mini gating fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PHAECqFfWqvGypofGev14U
@coderabbitai

coderabbitai Bot commented Jun 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: db7b1d3c-b139-412a-8737-26a7dfd29bc8

📥 Commits

Reviewing files that changed from the base of the PR and between dc4e905 and a29dd58.

📒 Files selected for processing (4)
  • apps/playground/src/app/pricing/page.tsx
  • apps/playground/src/components/pricing/chat-plan-upsell.tsx
  • apps/playground/src/components/pricing/chat-pricing-plans.tsx
  • packages/shared/src/chat-plans.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/playground/src/app/pricing/page.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/playground/src/components/pricing/chat-plan-upsell.tsx
  • apps/playground/src/components/pricing/chat-pricing-plans.tsx

Walkthrough

Adds a shared estimator for approximate chat message counts, threads it into pricing plan rendering and analytics, and updates the pricing page and upsell marketing copy.

Changes

Pricing Copy & Analytics Refresh

Layer / File(s) Summary
Shared message-count estimator
packages/shared/src/chat-plans.ts, packages/shared/src/index.ts
Adds ChatPlanMessageEstimate, illustrative token and rate constants, estimateChatPlanMessages(creditsUsd), and the shared re-export.
Plan data and analytics
apps/playground/src/components/pricing/chat-pricing-plans.tsx
Extends plan content with frontierIncluded and replacesSubsUsd, updates the plan definitions, adds viewSource, and captures chat_pricing_viewed plus pricing_plan_clicked events.
Plan card rendering
apps/playground/src/components/pricing/chat-pricing-plans.tsx
Computes per-plan estimates and updates the card UI with message breakdowns, replacement copy, the money-back guarantee callout, and revised disclaimer text.
Pricing page and upsell copy
apps/playground/src/app/pricing/page.tsx, apps/playground/src/components/pricing/chat-plan-upsell.tsx
Rewrites pricing metadata, page copy, and how-it-works bullets, updates the upsell paragraph, and passes viewSource="paywall" to the pricing plans component.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • theopenco/llmgateway#2703: Introduced the chat plan upsell flow and related pricing-plan wiring that this PR extends with new copy, analytics, and estimator-based rendering.

Suggested reviewers

  • steebchen
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: chat pricing copy updates, message estimates, and funnel analytics improvements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/chat-plans-conversion

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/playground/src/app/pricing/page.tsx`:
- Line 14: The pricing page hero/metadata copy is overstating what the $9
starter tier includes, since it implies access to frontier models like Claude
Opus, GPT-5, Gemini, and Grok even though the Starter plan only offers fast
models. Update the relevant copy in the pricing page content so it clearly
separates the starter tier from higher-tier frontier access, and align the
affected text blocks in the page component to avoid promising features the
Starter plan does not include.

In `@apps/playground/src/components/pricing/chat-plan-upsell.tsx`:
- Around line 52-60: The upsell copy in chat-plan-upsell.tsx overstates what the
Starter tier includes; update the headline and supporting paragraph in the
component to clearly apply only to Plus/Pro or explicitly call out Starter
separately. Use the existing headline/content rendering in chat-plan-upsell to
adjust the marketing copy so it matches the actual plan gating and doesn’t imply
every subscription includes frontier models.

In `@apps/playground/src/components/pricing/chat-pricing-plans.tsx`:
- Around line 38-42: The Starter plan copy in chat-pricing-plans.tsx is
inconsistent with the estimate buckets because it implies “All the fast models”
while the later estimate section treats Claude Sonnet separately from fast
models. Update the Starter plan’s tagline and/or features in the relevant
pricing plan definition so the wording matches the actual bucket structure used
by the message-estimate section, keeping the copy aligned with the plan data in
the pricing plans array.

In `@packages/shared/src/chat-plans.ts`:
- Around line 85-92: The estimateMessages() helper in chat-plans.ts is using
rounding and can return optimistic or negative counts; update it to be
conservative by guarding non-positive creditsUsd up front and using Math.floor()
instead of Math.round() when computing the message estimate. Keep the change
localized to estimateMessages(), preserving the existing perMessage calculation
and returning 0 whenever creditsUsd is not positive or perMessage is
non-positive.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c1b79913-64f9-4425-9ba9-1dde933abaad

📥 Commits

Reviewing files that changed from the base of the PR and between 5b5e37c and dc4e905.

📒 Files selected for processing (5)
  • apps/playground/src/app/pricing/page.tsx
  • apps/playground/src/components/pricing/chat-plan-upsell.tsx
  • apps/playground/src/components/pricing/chat-pricing-plans.tsx
  • packages/shared/src/chat-plans.ts
  • packages/shared/src/index.ts

Comment thread apps/playground/src/app/pricing/page.tsx Outdated
Comment thread apps/playground/src/components/pricing/chat-plan-upsell.tsx Outdated
Comment thread apps/playground/src/components/pricing/chat-pricing-plans.tsx Outdated
Comment thread packages/shared/src/chat-plans.ts Outdated
The pricing page, paywall upsell, and plan card implied the $9 Starter
tier included frontier flagships (Opus, GPT-5, Gemini Pro, Grok 4), which
are gated to Plus/Pro. Separate the tiers in the copy and stop labeling
Claude Sonnet as a "fast" model so the wording matches the estimate
buckets. Also make estimateMessages() a conservative floor (Math.floor +
non-positive guard).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@smakosh
smakosh added this pull request to the merge queue Jun 28, 2026
Merged via the queue into main with commit af79ae1 Jun 28, 2026
17 checks passed
@smakosh
smakosh deleted the feat/chat-plans-conversion branch June 28, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant