Migrate to Spring AI 1.1

Proprietary

Migrate applications to Spring AI 1.1, from Spring AI 1.0 or anything older that UpgradeSpringAi_1_0 migrates. This moves the OpenAI text-to-speech types to the provider-neutral org.springframework.ai.audio.tts API, replaces OllamaOptions with OllamaChatOptions, creates QuestionAnswerAdvisor through its builder, and upgrades Spring AI dependencies to 1.1.

io.moderne.java.spring.ai1.UpgradeSpringAi_1_1
mod run . --recipe=io.moderne.java.spring.ai1.UpgradeSpringAi_1_1

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Migrate to Spring AI 1.0
  2. Change type SpeechModel to TextToSpeechModel
  3. Change type StreamingSpeechModel to StreamingTextToSpeechModel
  4. Change type SpeechPrompt to TextToSpeechPrompt
  5. Change type SpeechResponse to TextToSpeechResponse
  6. Change type SpeechMessage to TextToSpeechMessage
  7. Change type org.springframework.ai.openai.audio.speech.Speech to org.springframework.ai.audio.tts.Speech
  8. Change type OllamaOptions to OllamaChatOptions
  9. Change Gradle or Maven dependency org.springframework.ai:spring-ai-autoconfigure-mcp-client
  10. Change Gradle or Maven dependency org.springframework.ai:spring-ai-autoconfigure-mcp-server
  11. Upgrade Gradle or Maven dependency versions org.springframework.ai:*:1.1.x