From 49e551454e72837735d3ce9b5e4645bc8ced7688 Mon Sep 17 00:00:00 2001 From: musi22 Date: Mon, 21 Sep 2026 18:04:18 +0530 Subject: [PATCH] style(anthropic): format authorization assignment in common_utils --- litellm/llms/anthropic/common_utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/litellm/llms/anthropic/common_utils.py b/litellm/llms/anthropic/common_utils.py index f25f1b8e722..79df946cb17 100644 --- a/litellm/llms/anthropic/common_utils.py +++ b/litellm/llms/anthropic/common_utils.py @@ -311,9 +311,7 @@ def optionally_handle_anthropic_oauth( ): headers.pop(name) headers["authorization"] = ( - api_key - if api_key.startswith("Bearer ") - else f"Bearer {api_key}" # pyright: ignore[reportOptionalMemberAccess] # guarded by is_anthropic_oauth_key + api_key if api_key.startswith("Bearer ") else f"Bearer {api_key}" # pyright: ignore[reportOptionalMemberAccess] # guarded by is_anthropic_oauth_key ) headers["anthropic-beta"] = _merge_beta_headers(headers.get("anthropic-beta"), ANTHROPIC_OAUTH_BETA_HEADER) headers["anthropic-dangerous-direct-browser-access"] = "true"