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]

update tests

Ishaan Jaff55139b8fd6c9
diff --git a/tests/llm_translation/test_openai.py b/tests/llm_translation/test_openai.py
index e76609dd6fd..234d59fe96b 100644
--- a/tests/llm_translation/test_openai.py
+++ b/tests/llm_translation/test_openai.py
@@ -308,7 +308,7 @@ def test_completion_bad_org():
)
print(exc_info.value)
- assert "No such organization: bad-org" in str(exc_info.value)
+ assert "header should match organization for API key" in str(exc_info.value)
if _old_org is not None:
os.environ["OPENAI_ORGANIZATION"] = _old_org
diff --git a/tests/local_testing/test_completion.py b/tests/local_testing/test_completion.py
index f4fed301c0f..135be8f5b65 100644
--- a/tests/local_testing/test_completion.py
+++ b/tests/local_testing/test_completion.py
@@ -2134,7 +2134,7 @@ def test_completion_openai_organization():
)
pytest.fail("Request should have failed - This organization does not exist")
except Exception as e:
- assert "No such organization: org-ikDc4ex8NB" in str(e)
+ assert "header should match organization for API key" in str(e)
except Exception as e:
print(e)
diff --git a/tests/local_testing/test_router_init.py b/tests/local_testing/test_router_init.py
index 9b4e12f12c9..af46d1dc875 100644
--- a/tests/local_testing/test_router_init.py
+++ b/tests/local_testing/test_router_init.py
@@ -448,7 +448,7 @@ async def test_openai_with_organization(sync_mode):
)
except Exception as e:
print("Got exception: " + str(e))
- assert "No such organization: org-ikDc4ex8NB" in str(e)
+ assert "header should match organization for API key" in str(e)
# good org works
response = router.completion(
@@ -478,7 +478,7 @@ async def test_openai_with_organization(sync_mode):
)
except Exception as e:
print("Got exception: " + str(e))
- assert "No such organization: org-ikDc4ex8NB" in str(e)
+ assert "header should match organization for API key" in str(e)
# good org works
response = await router.acompletion(
@@ -581,7 +581,7 @@ async def test_aaaaatext_completion_with_organization():
pytest.fail("Request should have failed - This organization does not exist")
except Exception as e:
print("Got exception: " + str(e))
- assert "No such organization: org-ikDc4ex8NB" in str(e)
+ assert "header should match organization for API key" in str(e)
# good org works
response = await router.atext_completion(