From 9a710306f8b1dfbc9566b3c4130122b97f3eaf09 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 29 Oct 2026 13:25:28 -0700 Subject: [PATCH] test(openai): accept SDK 2's missing-key message in the unkeyed deployment test --- tests/unit/llms/openai/test_openai_common_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/llms/openai/test_openai_common_utils.py b/tests/unit/llms/openai/test_openai_common_utils.py index 820c00c015d..6006b5e0d58 100644 --- a/tests/unit/llms/openai/test_openai_common_utils.py +++ b/tests/unit/llms/openai/test_openai_common_utils.py @@ -592,7 +592,7 @@ async def test_unkeyed_openai_deployment_never_sends_the_openai_admin_key( "api_base": api_base, } - with pytest.raises(litellm.AuthenticationError, match="Missing credentials"): + with pytest.raises(litellm.AuthenticationError, match=r"Missing credentials|The api_key client option must be set"): await litellm.acompletion(**request) if is_async else litellm.completion(**request) assert not route.called