You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
When migrating Spring AI from version 1.0.0-M8 to 1.0.0, configuring the spring.ai.azure.openai.chat.options.response-format property with values such as text, json_object, or json_schema (which were changed from the previous json value) results in an application startup failure. The application fails to bind the string property value to the org.springframework.ai.azure.openai.AzureOpenAiResponseFormat type, throwing a ConverterNotFoundException.
Environment
Spring AI version:1.0.0 (migrating from 1.0.0-M8)
Java version: 21
Model Provider: Azure OpenAI
Steps to reproduce
Have a Spring Boot application using spring-ai-azure-openai-starter.
Previously, in version 1.0.0-M8 or earlier, have the property spring.ai.azure.openai.chat.options.responseFormat=json (or its equivalent) configured.
Upgrade the Spring AI version to 1.0.0.
Modify the configuration property to spring.ai.azure.openai.chat.options.response-format and set its value to one of the new supported formats, for example: spring.ai.azure.openai.chat.options.response-format=json_object.
Attempt to start the Spring Boot application.
Observe the APPLICATION FAILED TO START error with the ConverterNotFoundException.
Expected behavior
The application should start successfully with the spring.ai.azure.openai.chat.options.response-format property correctly bound to the AzureOpenAiResponseFormat type, allowing the Azure OpenAI chat client to use the specified response format (e.g., text, json_object, or json_schema).
Minimal Complete Reproducible example
A minimal complete reproducible example or failing test was not provided in the initial report. However, a simple Spring Boot application with the spring-ai-azure-openai-starter dependency and the following configuration in application.properties should trigger the issue:
application.properties:
spring.ai.azure.openai.api-key=<YOUR_AZURE_OPENAI_KEY>
spring.ai.azure.openai.endpoint=<YOUR_AZURE_OPENAI_ENDPOINT>
spring.ai.azure.openai.chat.options.deployment-name=<YOUR_DEPLOYMENT_NAME> # or modelspring.ai.azure.openai.chat.options.response-format=json_object # or text, or json_schema
A simple component attempting to use the ChatClient would be sufficient to trigger the context loading and property binding.
Error Log Snippet Provided:
***************************
APPLICATION FAILED TO START
***************************
Description:
Failed to bind properties under 'spring.ai.azure.openai.chat.options.response-format' to org.springframework.ai.azure.openai.AzureOpenAiResponseFormat:
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.azure.openai.AzureOpenAiResponseFormat]
Action:
Review the value of the property. If the problem persists, check the DDL definition of the an @ConfigurationProperties bean if you have one.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Bug description
When migrating Spring AI from version
1.0.0-M8
to1.0.0
, configuring thespring.ai.azure.openai.chat.options.response-format
property with values such astext
,json_object
, orjson_schema
(which were changed from the previousjson
value) results in an application startup failure. The application fails to bind the string property value to theorg.springframework.ai.azure.openai.AzureOpenAiResponseFormat
type, throwing aConverterNotFoundException
.Environment
1.0.0
(migrating from1.0.0-M8
)Steps to reproduce
spring-ai-azure-openai-starter
.1.0.0-M8
or earlier, have the propertyspring.ai.azure.openai.chat.options.responseFormat=json
(or its equivalent) configured.1.0.0
.spring.ai.azure.openai.chat.options.response-format
and set its value to one of the new supported formats, for example:spring.ai.azure.openai.chat.options.response-format=json_object
.APPLICATION FAILED TO START
error with theConverterNotFoundException
.Expected behavior
The application should start successfully with the
spring.ai.azure.openai.chat.options.response-format
property correctly bound to theAzureOpenAiResponseFormat
type, allowing the Azure OpenAI chat client to use the specified response format (e.g.,text
,json_object
, orjson_schema
).Minimal Complete Reproducible example
A minimal complete reproducible example or failing test was not provided in the initial report. However, a simple Spring Boot application with the
spring-ai-azure-openai-starter
dependency and the following configuration inapplication.properties
should trigger the issue:application.properties
:A simple component attempting to use the
ChatClient
would be sufficient to trigger the context loading and property binding.Error Log Snippet Provided:
The text was updated successfully, but these errors were encountered: