Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.
TypeScript aeoai-agentai-searchanswer-engine-optimizationbrand-monitoringchatgptclaudecopilotdockergeminigeogoogle-ai-overviewsgrokmcpnextjsopen-sourceperplexityseosupabasetypescript
feat(billing): give the free trial $2 of AI usage instead of $1 (#1744)
Cihanb577e75d37f5
diff --git a/server/src/config/plans.js b/server/src/config/plans.jsindex 1f3be9ccd..cd56b83bc 100644--- a/server/src/config/plans.js+++ b/server/src/config/plans.js@@ -192,10 +192,11 @@ export const PLANS = {};/**- * The free trial's AI budget, whatever the plan (2026-10-24): the plan's own- * comes once the subscription is paid. See applyTrialAiBudget.+ * The free trial's AI budget, whatever the plan: the plan's own comes once+ * the subscription is paid. See applyTrialAiBudget. $2 since 2026-10-29+ * (was $1), when the Content Editor started writing with Claude Sonnet 5.5.*/-export const TRIAL_AI_BUDGET_USD = 1;+export const TRIAL_AI_BUDGET_USD = 2;export function isCloud() {return process.env.IS_CLOUD === 'true';diff --git a/server/src/lib/plan-guard-ai-budget.test.js b/server/src/lib/plan-guard-ai-budget.test.jsindex 75fabb9dc..f20ab5156 100644--- a/server/src/lib/plan-guard-ai-budget.test.js+++ b/server/src/lib/plan-guard-ai-budget.test.js@@ -179,10 +179,10 @@ describe('reserveAiBudget', () => {expect(ops).toEqual([]);});- it('holds a call in the free trial on its $1, and says starting the plan gives more', async () => {+ it('holds a call in the free trial on its $2, and says starting the plan gives more', async () => {org = { ...org, plan: 'growth', subscription_status: 'trialing' };await guard.reserveAiBudget('o1', { feature: 'improve', modelId: 'm', promptId: 'p1' });- expect(rpcCalls[0].args.p_budget).toBe(1);+ expect(rpcCalls[0].args.p_budget).toBe(2);reserved = null;await expect(diff --git a/server/src/lib/plan-guard-ai-usage.test.js b/server/src/lib/plan-guard-ai-usage.test.jsindex b2ed930c7..fa0a4ad9d 100644--- a/server/src/lib/plan-guard-ai-usage.test.js+++ b/server/src/lib/plan-guard-ai-usage.test.js@@ -264,13 +264,13 @@ describe('getDraftAiUsage', () => {});describe('the free trial’s AI budget', () => {- it('is $1 whatever the plan while the subscription is trialing, and says it is the trial’s', async () => {+ it('is $2 whatever the plan while the subscription is trialing, and says it is the trial’s', async () => {org = { ...org, plan: 'growth', subscription_status: 'trialing' };- spend = [{ feature: 'content', cost_usd: '0.21' }];+ spend = [{ feature: 'content', cost_usd: '0.42' }];expect(await guard.getAiUsage('o1')).toMatchObject({ trial: true, percentUsed: 21 });// Paid: Growth's own $25.org = { ...org, subscription_status: 'active' };- expect(await guard.getAiUsage('o1')).toMatchObject({ trial: false, percentUsed: 0.8 });+ expect(await guard.getAiUsage('o1')).toMatchObject({ trial: false, percentUsed: 1.7 });});it('leaves Enterprise with its own (a deal’s budget), and an unlimited one as it is', () => {@@ -281,13 +281,13 @@ describe('the free trial’s AI budget', () => {expect(guard.applyTrialAiBudget(plan(-1), trialing())).toEqual(plan(-1));});- it('holds Starter and Growth trials to $1, and a smaller budget to its own', () => {+ it('holds Starter and Growth trials to $2, and a smaller budget to its own', () => {const plan = (budget) => ({ id: 'x', limits: { improveMonthlyBudgetUsd: budget } });const trial = { plan: 'growth', subscription_status: 'trialing' };expect(guard.applyTrialAiBudget(plan(25), trial)).toEqual({id: 'x',trial: true,- limits: { improveMonthlyBudgetUsd: 1 },+ limits: { improveMonthlyBudgetUsd: 2 },});expect(guard.applyTrialAiBudget(plan(0.5), trial).limits.improveMonthlyBudgetUsd).toBe(0.5);expect(guard.applyTrialAiBudget(plan(25), { ...trial, subscription_status: 'active' })).toEqual(diff --git a/server/src/lib/plan-guard.js b/server/src/lib/plan-guard.jsindex 2a6f4c172..3bf0bada5 100644--- a/server/src/lib/plan-guard.js+++ b/server/src/lib/plan-guard.js@@ -379,7 +379,7 @@ async function improveSpendThisPeriod(orgId) {/*** Improve-tab budget (PROMPT-003): a monthly USD budget per organization* (plan.limits.improveMonthlyBudgetUsd: Starter $5, Growth $25, Enterprise- * $50 or a customer's own set by Ansvisor, the free trial $1), charged with each+ * $50 or a customer's own set by Ansvisor, the free trial $2), charged with each* generation's real token cost so the budget holds for any model. Users see* an estimate of generations left, not dollars. -1 is unlimited. `readOnly`* as resolveOrgPlanByOrgId: without an active plan, a budget of 0 anddiff --git a/server/src/lib/prompt-improve.test.js b/server/src/lib/prompt-improve.test.jsindex 67900dc22..5b3b93f4d 100644--- a/server/src/lib/prompt-improve.test.js+++ b/server/src/lib/prompt-improve.test.js@@ -482,10 +482,10 @@ describe('improveRangeKey', () => {});describe('Improve plan limits', () => {- it('is on every plan, in one AI budget: Starter $5, Growth $25 (5x), Enterprise $50, the trial $1', async () => {+ it('is on every plan, in one AI budget: Starter $5, Growth $25 (5x), Enterprise $50, the trial $2', async () => {const { PLANS, TRIAL_AI_BUDGET_USD } = await import('../config/plans.js');expect(PLANS.starter.limits.improveMonthlyBudgetUsd).toBe(5);- expect(TRIAL_AI_BUDGET_USD).toBe(1);+ expect(TRIAL_AI_BUDGET_USD).toBe(2);for (const id of ['starter', 'growth', 'enterprise', 'self_hosted']) {expect(PLANS[id].limits.features).toContain('prompt_improve');}diff --git a/web/src/config/plans.ts b/web/src/config/plans.tsindex d5aca3d32..73b71acf7 100644--- a/web/src/config/plans.ts+++ b/web/src/config/plans.ts@@ -47,7 +47,7 @@ export interface PlanLimits {* Monthly USD budget for AI usage: Improve-tab model calls (Positions* panel, PROMPT-003), the Content Editor's AI and the Action Center's task* writing. Starter $5, Growth $25, Enterprise $50 (or more, set per- * customer), and $1 in the free trial (the server's rule); the billing cards+ * customer), and $2 in the free trial (the server's rule); the billing cards* show them as multiples of Starter's. Enforced on the server from each* call's real token cost so it holds whichever model is configured.* -1 = unlimited (self-host).@@ -179,7 +179,7 @@ export const PLANS: Record<PlanId, Plan> = {maxBriefGenerations: 10,// The workspace's one AI budget, in tiers the billing cards show as// multiples of Starter's: $5 here (1x), Growth $25 (5x), Enterprise $50- // or more, set per customer (2026-10-27); the server gives the free trial $1.+ // or more, set per customer (2026-10-27); the server gives the free trial $2.improveMonthlyBudgetUsd: 5,// 0.1% of the $49 price, spent rating suggestions' relevance (VIS-011).relevanceMonthlyBudgetUsd: 0.049,