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(constants): clarify which env var the cap=0 fallback note applies to
nuernber8e92f989051d
diff --git a/litellm/constants.py b/litellm/constants.pyindex b03e122d09c..7a295c37010 100644--- a/litellm/constants.py+++ b/litellm/constants.py@@ -489,13 +489,14 @@ MAX_LANGFUSE_INITIALIZED_CLIENTS: Final = int(os.getenv("MAX_LANGFUSE_INITIALIZE# bounded so a slow client throttles the upstream pump instead of letting it# buffer the whole response in memory; the detached-drain cap bounds how many# post-disconnect drains may run concurrently so client behavior can't create-# unbounded worker state. Setting the cap to 0 disables detached draining-# entirely: every post-disconnect pump bills whatever partial output it has-# already collected and aborts the upstream stream immediately, instead of-# continuing to drain for the real terminal usage.+# unbounded worker state.ANTHROPIC_MESSAGES_STREAM_RELAY_QUEUE_MAXSIZE: Final = int(os.getenv("ANTHROPIC_MESSAGES_STREAM_RELAY_QUEUE_MAXSIZE", "1024"))+# Setting this to 0 disables detached draining entirely: every post-disconnect+# pump bills whatever partial output it has already collected and aborts the+# upstream stream immediately, instead of continuing to drain for the real+# terminal usage.ANTHROPIC_MESSAGES_MAX_DETACHED_STREAM_DRAINS: Final = int(os.getenv("ANTHROPIC_MESSAGES_MAX_DETACHED_STREAM_DRAINS", "100"))