Files
avante.nvim/lua/avante
Alan 4286ac963a fix(utils): ensure empty tool properties encode as JSON object (#2803)
When tools have no parameters, llm_tool_param_fields_to_json_schema
returns an empty Lua table {}. vim.json.encode serializes empty tables
as JSON arrays [] instead of objects {}, causing Anthropic API to reject
requests with "tools.N.custom.input_schema.properties: Input should be
a valid dictionary" error.

Solution: Use vim.empty_dict() for empty properties to ensure correct
JSON object {} serialization instead of array [].

Tested with Claude Sonnet 4.5 - tools now work correctly without
schema validation errors.
2025-10-30 13:21:47 +08:00
..
2025-05-06 19:32:55 +08:00
2025-10-11 16:41:45 -07:00
2024-11-23 21:49:33 +08:00
2025-09-11 18:39:00 +08:00