Repository navigation
API: free usage allowance on an organization's plan - #2108
Merged
Merged
Conversation
davidmckayv
requested review from
MikeRyanDev,
dustywusty,
guidovizoso,
mxmzb,
samjulien and
tylerslaton
as code owners
November 24, 2026 01:30
davidmckayv
force-pushed
the
free-runs-spec
branch
from
November 24, 2026 05:33
5ae14a8 to
f145639
Compare
OpenBot Cloud's free trial becomes a number of runs each person gets, not 30 days with a card. The plan read says how much of it is used and, once it is used up, how big it was. - OrganizationPlan.status gains free: the organization isn't on the plan and the person reading has free runs left. none keeps meaning a card is needed. - freeRunsUsedPercent (0 to 100, rounded down) is the reading person's share used, present while a plan is required and the organization is neither active nor trialing. - freeRunsAllowance is the allowance's size, present only once it is used up, so the number never shows while runs are left. - The 402 PLAN_REQUIRED refusal is declared on every operation that starts a run: runRoutine, runCheckIn, startCheckInItem, workOnCheckInItem, runGoal, startVoiceCall and retryTask, as well as sendConversationMessage. - Descriptions and examples no longer say 30-day trial. trialing and trialEndsAt stay, unused by OpenBot Cloud's free allowance. All additive. The bundle and the app, phone and Recorder clients are regenerated.
davidmckayv
force-pushed
the
free-runs-spec
branch
from
November 24, 2026 05:52
f145639 to
65963a8
Compare
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.
OpenBot Cloud's free trial becomes a number of free runs each person gets, instead of 30 days that start with a card. This is the API side: the plan read says how much of the allowance is used, and the refusal at the cap is declared everywhere a run starts. All additive.
What changed
OrganizationPlan.statusgainsfree: the organization isn't on the plan and the person reading has free runs left.nonekeeps meaning a card is needed (the free runs are used up, there are none, or the plan ended).past_dueis unchanged.freeRunsUsedPercent, an integer from 0 to 100: how much of the reading person's own allowance is used, across every organization they're in. Rounded down, so it reads 100 only once every run is used. Present only while a plan is required and the organization is neitheractivenortrialing. The count itself is never sent.freeRunsAllowance, an integer of at least 1: the allowance's size. Present only once the person has used it all, so the number never shows while runs are left.PLAN_REQUIREDrefusal is declared on every operation that starts a run:runRoutine,runCheckIn,startCheckInItem,workOnCheckInItem,runGoal,startVoiceCallandretryTask, besidessendConversationMessage, which already had it.trialingandtrialEndsAtstay in the schema, described as not used by OpenBot Cloud's free allowance.none,freeRunsAllowance500,addCardUrl), and on the plan.The bundle and the app, phone and Recorder clients are regenerated. No screen changes here.
Checks run locally
bun run api:lint: valid.breakingagainst main's bundle with--fail-on WARN: no breaking changes. The changelog shows 9 info-level changes: seven new 402 responses and two new optional properties.bun run api:generaterun again leaves no diff (bundle and client drift both clean).bun test api/(client boundary and every spec test), the deprecations test, the plan notices test and the tolerant-reader test all pass.