Phase 12/13: Simplify tool execution by removing legacy "default" tool name alias support.
Background
- OCR
run_tool() accepts tool_name="default" → maps to "analyze"
- YOLO
run_tool() accepts tool_name="default" → maps to first tool in dict
- These aliases were added for transition compatibility
- Current state: All callers use proper tool names
Change
Remove alias logic:
- OCR: Delete
if tool_name in ("default", "analyze") → keep only if tool_name == "analyze"
- YOLO: Delete
if tool_name == "default": tool_name = next(...) logic
Impact
- Server already sends proper tool names (never sends "default")
- Simplifies
run_tool() contract
- Breaks callers using "default" (none currently do)
Files to update
plugins/ocr/src/forgesyte_ocr/plugin.py L239-240
plugins/forgesyte-yolo-tracker/src/forgesyte_yolo_tracker/plugin.py L272-274
Related
- Depends on #164 (Phase 12 priority)
Phase 12/13: Simplify tool execution by removing legacy
"default"tool name alias support.Background
run_tool()acceptstool_name="default"→ maps to"analyze"run_tool()acceptstool_name="default"→ maps to first tool in dictChange
Remove alias logic:
if tool_name in ("default", "analyze")→ keep onlyif tool_name == "analyze"if tool_name == "default": tool_name = next(...)logicImpact
run_tool()contractFiles to update
plugins/ocr/src/forgesyte_ocr/plugin.pyL239-240plugins/forgesyte-yolo-tracker/src/forgesyte_yolo_tracker/plugin.pyL272-274Related