done
Stop EventAgent turns from ending with event agent did not return arguments for mock_search when the compatible provider fails to return a tool call in the exact shape the parser expects.
EventAgent currently sends one tool schema to the LLM and expects the stream parser to emit a provider tool-call event. There are two brittle points:
tools but does not force the single tool through tool_choice.finish_reason == "tool_calls", so providers that end with another terminal reason can drop the accumulated tool call.If neither path emits an event, EventAgent raises a ValueError and the tool result becomes a handler error.
finish_reason="stop" with accumulated tool call.tool_choice.uv run pytest tests/test_openai_stream_parser.py tests/test_event_agent.py tests/test_websocket_api.py::test_openai_chat_client_streams_sse_chunks_through_parser -q passes: 9 tests.uv run pytest passes: 53 tests.