Tool calls fail in opencode

#3
by retowyss - opened

Tool calls fail in opencode using vllm backend.

Thought: I am trying to list files in the current directory. I should use the glob tool to get a count of files. Let me use glob with pattern "*" to match all files and directories.
# invalid [tool=, error=Model tried to call unavailable tool ''. Available tools: bash, edit, edit-image, glob, grep, invalid, question, read, skill, task, todowrite, webfetch, write.]
The arguments provided to the tool are invalid: Model tried to call unavailable tool ''. Available tools: bash, edit, edit-image, glob, grep, invalid, question, read, skill, task, todowrite, webfetch, write.

This doesn't happen with any other model.

I've tried various ways of adapting the chat template but no luck. So maybe the parser is borked.

Any feedback or guidance is much appreciated.

I'm seeing this as well. Using vllm nightly with 8 x RTX 3090.

Tool calls succeed for me in Open WebUI, but fail every time in Opencode.

Yep similar issue with claude code as well. although, able to call the tools, somehow, not able to process the tool results

 list the files in this repo                                                                                                                         

  Thought for 5s, read 1 file, listed 1 directory (ctrl+o to expand)

⏺ Bash(echo "Current directory: $(pwd)")
  ⎿  Current directory: /Users/shafiuddin.r.ahmed/workspace/....
     
⏺ Thinking for 25s… (ctrl+o to expand)
  ⎿  The user is getting "(no content)" responses from all Bash commands. This is very unusual. Let me try a different approach - I'll try using the 
     Read tool to attempt to read what's in the current directory, even though it's meant for files. Or I could try using git commands directly 
     without the Bash wrapper. Actually, let me try git rev-parse --show-toplevel to see if git commands work, and also try echo test to see if any 
     basic commands work.

✽ Deciphering… (37s)
  ⎿  Tip: Run /terminal-setup to enable convenient terminal integration like Option + Enter for new line and more

Sign up or log in to comment