arcade-mcp/libs
Sam Partee e188fc6ae9
Improve Typedict and Basemodel support (#523)
Improve Pydantic and Typedict support and add a bunch of tets.

1. Fixed the test failure where TypeDict was being serialized as a list
of tuples instead of a dict by:
- Adding proper handling for BaseModel instances in the output.py file
- Converting BaseModel results (from TypeDict conversion) to dicts using
model_dump()
    - Handling lists containing BaseModel objects
2. Fixed None handling to ensure None results are converted to empty
strings as expected
3. Updated the schema.py to allow dict and list types in
ToolCallOutput.value
  4. new tests
    - TypeDict output execution tests
    - Output factory tests
    - Executor tests with TypeDict support
    - Schema validation tests

  The key changes were:
- In ``arcade_core/output.py``: Added BaseModel conversion logic in the
success method
- In ``arcade_core/schema.py``: Changed ToolCallOutput.value type from
list[str] to list to support complex types


TODO
- [ ] Confirm engine compatibility without changes made to engine

---------

Co-authored-by: Eric Gustin <eric@arcade.dev>
2025-08-27 16:50:09 -07:00
..
arcade-cli Improve Typedict and Basemodel support (#523) 2025-08-27 16:50:09 -07:00
arcade-core Improve Typedict and Basemodel support (#523) 2025-08-27 16:50:09 -07:00
arcade-evals 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
arcade-serve Support Tool Output in ValueSchema of ToolDefinition (#487) 2025-07-24 15:32:35 -07:00
arcade-tdk [PROD-186][ClickUp ToolKit][Auth] Update auth modules for ClickUp auth integration (#526) 2025-08-13 14:39:01 -03:00
tests Improve Typedict and Basemodel support (#523) 2025-08-27 16:50:09 -07:00