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",