-
Notifications
You must be signed in to change notification settings - Fork 649
Closed as not planned
Labels
model clientsIssues related to the model client implementationsIssues related to the model client implementationspython
Description
Description
The BaseTool class is defined in the codebase but is not exported in the module's __all__ list, making it impossible to import directly. While duck typing with ToolProtocol should work, I think this base class should be importable.
Current Behavior
Users cannot import the class:
from agent_framework import BaseTool # ✗ ImportError or not discoverableExpected Behavior
Users should be able to import and use the base class:
from agent_framework import BaseTool # ✓ Should workWhy This Matters
BaseToolis the recommended base class for creating custom tools- The documentation and examples show inheriting from
BaseTool, but it's not exported
Current all (from tools.py)
__all__ = [
"FUNCTION_INVOKING_CHAT_CLIENT_MARKER",
"AIFunction",
"HostedCodeInterpreterTool",
"HostedFileSearchTool",
"HostedMCPSpecificApproval",
"HostedMCPTool",
"HostedWebSearchTool",
"ToolProtocol",
"ai_function",
"use_function_invocation",
]Suggested Fix
Add BaseTool to __all__:
__all__ = [
"FUNCTION_INVOKING_CHAT_CLIENT_MARKER",
"AIFunction",
"BaseTool", # Add this
"HostedCodeInterpreterTool",
# ... rest of exports
]Metadata
Metadata
Assignees
Labels
model clientsIssues related to the model client implementationsIssues related to the model client implementationspython