From a8c00601e7d07ef206553863151f3ca95ea2b898 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 26 May 2026 22:26:57 +0000 Subject: [PATCH] fix(responses): populate usage details on early-return when usage is None Co-authored-by: Yassin Kortam --- .../litellm_completion_transformation/transformation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litellm/responses/litellm_completion_transformation/transformation.py b/litellm/responses/litellm_completion_transformation/transformation.py index a305f04db72..3fc1daff14b 100644 --- a/litellm/responses/litellm_completion_transformation/transformation.py +++ b/litellm/responses/litellm_completion_transformation/transformation.py @@ -2082,6 +2082,8 @@ class LiteLLMCompletionResponsesConfig: input_tokens=0, output_tokens=0, total_tokens=0, + input_tokens_details=InputTokensDetails(cached_tokens=0), + output_tokens_details=OutputTokensDetails(reasoning_tokens=0), ) response_usage = ResponseAPIUsage(