From 80b0ea6a2f4601e0217786019d2fe37f4b1da83b Mon Sep 17 00:00:00 2001 From: kerry Date: Sat, 19 Sep 2026 01:00:53 +0000 Subject: [PATCH] test(xai): narrow raises match for missing api key Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../llms/xai/test_xai_audio_transcription_transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_litellm/llms/xai/test_xai_audio_transcription_transformation.py b/tests/test_litellm/llms/xai/test_xai_audio_transcription_transformation.py index f2365f00ba3..0f3445eb400 100644 --- a/tests/test_litellm/llms/xai/test_xai_audio_transcription_transformation.py +++ b/tests/test_litellm/llms/xai/test_xai_audio_transcription_transformation.py @@ -92,7 +92,7 @@ def test_validate_environment_sets_bearer_header(): def test_validate_environment_requires_key(monkeypatch): monkeypatch.delenv("XAI_API_KEY", raising=False) monkeypatch.setattr(litellm, "xai_key", None) - with pytest.raises(ValueError): + with pytest.raises(ValueError, match="xAI API key is required"): CONFIG.validate_environment( headers={}, model="grok-voice-transcribe-2.0",