From 14095ee14444c3bfaff5546dc10d6ea0e664dc2d Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 28 Mar 2026 20:38:54 -0700 Subject: [PATCH] [Fix] Remove NLP_CLOUD_API_KEY requirement from test_exceptions.py The test only needs a bad key to verify AuthenticationError handling. No other tests use this env var, and it's not provisioned in CI. Co-Authored-By: Claude Opus 4.6 (1M context) --- tests/local_testing/test_exceptions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/local_testing/test_exceptions.py b/tests/local_testing/test_exceptions.py index 2c950d7906..ebab2030c1 100644 --- a/tests/local_testing/test_exceptions.py +++ b/tests/local_testing/test_exceptions.py @@ -185,7 +185,6 @@ def invalid_auth(model): # set the model key to an invalid key, depending on th temporary_key = os.environ["ALEPH_ALPHA_API_KEY"] os.environ["ALEPH_ALPHA_API_KEY"] = "bad-key" elif model in litellm.nlp_cloud_models: - temporary_key = os.environ["NLP_CLOUD_API_KEY"] os.environ["NLP_CLOUD_API_KEY"] = "bad-key" elif ( model @@ -230,7 +229,7 @@ def invalid_auth(model): # set the model key to an invalid key, depending on th elif model in litellm.aleph_alpha_models: os.environ["ALEPH_ALPHA_API_KEY"] = temporary_key elif model in litellm.nlp_cloud_models: - os.environ["NLP_CLOUD_API_KEY"] = temporary_key + os.environ.pop("NLP_CLOUD_API_KEY", None) elif "bedrock" in model: os.environ["AWS_ACCESS_KEY_ID"] = temporary_aws_access_key os.environ["AWS_REGION_NAME"] = temporary_aws_region_name