Skip to content

fix: repair each tool call independently of other server tags - #181

Open
liuzhengyang699 wants to merge 1 commit into
MiroMindAI:mainfrom
liuzhengyang699:fix/per-call-tool-server-repair
Open

liuzhengyang699 wants to merge 1 commit into
MiroMindAI:mainfrom
liuzhengyang699:fix/per-call-tool-server-repair

Conversation

@liuzhengyang699

Copy link
Copy Markdown

When one model response contains both a correctly routed call and an incorrectly routed call, fix_server_name_in_text skips the repair as soon as it finds the correct server tag anywhere in the response. This also affects different tools sharing a server: a correct search call can prevent repair of a following scrape call.

Remove the response-wide shortcut and let the existing per-call substitution handle every matching tool. Correct calls remain unchanged, aliases still normalize, and unrelated tools are preserved.

Validation: 4 focused offline parser tests passed (python -m pytest apps/miroflow-agent/tests/test_tool_server_repair.py -q -o addopts=''). Three fail before the fix. Full repository ruff==0.8.0 check and ruff==0.8.0 format --check passed, matching the lint workflow; git diff --check passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant