Repository navigation
feat(billing): give the free trial $2 of AI usage instead of $1 - #1744
Merged
Merged
Conversation
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]>
6 of 7 tasks
gkhngyk
approved these changes
Oct 29, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
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.
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.
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.applyTrialAiBudgetcaps 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.plan-guard.jsandweb/src/config/plans.tsand the tests follow.Independent of #1743: it can merge before or after it.
Related issue
None (product decision).
Type of change
feat— New featureHow to test
Checklist
plan-guard-ai-usage,plan-guard-ai-budget,plan-guardandprompt-improvetests pass (65)npm test: not run for a constant change; CI runs it🤖 Generated with Claude Code