collab: Make LLM billing fields required in LlmTokenClaims
(#18959)
This PR makes the `has_llm_subscription` and `max_monthly_spend_in_cents` fields in the `LlmTokenClaims` required. This change will be safe to deploy in ~45 minutes. Release Notes: - N/A
This commit is contained in:
parent
b2e1572820
commit
69711660ab
2 changed files with 6 additions and 17 deletions
|
@ -470,7 +470,7 @@ async fn check_usage_limit(
|
|||
|
||||
if state.config.is_llm_billing_enabled() {
|
||||
if usage.spending_this_month >= FREE_TIER_MONTHLY_SPENDING_LIMIT {
|
||||
if !claims.has_llm_subscription.unwrap_or(false) {
|
||||
if !claims.has_llm_subscription {
|
||||
return Err(Error::http(
|
||||
StatusCode::PAYMENT_REQUIRED,
|
||||
"Maximum spending limit reached for this month.".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue