mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-02 13:48:09 +00:00
BaseTool could not serialize to JSON because args_schema (a class reference) and cache_function (a lambda) are not JSON-serializable. This caused checkpointing to crash for any crew with tools. - Add PlainSerializer to args_schema so it round-trips via JSON schema - Replace default cache_function lambda with named _default_cache_function and type it as SerializableCallable so it serializes to a dotted path - Add computed_field tool_type that stores the fully qualified class name - Add restore_tool_from_dict to reconstruct the concrete subclass from checkpoint dicts, pre-resolving callback strings to callables - Update BaseAgent.validate_tools and Task._restore_tools_from_checkpoint to handle dict inputs from checkpoint deserialization