llama-stack-mirror/llama_stack/providers/inline/agents/meta_reference/responses
Jaideep Rao 4aa586d7af Fix: Ensure that tool calls with no arguments get handled correctly #3560
When a model decides to use an MCP tool call that requires no arguments, it sets the arguments field to None. This causes validation errors because this field gets removed when being parsed by an openai compatible inference provider like vLLM
This PR ensures that, as soon as the tool call args are accumulated while streaming, we check to ensure no tool call function arguments are set to None - if they are we replace them with "{}"

Closes #3456

Added new unit test to verify that any tool calls with function arguments set to None get handled correctly

Signed-off-by: Jaideep Rao <jrao@redhat.com>
2025-09-30 07:58:03 -04:00
..
__init__.py chore(responses): Refactor Responses Impl to be civilized (#3138) 2025-08-15 00:05:35 +00:00
openai_responses.py refactor(logging): rename llama_stack logger categories (#3065) 2025-08-21 17:31:04 -07:00
streaming.py Fix: Ensure that tool calls with no arguments get handled correctly #3560 2025-09-30 07:58:03 -04:00
tool_executor.py refactor(logging): rename llama_stack logger categories (#3065) 2025-08-21 17:31:04 -07:00
types.py feat(responses): add mcp list tool streaming event (#3159) 2025-08-15 00:05:36 +00:00
utils.py fix: ensure assistant message is followed by tool call message as expected by openai (#3224) 2025-08-22 10:42:03 -07:00