Skip to content

Commit 7739be3

Browse files
committed
fix assembly pass through cost tracking
1 parent 229f270 commit 7739be3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Diff for: litellm/proxy/pass_through_endpoints/llm_provider_handlers/assembly_passthrough_logging_handler.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ def _handle_assemblyai_passthrough_logging(
9696
)
9797
kwargs["model"] = model
9898
kwargs["custom_llm_provider"] = "assemblyai"
99-
logging_obj.model_call_details["model"] = model
100-
logging_obj.model_call_details["custom_llm_provider"] = "assemblyai"
99+
response_cost: Optional[float] = None
101100

102101
transcript_id = response_body.get("id")
103102
if transcript_id is None:
@@ -116,7 +115,7 @@ def _handle_assemblyai_passthrough_logging(
116115
speech_model=model,
117116
transcript_response=transcript_response,
118117
)
119-
kwargs["response_cost"] = cost
118+
response_cost = cost
120119

121120
# Make standard logging object for Vertex AI
122121
standard_logging_object = get_standard_logging_object_payload(
@@ -141,6 +140,10 @@ def _handle_assemblyai_passthrough_logging(
141140
verbose_proxy_logger.debug(
142141
"standard_logging_object= %s", json.dumps(standard_logging_object, indent=4)
143142
)
143+
logging_obj.model_call_details["model"] = model
144+
logging_obj.model_call_details["custom_llm_provider"] = "assemblyai"
145+
logging_obj.model_call_details["response_cost"] = response_cost
146+
144147
asyncio.run(
145148
pass_through_endpoint_logging._handle_logging(
146149
logging_obj=logging_obj,

0 commit comments

Comments
 (0)