revert: restore self-orgid balance bypass in checkCustomerBalance()

The 'if llm.ownerid == userorgid: return True' shortcut is correct
behavior — own organization's models should not require balance check.
This commit is contained in:
yumoqing 2026-05-26 12:05:46 +08:00
parent 265702b894
commit e9a20a091f

View File

@ -42,6 +42,9 @@ 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: