collab: Pass down billing information in UpdatePlan message (#29929)

This PR updates the `UpdatePlan` message to include some additional
information about the user's billing subscription usage.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-05-05 11:48:31 -04:00 committed by GitHub
parent 07b4480396
commit 10bdf39497
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 137 additions and 5 deletions

View file

@ -482,7 +482,9 @@ CREATE TABLE IF NOT EXISTS billing_preferences (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
user_id INTEGER NOT NULL REFERENCES users (id),
max_monthly_llm_usage_spending_in_cents INTEGER NOT NULL
max_monthly_llm_usage_spending_in_cents INTEGER NOT NULL,
model_request_overages_enabled bool NOT NULL DEFAULT FALSE,
model_request_overages_spend_limit_in_cents integer NOT NULL DEFAULT 0
);
CREATE UNIQUE INDEX "uix_billing_preferences_on_user_id" ON billing_preferences (user_id);