mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Fix spend tracking for anthropic_messages and allm_passthrough_route
This commit is contained in:
parent
d7c419bfee
commit
84fd1ac86c
1 changed files with 4 additions and 0 deletions
|
|
@ -1066,6 +1066,8 @@ def completion_cost( # noqa: PLR0915
|
|||
"""
|
||||
try:
|
||||
call_type = _infer_call_type(call_type, completion_response) or "completion"
|
||||
if call_type in ("anthropic_messages", "allm_passthrough_route"):
|
||||
call_type = "completion"
|
||||
|
||||
if (
|
||||
(call_type == "aimage_generation" or call_type == "image_generation")
|
||||
|
|
@ -1664,6 +1666,8 @@ def response_cost_calculator(
|
|||
"aembedding",
|
||||
"completion",
|
||||
"acompletion",
|
||||
"anthropic_messages",
|
||||
"allm_passthrough_route",
|
||||
"atext_completion",
|
||||
"text_completion",
|
||||
"image_generation",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue