mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-20 21:38:14 +00:00
fix: Update litellm dependency to >=1.65.1 to resolve httpx version conflicts
Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
48
tests/test_dependency_compatibility.py
Normal file
48
tests/test_dependency_compatibility.py
Normal file
@@ -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__}")
|
||||
Reference in New Issue
Block a user