From aeb89605e0de2893cd79e164411273e517b868f2 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 17:30:50 +0000 Subject: [PATCH] fix: Update litellm dependency to >=1.65.1 to resolve httpx version conflicts Co-Authored-By: Joe Moura --- pyproject.toml | 2 +- tests/test_dependency_compatibility.py | 48 ++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 tests/test_dependency_compatibility.py diff --git a/pyproject.toml b/pyproject.toml index 799efacb8..28e1edc39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ # Core Dependencies "pydantic>=2.4.2", "openai>=1.13.3", - "litellm==1.60.2", + "litellm>=1.65.1", "instructor>=1.3.3", # Text Processing "pdfplumber>=0.11.4", diff --git a/tests/test_dependency_compatibility.py b/tests/test_dependency_compatibility.py new file mode 100644 index 000000000..5bb5df693 --- /dev/null +++ b/tests/test_dependency_compatibility.py @@ -0,0 +1,48 @@ +import importlib.util +import sys +import pytest + + +def test_httpx_litellm_compatibility(): + """Test that litellm is compatible with the latest httpx""" + import httpx + import litellm + + assert hasattr(httpx, "__version__") + + print(f"Using httpx version: {httpx.__version__}") + print("Successfully imported litellm") + + +def test_exa_py_compatibility(): + """Test that exa-py can be imported alongside litellm""" + if importlib.util.find_spec("exa") is None: + pytest.skip("exa-py not installed") + + import exa + import litellm + import httpx + + assert hasattr(exa, "__version__") + assert hasattr(httpx, "__version__") + + print(f"Using exa-py version: {exa.__version__}") + print("Successfully imported litellm") + print(f"Using httpx version: {httpx.__version__}") + + +def test_google_genai_compatibility(): + """Test that google-genai can be imported alongside litellm""" + if importlib.util.find_spec("google.generativeai") is None: + pytest.skip("google-genai not installed") + + from google import generativeai + import litellm + import httpx + + assert hasattr(generativeai, "version") + assert hasattr(httpx, "__version__") + + print(f"Using google-genai version: {generativeai.version}") + print("Successfully imported litellm") + print(f"Using httpx version: {httpx.__version__}")