spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

Binding failure for spring.ai.ollama.chat.options.think-option in application.properties

Open nicolaskrier opened this issue 1 week ago • 0 comments
trafficstars

Description

When trying to configure the think-option for Ollama in application.properties, Spring Boot fails to bind the property value to the ThinkOption interface. Here is the relevant configuration:

spring.ai.ollama.chat.options.model=gpt-oss:latest
spring.ai.ollama.chat.options.think-option=low

Error Log

***************************
APPLICATION FAILED TO START
***************************

Description:
Failed to bind properties under 'spring.ai.ollama.chat.options.think-option' to org.springframework.ai.ollama.api.ThinkOption:
    Property: spring.ai.ollama.chat.options.think-option
    Value: "low"
    Origin: class path resource [application-ollama.properties] - 2:44
    Reason: org.springframework.core.convert.ConverterNotFoundException: No converter found capable of converting from type [java.lang.String] to type [@com.fasterxml.jackson.annotation.JsonProperty org.springframework.ai.ollama.api.ThinkOption]
Action:
Update your application's configuration

Expected Behavior

The property spring.ai.ollama.chat.options.think-option should be successfully bound to the ThinkOption.ThinkBoolean and the ThinkOption.ThinkLevel for valid values:

  • enabled,
  • disabled,
  • low,
  • medium,
  • high.

nicolaskrier avatar Nov 11 '25 20:11 nicolaskrier