Skip to content

When calling to vllm server with hermes tool parser opencode doesn't call the tools #1122

Closed

Description

@Anodyine

I'm trying to get this working with my local vllm server on fedora 41. Here's the current server command I'm running:

vllm serve Qwen/Qwen2.5-Coder-32B-Instruct --tensor-parallel-size 4 --enable-auto-tool-choice --tool-call-parser hermes --gpu-memory-utilization 0.8 --max-model-len 30000 --trust-remote-code

It seems that the model generates the tool calls fine, but but opencode just shows them as text instead of calling them. Is support for this feature coming later? Am I missing an easy workaround?

Image

Activity

  1. Anodyine commented on Jul 18, 2025

    @Anodyine
    Author

    I actually got it working with a local model that is served with vllm 0.9.2. It took a few messages to get it to use the tools, but eventually it made an edit that worked. So at least it proves that the tool calling can work with a local model for opencode 0.3.20. However, it is not practical for use yet. For more complex tasks it just thinks and then doesn't respond. I wonder if it is timing out. I would appreciate any help and will be looking out for updates that help us use local models better.

    Image

    Here is the vllm serve command that worked on my system with 4 3090 gpus:

    vllm serve Qwen/Qwen3-32B --enable-reasoning --reasoning-parser deepseek_r1 --tensor-parallel-size 4 --gpu-memory-utilization 0.8 --max-model-len 20000 --enable-auto-tool-choice --tool-call-parser hermes --trust-remote-code

  2. peaster commented on Aug 8, 2025

    @peaster

    @Anodyine did you have any further progress with this? I'm trying to do the same with Qwen3 30B Coder on dual 3090s and i'm seeing roughly the same issues. It just doesn't process tool calls

  3. Anodyine commented on Aug 19, 2025

    @Anodyine
    Author

    @peaster Yeah actually I had some great success with vllm 10.0 since it supports the qwen3_coder tool parser. I used the qwen cli client and it is very fast and effective.

    Here is the relevant article:

    https://docs.vllm.ai/projects/recipes/en/latest/Qwen/Qwen3-Coder-480B-A35B.html

    Of course, I was using this model not the 480B one the article mentions.

    https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct

  4. Anodyine commented on Aug 19, 2025

    @Anodyine
    Author

    @peaster Here is my start server command for reference. You need to reduce tensor-parallel-size to 2 and may need to reduce max model length and/or gpu-memory-utilization if you run out of memory.

    /opt/vllm/.venv/bin/vllm serve Qwen/Qwen3-Coder-30B-A3B-Instruct
    --tensor-parallel-size 4
    --enable-auto-tool-choice
    --tool-call-parser qwen3_coder
    --gpu-memory-utilization 0.9
    --max-model-len 200000
    --max-num-seqs 2
    --max-num-batched-tokens 16384
    --enable-chunked-prefill
    --enable-prefix-caching
    --swap-space 32
    --trust-remote-code
    --host 127.0.0.1
    --port 8000

  5. peaster commented on Aug 19, 2025

    @peaster

    Thanks! i did get it mostly working using the new tool call parser. In opencode specifically, it's struggling on a couple of the tools though. I commented in this thread and that mostly works #1809 (comment) but it would be nice to have this working natively too

  6. loligapta commented on Oct 15, 2025

    @loligapta

    Sir, how did you connect opencode to local running vLLM server? can share config please sir?

  7. zaidorx commented on Jan 20, 2026

    @zaidorx

    @loligapta Not sure if this is still relevant but I recently discovered and set up opencode with vllm and here is the section of my config.json

    {
    "$schema": "https://opencode.ai/config.json",
    "provider": {
    "local-vllm": {
    "npm": "@ai-sdk/openai-compatible",
    "name": "vLLM (Local)",
    "options": {
    "baseURL": "http://192.168.99.23:8000/v1",
    "apiKey": "dummy-key"
    },
    "models": {
    "Qwen/Qwen3-Coder-30B-A3B-Instruct-FP8": {
    "name": "Qwen3-Coder-30B"
    }
    }
    }
    }

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions