feat: gemini postpaid billing (skip credit_balance deduction)
This commit is contained in:
@@ -100,8 +100,8 @@ impl RequestLogger {
|
||||
.execute(&mut *tx)
|
||||
.await?;
|
||||
|
||||
// Deduct from provider balance if successful
|
||||
if log.cost > 0.0 {
|
||||
// Deduct from provider balance if successful (skip postpaid like Gemini)
|
||||
if log.cost > 0.0 && log.provider != "gemini" {
|
||||
sqlx::query("UPDATE provider_configs SET credit_balance = credit_balance - ? WHERE id = ?")
|
||||
.bind(log.cost)
|
||||
.bind(&log.provider)
|
||||
|
||||
Reference in New Issue
Block a user