The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
docs(budget_manager): add docstring to BudgetManager.reset_cost (#27867)
oss-agent-shinca82761e4843
diff --git a/litellm/budget_manager.py b/litellm/budget_manager.pyindex b25967579e0..bbebb6042cb 100644--- a/litellm/budget_manager.py+++ b/litellm/budget_manager.py@@ -178,6 +178,18 @@ class BudgetManager:return list(self.user_dict.keys())def reset_cost(self, user):+ """+ Reset the tracked spend for a user back to zero.++ Clears both the aggregate ``current_cost`` and the per-model+ ``model_cost`` breakdown stored for the given user.++ Args:+ user: The user identifier whose cost should be reset.++ Returns:+ dict: ``{"user": <updated user record>}`` reflecting the reset state.+ """self.user_dict[user]["current_cost"] = 0self.user_dict[user]["model_cost"] = {}return {"user": self.user_dict[user]}