Skip to content

fix(tool): preserve object and array parameter schemas#186

Merged
duguwanglong merged 1 commit intomainfrom
fix/object-array-tool-params
Apr 24, 2026
Merged

fix(tool): preserve object and array parameter schemas#186
duguwanglong merged 1 commit intomainfrom
fix/object-array-tool-params

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

Summary

  • preserve object and array child schemas when loading YAML tools so models receive the intended nested parameter structure
  • coerce JSON string inputs back into dict/list values for OBJECT and ARRAY parameters without changing plain-string fallback behavior
  • add regression tests for schema preservation and compatibility cases such as workflow path strings

Fixes #182.

Test plan

  • uv run pytest tests/tool/test_tool_plugin.py tests/tool/test_tool_schema_generation.py tests/workflow/test_tool_run_workflow.py -q

Preserve complex object and array schemas for YAML tools so models receive the intended structure. Coerce JSON string payloads back into dict/list values while keeping plain-string compatibility for existing tools.

Made-with: Cursor
@xiami762 xiami762 requested a review from duguwanglong April 24, 2026 08:35
@duguwanglong duguwanglong merged commit 725dd59 into main Apr 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature/Bug] _coerce_params_json_schema_to_params 未完整支持 object/array 类型参数,导致插件工具接收到错误的参数类型

2 participants