fix: decode nested JSON tool arguments by schema

This commit is contained in:
Ruiming Zhao authored and Xubin Ren committed 2026-10-25 13:04:53 +08:00
1 parent c9bd5ebb45
commit 6b930432cb
4 files changed
+244

No files matched your search

+2
View File
@@ -144,6 +144,8 @@ Important files:
Tool behavior is part of the model contract. Keep user-visible tool names, schemas, and error messages stable unless a change is intentional.
Before tool execution, schema-guided casting can decode a nested JSON string when the declared type requires an object or array. Simple container-only unions are supported without selecting a preferred branch. String-accepting unions, malformed JSON, mismatched values, and schemas without an explicit container type stay unchanged. This step does not infer types through references or composition rules. The model-facing schema and original tool-call arguments in history remain unchanged.
## Config and Paths
The config schema lives in `nanobot/config/schema.py`. Loading and saving live in `nanobot/config/loader.py`. Runtime path helpers live in `nanobot/config/paths.py`.