collab: Fix issues with syncing LLM usage to Stripe (#18970)
This PR fixes some issues with our previous approach to synching LLM usage over to Stripe. We now have a separate LLM access price in Stripe that is a marker price to allow us to create the initial subscription with that as its subscription item We then dynamically set the LLM usage price during the reconciliation sync based on the usage for the current month. Release Notes: - N/A --------- Co-authored-by: Antonio <antonio@zed.dev> Co-authored-by: Richard <richard@zed.dev>
This commit is contained in:
parent
69711660ab
commit
cae548a50d
4 changed files with 36 additions and 21 deletions
|
@ -155,7 +155,8 @@ async fn main() -> Result<()> {
|
|||
.await
|
||||
.trace_err();
|
||||
|
||||
if let Some(llm_db) = llm_db {
|
||||
if let Some(mut llm_db) = llm_db {
|
||||
llm_db.initialize().await?;
|
||||
sync_llm_usage_with_stripe_periodically(state.clone(), llm_db);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue