From 8e92f989051db0a518ef244e9961efc7b487a2fe Mon Sep 17 00:00:00 2001 From: nuernber Date: Mon, 31 Aug 2026 09:18:12 -0700 Subject: [PATCH] docs(constants): clarify which env var the cap=0 fallback note applies to --- litellm/constants.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/litellm/constants.py b/litellm/constants.py index 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") )