Repository navigation
Add monthly model credits and auditable usage billing - #1878
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
[Critical impact] The latest changes appear safe to merge, with the hosted judge credit-check issue fixed. SummaryAdds monthly model credits, permanent top-ups, and durable records for model charges.
|
Contributor
Playwright screenshotsFeature frames for this PR:
Open screenshot gallery · Dashboard · CI run Updated for commit |
This branch was previously deployed
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.
Why
Offer free use with a personal API key or prepaid hosted model usage, with charges that can be reconstructed from durable financial records.
What changed
UI copy
The funding choice uses “Choose how to use Rakazo”, “Your API key”, “Pay your model provider directly.”, “Use my API key”, “Rakazo credits”, “$10 / month”, “$10 in monthly model credits. No API key needed.”, “Continue with credits”, “Bots and browser automation”, “Scheduled routines”, “Web, desktop and mobile”, “Models at provider cost”, and “Top up anytime”. Amounts follow the selected tier. These visible labels distinguish funding methods and show that both paths include the same product features; hiding them would obscure the purchase decision.
Billing-only copy is “Available credits”, “Refresh credits”, “Monthly credits”, “Upgrade now”, “Downgrade at renewal”, “Monthly credits expire at renewal. Top-ups do not expire.”, “Add credits”, “Credit amount”, “One-time purchase. Credits do not expire.”, “Continue to checkout”, and “Using your API key”. “Use Rakazo credits” is shown when switching from personal setup; “Could not update billing” appears only after a failed action. These details are revealed only in billing settings, purchase dialogs, or the relevant error state.
Validation
Focused billing, catalog, API, and Postgres accounting tests pass, including disabled-billing endpoints, replay/refund handling, proration, tax/mixed invoices, renewal expiry, and previous-writer holds. Project-wide typechecking and lint pass with existing warnings. The signup/monthly-checkout/top-up browser flow and resuming existing credits passed locally. Crash recovery, provider rejection, interrupted-stream receipts, credential selection, and disabled billing have regression coverage. Hosted authentication without an API key is also covered. Stripe sandbox checkout, upgrade, downgrade, top-up, and provider metering were exercised locally.
CI passed the validation workflow, including unit tests, Postgres journeys, native checks, production builds, and all web E2E shards. Native billing uses shared contracts and native menus; its types and translations were checked. CI captures the shared web/Electron UI; native mobile screens cannot be captured by this suite and were not exercised on a device.
CI screenshots: billing credit choice, billing credit options, billing use existing credits.
Production deployment and the compatible mobile update completed successfully in the main CI run.