chatbox icon indicating copy to clipboard operation
chatbox copied to clipboard

[BUG] ollama deepseek-r1-tool-calling

Open platise opened this issue 2 months ago • 4 comments

Bug Description

</think>
{"name": "mcp__postgres_home_assistant__get_object_details", "parameters": {"object_name": "grid_power", "object_type": "table", "schema_name": "public"}}

tokens used: 3798, model: Ollama (MFDoom/deepseek-r1-tool-calling:32b)

Steps to Reproduce Please provide the steps to reproduce the bug:

  1. I am using postgresql mcp server with ollama deepseek-r1-tool calling
  2. Ask something to query the db, which fails; with other models it works.

Expected Results

For example:

I'll check the database for humidity data related to the areca palm. Let me look for sensor data that might contain this information.

mcp__postgres_home_assistant__list_schemas

mcp__postgres_home_assistant__list_objects

mcp__postgres_home_assistant__get_object_details

Let me query for humidity data related to the areca palm by searching for relevant entity IDs in the database:

mcp__postgres_home_assistant__execute_sql

Let me query for the most recent humidity reading from the areca palm sensor:

mcp__postgres_home_assistant__execute_sql

47

tokens used: 3647, model: Ollama (qwen3-coder:30b)

But I am unsure whether bug is in chatbox or ollama is improperly format the tool request?

Desktop (please complete the following information):

  • Operating System: Linux
  • Application Version: 1.16.4

platise avatar Oct 13 '25 12:10 platise

Is there any error? I don't see any in the log you posted. BTW deepseek-r1's tool use ability is very weak, you can try some other model like qwen or gemma

themez avatar Oct 14 '25 12:10 themez

I checked the main.log and there are no errors.

Yes qwen works, but I easily get this qwen3-coder to "cycle forever" ... and wanted to try with deepseek, which has better reasoning.

platise avatar Oct 14 '25 12:10 platise

If no error, what do you mean by it fails? What behavior is unexpected

themez avatar Oct 14 '25 13:10 themez

If you look at this output, seems like ollama requested a tool, but then everything stopped?

If you see "expected results" above from qwen, it works fine.

` {"name": "mcp__postgres_home_assistant__get_object_details", "parameters": {"object_name": "grid_power", "object_type": "table", "schema_name": "public"}}

tokens used: 3798, model: Ollama (MFDoom/deepseek-r1-tool-calling:32b) `

platise avatar Oct 14 '25 14:10 platise