Skip to content

Commit b622a07

Browse files
Merge branch 'webb/litellm/embedding-tests' into webb/litellm/error-mock
2 parents ad16c7f + dda374f commit b622a07

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

tests/integrations/litellm/test_litellm.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ async def __call__(self, *args, **kwargs):
3838
import litellm.utils as litellm_utils
3939
from litellm.litellm_core_utils import streaming_handler
4040
from litellm.litellm_core_utils import thread_pool_executor
41+
from litellm.litellm_core_utils import litellm_logging
4142
from litellm.llms.custom_httpx.http_handler import HTTPHandler
4243

4344

@@ -48,6 +49,7 @@ def _reset_litellm_executor():
4849
thread_pool_executor.executor = ThreadPoolExecutor(max_workers=100)
4950
litellm_utils.executor = thread_pool_executor.executor
5051
streaming_handler.executor = thread_pool_executor.executor
52+
litellm_logging.executor = thread_pool_executor.executor
5153

5254

5355
@pytest.fixture()
@@ -158,7 +160,7 @@ def test_nonstreaming_chat_completion(
158160
model_response = get_model_response(
159161
nonstreaming_chat_completions_model_response,
160162
serialize_pydantic=True,
161-
request_headers={"X-Stainless-Raw-Response": "True"},
163+
request_headers={"X-Stainless-Raw-Response": "true"},
162164
)
163165

164166
with mock.patch.object(
@@ -243,7 +245,7 @@ def test_streaming_chat_completion(
243245
streaming_chat_completions_model_response,
244246
include_event_type=False,
245247
),
246-
request_headers={"X-Stainless-Raw-Response": "True"},
248+
request_headers={"X-Stainless-Raw-Response": "true"},
247249
)
248250

249251
with mock.patch.object(
@@ -520,7 +522,7 @@ def test_span_origin(
520522
model_response = get_model_response(
521523
nonstreaming_chat_completions_model_response,
522524
serialize_pydantic=True,
523-
request_headers={"X-Stainless-Raw-Response": "True"},
525+
request_headers={"X-Stainless-Raw-Response": "true"},
524526
)
525527

526528
with mock.patch.object(
@@ -565,7 +567,7 @@ def test_multiple_providers(
565567
openai_model_response = get_model_response(
566568
nonstreaming_chat_completions_model_response,
567569
serialize_pydantic=True,
568-
request_headers={"X-Stainless-Raw-Response": "True"},
570+
request_headers={"X-Stainless-Raw-Response": "true"},
569571
)
570572

571573
with mock.patch.object(
@@ -588,7 +590,7 @@ def test_multiple_providers(
588590
anthropic_model_response = get_model_response(
589591
nonstreaming_anthropic_model_response,
590592
serialize_pydantic=True,
591-
request_headers={"X-Stainless-Raw-Response": "True"},
593+
request_headers={"X-Stainless-Raw-Response": "true"},
592594
)
593595

594596
with mock.patch.object(
@@ -657,7 +659,7 @@ def test_additional_parameters(
657659
model_response = get_model_response(
658660
nonstreaming_chat_completions_model_response,
659661
serialize_pydantic=True,
660-
request_headers={"X-Stainless-Raw-Response": "True"},
662+
request_headers={"X-Stainless-Raw-Response": "true"},
661663
)
662664

663665
with mock.patch.object(
@@ -750,7 +752,7 @@ def test_no_integration(
750752
model_response = get_model_response(
751753
nonstreaming_chat_completions_model_response,
752754
serialize_pydantic=True,
753-
request_headers={"X-Stainless-Raw-Response": "True"},
755+
request_headers={"X-Stainless-Raw-Response": "true"},
754756
)
755757

756758
with mock.patch.object(
@@ -926,7 +928,7 @@ def test_binary_content_encoding_image_url(
926928
model_response = get_model_response(
927929
nonstreaming_chat_completions_model_response,
928930
serialize_pydantic=True,
929-
request_headers={"X-Stainless-Raw-Response": "True"},
931+
request_headers={"X-Stainless-Raw-Response": "true"},
930932
)
931933

932934
with mock.patch.object(
@@ -1005,7 +1007,7 @@ def test_binary_content_encoding_mixed_content(
10051007
model_response = get_model_response(
10061008
nonstreaming_chat_completions_model_response,
10071009
serialize_pydantic=True,
1008-
request_headers={"X-Stainless-Raw-Response": "True"},
1010+
request_headers={"X-Stainless-Raw-Response": "true"},
10091011
)
10101012

10111013
with mock.patch.object(
@@ -1070,7 +1072,7 @@ def test_binary_content_encoding_uri_type(
10701072
model_response = get_model_response(
10711073
nonstreaming_chat_completions_model_response,
10721074
serialize_pydantic=True,
1073-
request_headers={"X-Stainless-Raw-Response": "True"},
1075+
request_headers={"X-Stainless-Raw-Response": "true"},
10741076
)
10751077

10761078
with mock.patch.object(

0 commit comments

Comments
 (0)