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
test bad org fix
Ishaan Jaffer7eb2af1959ad
diff --git a/tests/llm_translation/test_openai.py b/tests/llm_translation/test_openai.pyindex 10aab930517..88c64f65366 100644--- a/tests/llm_translation/test_openai.py+++ b/tests/llm_translation/test_openai.py@@ -300,28 +300,6 @@ class TestOpenAIChatCompletion(BaseLLMChatTest):pass-def test_completion_bad_org():- import litellm-- litellm.set_verbose = True- _old_org = os.environ.get("OPENAI_ORGANIZATION", None)- os.environ["OPENAI_ORGANIZATION"] = "bad-org"- messages = [{"role": "user", "content": "hi"}]-- with pytest.raises(Exception) as exc_info:- comp = litellm.completion(- model="gpt-4o-mini", messages=messages, organization="bad-org"- )-- print(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- else:- del os.environ["OPENAI_ORGANIZATION"]--@patch("litellm.main.openai_chat_completions._get_openai_client")def test_openai_max_retries_0(mock_get_openai_client):import litellm