diff --git a/google/genai/tests/errors/test_neon_audio_503_diagnostics.py b/google/genai/tests/errors/test_neon_audio_503_diagnostics.py new file mode 100644 index 0000000000..d772587e39 --- /dev/null +++ b/google/genai/tests/errors/test_neon_audio_503_diagnostics.py @@ -0,0 +1,18 @@ +"""Regression test for HTTP 503 diagnostics on gemini-4-neon audio/mp4 payloads.""" + +import pytest +from google.genai import errors + + +def test_neon_audio_mp4_503_server_error_preserves_message() -> None: + payload = { + "error": { + "code": 503, + "message": "Model isn't available right now. Please wait a minute and try again.", + "status": "UNAVAILABLE", + } + } + err = errors.ServerError(503, payload) + assert err.code == 503 + assert err.status == "UNAVAILABLE" + assert "Model isn't available right now" in str(err)