mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-08-28 07:17:59 +00:00
The spec generator previously used a hardcoded list of field names to exclude from init_params_schema. Any new field or computed_field added to BaseTool (like tool_type from 86ce54f) would silently leak into tool.specs.json unless someone remembered to update that list. Now _extract_init_params() dynamically computes BaseTool's fields at import time via model_fields + model_computed_fields, so any future additions to BaseTool are automatically excluded. Fields from intermediate base classes (RagTool, BraveSearchToolBase, SerpApiBaseTool) are correctly preserved since they're not on BaseTool. TDD: - RED: 3 new tests confirming BaseTool field leak, intermediate base preservation, and future-proofing — all failed before the fix - GREEN: Dynamic allowlist applied — all 10 tests pass - Regenerated tool.specs.json (tool_type removed from all tools)