Skip to content

The agent engineering platform.

test(openai): mark tests flaky (#33750)

Mason Daughertydc5b7dace873
diff --git a/libs/partners/openai/tests/integration_tests/chat_models/test_base.py b/libs/partners/openai/tests/integration_tests/chat_models/test_base.py
index 6c0193de58..b35249e2a1 100644
--- a/libs/partners/openai/tests/integration_tests/chat_models/test_base.py
+++ b/libs/partners/openai/tests/integration_tests/chat_models/test_base.py
@@ -1003,6 +1003,7 @@ def test_audio_input_modality() -> None:
assert "audio" in output.additional_kwargs
[email protected](retries=3, delay=1)
def test_prediction_tokens() -> None:
code = dedent(
"""
diff --git a/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py b/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py
index a4c622bdc3..c49d5a40e1 100644
--- a/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py
+++ b/libs/partners/openai/tests/integration_tests/chat_models/test_base_standard.py
@@ -88,6 +88,7 @@ class TestOpenAIStandard(ChatModelIntegrationTests):
# For now, we test with filename in OpenAI-specific tests
return False
+ @pytest.mark.flaky(retries=3, delay=1)
def test_openai_pdf_inputs(self, model: BaseChatModel) -> None:
"""Test that the model can process PDF inputs."""
url = "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"
diff --git a/libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py b/libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py
index 565b88fa95..532f071790 100644
--- a/libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py
+++ b/libs/partners/openai/tests/integration_tests/chat_models/test_responses_standard.py
@@ -54,6 +54,7 @@ class TestOpenAIResponses(TestOpenAIStandard):
input_ = "What was the 3rd highest building in 2000?"
return _invoke(llm, input_, stream)
+ @pytest.mark.flaky(retries=3, delay=1)
def test_openai_pdf_inputs(self, model: BaseChatModel) -> None:
"""Test that the model can process PDF inputs."""
super().test_openai_pdf_inputs(model)