pub fn normalize_arguments_field(obj: Value) -> ValueExpand description
Normalize the arguments/parameters field in a tool call object. If the object has “parameters” but not “arguments”, copy parameters to arguments.
§Background
Different LLM formats use different field names:
- Llama and JSON parsers use “parameters” (correct per JSON Schema spec)
- Mistral and Qwen use “arguments”
This function normalizes to “arguments” for consistent downstream processing.