fix Gemini token validation issue with LiteLLM (#735)

Fix for #734
This commit is contained in:
Andrew Han 2025-05-21 14:59:47 -07:00 committed by GitHub
parent 1992be3e8d
commit 1364f4408e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -111,12 +111,12 @@ class LitellmModel(Model):
input_tokens_details=InputTokensDetails(
cached_tokens=getattr(
response_usage.prompt_tokens_details, "cached_tokens", 0
)
) or 0
),
output_tokens_details=OutputTokensDetails(
reasoning_tokens=getattr(
response_usage.completion_tokens_details, "reasoning_tokens", 0
)
) or 0
),
)
if response.usage