Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionsince 2.1.0; a thinking chunk holds a
ReasoningPart, seeAssistantMessage.getReasoning()since 2.1.0; read the text of the chunk'sReasoningPart, seeAssistantMessage.getReasoning()useTextToSpeechModel.getOptions()instead.since 2.0.0 for removal in 3.0.0 — internal tool execution inBedrockProxyChatModelis superseded byToolCallingAdvisorused viaChatClient.since 2.1.0, for removal in 3.0.0, in favor ofSessionAdvisorsandSessionMemoryAdvisorinspring-ai-session-advisorsince 2.0.0 in favor ofToolCallingAdvisor. This is kept for backward compatibility and will be removed in a future release.since 2.0.0 in favor ofToolCallingAdvisor.builder().since 2.0.0 in favor ofToolCallingAdvisor.Builder.since 2.0.0 in favor ofAdvisorParams.toolCallingAdvisorAutoRegister(boolean).as of 2.0.0, in favor ofChatClient.Builder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.Builder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.Builder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.ChatClientRequestSpec.tools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.ChatClientRequestSpec.tools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.ChatClientRequestSpec.tools(Object...). To be removed in 3.0.0.in favor ofChatClientBuilderCustomizerorg.springframework.ai.chat.client.DefaultChatClientBuilder.defaultToolCallbacks(List<ToolCallback>) as of 2.0.0, in favor of#defaultTools(Consumer). To be removed in 3.0.0.as of 2.0.0, in favor ofDefaultChatClientBuilder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor of#defaultTools(Consumer). To be removed in 3.0.0.since 2.1.0, for removal in 3.0.0, in favor of session memory,org.springframework.ai.session.SessionServiceinspring-ai-session; the context key isMemoryAdvisor.CONVERSATION_IDinspring-ai-client-chatsince 2.1.0, for removal in 3.0.0, in favor oforg.springframework.ai.session.SessionRepositoryinspring-ai-sessionsince 2.1.0, for removal in 3.0.0, in favor oforg.springframework.ai.session.SessionRepositoryinspring-ai-sessionsince 2.1.0, for removal in 3.0.0, in favor of session memory,org.springframework.ai.session.SessionServiceinspring-ai-session; a turn-aware window isEventFilter.lastN, and compaction replaces evictionsince 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor ofH2JdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for HSQLDB yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofMysqlJdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for Oracle yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor ofPostgresJdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for SQLite yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for SQL Server yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.since 2.1.0 in favor ofAbstractMessage.getText(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.since 2.1.0 in favor ofAssistantMessage.getMedia(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.since 2.1.0 in favor ofToolResponseMessage.getResponses(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.since 2.1.0 in favor ofUserMessage.getMedia(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.useChatModel.getOptions()instead.since 2.1.0 for removal: read the reasoning throughAssistantMessage.getReasoning(), and build a prefix message as anAssistantMessagewhose metadata holdstrueunderDeepSeekChatModel.PREFIX_METADATA_KEYuseElevenLabsTextToSpeechModel.getOptions()instead.useGoogleGenAiTextToSpeechModel.getOptions()instead.The SSE transport has been deprecated in the 2025-03-26 version of the spec, and should not be used anymore. We keep it for backwards compatibility.The SSE transport has been deprecated in the 2025-03-26 version of the spec, and should not be used anymore. We keep it for backwards compatibility.The SSE transport has been deprecated in the 2025-03-26 version of the spec, and should not be used anymore. We keep it for backwards compatibility.since 2.0.0 for removal in 3.0.0 — internal tool execution inMistralAiChatModelis superseded byToolCallingAdvisorused viaChatClient.since 2.1.0 in favor ofAssistantMessage.getReasoning()org.springframework.ai.model.anthropic.autoconfigure.AnthropicChatProperties.Options.getToolChoice()since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-sessionUseRedisChatMemoryRepositoryAutoConfigurationinstead.UseRedisChatMemoryRepositoryPropertiesinstead.org.springframework.ai.model.chat.memory.redis.autoconfigure.RedisChatMemoryProperties.getPassword()org.springframework.ai.model.chat.memory.redis.autoconfigure.RedisChatMemoryProperties.getUsername()since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryAutoConfigurationinspring-ai-autoconfigure-model-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryPropertiesinspring-ai-autoconfigure-model-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.org.springframework.ai.model.elevenlabs.autoconfigure.ElevenLabsSpeechProperties.Options.getFormat()org.springframework.ai.model.mistralai.autoconfigure.MistralAiChatProperties.Options.getRandomSeed()org.springframework.ai.model.mistralai.autoconfigure.MistralAiChatProperties.Options.getSafePrompt()org.springframework.ai.model.mistralai.autoconfigure.MistralAiChatProperties.Options.getToolChoice()org.springframework.ai.model.mistralai.autoconfigure.MistralAiEmbeddingProperties.Options.getModel()org.springframework.ai.model.ollama.autoconfigure.OllamaChatProperties.Options.getFrequencyPenalty()org.springframework.ai.model.openai.autoconfigure.OpenAiChatProperties.Options.getFrequencyPenalty()org.springframework.ai.model.openai.autoconfigure.OpenAiChatProperties.Options.getMicrosoftFoundry()org.springframework.ai.model.openai.autoconfigure.OpenAiChatProperties.Options.getOutputModalities()org.springframework.ai.model.stabilityai.autoconfigure.StabilityAiImageProperties.Options.getModel()org.springframework.ai.model.stabilityai.autoconfigure.StabilityAiImageProperties.Options.getSteps()org.springframework.ai.model.stabilityai.autoconfigure.StabilityAiImageProperties.Options.getWidth()since 2.0.0 for removal in 3.0.0 — internal tool execution inOllamaChatModelis superseded byToolCallingAdvisorused viaChatClient.useOpenAiAudioSpeechModel.getOptions()instead.since 2.0.0 for removal in 3.0.0 — internal tool execution inOpenAiChatModelis superseded byToolCallingAdvisorused viaChatClient.useOpenAiChatModel.getOptions()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.UseJacksonUtilsorJsonHelperinsteadUseJsonHelper.fromJson(String, Class)insteadUseJsonHelper.fromJson(String, Type)insteadUseJacksonUtils.getDefaultJsonMapper()insteadUseJsonHelper.toJson(Object, boolean)instead
-
Deprecated InterfacesInterfaceDescriptionin favor of
ChatClientBuilderCustomizersince 2.1.0, for removal in 3.0.0, in favor of session memory,org.springframework.ai.session.SessionServiceinspring-ai-session; the context key isMemoryAdvisor.CONVERSATION_IDinspring-ai-client-chatsince 2.1.0, for removal in 3.0.0, in favor oforg.springframework.ai.session.SessionRepositoryinspring-ai-sessionsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.
-
Deprecated ClassesClassDescriptionsince 2.1.0, for removal in 3.0.0, in favor of
SessionAdvisorsandSessionMemoryAdvisorinspring-ai-session-advisorsince 2.0.0 in favor ofToolCallingAdvisor. This is kept for backward compatibility and will be removed in a future release.since 2.0.0 in favor ofToolCallingAdvisor.Builder.since 2.1.0, for removal in 3.0.0, in favor oforg.springframework.ai.session.SessionRepositoryinspring-ai-sessionsince 2.1.0, for removal in 3.0.0, in favor of session memory,org.springframework.ai.session.SessionServiceinspring-ai-session; a turn-aware window isEventFilter.lastN, and compaction replaces evictionsince 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor ofH2JdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for HSQLDB yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofMysqlJdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for Oracle yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor ofPostgresJdbcSessionRepositoryDialectinspring-ai-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for SQLite yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryinspring-ai-session-jdbc. There is no session dialect for SQL Server yet; one is planned before 3.0.0, and until then a dialect of your own implementsJdbcSessionRepositoryDialect.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.since 2.1.0 for removal: read the reasoning throughAssistantMessage.getReasoning(), and build a prefix message as anAssistantMessagewhose metadata holdstrueunderDeepSeekChatModel.PREFIX_METADATA_KEYUseSyncMcpLoggingProviderinstead.The SSE transport has been deprecated in the 2025-03-26 version of the spec, and should not be used anymore. We keep it for backwards compatibility.The SSE transport has been deprecated in the 2025-03-26 version of the spec, and should not be used anymore. We keep it for backwards compatibility.The SSE transport has been deprecated in the 2025-03-26 version of the spec, and should not be used anymore. We keep it for backwards compatibility.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-sessionUseRedisChatMemoryRepositoryAutoConfigurationinstead.UseRedisChatMemoryRepositoryPropertiesinstead.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Cassandra yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryAutoConfigurationinspring-ai-autoconfigure-model-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor ofJdbcSessionRepositoryPropertiesinspring-ai-autoconfigure-model-session-jdbcsince 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of the session memory auto-configuration,SessionServiceAutoConfigurationinspring-ai-autoconfigure-model-session. There is no session store for Redis yet; one is planned before 3.0.0, when this module is removed.UseJacksonUtilsorJsonHelperinstead
-
Deprecated Enum ClassesEnum ClassDescriptionsince 2.1.0, for removal in 3.0.0, in favor of session memory:
org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.since 2.1.0, for removal in 3.0.0, in favor of session memory:org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for Neo4j yet; one is planned before 3.0.0, when this module is removed.
-
Deprecated Record ClassesRecord ClassDescriptionsince 2.1.0, for removal in 3.0.0, in favor of session memory:
org.springframework.ai.session.SessionRepositoryinspring-ai-session, with a JDBC store inspring-ai-session-jdbc. There is no session store for MongoDB yet; one is planned before 3.0.0, when this module is removed.
-
Deprecated FieldsFieldDescriptionsince 2.1.0; a thinking chunk holds a
ReasoningPart, seeAssistantMessage.getReasoning()since 2.1.0; read the text of the chunk'sReasoningPart, seeAssistantMessage.getReasoning()since 2.1.0 in favor ofAbstractMessage.getText(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.since 2.1.0 in favor ofAssistantMessage.getMedia(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.since 2.1.0 in favor ofToolResponseMessage.getResponses(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.since 2.1.0 in favor ofUserMessage.getMedia(); kept so existing subclasses that read the field keep compiling. Will be removed in a future release.no longer consulted. Exception handling now follows the@Toolcontract based on the exception type. Retained for backward compatibility. Will be removed in 2.1.0.since 2.1.0 in favor ofAssistantMessage.getReasoning()UseFiltersLexer.VOCABULARYinstead.UseFiltersParser.VOCABULARYinstead.
-
Deprecated MethodsMethodDescriptionsince 2.0.0 for removal in 3.0.0 — internal tool execution in
AnthropicChatModelis superseded byToolCallingAdvisorused viaChatClient.useTextToSpeechModel.getOptions()instead.This method is not sufficient for security-sensitive URL validation and should not be relied upon for security-critical checks. UseURLValidator.isValidURLStrict(String)instead for robust validation.since 2.0.0 for removal in 3.0.0 — internal tool execution inBedrockProxyChatModelis superseded byToolCallingAdvisorused viaChatClient.since 2.0.0 in favor ofToolCallingAdvisor.builder().since 2.0.0 in favor ofAdvisorParams.toolCallingAdvisorAutoRegister(boolean).as of 2.0.0, in favor ofChatClient.Builder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.Builder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.Builder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.ChatClientRequestSpec.tools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.ChatClientRequestSpec.tools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor ofChatClient.ChatClientRequestSpec.tools(Object...). To be removed in 3.0.0.org.springframework.ai.chat.client.DefaultChatClientBuilder.defaultToolCallbacks(List<ToolCallback>) as of 2.0.0, in favor of#defaultTools(Consumer). To be removed in 3.0.0.as of 2.0.0, in favor ofDefaultChatClientBuilder.defaultTools(Object...). To be removed in 3.0.0.as of 2.0.0, in favor of#defaultTools(Consumer). To be removed in 3.0.0.useChatModel.getOptions()instead.useElevenLabsTextToSpeechModel.getOptions()instead.useGoogleGenAiTextToSpeechModel.getOptions()instead.org.springframework.ai.mcp.annotation.provider.tool.AbstractMcpToolProvider.doGetToolCallException()no longer consulted. Exception handling now follows the@Toolcontract based on the exception type, so the returned value has no effect. Retained for backward compatibility. Will be removed in 2.1.0.since 2.0.0 for removal in 3.0.0 — internal tool execution inMistralAiChatModelis superseded byToolCallingAdvisorused viaChatClient.org.springframework.ai.model.anthropic.autoconfigure.AnthropicChatProperties.Options.getToolChoice()org.springframework.ai.model.chat.memory.redis.autoconfigure.RedisChatMemoryProperties.getPassword()org.springframework.ai.model.chat.memory.redis.autoconfigure.RedisChatMemoryProperties.getUsername()org.springframework.ai.model.elevenlabs.autoconfigure.ElevenLabsSpeechProperties.Options.getFormat()org.springframework.ai.model.mistralai.autoconfigure.MistralAiChatProperties.Options.getRandomSeed()org.springframework.ai.model.mistralai.autoconfigure.MistralAiChatProperties.Options.getSafePrompt()org.springframework.ai.model.mistralai.autoconfigure.MistralAiChatProperties.Options.getToolChoice()org.springframework.ai.model.mistralai.autoconfigure.MistralAiEmbeddingProperties.Options.getModel()org.springframework.ai.model.ollama.autoconfigure.OllamaChatProperties.Options.getFrequencyPenalty()org.springframework.ai.model.openai.autoconfigure.OpenAiChatProperties.Options.getFrequencyPenalty()org.springframework.ai.model.openai.autoconfigure.OpenAiChatProperties.Options.getMicrosoftFoundry()org.springframework.ai.model.openai.autoconfigure.OpenAiChatProperties.Options.getOutputModalities()org.springframework.ai.model.stabilityai.autoconfigure.StabilityAiImageProperties.Options.getModel()org.springframework.ai.model.stabilityai.autoconfigure.StabilityAiImageProperties.Options.getSteps()org.springframework.ai.model.stabilityai.autoconfigure.StabilityAiImageProperties.Options.getWidth()since 2.0.0 for removal in 3.0.0 — internal tool execution inOllamaChatModelis superseded byToolCallingAdvisorused viaChatClient.useOpenAiAudioSpeechModel.getOptions()instead.since 2.0.0 for removal in 3.0.0 — internal tool execution inOpenAiChatModelis superseded byToolCallingAdvisorused viaChatClient.useOpenAiChatModel.getOptions()instead.UseJsonHelper.fromJson(String, Class)insteadUseJsonHelper.fromJson(String, Type)insteadUseJacksonUtils.getDefaultJsonMapper()insteadUseJsonHelper.toJson(Object, boolean)instead
-
Deprecated ConstructorsConstructorDescriptionuse
AbstractAsyncMcpToolMethodCallback(ReturnMode, Method, Object). ThetoolCallExceptionClassargument is ignored: exception handling now follows the@Toolcontract based on the exception type. Will be removed in 2.1.0.useAbstractSyncMcpToolMethodCallback(ReturnMode, Method, Object). ThetoolCallExceptionClassargument is ignored: exception handling now follows the@Toolcontract based on the exception type. Will be removed in 2.1.0.useAsyncMcpToolMethodCallback(ReturnMode, Method, Object). ThetoolCallExceptionClassargument is ignored: exception handling now follows the@Toolcontract based on the exception type. Will be removed in 2.1.0.useAsyncStatelessMcpToolMethodCallback(ReturnMode, java.lang.reflect.Method, Object). ThetoolCallExceptionClassargument is ignored: exception handling now follows the@Toolcontract based on the exception type. Will be removed in 2.1.0.useSyncMcpToolMethodCallback(ReturnMode, java.lang.reflect.Method, Object). ThetoolCallExceptionClassargument is ignored: exception handling now follows the@Toolcontract based on the exception type. Will be removed in 2.1.0.useSyncStatelessMcpToolMethodCallback(ReturnMode, java.lang.reflect.Method, Object). ThetoolCallExceptionClassargument is ignored: exception handling now follows the@Toolcontract based on the exception type. Will be removed in 2.1.0.useAsyncMcpToolCallback.BuilderinsteaduseAsyncMcpToolCallbackProvider.builder()insteaduseAsyncMcpToolCallbackProvider.builder()insteaduseAsyncMcpToolCallbackProvider.builder()insteaduseAsyncMcpToolCallbackProvider.builder()insteaduseSyncMcpToolCallback.builder()insteaduseSyncMcpToolCallbackProvider.builder()insteaduseSyncMcpToolCallbackProvider.builder()insteaduseSyncMcpToolCallbackProvider.builder()insteaduseSyncMcpToolCallbackProvider.builder()insteadUseMistralAiApi.ChatCompletionRequest.ResponseFormat.builder()or factory methods instead.UseMistralAiApi.ChatCompletionRequest.ResponseFormat.builder()or factory methods instead.in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()in favor ofOpenAiEmbeddingModel.builder()useOpenAiImageModel.builder()instead.useOpenAiImageModel.builder()instead.useOpenAiImageModel.builder()instead.useOpenAiImageModel.builder()instead.useOpenAiImageModel.builder()instead.useOpenAiImageModel.builder()instead.useOpenAiImageModel.builder()instead.useOpenAiImageModel.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.since 2.0.0-M3, useTokenTextSplitter.builder()instead.
-
Deprecated Enum ConstantsEnum ConstantDescriptionDeepSeek has announced this legacy model name will be deprecated. Prefer
DeepSeekApi.ChatModel.DEEPSEEK_V4_FLASHorDeepSeekApi.ChatModel.DEEPSEEK_V4_PRO.DeepSeek has announced this legacy model name will be deprecated. PreferDeepSeekApi.ChatModel.DEEPSEEK_V4_FLASH/DeepSeekApi.ChatModel.DEEPSEEK_V4_PROwith provider-specific reasoning configuration.
AnthropicChatModelis superseded byToolCallingAdvisorused viaChatClient.