Bug description The embedding_only option is not part of the Ollama API anymore. It's been removed since it wasn't actually used: https://github.com/ollama/ollama/pull/2848. When this option is included in a request to Ollama, an error is thrown. Current API spec: https://github.com/ollama/ollama/blob/main/api/types.go#L87.

Environment Spring AI Snapshot Ollama 0.1.29

Expected behavior The embedding_only option should not be part of https://github.com/spring-projects/spring-ai/blob/main/models/spring-ai-ollama/src/main/java/org/springframework/ai/ollama/api/OllamaOptions.java

PR: https://github.com/spring-projects/spring-ai/pull/504

Comment From: tzolov

Thanks for the fix @ThomasVitale ,

Unfortunately the Ollama's options management and documentation looks like a complete mess.
It is not clear which properties are used only for Chat, Embedding or shared. For example: https://github.com/ollama/ollama/issues/2349 Also, for half of the defined options there is no documentation: https://docs.spring.io/spring-ai/reference/1.0-SNAPSHOT/api/chat/ollama-chat.html#_chat_properties

So, issues like this will continue to pop up until we figure out how to fix our Ollama ITs caching. @eddumelendez we need to give the https://github.com/spring-projects/spring-ai/pull/322 another try.

Comment From: ThomasVitale

@tzolov you're welcome! I caught this error on another project where I run integration tests with the Testcontainers Ollama module and these images I maintain that come with pre-built models for convenience and to keep the pipelines simple. They are built weekly with the latest Ollama and model versions, and they are multi-arch: https://github.com/ThomasVitale/llm-images