I want to share a note about the Ollama account credential test that could be helpful to include in the connection test.
I encountered an issue for nearly two days where I couldn’t connect to Ollama, even though the connection test in the credential section was successful and it even displayed the list of available models in Ollama. However, when trying to call the api/embeddings
, I kept getting a 404 error in the Ollama logs.
After spending two days reviewing code and searching online without success, I finally discovered the issue by logging the request sent from N8N. I realized that I had added a trailing slash at the end of the connection URL, like this:
http://127.0.0.1:11434/
This trailing slash was causing Ollama to incorrectly receive the API request for embeddings.
Please consider adding a check in the Ollama credential test to either remove the trailing slash from the URL or at least provide a warning or fail the test if it’s present. This could prevent others from spending time on a similar issue.
Thank you!