Repository navigation
Give a card-backed Cloud trial the full Team code mode - #1490
Merged
Merged
Conversation
A Cloud trial with a card on file (licence plan='trial', billing.status= 'trialing') is high-intent and low-abuse, so it is treated as Team for code mode for the length of the trial: inline code (code_execute / code_propose_tool) and the Team saved-tool cap of 20, instead of tools-only with a cap of 3. A free, card-less trial is unchanged, and a self-hosted trial carries no billing so it is never promoted. effectiveCodeModePlan() resolves a card trial to 'team'; LicenseGuardService reads billing.status in checkCanCreateCodeTool and canUseInlineCode. No schema change.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #1489. Follow-up to the per-plan code-mode gating (PR #1447 / #1446).
What
A Cloud trial that has added a card (licence
plan='trial'withbilling.status='trialing') is treated as Team for code mode for the length of the trial:code_execute/code_propose_tool) unlocked, andA free, card-less trial is unchanged (tools-only, cap 3, no inline). This lets a high-intent user try the whole product during the trial, a conversion lever, while a card is on file to limit abuse.
Behaviour (Cloud + self-hosted)
billing, so it is never promoted — unchanged.How
license/code-mode-quotas.ts: new pureeffectiveCodeModePlan(plan, cardTrial)('trial' + card -> 'team', everything else unchanged).license/license-guard.service.ts: a privatecodeModePlan(license)readsbilling.status === 'trialing'and feeds the effective plan tocheckCanCreateCodeToolandcanUseInlineCode.docs/code-mode.md'Per plan' note) + regeneratedllms-full.txt.No Prisma/schema change. Still off unless an operator runs the runner and a workspace turns
codeModeon per server.Tests / checks (packages/backend)
npx tsc --noEmit— clean.npx eslinton the three touched files — clean.npx jest --maxWorkers=4 src/license— 245 pass (adds card-trial cases to code-mode-gating.spec.ts).npx jest --maxWorkers=4 dynamic-mcp-tools code-tool mcp-endpoint— 209 pass.node scripts/generate-llms-txt.mjs --check— clean.