-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Description
collect_classes stores retrieval tool entries using obj.__name__ (e.g., "ProductDocsSearch"), but collect_definitions resolves them using the explicit name attribute (e.g., "product_docs_search"). When the migration runner looks up classes by definition key, the mismatch causes a "retrieval is required for retrieval tool" error because the class cannot be found.
Steps to Reproduce
- Define a
BaseRetrievalToolwith an explicitnameattribute:class ProductDocsSearch(BaseRetrievalTool): name = "product_docs_search" retrieval = ProductDocsRetrieval
- Run
manage.py migrate agents. - The migration fails with:
"retrieval is required for retrieval tool 'product_docs_search'".
Expected Behavior
collect_classes should use getattr(obj, "name", None) or obj.__name__ as the key, matching the logic in collect_definitions.
Actual Behavior
collect_classes uses obj.__name__ as the key. When collect_definitions looks up the class by the explicit name, it doesn't find it, and the retrieval reference cannot be resolved.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels