From ab054462059c94af5f86fd0cf5fe5ece5e0a792d Mon Sep 17 00:00:00 2001 From: Mrinal Chanshetty Date: Fri, 30 Oct 2026 12:31:17 -0700 Subject: [PATCH] fix(proxy): type the batch metadata adapter as a read-only mapping --- litellm/proxy/batches_endpoints/litellm_executed_batches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/batches_endpoints/litellm_executed_batches.py b/litellm/proxy/batches_endpoints/litellm_executed_batches.py index 979e9abdba5..496d2e55a67 100644 --- a/litellm/proxy/batches_endpoints/litellm_executed_batches.py +++ b/litellm/proxy/batches_endpoints/litellm_executed_batches.py @@ -49,7 +49,7 @@ BatchStatus: TypeAlias = Literal[ TERMINAL_BATCH_STATUSES: Final[frozenset[str]] = frozenset({"completed", "failed", "cancelled", "expired"}) _STOP_STATUSES: Final[frozenset[str]] = TERMINAL_BATCH_STATUSES | frozenset({"cancelling"}) _BATCH_ENDPOINT_ADAPTER: Final[TypeAdapter[BatchEndpoint]] = TypeAdapter(BatchEndpoint) -_CLIENT_METADATA_ADAPTER: Final[TypeAdapter[dict[str, object]]] = TypeAdapter(dict[str, object]) +_CLIENT_METADATA_ADAPTER: Final[TypeAdapter[Mapping[str, object]]] = TypeAdapter(Mapping[str, object]) _CANCEL_POLL_SECONDS: Final = 1.0 _HEARTBEAT_SECONDS: Final = 30.0 _STALE_AFTER_SECONDS: Final = 180.0