Skip to content

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]

fix(spend-tracking): make the new batch count keys writable

mubashir1osmani5a7edc9c7783
diff --git a/litellm/proxy/_types.py b/litellm/proxy/_types.py
index bf0dbc97482..377eb7dce0e 100644
--- a/litellm/proxy/_types.py
+++ b/litellm/proxy/_types.py
@@ -3528,8 +3528,8 @@ class SpendLogsMetadata(TypedDict):
status: StandardLoggingPayloadStatus
proxy_server_request: str | None
batch_models: list[str] | None
- batch_successful_requests: ReadOnly[int | None]
- batch_failed_requests: ReadOnly[int | None]
+ batch_successful_requests: int | None # writable-ok: built by assignment like every sibling key in this TypedDict
+ batch_failed_requests: int | None # writable-ok: built by assignment like every sibling key in this TypedDict
error_information: StandardLoggingPayloadErrorInformation | None
usage_object: dict | None
model_map_information: StandardLoggingModelInformation | None