Update usage.py

This commit is contained in:
Alex committed 2026-07-16 10:12:48 +01:00
1 parent 2b8afb8c10
commit d554eef97f
1 file changed
+2
+2
View File
@@ -171,6 +171,8 @@ def _prefer_provider_usage(llm: Any, call_usage: Dict[str, int]) -> Dict[str, in
try:
llm._last_usage_claimed = True
except AttributeError:
# Slotted/immutable LLM stand-ins can't record the claim; this
# call still gets the provider counts, which is correct for them.
pass
return {
"prompt_tokens": int(prompt or 0),