mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
calculate_mcp_tool_call_cost
This commit is contained in:
parent
4baa48962e
commit
609f27b4ad
1 changed files with 2 additions and 1 deletions
|
|
@ -38,7 +38,8 @@ class MCPCostCalculator:
|
|||
# Unpack the mcp_tool_call_metadata
|
||||
#########################################################
|
||||
mcp_tool_call_metadata: StandardLoggingMCPToolCall = cast(StandardLoggingMCPToolCall, litellm_logging_obj.model_call_details.get("mcp_tool_call_metadata", {})) or {}
|
||||
mcp_server_cost_info: MCPServerCostInfo = mcp_tool_call_metadata.get("mcp_server_cost_info", {}) or {}
|
||||
mcp_server_cost_info_raw = mcp_tool_call_metadata.get("mcp_server_cost_info", {}) or {}
|
||||
mcp_server_cost_info: MCPServerCostInfo = cast(MCPServerCostInfo, mcp_server_cost_info_raw)
|
||||
#########################################################
|
||||
# User defined cost per query
|
||||
#########################################################
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue