Skip to content

feat(billing): give the free trial $2 of AI usage instead of $1 - #1744

Merged
gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:feature/trial-ai-budget-2
Oct 29, 2026
Merged

gkhngyk merged 2 commits into
ansvisor:mainfrom
cihan-gyk:feature/trial-ai-budget-2

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Product decision (Cihan): the free trial gets $2 of AI usage instead of $1.

#1743 moves the Content Editor's writing to Claude Sonnet 5.5, about three times the cost of a page written today (a full blog flow ~$0.31 instead of ~$0.10). On $1, a trial could do about three full writes. On $2 it can do about six, enough to try the editor properly before buying.

  • TRIAL_AI_BUDGET_USD (server/src/config/plans.js): 1 → 2. applyTrialAiBudget caps a trialing Starter or Growth workspace's AI budget at it. A plan whose own budget is smaller keeps its own; Enterprise keeps its deal's budget.
  • Paid plans are unchanged: Starter $5, Growth $25, Enterprise $50 or more.
  • Comments in plan-guard.js and web/src/config/plans.ts and the tests follow.

Independent of #1743: it can merge before or after it.

Related issue

None (product decision).

Type of change

  • feat — New feature

How to test

  1. A workspace on a 14-day trial: Settings › Billing shows the AI usage meter against a $2 budget (e.g. $0.42 used = 21%).
  2. When the trial converts to a paid plan, the plan's own budget applies.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • Server: prettier and eslint on the changed files; plan-guard-ai-usage, plan-guard-ai-budget, plan-guard and prompt-improve tests pass (65)
  • Full npm test: not run for a constant change; CI runs it

🤖 Generated with Claude Code

The Content Editor now writes with Claude Sonnet 5.5 (ansvisor#1743), about
three times the cost of a page written before; $1 covered about three
full writes. TRIAL_AI_BUDGET_USD goes to 2; a paid plan's own budget is
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@gkhngyk gkhngyk 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.

Looks good.

TRIAL_AI_BUDGET_USD is the only place the trial's budget comes from. applyTrialAiBudget reads it, and so do the reserve (p_budget) and the usage meter, so all of them now use $2. Neither the server, the web copy (en.json speaks of "the free trial's AI usage", with no amount) nor the docs state the amount anywhere else, and the SQL takes the budget from the server. The comments in plan-guard.js and web/src/config/plans.ts now say $2, as do the tests. The new meter numbers are right: $0.42 is 21% of $2 and 1.7% of Growth's $25.

  • Existing trials: the budget is worked out on every call, so trials that are already running get the $2 straight away. A trial that used up its $1 can carry on. Nothing is stored that would need a backfill.
  • Paid plans: unchanged at Starter $5, Growth $25 and Enterprise $50 or more. A plan with a smaller budget of its own keeps it, and Enterprise keeps its deal's budget.

Merges cleanly with main and with #1743's take-1743. Tests on main + this PR + take-1743:

  • plan-guard-ai-usage, plan-guard-ai-budget, plan-guard, prompt-improve and improve-cost: 82/82.
  • No migration, no PostgREST embed, no new route.

@gkhngyk
gkhngyk merged commit b577e75 into ansvisor:main Oct 29, 2026
3 of 5 checks passed
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.

2 participants