n8n-io/n8n

"does not support tools"

Closed this issue · 2 comments

Bug Description

When I try to chat using the following workflow:
Screenshot 2024-09-07 at 16 57 14
I get back
"[my_model_name] does not support tools."

Log:

ResponseError: llama3.1-8B-Meta:latest does not support tools
    at checkOk (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/ollama/dist/shared/ollama.384eb0a9.cjs:72:9)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at post (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/ollama/dist/shared/ollama.384eb0a9.cjs:119:3)
    at Ollama.processStreamableRequest (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/ollama/dist/shared/ollama.384eb0a9.cjs:251:22)
    at ChatOllama._streamResponseChunks (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@langchain/ollama/dist/chat_models.cjs:455:32)
    at ChatOllama._streamIterator (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@langchain/core/dist/language_models/chat_models.cjs:93:34)
    at ChatOllama.transform (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@langchain/core/dist/runnables/base.cjs:394:9)
    at RunnableBinding.transform (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@langchain/core/dist/runnables/base.cjs:840:9)
    at ToolCallingAgentOutputParser.transform (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@langchain/core/dist/runnables/base.cjs:383:26)
    at RunnableSequence._streamIterator (/Users/xroot/.nvm/versions/node/v20.17.0/lib/node_modules/n8n/node_modules/@langchain/core/dist/runnables/base.cjs:1208:30) {
  error: 'llama3.1-8B-Meta:latest does not support tools',
  status_code: 400
} undefined

If I replace Ollama with OpenAI, everything works.

To Reproduce

Use a similar workflow:
workflow.json
Open chat.
Type any prompt.

Models that I tried and got the same response:
Reasoner-Llama3.1-70b.i1-Q4_K_M.gguf
Meta-Llama-3.1-8B-Instruct-Q8_0.gguf
Dark-Miqu-70B.i1-Q5_K_M.gguf

Expected behavior

The model should respond

Operating System

macOS Sonoma 14.5 or 14.5.1

n8n Version

1.58.1, reproducable on 1.57.1

Node.js Version

20.17.0, reproducable on 18 and 22

Database

SQLite (default)

Execution mode

main (default)

Hey @cypherpork,

We have created an internal ticket to look into this which we will be tracking as "GHC-213"

Hey @cypherpork,

This doesn't look like a bug, Sadly not all Models support using tools so you would need to find one that supports the tools you are using. In this case Ollama is telling you the model selected won't work the tool you are using, I don't have a list of the ones that support tools as we don't control that but the Ollama team might.