llama-stack-mirror/llama_stack
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
..
apis feat(openai_movement)!: Change URL structures to kill /openai/v1 (part 2) (#3605) 2025-09-29 22:57:37 -07:00
cli feat: migrate to FIPS-validated cryptographic algorithms (#3423) 2025-09-12 11:18:19 +02:00
core feat(api): level inference/rerank and remove experimental (#3565) 2025-09-29 12:42:09 -07:00
distributions feat: add static embedding metadata to dynamic model listings for providers using OpenAIMixin (#3547) 2025-09-25 17:17:00 -04:00
models feat: Add items and title to ToolParameter/ToolParamDefinition (#3003) 2025-09-27 11:35:29 -07:00
providers Fix: Ensure that tool calls with no arguments get handled correctly #3560 2025-09-30 07:58:03 -04:00
strong_typing feat(files): fix expires_after API shape (#3604) 2025-09-29 21:29:15 -07:00
testing feat: (re-)enable Databricks inference adapter (#3500) 2025-09-23 15:37:23 -04:00
ui fix: Remove deprecated user param in OpenAIResponseObject (#3596) 2025-09-29 13:55:59 -07:00
__init__.py chore(rename): move llama_stack.distribution to llama_stack.core (#2975) 2025-07-30 23:30:53 -07:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py chore(pre-commit): add pre-commit hook to enforce llama_stack logger usage (#3061) 2025-08-20 07:15:35 -04:00
schema_utils.py feat(api): level inference/rerank and remove experimental (#3565) 2025-09-29 12:42:09 -07:00