Skip to content

Instantly share code, notes, and snippets.

@zby
Created August 12, 2024 10:48
Show Gist options
  • Save zby/e8a0652b196068f1492f68ff79fee31e to your computer and use it in GitHub Desktop.
Save zby/e8a0652b196068f1492f68ff79fee31e to your computer and use it in GitHub Desktop.
testing a frewsh checkout of litellm
(test_env) zby@zby-Z4:~/llm/litellm$ pip install -e .
Obtaining file:///home/zby/llm/litellm
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Collecting importlib-metadata>=6.8.0
Downloading importlib_metadata-8.2.0-py3-none-any.whl (25 kB)
Collecting openai>=1.40.0
Downloading openai-1.40.3-py3-none-any.whl (360 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 360.7/360.7 KB 6.3 MB/s eta 0:00:00
Collecting requests<3.0.0,>=2.31.0
Downloading requests-2.32.3-py3-none-any.whl (64 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.9/64.9 KB 7.5 MB/s eta 0:00:00
Collecting jsonschema<5.0.0,>=4.22.0
Downloading jsonschema-4.23.0-py3-none-any.whl (88 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.5/88.5 KB 6.6 MB/s eta 0:00:00
Collecting tokenizers
Downloading tokenizers-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.9/2.9 MB 52.1 MB/s eta 0:00:00
Collecting tiktoken>=0.7.0
Downloading tiktoken-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 52.0 MB/s eta 0:00:00
Collecting python-dotenv>=0.2.0
Downloading python_dotenv-1.0.1-py3-none-any.whl (19 kB)
Collecting aiohttp
Downloading aiohttp-3.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 48.6 MB/s eta 0:00:00
Collecting pydantic<3.0.0,>=2.0.0
Downloading pydantic-2.8.2-py3-none-any.whl (423 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 423.9/423.9 KB 33.6 MB/s eta 0:00:00
Collecting jinja2<4.0.0,>=3.1.2
Downloading jinja2-3.1.4-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 KB 13.9 MB/s eta 0:00:00
Collecting click
Using cached click-8.1.7-py3-none-any.whl (97 kB)
Collecting zipp>=0.5
Downloading zipp-3.20.0-py3-none-any.whl (9.4 kB)
Collecting MarkupSafe>=2.0
Using cached MarkupSafe-2.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting referencing>=0.28.4
Downloading referencing-0.35.1-py3-none-any.whl (26 kB)
Collecting rpds-py>=0.7.1
Downloading rpds_py-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (354 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 354.8/354.8 KB 31.3 MB/s eta 0:00:00
Collecting jsonschema-specifications>=2023.03.6
Downloading jsonschema_specifications-2023.12.1-py3-none-any.whl (18 kB)
Collecting attrs>=22.2.0
Downloading attrs-24.2.0-py3-none-any.whl (63 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.0/63.0 KB 7.1 MB/s eta 0:00:00
Collecting jiter<1,>=0.4.0
Downloading jiter-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (318 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 318.9/318.9 KB 20.2 MB/s eta 0:00:00
Collecting anyio<5,>=3.5.0
Downloading anyio-4.4.0-py3-none-any.whl (86 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 KB 7.1 MB/s eta 0:00:00
Collecting httpx<1,>=0.23.0
Using cached httpx-0.27.0-py3-none-any.whl (75 kB)
Collecting tqdm>4
Downloading tqdm-4.66.5-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.4/78.4 KB 9.2 MB/s eta 0:00:00
Collecting sniffio
Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
Collecting distro<2,>=1.7.0
Using cached distro-1.9.0-py3-none-any.whl (20 kB)
Collecting typing-extensions<5,>=4.11
Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Collecting annotated-types>=0.4.0
Downloading annotated_types-0.7.0-py3-none-any.whl (13 kB)
Collecting pydantic-core==2.20.1
Downloading pydantic_core-2.20.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 67.7 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
Downloading certifi-2024.7.4-py3-none-any.whl (162 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.0/163.0 KB 17.0 MB/s eta 0:00:00
Collecting idna<4,>=2.5
Downloading idna-3.7-py3-none-any.whl (66 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 KB 7.8 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2
Using cached charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Collecting urllib3<3,>=1.21.1
Downloading urllib3-2.2.2-py3-none-any.whl (121 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.4/121.4 KB 10.9 MB/s eta 0:00:00
Collecting regex>=2022.1.18
Downloading regex-2024.7.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (776 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 776.5/776.5 KB 35.9 MB/s eta 0:00:00
Collecting yarl<2.0,>=1.0
Using cached yarl-1.9.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (301 kB)
Collecting frozenlist>=1.1.1
Using cached frozenlist-1.4.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (239 kB)
Collecting aiosignal>=1.1.2
Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting multidict<7.0,>=4.5
Using cached multidict-6.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (124 kB)
Collecting aiohappyeyeballs>=2.3.0
Downloading aiohappyeyeballs-2.3.5-py3-none-any.whl (12 kB)
Collecting async-timeout<5.0,>=4.0
Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
Collecting huggingface-hub<1.0,>=0.16.4
Downloading huggingface_hub-0.24.5-py3-none-any.whl (417 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 417.5/417.5 KB 52.0 MB/s eta 0:00:00
Collecting exceptiongroup>=1.0.2
Downloading exceptiongroup-1.2.2-py3-none-any.whl (16 kB)
Collecting httpcore==1.*
Using cached httpcore-1.0.5-py3-none-any.whl (77 kB)
Collecting h11<0.15,>=0.13
Using cached h11-0.14.0-py3-none-any.whl (58 kB)
Collecting packaging>=20.9
Downloading packaging-24.1-py3-none-any.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 KB 3.8 MB/s eta 0:00:00
Collecting fsspec>=2023.5.0
Downloading fsspec-2024.6.1-py3-none-any.whl (177 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.6/177.6 KB 18.8 MB/s eta 0:00:00
Collecting pyyaml>=5.1
Downloading PyYAML-6.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (751 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 751.2/751.2 KB 44.5 MB/s eta 0:00:00
Collecting filelock
Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
Building wheels for collected packages: litellm
Building editable for litellm (pyproject.toml) ... done
Created wheel for litellm: filename=litellm-1.43.7-py3-none-any.whl size=8027 sha256=eafea9d826d782c874c984e82a3016f6f524c912c0205109ee8e7006a288bb79
Stored in directory: /tmp/pip-ephem-wheel-cache-6bldpwuw/wheels/18/31/54/4bd8fb22dccb026eaa8036b762ef88617b4597172bbe78dc0d
Successfully built litellm
Installing collected packages: zipp, urllib3, typing-extensions, tqdm, sniffio, rpds-py, regex, pyyaml, python-dotenv, packaging, multidict, MarkupSafe, jiter, idna, h11, fsspec, frozenlist, filelock, exceptiongroup, distro, click, charset-normalizer, certifi, attrs, async-timeout, annotated-types, aiohappyeyeballs, yarl, requests, referencing, pydantic-core, jinja2, importlib-metadata, httpcore, anyio, aiosignal, tiktoken, pydantic, jsonschema-specifications, huggingface-hub, httpx, aiohttp, tokenizers, openai, jsonschema, litellm
Successfully installed MarkupSafe-2.1.5 aiohappyeyeballs-2.3.5 aiohttp-3.10.3 aiosignal-1.3.1 annotated-types-0.7.0 anyio-4.4.0 async-timeout-4.0.3 attrs-24.2.0 certifi-2024.7.4 charset-normalizer-3.3.2 click-8.1.7 distro-1.9.0 exceptiongroup-1.2.2 filelock-3.15.4 frozenlist-1.4.1 fsspec-2024.6.1 h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 huggingface-hub-0.24.5 idna-3.7 importlib-metadata-8.2.0 jinja2-3.1.4 jiter-0.5.0 jsonschema-4.23.0 jsonschema-specifications-2023.12.1 litellm-1.43.7 multidict-6.0.5 openai-1.40.3 packaging-24.1 pydantic-2.8.2 pydantic-core-2.20.1 python-dotenv-1.0.1 pyyaml-6.0.2 referencing-0.35.1 regex-2024.7.24 requests-2.32.3 rpds-py-0.20.0 sniffio-1.3.1 tiktoken-0.7.0 tokenizers-0.20.0 tqdm-4.66.5 typing-extensions-4.12.2 urllib3-2.2.2 yarl-1.9.4 zipp-3.20.0
(test_env) zby@zby-Z4:~/llm/litellm$ pytest
====================================================================================================== test session starts ======================================================================================================
platform linux -- Python 3.10.12, pytest-8.2.0, pluggy-1.5.0
rootdir: /home/zby/llm/litellm
configfile: pyproject.toml
plugins: anyio-4.2.0, mock-3.14.0, asyncio-0.21.1
asyncio: mode=strict
collected 55 items / 20 errors
============================================================================================================ ERRORS =============================================================================================================
_______________________________________________________________________ ERROR collecting cookbook/litellm_router_load_test/test_loadtest_openai_client.py _______________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/cookbook/litellm_router_load_test/test_loadtest_openai_client.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
cookbook/litellm_router_load_test/test_loadtest_openai_client.py:11: in <module>
from litellm import Router, Timeout
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
__________________________________________________________________________ ERROR collecting cookbook/litellm_router_load_test/test_loadtest_router.py ___________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/cookbook/litellm_router_load_test/test_loadtest_router.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
cookbook/litellm_router_load_test/test_loadtest_router.py:11: in <module>
from litellm import Router, Timeout
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
____________________________________________________________________ ERROR collecting cookbook/litellm_router_load_test/test_loadtest_router_withs3_cache.py ____________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/cookbook/litellm_router_load_test/test_loadtest_router_withs3_cache.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
cookbook/litellm_router_load_test/test_loadtest_router_withs3_cache.py:11: in <module>
from litellm import Router, Timeout
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
______________________________________________________________________________________ ERROR collecting litellm/integrations/test_httpx.py ______________________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/litellm/integrations/test_httpx.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
__________________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_anthropic_sdk.py ___________________________________________________________________________________
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
litellm/proxy/tests/test_anthropic_sdk.py:12: in <module>
message = client.messages.create(
../../.local/lib/python3.10/site-packages/anthropic/_utils/_utils.py:277: in wrapper
return func(*args, **kwargs)
../../.local/lib/python3.10/site-packages/anthropic/resources/messages.py:904: in create
return self._post(
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:1249: in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:931: in request
return self._request(
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:1062: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:1062: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/anthropic/_base_client.py:996: in _request
raise APIConnectionError(request=request) from err
E anthropic.APIConnectionError: Connection error.
______________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_gemini_context_caching.py ______________________________________________________________________________
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
litellm/proxy/tests/test_gemini_context_caching.py:16: in <module>
create_cache = httpx_client.post(
../../.local/lib/python3.10/site-packages/httpx/_client.py:1146: in post
return self.request(
../../.local/lib/python3.10/site-packages/httpx/_client.py:828: in request
return self.send(request, auth=auth, follow_redirects=follow_redirects)
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
-------------------------------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------------------------------
creating cached content
____________________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_llamaindex.py ____________________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/litellm/proxy/tests/test_llamaindex.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
litellm/proxy/tests/test_llamaindex.py:7: in <module>
from llama_index.llms import AzureOpenAI
E ImportError: cannot import name 'AzureOpenAI' from 'llama_index.llms' (unknown location)
___________________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_mistral_sdk.py ____________________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/litellm/proxy/tests/test_mistral_sdk.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
litellm/proxy/tests/test_mistral_sdk.py:3: in <module>
from mistralai.client import MistralClient
E ModuleNotFoundError: No module named 'mistralai'
_________________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_openai_embedding.py _________________________________________________________________________________
../../.local/lib/python3.10/site-packages/anyio/_core/_sockets.py:170: in try_connect
stream = await asynclib.connect_tcp(remote_host, remote_port, local_address)
../../.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py:2258: in connect_tcp
await get_running_loop().create_connection(
/usr/lib/python3.10/asyncio/base_events.py:1076: in create_connection
raise exceptions[0]
/usr/lib/python3.10/asyncio/base_events.py:1060: in create_connection
sock = await self._connect_sock(
/usr/lib/python3.10/asyncio/base_events.py:969: in _connect_sock
await self.sock_connect(sock, address)
/usr/lib/python3.10/asyncio/selector_events.py:501: in sock_connect
return await fut
/usr/lib/python3.10/asyncio/selector_events.py:541: in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
E ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 4000)
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/anyio.py:114: in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
../../.local/lib/python3.10/site-packages/anyio/_core/_sockets.py:232: in connect_tcp
raise OSError("All connection attempts failed") from cause
E OSError: All connection attempts failed
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:371: in handle_async_request
resp = await self._pool.handle_async_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py:268: in handle_async_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py:251: in handle_async_request
response = await connection.handle_async_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_async/connection.py:99: in handle_async_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_async/connection.py:76: in handle_async_request
stream = await self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_async/connection.py:124: in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/auto.py:30: in connect_tcp
return await self._backend.connect_tcp(
../../.local/lib/python3.10/site-packages/httpcore/_backends/anyio.py:112: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1537: in _request
response = await self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:1646: in send
response = await self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:1674: in _send_handling_auth
response = await self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:1711: in _send_handling_redirects
response = await self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1748: in _send_single_request
response = await transport.handle_async_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:370: in handle_async_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception:
litellm/proxy/tests/test_openai_embedding.py:126: in <module>
asyncio.run(main())
/usr/lib/python3.10/asyncio/runners.py:44: in run
return loop.run_until_complete(main)
/usr/lib/python3.10/asyncio/base_events.py:649: in run_until_complete
return future.result()
litellm/proxy/tests/test_openai_embedding.py:117: in main
responses = await asyncio.gather(*tasks)
litellm/proxy/tests/test_openai_embedding.py:6: in async_request
response = await client.embeddings.create(model=model, input=input_data)
../../.local/lib/python3.10/site-packages/openai/resources/embeddings.py:215: in create
return await self._post(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1805: in post
return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1503: in request
return await self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1561: in _request
return await self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1630: in _retry_request
return await self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1561: in _request
return await self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1630: in _retry_request
return await self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1571: in _request
raise APIConnectionError(request=request) from err
E openai.APIConnectionError: Connection error.
_____________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_openai_exception_request.py _____________________________________________________________________________
litellm/proxy/tests/test_openai_exception_request.py:34: in <module>
client = openai.AzureOpenAI(
../../.local/lib/python3.10/site-packages/openai/lib/azure.py:169: in __init__
raise OpenAIError(
E openai.OpenAIError: Missing credentials. Please pass one of `api_key`, `azure_ad_token`, `azure_ad_token_provider`, or the `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_AD_TOKEN` environment variables.
-------------------------------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------------------------------
Connection error.
proxy exception variables dict_keys(['request', 'message', 'body', 'code', 'param', 'type'])
None
None None
__________________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_openai_request.py __________________________________________________________________________________
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
litellm/proxy/tests/test_openai_request.py:6: in <module>
response = client.chat.completions.create(
../../.local/lib/python3.10/site-packages/openai/_utils/_utils.py:277: in wrapper
return func(*args, **kwargs)
../../.local/lib/python3.10/site-packages/openai/resources/chat/completions.py:640: in create
return self._post(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1250: in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
../../.local/lib/python3.10/site-packages/openai/_base_client.py:931: in request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1063: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1063: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:996: in _request
raise APIConnectionError(request=request) from err
E openai.APIConnectionError: Connection error.
_________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_openai_request_with_traceparent.py __________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/litellm/proxy/tests/test_openai_request_with_traceparent.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
litellm/proxy/tests/test_openai_request_with_traceparent.py:3: in <module>
from opentelemetry import trace
E ModuleNotFoundError: No module named 'opentelemetry'
_____________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_openai_simple_embedding.py ______________________________________________________________________________
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
litellm/proxy/tests/test_openai_simple_embedding.py:6: in <module>
response = client.embeddings.create(
../../.local/lib/python3.10/site-packages/openai/resources/embeddings.py:114: in create
return self._post(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1250: in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
../../.local/lib/python3.10/site-packages/openai/_base_client.py:931: in request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1063: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1063: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:996: in _request
raise APIConnectionError(request=request) from err
E openai.APIConnectionError: Connection error.
______________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_pass_through_langfuse.py _______________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/litellm/proxy/tests/test_pass_through_langfuse.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
litellm/proxy/tests/test_pass_through_langfuse.py:1: in <module>
from langfuse import Langfuse
E ModuleNotFoundError: No module named 'langfuse'
________________________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_q.py _________________________________________________________________________________________
../../.local/lib/python3.10/site-packages/requests/models.py:971: in json
return complexjson.loads(self.text, **kwargs)
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/usr/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
/usr/lib/python3.10/json/decoder.py:355: in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
litellm/proxy/tests/test_q.py:37: in <module>
print("\n json response from gen key", response.json())
../../.local/lib/python3.10/site-packages/requests/models.py:975: in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
E requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
-------------------------------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------------------------------
response from generating key <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Service Suspended</title>
</head>
<body>
This service has been suspended.
</body>
</html>
____________________________________________________________________________ ERROR collecting litellm/proxy/tests/test_simple_traceparent_openai.py _____________________________________________________________________________
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:10: in map_exceptions
yield
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:206: in connect_tcp
sock = socket.create_connection(
/usr/lib/python3.10/socket.py:845: in create_connection
raise err
/usr/lib/python3.10/socket.py:833: in create_connection
sock.connect(sa)
E ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:67: in map_httpcore_exceptions
yield
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:231: in handle_request
resp = self._pool.handle_request(req)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:268: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection_pool.py:251: in handle_request
response = connection.handle_request(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:99: in handle_request
raise exc
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:76: in handle_request
stream = self._connect(request)
../../.local/lib/python3.10/site-packages/httpcore/_sync/connection.py:124: in _connect
stream = self._network_backend.connect_tcp(**kwargs)
../../.local/lib/python3.10/site-packages/httpcore/_backends/sync.py:205: in connect_tcp
with map_exceptions(exc_map):
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpcore/_exceptions.py:14: in map_exceptions
raise to_exc(exc) from exc
E httpcore.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
../../.local/lib/python3.10/site-packages/openai/_base_client.py:962: in _request
response = self._client.send(
../../.local/lib/python3.10/site-packages/httpx/_client.py:915: in send
response = self._send_handling_auth(
../../.local/lib/python3.10/site-packages/httpx/_client.py:943: in _send_handling_auth
response = self._send_handling_redirects(
../../.local/lib/python3.10/site-packages/httpx/_client.py:980: in _send_handling_redirects
response = self._send_single_request(request)
../../.local/lib/python3.10/site-packages/httpx/_client.py:1016: in _send_single_request
response = transport.handle_request(request)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:230: in handle_request
with map_httpcore_exceptions():
/usr/lib/python3.10/contextlib.py:153: in __exit__
self.gen.throw(typ, value, traceback)
../../.local/lib/python3.10/site-packages/httpx/_transports/default.py:84: in map_httpcore_exceptions
raise mapped_exc(message) from exc
E httpx.ConnectError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
litellm/proxy/tests/test_simple_traceparent_openai.py:13: in <module>
response = client.chat.completions.create(
../../.local/lib/python3.10/site-packages/openai/_utils/_utils.py:277: in wrapper
return func(*args, **kwargs)
../../.local/lib/python3.10/site-packages/openai/resources/chat/completions.py:640: in create
return self._post(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1250: in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
../../.local/lib/python3.10/site-packages/openai/_base_client.py:931: in request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1063: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:986: in _request
return self._retry_request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:1063: in _retry_request
return self._request(
../../.local/lib/python3.10/site-packages/openai/_base_client.py:996: in _request
raise APIConnectionError(request=request) from err
E openai.APIConnectionError: Connection error.
-------------------------------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------------------------------
EXTRA HEADERS: {'traceparent': '00-80e1afed08e019fc1110464cfa66635c-02e80198930058d4-01'}
Trace ID: 80e1afed08e019fc1110464cfa66635c
________________________________________________________________________________________________ ERROR collecting litellm/tests _________________________________________________________________________________________________
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
???
<frozen importlib._bootstrap>:1027: in _find_and_load
???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:688: in _load_unlocked
???
../../.local/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
exec(co, module.__dict__)
litellm/tests/conftest.py:12: in <module>
import litellm
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
___________________________________________________________________________________________ ERROR collecting tests/test_entrypoint.py ___________________________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/tests/test_entrypoint.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_entrypoint.py:11: in <module>
import litellm
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
______________________________________________________________________________________________ ERROR collecting tests/test_keys.py ______________________________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/tests/test_keys.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_keys.py:14: in <module>
import litellm
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
___________________________________________________________________________________________ ERROR collecting tests/test_ratelimit.py ____________________________________________________________________________________________
ImportError while importing test module '/home/zby/llm/litellm/tests/test_ratelimit.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_ratelimit.py:17: in <module>
from litellm import utils, Router
litellm/__init__.py:788: in <module>
from .cost_calculator import completion_cost
litellm/cost_calculator.py:24: in <module>
from litellm.utils import (
litellm/utils.py:48: in <module>
from openai.lib import _parsing, _pydantic
E ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
======================================================================================================= warnings summary ========================================================================================================
../../.local/lib/python3.10/site-packages/pydantic/_internal/_config.py:271
/home/zby/.local/lib/python3.10/site-packages/pydantic/_internal/_config.py:271: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/
warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)
tests/test_callbacks_on_proxy.py:101
/home/zby/llm/litellm/tests/test_callbacks_on_proxy.py:101: PytestUnknownMarkWarning: Unknown pytest.mark.order1 - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.order1
tests/test_callbacks_on_proxy.py:149
/home/zby/llm/litellm/tests/test_callbacks_on_proxy.py:149: PytestUnknownMarkWarning: Unknown pytest.mark.order2 - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
@pytest.mark.order2
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
==================================================================================================== short test summary info ====================================================================================================
ERROR cookbook/litellm_router_load_test/test_loadtest_openai_client.py
ERROR cookbook/litellm_router_load_test/test_loadtest_router.py
ERROR cookbook/litellm_router_load_test/test_loadtest_router_withs3_cache.py
ERROR litellm/integrations/test_httpx.py
ERROR litellm/proxy/tests/test_anthropic_sdk.py - anthropic.APIConnectionError: Connection error.
ERROR litellm/proxy/tests/test_gemini_context_caching.py - httpx.ConnectError: [Errno 111] Connection refused
ERROR litellm/proxy/tests/test_llamaindex.py
ERROR litellm/proxy/tests/test_mistral_sdk.py
ERROR litellm/proxy/tests/test_openai_embedding.py - openai.APIConnectionError: Connection error.
ERROR litellm/proxy/tests/test_openai_exception_request.py - openai.OpenAIError: Missing credentials. Please pass one of `api_key`, `azure_ad_token`, `azure_ad_token_provider`, or the `AZURE_OPENAI_API_KEY` or `AZURE_OPENAI_AD_TOKEN` environment variables.
ERROR litellm/proxy/tests/test_openai_request.py - openai.APIConnectionError: Connection error.
ERROR litellm/proxy/tests/test_openai_request_with_traceparent.py
ERROR litellm/proxy/tests/test_openai_simple_embedding.py - openai.APIConnectionError: Connection error.
ERROR litellm/proxy/tests/test_pass_through_langfuse.py
ERROR litellm/proxy/tests/test_q.py - requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
ERROR litellm/proxy/tests/test_simple_traceparent_openai.py - openai.APIConnectionError: Connection error.
ERROR litellm/tests - ImportError: cannot import name '_parsing' from 'openai.lib' (unknown location)
ERROR tests/test_entrypoint.py
ERROR tests/test_keys.py
ERROR tests/test_ratelimit.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 20 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================================ 3 warnings, 20 errors in 22.53s ================================================================================================
(test_env) zby@zby-Z4:~/llm/litellm$
@zby
Copy link
Author

zby commented Aug 12, 2024

This was in a fresh env with Python 3.10.12

@zby
Copy link
Author

zby commented Aug 12, 2024

Later I also tried installing pytest and pytest-mock into the test environment - but I was still getting tons of errors.

By the way pytest-asyncio is surely a missing test dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment