You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(tools): normalize null tool call arguments to empty object
LLMs frequently send `null` when a tool has all-optional fields and no
arguments are needed. `serde_json::from_str::<T>("null")` fails for
struct-typed args even when every field is `Option<_>`, because JSON
null does not deserialize to an empty object.
Normalize `null` to `{}` in `ToolDyn::call` before deserialization so
callers do not need to wrap their entire args type in `Option<T>` to
handle the no-argument case. Adds a test using a struct with optional
fields to exercise the fix.
* fix tools null args fallback
---------
Co-authored-by: Jimmie Fulton <jimmie.fulton@gmail.com>
0 commit comments