Add multi-tenant cloud mode: self-serve purchase, credit metering, core-decoupling
Introduces RECAP_MODE=multi alongside single-mode self-host: - Tenant auth + accounts (magic-link via System SMTP), per-tenant credit pool, anonymous trial minting with per-IP/-64 caps - Self-serve Pro/Max purchase: inline Lightning (BTCPay) + card (Zaprite), prepaid 30-day periods, expiry-reminder emails - Core-decoupling: relay owns cloud tier/expiry keyed by Recaps user-id - SQLite (better-sqlite3) schema for multi-mode; filesystem unchanged for single - StartOS actions/versions through 0.2.155
This commit is contained in:
@@ -4,10 +4,11 @@ import { PRICING, calcCost, buildAnalysisPrompt } from "../gemini-helpers.js";
|
||||
|
||||
describe("PRICING table", () => {
|
||||
test("includes all current production model slugs", () => {
|
||||
assert.ok(PRICING["gemini-3-flash-preview"]);
|
||||
assert.ok(PRICING["gemini-3-pro-preview"]);
|
||||
assert.ok(PRICING["gemini-3.1-pro-preview"]);
|
||||
assert.ok(PRICING["gemini-2.5-pro"]);
|
||||
assert.ok(PRICING["gemini-3-flash-preview"]);
|
||||
assert.ok(PRICING["gemini-2.5-flash"]);
|
||||
assert.ok(PRICING["gemini-3.1-flash-lite"]);
|
||||
});
|
||||
|
||||
test("has a 'default' fallback row", () => {
|
||||
@@ -66,7 +67,7 @@ describe("calcCost", () => {
|
||||
});
|
||||
|
||||
test("formats >$0.01 totals as $X.XXXX", () => {
|
||||
const cost = calcCost("gemini-3-pro-preview", {
|
||||
const cost = calcCost("gemini-3.1-pro-preview", {
|
||||
promptTokenCount: 1_000_000,
|
||||
candidatesTokenCount: 0,
|
||||
thoughtsTokenCount: 0,
|
||||
|
||||
Reference in New Issue
Block a user