mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
Fix check for already migrated (#12700)
This commit is contained in:
@@ -153,10 +153,13 @@ class LiteLlmManager:
|
|||||||
max_budget *= billing_margin
|
max_budget *= billing_margin
|
||||||
spend *= billing_margin
|
spend *= billing_margin
|
||||||
|
|
||||||
# Check if max_budget is None (not 0.0) to determine if already migrated
|
# Check if max_budget is None (not 0.0) or set to unlimited to determine if already migrated
|
||||||
# A user with max_budget=0.0 is different from max_budget=None
|
# A user with max_budget=0.0 is different from max_budget=None
|
||||||
if original_max_budget is None:
|
if (
|
||||||
# if max_budget is None, then we've already migrated the User
|
original_max_budget is None
|
||||||
|
or original_max_budget == UNLIMITED_BUDGET_SETTING
|
||||||
|
):
|
||||||
|
# if max_budget is None or UNLIMITED, then we've already migrated the User
|
||||||
logger.info(
|
logger.info(
|
||||||
'LiteLlmManager:migrate_lite_llm_entries:already_migrated',
|
'LiteLlmManager:migrate_lite_llm_entries:already_migrated',
|
||||||
extra={
|
extra={
|
||||||
|
|||||||
Reference in New Issue
Block a user