collab: Sync model request overages to Stripe (#29583)
This PR adds syncing of model request overages to Stripe. Release Notes: - N/A
This commit is contained in:
parent
3a212e72a4
commit
5092f0f18b
9 changed files with 318 additions and 16 deletions
|
@ -8,7 +8,9 @@ use axum::{
|
|||
};
|
||||
|
||||
use collab::api::CloudflareIpCountryHeader;
|
||||
use collab::api::billing::sync_llm_token_usage_with_stripe_periodically;
|
||||
use collab::api::billing::{
|
||||
sync_llm_request_usage_with_stripe_periodically, sync_llm_token_usage_with_stripe_periodically,
|
||||
};
|
||||
use collab::llm::db::LlmDatabase;
|
||||
use collab::migrations::run_database_migrations;
|
||||
use collab::user_backfiller::spawn_user_backfiller;
|
||||
|
@ -152,6 +154,7 @@ async fn main() -> Result<()> {
|
|||
|
||||
if let Some(mut llm_db) = llm_db {
|
||||
llm_db.initialize().await?;
|
||||
sync_llm_request_usage_with_stripe_periodically(state.clone());
|
||||
sync_llm_token_usage_with_stripe_periodically(state.clone());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue