From 947b83ae6585886e930e373124745f47c136c562 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 4 Aug 2026 18:36:10 +0800 Subject: [PATCH] feat(balance): pass llmid to finalize_balance for cold-start max_cost --- product_management/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/product_management/core.py b/product_management/core.py index 52a371a..1e01418 100644 --- a/product_management/core.py +++ b/product_management/core.py @@ -1627,7 +1627,8 @@ WHERE resource_ref_id = ${llm_id}$ AND product_type = 'llm_model' LIMIT 1""" luid = getattr(llmusage, 'id', None) if luid: from llmage.balance import finalize_balance - await finalize_balance(ServerEnv(), luid, customer_amount) + await finalize_balance(ServerEnv(), luid, customer_amount, + llmid=getattr(llmusage, 'llmid', None)) except Exception as e: exception(f'finalize_balance failed (non-critical): {e}')