Skip to content

Conversation

@js-0s
Copy link

@js-0s js-0s commented Nov 9, 2025

Release Notes:

  • Fixed ollama 0.12.10 tool use

Issue:

failure to execute tools (parse error)

2025-11-09T00:10:05+01:00 INFO  [ollama] Received line from Ollama: {"model":"qwen3:8b","created_at":"2025-11-08T23:10:05.993258464Z","message":{"role":"assist
ant","content":"","tool_calls":[{"id":"call_f5kqwpjg","function":{"index":0,"name":"find_path","arguments":{"glob":"*led*","offset":0}}}]},"done":false}       
2025-11-09T00:10:05+01:00 ERROR [ollama] Unable to parse chat response: Error("invalid value: map, expected map with a single key", line: 1, column: 229)      
2025-11-09T00:10:05+01:00 ERROR [agent::thread] Turn execution failed: invalid value: map, expected map with a single key at line 1 column 229                 
2025-11-09T00:10:05+01:00 ERROR [agent] Error in model response stream: invalid value: map, expected map with a single key at line 1 column 229

solution: change the structure to be able to parse the tool response:
add id to OllamaToolCall (and change from enum to struct)
add index to OllamaFunctionCall

environment:
dockerized ollama: ollama/ollama
ollama/ollama latest d353379de60a 2 days ago 3.65GB

ollama --version
ollama version is 0.12.10

Zed 0.211.6
394f56d

any tool supporting model

i dont expect you to merge this PR, this rust code might be too hacky, but it would be really great to get some logging for ollama in the future in case some model answers do not match expectations anymore. did not find any useful way to enable debugging output for the real agent conversation

js-0s added 2 commits November 9, 2025 00:59
- add logging
- change ollama tool response structure
@cla-bot
Copy link

cla-bot bot commented Nov 9, 2025

We require contributors to sign our Contributor License Agreement, and we don't have @js-0s on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@js-0s js-0s changed the title fix(ollama): correct tool use for ollama 0.12.10 fix(ollama): Correct tool use for ollama 0.12.10 Nov 9, 2025
@js-0s
Copy link
Author

js-0s commented Nov 9, 2025

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 9, 2025
@cla-bot
Copy link

cla-bot bot commented Nov 9, 2025

The cla-bot has been summoned, and re-checked this pull request!

@tidely
Copy link
Contributor

tidely commented Nov 9, 2025

Similar PR: #42275

@maxdeviant maxdeviant changed the title fix(ollama): Correct tool use for ollama 0.12.10 ollama: Correct tool use for ollama 0.12.10 Nov 9, 2025
@SomeoneToIgnore SomeoneToIgnore added the ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features label Nov 9, 2025
@bennetbo
Copy link
Member

Thank you for working on this, closing in favour of #42275

@bennetbo bennetbo closed this Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Improvement related to Agent Panel, Edit Prediction, Copilot, or other AI features cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants