Skip to content

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]

a121 fixes

Ishaan Jaffer645ca6478011
diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.py
index 5e92c10fbdc..8fc43e037d4 100644
--- a/tests/local_testing/test_completion.py
+++ b/tests/local_testing/test_completion.py
@@ -3916,26 +3916,7 @@ async def test_dynamic_azure_params(stream, sync_mode):
raise e
[email protected](retries=3, delay=1)
-async def test_completion_ai21_chat():
- litellm.set_verbose = True
- try:
- response = await litellm.acompletion(
- model="ai21_chat/jamba-mini",
- user="ishaan",
- tool_choice="auto",
- seed=123,
- messages=[{"role": "user", "content": "what does the document say"}],
- documents=[
- {
- "content": "hello world",
- "metadata": {"source": "google", "author": "ishaan"},
- }
- ],
- )
- except litellm.InternalServerError:
- pytest.skip("Model is overloaded")
+
@pytest.mark.parametrize(
diff --git a/tests/local_testing/test_streaming.py b/tests/local_testing/test_streaming.py
index b9b5d0fdb07..b6bf05c4149 100644
--- a/tests/local_testing/test_streaming.py
+++ b/tests/local_testing/test_streaming.py
@@ -552,36 +552,6 @@ async def test_completion_predibase_streaming(sync_mode):
pytest.fail(f"Error occurred: {e}")
[email protected](retries=3, delay=1)
-async def test_completion_ai21_stream():
- litellm.set_verbose = True
- response = await litellm.acompletion(
- model="ai21_chat/jamba-mini",
- user="ishaan",
- stream=True,
- seed=123,
- messages=[{"role": "user", "content": "hi my name is ishaan"}],
- )
- complete_response = ""
- idx = 0
- async for init_chunk in response:
- chunk, finished = streaming_format_tests(idx, init_chunk)
- complete_response += chunk
- custom_llm_provider = init_chunk._hidden_params["custom_llm_provider"]
- print(f"custom_llm_provider: {custom_llm_provider}")
- assert custom_llm_provider == "ai21_chat"
- idx += 1
- if finished:
- assert isinstance(init_chunk.choices[0], litellm.utils.StreamingChoices)
- break
- if complete_response.strip() == "":
- raise Exception("Empty response received")
-
- print(f"complete_response: {complete_response}")
-
- pass
-
def test_completion_azure_function_calling_stream():
try: