Here's the stack trace
File "somefile.py", line 51, in somefunc
return self.client.with_options(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/api_resources/apis/chat_complete.py", line 110, in create
return self.normal_create(
^^^^^^^^^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/api_resources/apis/chat_complete.py", line 75, in normal_create
response = self.openai_client.with_raw_response.chat.completions.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/_vendor/openai/_legacy_response.py", line 350, in wrapped
return cast(LegacyAPIResponse[R], func(*args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/_vendor/openai/_utils/_utils.py", line 274, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/_vendor/openai/resources/chat/completions.py", line 650, in create
return self._post(
^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/_vendor/openai/_base_client.py", line 1259, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/_vendor/openai/_base_client.py", line 936, in request
return self._request(
^^^^^^^^^^^^^^
File "/Users/rahul/someenv/lib/python3.12/site-packages/portkey_ai/_vendor/openai/_base_client.py", line 1006, in _request
raise APIConnectionError(request=request) from err
openai.APIConnectionError: Connection error.