The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
set timeout for deepseek testing
Ishaan Jaff46469c608743
diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.pyindex 1a3f90a0bcc..b1aeeb98a27 100644--- a/tests/local_testing/test_completion.py+++ b/tests/local_testing/test_completion.py@@ -4540,13 +4540,18 @@ def test_humanloop_completion(monkeypatch):def test_deepseek_reasoning_content_completion():- litellm.set_verbose = True- resp = litellm.completion(- model="deepseek/deepseek-reasoner",- messages=[{"role": "user", "content": "Tell me a joke."}],- )+ try:+ litellm.set_verbose = True+ litellm._turn_on_debug()+ resp = litellm.completion(+ timeout=5,+ model="deepseek/deepseek-reasoner",+ messages=[{"role": "user", "content": "Tell me a joke."}],+ )- assert resp.choices[0].message.reasoning_content is not None+ assert resp.choices[0].message.reasoning_content is not None+ except litellm.Timeout:+ pytest.skip("Model is timing out")@pytest.mark.parametrize(diff --git a/tests/local_testing/test_streaming.py b/tests/local_testing/test_streaming.pyindex 527742b3256..6958592c51f 100644--- a/tests/local_testing/test_streaming.py+++ b/tests/local_testing/test_streaming.py@@ -4067,16 +4067,20 @@ def test_mock_response_iterator_tool_use():def test_deepseek_reasoning_content_completion():# litellm.set_verbose = True- resp = litellm.completion(- model="deepseek/deepseek-reasoner",- messages=[{"role": "user", "content": "Tell me a joke."}],- stream=True,- )+ try:+ resp = litellm.completion(+ model="deepseek/deepseek-reasoner",+ messages=[{"role": "user", "content": "Tell me a joke."}],+ stream=True,+ timeout=5,+ )- reasoning_content_exists = False- for chunk in resp:- print(f"chunk: {chunk}")- if chunk.choices[0].delta.reasoning_content is not None:- reasoning_content_exists = True- break- assert reasoning_content_exists+ reasoning_content_exists = False+ for chunk in resp:+ print(f"chunk: {chunk}")+ if chunk.choices[0].delta.reasoning_content is not None:+ reasoning_content_exists = True+ break+ assert reasoning_content_exists+ except litellm.Timeout:+ pytest.skip("Model is timing out")