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]

test - list batches

Ishaan Jaff4206354ee79e
diff --git a/litellm/tests/test_openai_batches_and_files.py b/litellm/tests/test_openai_batches_and_files.py
index 14aee6e19f1..e8bde4d20de 100644
--- a/litellm/tests/test_openai_batches_and_files.py
+++ b/litellm/tests/test_openai_batches_and_files.py
@@ -72,6 +72,10 @@ def test_create_batch():
assert retrieved_batch.id == create_batch_response.id
+ # list all batches
+ list_batches = litellm.list_batches(custom_llm_provider="openai", limit=2)
+ print("list_batches=", list_batches)
+
file_content = litellm.file_content(
file_id=batch_input_file_id, custom_llm_provider="openai"
)
@@ -140,6 +144,10 @@ async def test_async_create_batch():
assert retrieved_batch.id == create_batch_response.id
+ # list all batches
+ list_batches = await litellm.alist_batches(custom_llm_provider="openai", limit=2)
+ print("list_batches=", list_batches)
+
# try to get file content for our original file
file_content = await litellm.afile_content(