Agent mode not work when using Qwen3 model
Before submitting your bug report
- [x] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: MacOS
- Continue version: 1.0.7
- IDE version: vscode 1.99
- Model:qwen3-235b-a22b
- config:
- name: openrouter-qwen3-235b-a22b
provider: openrouter
apiBase: https://openrouter.ai/api/v1
apiKey: "*"
model: qwen/qwen3-235b-a22b
roles:
- chat
capabilities:
- tool_use
defaultCompletionOptions:
temperature: 0.6
contextLength: 40960
maxTokens: 4096
Description
After the recent release of Qwen3, I attempted to use it in Continue’s agent mode against both OpenRouter’s hosted endpoint and a self-hosted Qwen3 instance that supports tool calls. In both cases, the agent fails to load tools, returning a 404 error (tools functionality not available), even though the same model works fine in cline.
To reproduce
Error handling webview message: {
"msg": {
"messageId": "57ea432b-cfe3-48a1-97ea-67894ff15d47",
"messageType": "llm/streamChat",
"data": {
"completionOptions": {
"tools": [
{
"type": "function",
"displayTitle": "Edit File",
"wouldLikeTo": "edit {{{ filepath }}}",
"isCurrently": "editing {{{ filepath }}}",
"hasAlready": "edited {{{ filepath }}}",
"group": "Built-In",
"readonly": false,
"function": {
"name": "builtin_edit_existing_file",
"description": "Use this tool to edit an existing file. If you don't know the contents of the file, read it first.",
"parameters": {
"type": "object",
"required": [
"filepath",
"new_contents"
],
"properties": {
"filepath": {
"type": "string",
"description": "The path of the file to edit, relative to the root of the workspace."
},
"new_contents": {
"type": "string",
"description": "The new file contents"
}
}
}
}
},
{
"type": "function",
"displayTitle": "Create New File",
"wouldLikeTo": "create a new file at {{{ filepath }}}",
"isCurrently": "creating a new file at {{{ filepath }}}",
"hasAlready": "created a new file at {{{ filepath }}}",
"group": "Built-In",
"readonly": false,
"function": {
"name": "builtin_create_new_file",
"description": "Create a new file. Only use this when a file doesn't exist and should be created",
"parameters": {
"type": "object",
"required": [
"filepath",
"contents"
],
"properties": {
"filepath": {
"type": "string",
"description": "The path where the new file should be created, relative to the root of the workspace"
},
"contents": {
"type": "string",
"description": "The contents to write to the new file"
}
}
}
}
},
{
"type": "function",
"displayTitle": "Run Terminal Command",
"wouldLikeTo": "run the following terminal command:",
"isCurrently": "running the following terminal command:",
"hasAlready": "ran the following terminal command:",
"readonly": false,
"group": "Built-In",
"function": {
"name": "builtin_run_terminal_command",
"description": "Run a terminal command in the current directory. The shell is not stateful and will not remember any previous commands. Do NOT perform actions requiring special/admin priveleges.",
"parameters": {
"type": "object",
"required": [
"command"
],
"properties": {
"command": {
"type": "string",
"description": "The command to run. This will be passed directly into the IDE shell."
}
}
}
}
},
{
"type": "function",
"displayTitle": "Grep Search",
"wouldLikeTo": "search for "{{{ query }}}" in the repository",
"isCurrently": "getting search results for "{{{ query }}}"",
"hasAlready": "retrieved search results for "{{{ query }}}"",
"readonly": true,
"group": "Built-In",
"function": {
"name": "builtin_grep_search",
"description": "Perform a search over the repository using ripgrep.",
"parameters": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "The search query to use. Must be a valid ripgrep regex expression, escaped where needed"
}
}
}
}
},
{
"type": "function",
"displayTitle": "Glob File Search",
"wouldLikeTo": "find file matches for "{{{ pattern }}}"",
"isCurrently": "finding file matches for "{{{ pattern }}}"",
"hasAlready": "retreived file matches for "{{{ pattern }}}"",
"readonly": true,
"group": "Built-In",
"function": {
"name": "builtin_file_glob_search",
"description": "Search for files in the project",
"parameters": {
"type": "object",
"required": [
"pattern"
],
"properties": {
"pattern": {
"type": "string",
"description": "Glob pattern for file path matching"
}
}
}
}
},
{
"type": "function",
"displayTitle": "Search Web",
"wouldLikeTo": "search the web for "{{{ query }}}"",
"isCurrently": "searching the web for "{{{ query }}}"",
"hasAlready": "searched the web for "{{{ query }}}"",
"readonly": true,
"group": "Built-In",
"function": {
"name": "builtin_search_web",
"description": "Performs a web search, returning top results. Use this tool sparingly - only for questions that require specialized, external, and/or up-to-date knowledege. Common programming questions do not require web search.",
"parameters": {
"type": "object",
"required": [
"query"
],
"properties": {
"query": {
"type": "string",
"description": "The natural language search query"
}
}
}
}
},
{
"type": "function",
"displayTitle": "View Diff",
"wouldLikeTo": "view the git diff",
"isCurrently": "getting the git diff",
"hasAlready": "viewed the git diff",
"readonly": true,
"group": "Built-In",
"function": {
"name": "builtin_view_diff",
"description": "View the current diff of working changes",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"displayTitle": "Read Currently Open File",
"wouldLikeTo": "read the current file",
"isCurrently": "reading the current file",
"hasAlready": "viewed the current file",
"readonly": true,
"group": "Built-In",
"function": {
"name": "builtin_read_currently_open_file",
"description": "Read the currently open file in the IDE. If the user seems to be referring to a file that you can't see, try using this",
"parameters": {
"type": "object",
"properties": {}
}
}
},
{
"type": "function",
"displayTitle": "LS Tool",
"wouldLikeTo": "list files and folders in {{{ dirPath }}}",
"isCurrently": "listing files and folders in {{{ dirPath }}}",
"hasAlready": "listed files and folders in {{{ dirPath }}}",
"readonly": true,
"group": "Built-In",
"function": {
"name": "builtin_ls",
"description": "List files and folders in a given directory",
"parameters": {
"type": "object",
"required": [
"dirPath",
"recursive"
],
"properties": {
"dirPath": {
"type": "string",
"description": "The directory path relative to the root of the project. Always use forward slash paths like '/'. rather than e.g. '.'"
},
"recursive": {
"type": "boolean",
"description": "If true, lists files and folders recursively. To prevent unexpected large results, use this sparingly"
}
}
}
}
}
]
},
"title": "openrouter-qwen3-235b-a22b",
"messages": [
{
"role": "system",
"content": "<important_rules>\n Always include the language and file name in the info string when you write code blocks. \n If you are editing "src/main.py" for example, your code block should start with 'python src/main.py'\n\n When addressing code modification requests, present a concise code snippet that\n emphasizes only the necessary changes and uses abbreviated placeholders for\n unmodified sections. For instance:\n\n typescript /path/to/file\n // ... rest of code here ...\n\n {{ modified code here }}\n\n // ... rest of code here ...\n\n {{ another modification }}\n\n // ... rest of code here ...\n ```\n\n Since users have access to their complete file, they prefer reading only the\n relevant modifications. It's perfectly acceptable to omit unmodified portions\n at the beginning, middle, or end of files using these "lazy" comments. Only\n provide the complete file when explicitly requested. Include a concise explanation\n of changes unless the user specifically asks for code only.\n</important_rules>"
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "阅读项目源码, 列出全部路由"
}
]
},
{
"role": "assistant",
"content": ""
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "阅读项目源码, 列出全部路由"
}
]
},
{
"role": "assistant",
"content": "\n\n"
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "阅读项目源码, 列出全部路由"
}
]
},
{
"role": "assistant",
"content": "\n\n"
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "阅读项目源码, 列出全部路由"
}
]
}
]
}
}
}
Error: HTTP 404 Not Found from https://openrouter.ai/api/v1/chat/completions
{"error":{"message":"No endpoints found that support tool use. To learn more about provider routing, visit: https://openrouter.ai/docs/provider-routing","code":404}}
Log output
Maybe this wrong msg is openrouter not support tool use for qwen3 model
也许这个错误信息是 openrouter 不支持 qwen3 模型的工具使用
![]()
Since I encounter the same error when requesting tool use capability from OpenRouter's Qwen3 model in the terminal, it appears that OpenRouter does not currently support tool calling functionality for the Qwen3 model.
use cline,selected openrouter qwen3-233b-a23 model,it does worked fine。 i belive that's continue agent bug。
I have the same problem running qwen3:14b in Ollama, so it's not just an OpenRouter issue.
I also have the same problem when using ollamaon our local HPC.
Qwen 2.5 works fine, with agent enabled
but for both Qwen 3 0.6B and 32B the agent is greyed out
My config.yaml specifies the same roles for each model (chat, edit, apply and autocomplete).
Could it be because "qwen2" is hardcoded in to the continue/core/llm/toolSuport.ts script?
It would be good if we had more flexibility to add new agents and avoid hardcoding - i.e. if we add "agent" to the list of roles, could it bypass this hardcoded check?
Sorry, I should have been clearer. In addition to not automatically detecting Qwen3 as a model capable of tool calling, forcing it on with "capabilities": { "tools": true } yields issues like #5418 and #5378, and streaming doesn't seem to work most of the time for this model for some reason. In case it matters, I'm on Ubuntu and I'm running Ollama in Docker on the same machine. Hope to get support because this 14b model is the best I've tested in a while.
use cline,selected openrouter qwen3-233b-a23 model,it does worked fine。 i belive that's continue agent bug。
For the openrouter specific case (ollama one not included), It is not a continue agent bug, but rather cline uses a different way for do to tool calling, cline DOES NOT use the tool call api. If we were to support this, we should vote for or implement this feature https://github.com/continuedev/continue/issues/4308.
But on the other side I don't understand that why providers like openrouter does not provide the toolcall api capability out of the box if the model supports it.
I tried Qwen3 from SiliconFlow, and the agent works. However, I think the issue is that Qwen3 provided by OpenRouter doesn't support function calling, which Continue relies on for its agent model (Cline supports agents through prompts, which is different from Continue).
So I used VLLM as a backend through OpenWebUI through Continue.dev So essentially, I am going VLLM - > OpenWebUI (custom modelfile) - > continue.dev, all you had to do to have agent ungrayed is under model you just put
capabilities:
- tool_use
But have it actually behave the way a typical agent do, you have 2 options, 1, prompt it with a system prompt (in my case thru openwebui modelfile) or 2. add rules to it.
Thanks @yuchenxie4645 It works perfectly on Ollama with this config.
- name: qwen3:8bTool
provider: ollama
model: qwen3:8b
apiBase: http://localhost:11434
capabilities:
- tool_use
roles:
- chat
So I used VLLM as a backend through OpenWebUI through Continue.dev So essentially, I am going VLLM - > OpenWebUI (custom modelfile) - > continue.dev, all you had to do to have agent ungrayed is under model you just put
capabilities: - tool_useBut have it actually behave the way a typical agent do, you have 2 options, 1, prompt it with a system prompt (in my case thru openwebui modelfile) or 2. add rules to it.
Thankyou! Adding capabilities - tool_use fixed mine.
- name: Qwen 3 30B
provider: ollama
model: qwen3:30b
capabilities:
- tool_use
apiBase: http://127.0.0.1:11434
roles:
- chat
To recap some of the helpful comments above:
- Ollama: it looks like this is working once the
tool_usecapability is added. We will soon add this as a default so you don't need to do this - OpenRouter: since their tool use API isn't directly OpenAI-compatible (so far as I can tell), we need to implement some additional code to make this work. I created an issue here: https://github.com/continuedev/continue/issues/5547
- vLLM: Similarly to Ollama, you should just need to add the
tool_usecapability
Is Qwen3 actually working in agent mode? On my system it says "Thinking" and then never gives a response after it finishes thinking. I can expand the thinking box to get the answer, but doesn't provide a response outside of that container. In chat instead of agent mode the "Thinking" box correctly only contains the response text between the <thinking></thinking> elements and places the actual response outside.
So far I have only been able to get Qwen2.5 working with agent mode.
Guys, copy your config.json file if you have one already setup (I did). Remove that file from the .continue folder in your user (not in your workspace, in case you have one). Reload VSCode. Now, on the assistants option, you can click refresh (just in case) Next to local assistant, you can click the gear icon, and it will open a new settings template. This template would be config.yaml (YAML).
- If it doesn't, you could have a few issues there:
- 1st - Make sure you have an updated version of continue (the original only worked with config.json, then new one supports both).
- 2nd - You didn't delete the config.json file as I told you. (make a copy on your desktop, then delete the config.json on your .continue folder).
Once you have your config.yaml, try to "convert" your settings from config.json to config.yaml. NO, they are not straight forward. Some are kind of easy to transfer, SOME might require you dig in a little more around the documentation.
once you have the basic settings of your config.yaml, and everything seems to work with your assistant (save for the Agents), you should add this to your model:
capabilities:
- tool_use
so, if this is your config.yaml:
- name: Qwen 3
provider: ollama
model: qwen3:8b
apiBase: http://127.0.0.1:11434
roles:
- chat
- autocomplete
- edit
- apply
- summarize
then it should end up looking like this:
- name: Qwen 3
provider: ollama
model: qwen3:8b
apiBase: http://127.0.0.1:11434
roles:
- chat
- autocomplete
- edit
- apply
- summarize
capabilities:
- tool_use
then do anything you need to reload the config (refresh the assistants, reload workspace, close and open vscode, etc.) and so, it should work. Please, keep in mind that it would not work if you are in an old version or is you still have your config.json file in there!!!
Already did that. The problem is not that agent is not a selectable option (tool_use). It is that using Agent doesn’t work. It shows “Thinking” and then never parses out the answer.
I find it hit or miss whether tool calls or responses work.
@aarononeal I'm having the same issue you are after adding tool_use to the capabilities for my qwen3 config. All of the output is being placed under a "Thought for..." block and is never summarized and output to the user. Here's a contrived example to demonstrate:
I have local GPUs and I am hosting with LMDeploy and an OpenAI compatible API. I added the capabilities: - tool_use lines for Qwen3-32B and that allowed me to turn on agent mode -- but the model does not appear to use the tools or behave as expected.
My provider is openai. When I had an agent look through the Continue code, it said that the wrong tool prompts appear to be being used for Qwen when openai is the provider... I'm not 100% certain of this because I do not have time to dive all the in. If that is true, I would suggest adding something like an 'openai-compatible` provider that would allow for the correct tool use prompts to be used.
I don't believe this is specific to openai, since I'm running via ollama and experiencing the issue.
I'm also using Ollama and have this issue. I really like Qwen3 and wish it could access normal tool calling.