[tool system] Circular import chain between agent_tools, tool_parsing, and tool_schemas #672
Labels
No labels
area:chat
area:core
area:llm
area:routes
area:tools
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sleepy/odysseus#672
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Circular import chain in tool modules
The tool module graph has a circular dependency chain:
Current workaround
tool_parsing.pyandtool_schemas.pyimport fromagent_tools.pyat module levelagent_tools.pyimports fromtool_parsing.pyandtool_schemas.pyat module levelEvidence
tool_parsing.py:13:from src.agent_tools import ToolBlock, TOOL_TAGStool_schemas.py:15:from src.agent_tools import ToolBlock, TOOL_TAGStool_schemas.py:16:from src.tool_parsing import _TOOL_NAME_MAPagent_tools.py:92:from src.tool_parsing import ...agent_tools.py:104:from src.tool_schemas import ...Suggested fix
ToolBlock(anamedtuple) andTOOL_TAGS(aset) into a standalonesrc/tools/types.pyorsrc/tools/constants.pytool_parsing.pyandtool_schemas.pyimport from the constants module instead of fromagent_tools.pyFixed via PR #903 — extracted ToolBlock + TOOL_TAGS into tool_types.py leaf module, breaking the cycle. Backward-compatible re-exports preserved.