feat: gemini postpaid billing (skip credit_balance deduction)
Some checks failed
CI / Check (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Formatting (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Release Build (push) Has been cancelled

This commit is contained in:
2026-03-03 15:18:28 -05:00
parent beb511291f
commit 756600c2c0

View File

@@ -100,8 +100,8 @@ impl RequestLogger {
.execute(&mut *tx) .execute(&mut *tx)
.await?; .await?;
// Deduct from provider balance if successful // Deduct from provider balance if successful (skip postpaid like Gemini)
if log.cost > 0.0 { if log.cost > 0.0 && log.provider != "gemini" {
sqlx::query("UPDATE provider_configs SET credit_balance = credit_balance - ? WHERE id = ?") sqlx::query("UPDATE provider_configs SET credit_balance = credit_balance - ? WHERE id = ?")
.bind(log.cost) .bind(log.cost)
.bind(&log.provider) .bind(&log.provider)