Skip to content

The agent engineering platform.

openai[patch]: relax Azure llm streaming callback test (#31319)

ccurme851fd438cf06
diff --git a/libs/partners/openai/tests/integration_tests/llms/test_azure.py b/libs/partners/openai/tests/integration_tests/llms/test_azure.py
index 3af71e31d5..4d601c0f2a 100644
--- a/libs/partners/openai/tests/integration_tests/llms/test_azure.py
+++ b/libs/partners/openai/tests/integration_tests/llms/test_azure.py
@@ -149,7 +149,7 @@ def test_openai_streaming_callback() -> None:
verbose=True,
)
llm.invoke("Write me a sentence with 100 words.")
- assert callback_handler.llm_streams == 12
+ assert callback_handler.llm_streams < 15
@pytest.mark.scheduled
@@ -172,5 +172,5 @@ async def test_openai_async_streaming_callback() -> None:
verbose=True,
)
result = await llm.agenerate(["Write me a sentence with 100 words."])
- assert callback_handler.llm_streams == 12
+ assert callback_handler.llm_streams < 15
assert isinstance(result, LLMResult)