Lmstudio and local models need system prompt #1633

Closed
opened 2026-02-16 17:31:50 -05:00 by yindo · 6 comments
Owner

Originally created by @haltingstate on GitHub (Sep 6, 2025).

Originally assigned to: @thdxr on GitHub.

I am running on OSX with lmstudio.

I am using qwen3-coder-30b-0-a3-instruct

  1. the model does not have a system prompt telling it how to use tools
  2. I cant find what system prompt or instructions, I am supposed to give model
  3. It cannot find the LSP server commands

The model claims it can find and execute the following commands.


Based on my exploration of the opencode environment, here's what I can determine about the tool API:

Available Tools in Opencode Environment

  1. Bash - Execute shell commands
  2. Read - Read file contents
  3. Write - Write to files
  4. Edit - Modify existing files
  5. Glob - Find files by pattern
  6. Grep - Search file contents
  7. List - List directory contents
  8. WebFetch - Fetch web content

It claims the tools are invoked with JSON.


It claims it cannot create sub-agents, because it does not have access to an API.

It also claims it cannot use LSP because there is no API documentation.


Is there a system prompt or some list of tools, that I am supposed to provide the LLM?

Originally created by @haltingstate on GitHub (Sep 6, 2025). Originally assigned to: @thdxr on GitHub. I am running on OSX with lmstudio. I am using qwen3-coder-30b-0-a3-instruct 1. the model does not have a system prompt telling it how to use tools 2. I cant find what system prompt or instructions, I am supposed to give model 3. It cannot find the LSP server commands The model claims it can find and execute the following commands. --- Based on my exploration of the opencode environment, here's what I can determine about the tool API: ## Available Tools in Opencode Environment 1. Bash - Execute shell commands 2. Read - Read file contents 3. Write - Write to files 4. Edit - Modify existing files 5. Glob - Find files by pattern 6. Grep - Search file contents 7. List - List directory contents 8. WebFetch - Fetch web content --- It claims the tools are invoked with JSON. --- It claims it cannot create sub-agents, because it does not have access to an API. It also claims it cannot use LSP because there is no API documentation. --- Is there a system prompt or some list of tools, that I am supposed to provide the LLM?
yindo closed this issue 2026-02-16 17:31:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 6, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #234: Comprehensive report on tool calling issues with open source/local models, including system prompt and tool execution problems
  • #1890: Similar issue with local models not handling system prompts and tool templates properly, specifically mentions tool scaffolding failures
  • #1034: Local Ollama models generating tool calls but not executing them properly
  • #590: Local models generating tool JSON but tools not being executed
  • #1068: Tool use failures with local models where calls are generated but execution fails

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Sep 6, 2025): This issue might be a duplicate of existing issues. Please check: - #234: Comprehensive report on tool calling issues with open source/local models, including system prompt and tool execution problems - #1890: Similar issue with local models not handling system prompts and tool templates properly, specifically mentions tool scaffolding failures - #1034: Local Ollama models generating tool calls but not executing them properly - #590: Local models generating tool JSON but tools not being executed - #1068: Tool use failures with local models where calls are generated but execution fails Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Sep 6, 2025):

It cannot find the LSP server commands

There are no lsp tools rn so this is expected

It claims it cannot create sub-agents, because it does not have access to an API.

There should be a tool called “task” it can use for subagents

@rekram1-node commented on GitHub (Sep 6, 2025): > It cannot find the LSP server commands There are no lsp tools rn so this is expected > It claims it cannot create sub-agents, because it does not have access to an API. There should be a tool called “task” it can use for subagents
Author
Owner

@rekram1-node commented on GitHub (Sep 6, 2025):

Is there a system prompt or some list of tools, that I am supposed to provide the LLM?

No I would expect things to work out of the box can you share what happens? Are tools not invoking? Does it say it has none?

@rekram1-node commented on GitHub (Sep 6, 2025): > Is there a system prompt or some list of tools, that I am supposed to provide the LLM? No I would expect things to work out of the box can you share what happens? Are tools not invoking? Does it say it has none?
Author
Owner

@haltingstate commented on GitHub (Sep 24, 2025):

Yes. The LLM fights with me and claims its not a development environment and it has no tools to edit files.

I can setup an automated environment and try different local LLMs and send evals.

You should definitely contact me about a fine tune or model merge or something; and producing some open source models tuned for toolset.

Sonnet was good but the other models, fight with you and refuse to use tools or do software development.

@haltingstate commented on GitHub (Sep 24, 2025): Yes. The LLM fights with me and claims its not a development environment and it has no tools to edit files. I can setup an automated environment and try different local LLMs and send evals. You should definitely contact me about a fine tune or model merge or something; and producing some open source models tuned for toolset. Sonnet was good but the other models, fight with you and refuse to use tools or do software development.
Author
Owner

@rekram1-node commented on GitHub (Sep 24, 2025):

@haltingstate the only people i hear having this issue have some misconfiguration with their setup that prevents model from using tools properly.

if you ask the llm what tools it has what does it say?

Do you have any special AGENTS.md prompt or anything else?

@rekram1-node commented on GitHub (Sep 24, 2025): @haltingstate the only people i hear having this issue have some misconfiguration with their setup that prevents model from using tools properly. if you ask the llm what tools it has what does it say? Do you have any special AGENTS.md prompt or anything else?
Author
Owner

@haltingstate commented on GitHub (Oct 16, 2025):

if you ask the llm what tools it has what does it say?

Let me try again.

Issue may have been fixed.

Opencode and Crush are on same code base, so was surprised I had such a large difference in behavior from Opencode.

I will open a new ticket if it come back.

@haltingstate commented on GitHub (Oct 16, 2025): >if you ask the llm what tools it has what does it say? Let me try again. Issue may have been fixed. Opencode and Crush are on same code base, so was surprised I had such a large difference in behavior from Opencode. I will open a new ticket if it come back.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1633