From c59054b37fa4a7189c5318652dbbd79f18dab7fc Mon Sep 17 00:00:00 2001 From: Dean Schmigelski Date: Wed, 21 Jan 2026 15:09:40 -0500 Subject: [PATCH] test: fix flaky openai structured output test by adding Field guidance --- tests_integ/models/test_model_openai.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests_integ/models/test_model_openai.py b/tests_integ/models/test_model_openai.py index 503fca898..99ac49148 100644 --- a/tests_integ/models/test_model_openai.py +++ b/tests_integ/models/test_model_openai.py @@ -45,10 +45,10 @@ def agent(model, tools): @pytest.fixture def weather(): class Weather(pydantic.BaseModel): - """Extracts the time and weather from the user's message with the exact strings.""" + """Extract time and weather values.""" - time: str - weather: str + time: str = pydantic.Field(description="The time value only, e.g. '14:30' not 'The time is 14:30'") + weather: str = pydantic.Field(description="The weather condition only, e.g. 'rainy' not 'the weather is rainy'") return Weather(time="12:00", weather="sunny")