From 60216bad222bfb4f08e72a02ef81d45f83ad0bf5 Mon Sep 17 00:00:00 2001 From: Thomas Menard Date: Sun, 3 May 2026 18:09:29 +0200 Subject: [PATCH] fix: add missing Fetch httpxSpecialProvider, fix get_async_httpx_client call --- litellm/llms/firecrawl/fetch/transformation.py | 7 +++++-- litellm/types/llms/custom_http.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/litellm/llms/firecrawl/fetch/transformation.py b/litellm/llms/firecrawl/fetch/transformation.py index 003381187f8..9bc04707eee 100644 --- a/litellm/llms/firecrawl/fetch/transformation.py +++ b/litellm/llms/firecrawl/fetch/transformation.py @@ -8,7 +8,10 @@ Supports both Firecrawl Cloud and self-hosted instances. from typing import Any, Dict, Optional from litellm.llms.base_llm.fetch.transformation import BaseFetchConfig, WebFetchResponse -from litellm.llms.custom_httpx.http_handler import get_async_httpx_client +from litellm.llms.custom_httpx.http_handler import ( + get_async_httpx_client, + httpxSpecialProvider, +) from litellm.secret_managers.main import get_secret_str @@ -94,7 +97,7 @@ class FirecrawlFetchConfig(BaseFetchConfig): # Allow passing api_base via optional_params for dynamic override api_base = optional_params.get("api_base") - client = get_async_httpx_client() + client = get_async_httpx_client(llm_provider=httpxSpecialProvider.Fetch) response = await client.post( self.get_complete_url(api_base=api_base), headers=headers, diff --git a/litellm/types/llms/custom_http.py b/litellm/types/llms/custom_http.py index 792adb4182d..95146f135db 100644 --- a/litellm/types/llms/custom_http.py +++ b/litellm/types/llms/custom_http.py @@ -23,6 +23,7 @@ class httpxSpecialProvider(str, Enum): SSO_HANDLER = "sso_handler" Search = "search" MCP = "mcp" + Fetch = "fetch" RAG = "rag" A2AProvider = "a2a_provider" AgentHealthCheck = "agent_health_check"