collab: Add has_extended_trial to LlmTokenClaims (#29622)

This PR adds the `has_extended_trial` field to the LLM token claims.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-04-29 16:22:51 -04:00 committed by GitHub
parent 15a83b5a10
commit 24e47de02a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,7 @@
use std::sync::Arc;
use crate::{Cents, Result, llm};
use crate::llm::{self, AGENT_EXTENDED_TRIAL_FEATURE_FLAG};
use crate::{Cents, Result};
use anyhow::{Context as _, anyhow};
use chrono::{Datelike, Utc};
use collections::HashMap;
@ -492,8 +493,6 @@ impl StripeBilling {
feature_flags: Vec<String>,
success_url: &str,
) -> Result<String> {
const AGENT_EXTENDED_TRIAL_FEATURE_FLAG: &str = "agent-extended-trial";
let eligible_for_extended_trial = feature_flags
.iter()
.any(|flag| flag == AGENT_EXTENDED_TRIAL_FEATURE_FLAG);