Skip to content

fix: skip malformed tool calls with empty tool names#212

Merged
everettjf merged 3 commits intomainfrom
fix/208-ignore-empty-tool-calls
Mar 8, 2026
Merged

fix: skip malformed tool calls with empty tool names#212
everettjf merged 3 commits intomainfrom
fix/208-ignore-empty-tool-calls

Conversation

@everettjf
Copy link
Contributor

Summary

  • detect malformed tool_use blocks with an empty name before tool execution
  • skip execution for those malformed calls and return a structured error tool_result so the model can recover on the next turn
  • add regression test that verifies empty tool names no longer surface as user-visible Unknown tool: failures

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings

Closes #208

@everettjf everettjf merged commit 0a71dce into main Mar 8, 2026
4 checks 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.

tools使用报错

1 participant