From fe184936ff1fc1ac74f100c4f01a2c31de1a35d0 Mon Sep 17 00:00:00 2001 From: jayy-77 <1427jay@gmail.com> Date: Wed, 28 Jan 2026 00:49:52 +0530 Subject: [PATCH] feat: add disable_default_user_agent flag Add litellm.disable_default_user_agent global flag to control whether the automatic User-Agent header is injected into HTTP requests. --- litellm/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/__init__.py b/litellm/__init__.py index e5c09702b9b..5998032b8e8 100644 --- a/litellm/__init__.py +++ b/litellm/__init__.py @@ -254,6 +254,7 @@ disable_streaming_logging: bool = False disable_token_counter: bool = False disable_add_transform_inline_image_block: bool = False disable_add_user_agent_to_request_tags: bool = False +disable_default_user_agent: bool = False # Option to disable automatic User-Agent header injection extra_spend_tag_headers: Optional[List[str]] = None in_memory_llm_clients_cache: "LLMClientCache" safe_memory_mode: bool = False