From 265702b894b5d3d77129f8f0c3959a09eadfb4af Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 26 May 2026 12:02:23 +0800 Subject: [PATCH] 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. --- llmage/accounting.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/llmage/accounting.py b/llmage/accounting.py index c34d42b..2f88172 100644 --- a/llmage/accounting.py +++ b/llmage/accounting.py @@ -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: