@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / d83becd503
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 10, 09:00 UTC

[ROCm][CI] Fix flaky `test_function_calling_with_stream` and reduce schema test examples (#32063)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>

Andreas Karatzas committed Jan 9, 2026 at 23:02 UTC d83becd503660fb876ea42beaa9f63217b857b99
2 files changed +14 -10
tests/entrypoints/openai/test_openai_schema.py
+1 -1
@@ -129,7 +129,7 @@ def before_generate_case(context: schemathesis.hooks.HookContext, strategy):
129
130 @schema.parametrize()
131 @schema.override(headers={"Content-Type": "application/json"})
132 -@settings(deadline=LONG_TIMEOUT_SECONDS * 1000)
132 +@settings(deadline=LONG_TIMEOUT_SECONDS * 1000, max_examples=50)
133 def test_openapi_stateless(case: schemathesis.Case):
134 key = (
135 case.operation.method.upper(),
tests/entrypoints/openai/test_response_api_with_harmony.py
+13 -9
@@ -821,16 +821,20 @@ async def test_function_calling_with_stream(client: OpenAI, model_name: str):
821 final_tool_calls_named[tool_call.name] = tool_call
822 elif event.type == "response.function_call_arguments.done":
823 assert event.arguments == final_tool_calls_named[event.name].arguments
824 - for tool_call in final_tool_calls.values():
825 - if (
826 - tool_call
827 - and tool_call.type == "function_call"
828 - and tool_call.name == "get_weather"
829 - ):
830 - args = json.loads(tool_call.arguments)
831 - result = call_function(tool_call.name, args)
832 - input_list += [tool_call]
824 + result = None
825 + tool_call = None
826 + for tc in final_tool_calls.values():
827 + if tc and tc.type == "function_call" and tc.name == "get_weather":
828 + args = json.loads(tc.arguments)
829 + result = call_function(tc.name, args)
830 + tool_call = tc
831 + input_list += [tc]
832 break
833 +
834 + assert tool_call is not None, (
835 + "Expected model to call 'get_weather' function, "
836 + f"but got: {list(final_tool_calls_named.keys())}"
837 + )
838 assert result is not None
839 response = await client.responses.create(
840 model=model_name,