From e9a20a091f05de04fa335ccada49a73ef5d0e7ab Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 26 May 2026 12:05:46 +0800 Subject: [PATCH] revert: restore self-orgid balance bypass in checkCustomerBalance() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 'if llm.ownerid == userorgid: return True' shortcut is correct behavior — own organization's models should not require balance check. --- llmage/accounting.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llmage/accounting.py b/llmage/accounting.py index 2f88172..c34d42b 100644 --- a/llmage/accounting.py +++ b/llmage/accounting.py @@ -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: