fix: remove self-orgid balance bypass in checkCustomerBalance()

Removed the 'if llm.ownerid == userorgid: return True' shortcut from
checkCustomerBalance() in llmage/accounting.py. All requests now go
through the full balance check regardless of whether the model belongs
to the caller's organization.
This commit is contained in:
yumoqing 2026-05-26 12:02:23 +08:00
parent f151ad2c30
commit 265702b894

View File

@ -42,9 +42,6 @@ async def checkCustomerBalance(llmid, userid, userorgid, catelogid=None):
return False
env = ServerEnv()
llm = await get_llm(llmid)
if llm.ownerid == userorgid:
debug(f'self orgid user')
return True
balance = 0.00
tpac = await get_user_tpac(userid)
if tpac: