From e5dc912367721744b835e701118a89d41201ed7a Mon Sep 17 00:00:00 2001 From: joereyna Date: Thu, 19 Mar 2026 18:59:39 -0700 Subject: [PATCH 1/5] =?UTF-8?q?bump:=20version=201.82.4=20=E2=86=92=201.82?= =?UTF-8?q?.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3fb05cc8b3..73f495203b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "1.82.4" +version = "1.82.5" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT" @@ -184,7 +184,7 @@ requires = ["poetry-core", "wheel"] build-backend = "poetry.core.masonry.api" [tool.commitizen] -version = "1.82.4" +version = "1.82.5" version_files = [ "pyproject.toml:^version" ] From c6b5c070056d667db80259cc8503373a712157a1 Mon Sep 17 00:00:00 2001 From: joereyna Date: Thu, 19 Mar 2026 21:00:54 -0700 Subject: [PATCH 2/5] chore: apply black formatting and enable black pre-commit hook --- .pre-commit-config.yaml | 12 ++++++------ litellm/llms/anthropic/skills/transformation.py | 4 +++- .../llm_passthrough_endpoints.py | 6 +++++- litellm/utils.py | 10 ++++++++-- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9396f323e4..2bc361bc48 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,12 +14,12 @@ repos: types: [python] files: (litellm/|litellm_proxy_extras/|enterprise/).*\.py exclude: ^litellm/__init__.py$ - # - id: black - # name: black - # entry: poetry run black - # language: system - # types: [python] - # files: (litellm/|litellm_proxy_extras/|enterprise/).*\.py + - id: black + name: black + entry: poetry run black + language: system + types: [python] + files: (litellm/|litellm_proxy_extras/).*\.py - repo: https://github.com/pycqa/flake8 rev: 7.0.0 # The version of flake8 to use hooks: diff --git a/litellm/llms/anthropic/skills/transformation.py b/litellm/llms/anthropic/skills/transformation.py index f582aefd81..a992d84d45 100644 --- a/litellm/llms/anthropic/skills/transformation.py +++ b/litellm/llms/anthropic/skills/transformation.py @@ -42,7 +42,9 @@ class AnthropicSkillsConfig(BaseSkillsAPIConfig): auth_header = AnthropicModelInfo.get_auth_header(api_key) if auth_header is None: - raise ValueError("ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN is required for Skills API") + raise ValueError( + "ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN is required for Skills API" + ) headers.update(auth_header) headers["anthropic-version"] = "2023-06-01" diff --git a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py index 96a7b5a27a..534022cc13 100644 --- a/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py +++ b/litellm/proxy/pass_through_endpoints/llm_passthrough_endpoints.py @@ -586,7 +586,11 @@ async def anthropic_proxy_route( """ [Docs](https://docs.litellm.ai/docs/pass_through/anthropic_completion) """ - base_target_url = os.getenv("ANTHROPIC_API_BASE") or os.getenv("ANTHROPIC_BASE_URL") or "https://api.anthropic.com" + base_target_url = ( + os.getenv("ANTHROPIC_API_BASE") + or os.getenv("ANTHROPIC_BASE_URL") + or "https://api.anthropic.com" + ) encoded_endpoint = httpx.URL(endpoint).path # Ensure endpoint starts with '/' for proper URL construction diff --git a/litellm/utils.py b/litellm/utils.py index 77625809bf..c8272586da 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -6160,7 +6160,10 @@ def validate_environment( # noqa: PLR0915 ["AZURE_API_BASE", "AZURE_API_VERSION", "AZURE_API_KEY"] ) elif custom_llm_provider == "anthropic": - if "ANTHROPIC_API_KEY" in os.environ or "ANTHROPIC_AUTH_TOKEN" in os.environ: + if ( + "ANTHROPIC_API_KEY" in os.environ + or "ANTHROPIC_AUTH_TOKEN" in os.environ + ): keys_in_environment = True else: missing_keys.append("ANTHROPIC_API_KEY") @@ -6399,7 +6402,10 @@ def validate_environment( # noqa: PLR0915 missing_keys.append("OPENAI_API_KEY") ## anthropic elif model in litellm.anthropic_models: - if "ANTHROPIC_API_KEY" in os.environ or "ANTHROPIC_AUTH_TOKEN" in os.environ: + if ( + "ANTHROPIC_API_KEY" in os.environ + or "ANTHROPIC_AUTH_TOKEN" in os.environ + ): keys_in_environment = True else: missing_keys.append("ANTHROPIC_API_KEY") From ff6faacc641f1d1568ef649e6dc1438c83d4a36f Mon Sep 17 00:00:00 2001 From: joereyna Date: Thu, 19 Mar 2026 21:20:12 -0700 Subject: [PATCH 3/5] fix: resolve mypy union-attr error in anthropic messages transformation --- .../experimental_pass_through/messages/transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py b/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py index 6f1a7718fc..2e0b58bc49 100644 --- a/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py +++ b/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py @@ -126,7 +126,7 @@ class AnthropicMessagesConfig(BaseAnthropicMessagesConfig): litellm_params: dict, stream: Optional[bool] = None, ) -> str: - api_base = AnthropicModelInfo.get_api_base(api_base) + api_base = AnthropicModelInfo.get_api_base(api_base) or "https://api.anthropic.com" if not api_base.endswith("/v1/messages"): api_base = f"{api_base}/v1/messages" return api_base From 6f6e23a7b0b634bb5304c2ca2fc35441fba5f905 Mon Sep 17 00:00:00 2001 From: joereyna Date: Thu, 19 Mar 2026 21:25:02 -0700 Subject: [PATCH 4/5] chore: apply black formatting to experimental_pass_through transformation --- .../experimental_pass_through/messages/transformation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py b/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py index 2e0b58bc49..9b60a58260 100644 --- a/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py +++ b/litellm/llms/anthropic/experimental_pass_through/messages/transformation.py @@ -126,7 +126,9 @@ class AnthropicMessagesConfig(BaseAnthropicMessagesConfig): litellm_params: dict, stream: Optional[bool] = None, ) -> str: - api_base = AnthropicModelInfo.get_api_base(api_base) or "https://api.anthropic.com" + api_base = ( + AnthropicModelInfo.get_api_base(api_base) or "https://api.anthropic.com" + ) if not api_base.endswith("/v1/messages"): api_base = f"{api_base}/v1/messages" return api_base From 32ada454a2e6eed5113d28ed74f0bd6f4de22f38 Mon Sep 17 00:00:00 2001 From: joereyna Date: Thu, 19 Mar 2026 20:02:58 -0700 Subject: [PATCH 5/5] fix: upgrade mcp to 1.26.0 --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index dc25864442..d43cdea726 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3473,15 +3473,15 @@ files = [ [[package]] name = "mcp" -version = "1.25.0" +version = "1.26.0" description = "Model Context Protocol SDK" optional = true python-versions = ">=3.10" groups = ["main"] markers = "python_version >= \"3.10\" and extra == \"proxy\"" files = [ - {file = "mcp-1.25.0-py3-none-any.whl", hash = "sha256:b37c38144a666add0862614cc79ec276e97d72aa8ca26d622818d4e278b9721a"}, - {file = "mcp-1.25.0.tar.gz", hash = "sha256:56310361ebf0364e2d438e5b45f7668cbb124e158bb358333cd06e49e83a6802"}, + {file = "mcp-1.26.0-py3-none-any.whl", hash = "sha256:904a21c33c25aa98ddbeb47273033c435e595bbacfdb177f4bd87f6dceebe1ca"}, + {file = "mcp-1.26.0.tar.gz", hash = "sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66"}, ] [package.dependencies]