diff --git a/tests/local_testing/test_custom_callback_input.py b/tests/local_testing/test_custom_callback_input.py index 545039e60ba..04d83a09ffb 100644 --- a/tests/local_testing/test_custom_callback_input.py +++ b/tests/local_testing/test_custom_callback_input.py @@ -1134,8 +1134,12 @@ def test_standard_logging_payload_audio(turn_off_message_logging, stream): stream=stream, ) except Exception as e: - if "openai-internal" in str(e): + err = str(e) + if "openai-internal" in err: pytest.skip("Skipping test due to openai-internal error") + if "model_not_found" in err or "does not exist" in err: + pytest.skip(f"Skipping test - upstream model unavailable: {err}") + raise if stream: for chunk in response: diff --git a/tests/local_testing/test_stream_chunk_builder.py b/tests/local_testing/test_stream_chunk_builder.py index 24fdf49c16c..cf61f8b8777 100644 --- a/tests/local_testing/test_stream_chunk_builder.py +++ b/tests/local_testing/test_stream_chunk_builder.py @@ -657,8 +657,12 @@ def test_stream_chunk_builder_openai_audio_output_usage(): stream_options={"include_usage": True}, ) except Exception as e: - if "openai-internal" in str(e): + err = str(e) + if "openai-internal" in err: pytest.skip("Skipping test due to openai-internal error") + if "model_not_found" in err or "does not exist" in err: + pytest.skip(f"Skipping test - upstream model unavailable: {err}") + raise chunks = [] for chunk in completion: