Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions openhands-tools/openhands/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,15 @@

The curated public surface is tracked via ``__all__`` so CI can detect breaking
changes.

Note: BrowserToolSet is intentionally NOT re-exported here to avoid forcing
downstream consumers (e.g., OpenHands-CLI) to bundle the browser-use package
and its heavy dependencies. Users who need browser tools should import directly
from ``openhands.tools.browser_use``.
"""

from importlib.metadata import PackageNotFoundError, version

from openhands.tools.browser_use import BrowserToolSet
from openhands.tools.delegate import DelegationVisualizer, register_agent
from openhands.tools.delegate.registration import get_agent_factory
from openhands.tools.file_editor import FileEditorTool
Expand All @@ -34,7 +38,6 @@

__all__ = [
"__version__",
"BrowserToolSet",
"DelegationVisualizer",
"FileEditorTool",
"TaskTrackerTool",
Expand Down
8 changes: 6 additions & 2 deletions tests/tools/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ def test_submodule_imports_work():


def test_tools_module_has_expected_top_level_exports():
"""Common tools/presets should be importable from the top-level package."""
"""Common tools/presets should be importable from the top-level package.

Note: BrowserToolSet is intentionally NOT exported at the top level to avoid
forcing downstream consumers to bundle browser-use and its heavy dependencies.
See: https://github.com/OpenHands/OpenHands-CLI/pull/527
"""

import openhands.tools

assert openhands.tools.TerminalTool is not None
assert openhands.tools.FileEditorTool is not None
assert openhands.tools.TaskTrackerTool is not None
assert openhands.tools.BrowserToolSet is not None

assert openhands.tools.get_default_agent is not None
assert openhands.tools.get_default_tools is not None
Expand Down
Loading