From 6baa63aa3a825449e9f8ddf9d884ce323dca04e9 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 5 Apr 2026 16:38:54 +0800 Subject: [PATCH] bugfix --- llmage/accounting.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llmage/accounting.py b/llmage/accounting.py index 4cb351c..c3e87c6 100644 --- a/llmage/accounting.py +++ b/llmage/accounting.py @@ -181,6 +181,8 @@ where a.llmid = b.id debug(f'{r.usages=} is None') continue try: + if isinstance(r.usages, str): + r.usages = json.loads(r.usages) d = await llm_charging(sor, r.ppid, r) except Exception as e: debug(f'{r.ppid=}, {r.usages=} llm_charging() failed')