Skip to content

Commit 4bf1ce5

Browse files
committed
Add missing metadata for spring.ai.model.* properties
The new spring.ai.model.* properties introduced in M7 were missing Spring Boot configuration metadata. Furthermore, the breaking change was not documented as the previous properties have been completely removed. Documentation has been added in the upgrade notes for this change.
1 parent 0c0787b commit 4bf1ce5

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"properties": [
3+
{
4+
"name": "spring.ai.model.chat",
5+
"type": "java.lang.String",
6+
"description": "The primary ChatModel to autoconfigure. If not set, each ChatModel auto-configuration is enabled by default.",
7+
"defaultValue": ""
8+
},
9+
{
10+
"name": "spring.ai.model.embedding",
11+
"type": "java.lang.String",
12+
"description": "The primary EmbeddingModel to autoconfigure. If not set, each EmbeddingModel auto-configuration is enabled by default.",
13+
"defaultValue": ""
14+
},
15+
{
16+
"name": "spring.ai.model.embedding.text",
17+
"type": "java.lang.String",
18+
"description": "The primary EmbeddingModel for text embeddings to autoconfigure. If not set, each text EmbeddingModel auto-configuration is enabled by default.",
19+
"defaultValue": ""
20+
},
21+
{
22+
"name": "spring.ai.model.embedding.multimodal",
23+
"type": "java.lang.String",
24+
"description": "The primary EmbeddingModel for multimodal embeddings to autoconfigure. If not set, each multimodal EmbeddingModel auto-configuration is enabled by default.",
25+
"defaultValue": ""
26+
},
27+
{
28+
"name": "spring.ai.model.image",
29+
"type": "java.lang.String",
30+
"description": "The primary ImageModel to autoconfigure. If not set, each ImageModel auto-configuration is enabled by default.",
31+
"defaultValue": ""
32+
},
33+
{
34+
"name": "spring.ai.model.audio.transcription",
35+
"type": "java.lang.String",
36+
"description": "The primary TranscriptionModel to autoconfigure. If not set, each TranscriptionModel auto-configuration is enabled by default.",
37+
"defaultValue": ""
38+
},
39+
{
40+
"name": "spring.ai.model.audio.speech",
41+
"type": "java.lang.String",
42+
"description": "The primary SpeechModel to autoconfigure. If not set, each SpeechModel auto-configuration is enabled by default.",
43+
"defaultValue": ""
44+
},
45+
{
46+
"name": "spring.ai.model.moderation",
47+
"type": "java.lang.String",
48+
"description": "The primary ModerationModel to autoconfigure. If not set, each ModerationModel auto-configuration is enabled by default.",
49+
"defaultValue": ""
50+
}
51+
]
52+
}

spring-ai-docs/src/main/antora/modules/ROOT/pages/upgrade-notes.adoc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,26 @@ CreateMessageResult result = exchange.createMessage(new CreateMessageRequest(...
150150

151151
For a complete guide to migrating MCP code, refer to the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-docs/src/main/antora/modules/ROOT/pages/mcp-migration.adoc[MCP Migration Guide].
152152

153+
=== Enabling/Disabling Model Auto-Configuration
154+
155+
The following configuration properties for enabling/disabling model auto-configuration have been removed:
156+
157+
* `spring.ai.<provider>.chat.enabled`
158+
* `spring.ai.<provider>.embedding.enabled`
159+
* `spring.ai.<provider>.image.enabled`
160+
* `spring.ai.<provider>.moderation.enabled`
161+
162+
As a replacement, the following properties can be used to choose for which model provider the auto-configuration should be enabled. If no value is specified, auto-configurations for all model providers are enabled by default. If a certain value is defined (e.g. `mistral`), then only the auto-configuration for that model provider will be enabled. You can refer to the https://github.com/spring-projects/spring-ai/blob/main/spring-ai-model/src/main/java/org/springframework/ai/model/SpringAIModels.java[SpringAiModels.java] enumeration for a list of well-known values for the model providers.
163+
164+
* `spring.ai.model.audio.speech=<model-provider>`
165+
* `spring.ai.model.audio.transcription=<model-provider>`
166+
* `spring.ai.model.chat=<model-provider>`
167+
* `spring.ai.model.embedding=<model-provider>`
168+
* `spring.ai.model.embedding.multimodal=<model-provider>`
169+
* `spring.ai.model.embedding.text=<model-provider>`
170+
* `spring.ai.model.image=<model-provider>`
171+
* `spring.ai.model.moderation=<model-provider>`
172+
153173
=== Automating upgrading using AI
154174

155175
You can automate the upgrade process to 1.0.0-M7 using the Claude Code CLI tool with a provided prompt:

0 commit comments

Comments
 (0)