Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
collab: Remove lifetime spending limit in favor of LLM usage billing (#19321)
Marshall Bowersf6fad3b09ed5
diff --git a/crates/collab/src/llm.rs b/crates/collab/src/llm.rsindex 1facfa20eac..e54c9e133e3 100644--- a/crates/collab/src/llm.rs+++ b/crates/collab/src/llm.rs@@ -443,9 +443,6 @@ pub const FREE_TIER_MONTHLY_SPENDING_LIMIT: Cents = Cents::from_dollars(10);/// Used to prevent surprise bills.pub const DEFAULT_MAX_MONTHLY_SPEND: Cents = Cents::from_dollars(10);-/// The maximum lifetime spending an individual user can reach before being cut off.-const LIFETIME_SPENDING_LIMIT: Cents = Cents::from_dollars(1_000);-async fn check_usage_limit(state: &Arc<LlmState>,provider: LanguageModelProvider,@@ -487,14 +484,6 @@ async fn check_usage_limit(}}- // TODO: Remove this once we've rolled out monthly spending limits.- if usage.lifetime_spending >= LIFETIME_SPENDING_LIMIT {- return Err(Error::http(- StatusCode::FORBIDDEN,- "Maximum spending limit reached.".to_string(),- ));- }-let active_users = state.get_active_user_count(provider, model_name).await?;let users_in_recent_minutes = active_users.users_in_recent_minutes.max(1);