Deprecated API
Contents
-
Terminally Deprecated ElementsElementDescriptionUse the constructor with suppliers for Tika components if you intend to use this parser for multiple files and specify whether to include metadata or not.Use the constructor with suppliers for Tika components if you intend to use this parser for multiple files.use
DoclingDocumentParser.builder()withDoclingDocumentParser.Builder.doclingClient(DoclingServeApi)and aDoclingDocumentParser.Builder.documentRequest(DocumentRequest)carrying aConvertDocumentRequestwith the desiredConvertDocumentOptionsinsteadThis method is not supported on the official MCP registry anymore.This field was removed in the 2025-09-29 version of the schema.This field was moved to the McpOfficialMeta object in schema version 2025-09-29please useAnthropicTool(Builder)insteadPlease usebuilder()instead, and explicitly set the model name and, if necessary, other parameters.Please usebuilder()instead, and explicitly set the model name and, if necessary, other parameters.useChoiceQuestion.from(String, List)insteaduseChoiceQuestion.from(String, Map)insteaduseScaleQuestion.from(String, List)insteaduseYesNoQuestion.from(String)insteaduseYesNoAnswer.from(double)insteadPlease useOpenAiChatModelfrom thelangchain4j-open-aimodule instead:ChatModel model = OpenAiChatModel.builder() .apiKey(System.getenv("HF_API_KEY")) .baseUrl("https://router.huggingface.co/v1") .modelName("HuggingFaceTB/SmolLM3-3B:hf-inference") .build();Please useOpenAiChatModelfrom thelangchain4j-open-aimodule instead:ChatModel model = OpenAiChatModel.builder() .apiKey(System.getenv("HF_API_KEY")) .baseUrl("https://router.huggingface.co/v1") .modelName("HuggingFaceTB/SmolLM3-3B:hf-inference") .build();useEmbeddingRequestfromlangchain4j-open-aimodule insteaduseEmbeddingResponsefromlangchain4j-open-aimodule insteadDo not use anymore, uselangchain4j-open-aimodule insteadDo not use anymore, uselangchain4j-open-aimodule insteadDo not use anymore, uselangchain4j-open-aimodule insteaduseOpenAiEmbeddingModelfromlangchain4j-open-aimodule insteadPlease usebuilder()instead, and explicitly set the baseUrl and, if necessary, other parameters. The default value for baseUrl will be removed in future releases!please useVertexAiGeminiChatModel(VertexAiGeminiChatModelBuilder)insteadplease useVertexAiGeminiStreamingChatModel(VertexAiGeminiStreamingChatModelBuilder)insteadPlease useVertexAiChatModel(Builder)insteadPlease useVertexAiEmbeddingModel(Builder)insteadtopKcannot be used together withScoringModel, which requires exactly one score per input segment (seeVoyageAiScoringModel.scoreAll(List, String)). Asking Voyage AI for fewer documents than were sent makes it impossible to tell which segment each returned score belongs to, soscoreAllnow throws anIllegalArgumentExceptionwhentopKis smaller than the number of segments. Any other value has no effect. To limit how many results a RAG pipeline keeps after re-ranking, useReRankingContentAggregator.ReRankingContentAggregatorBuilder.maxResults(Integer)instead:ReRankingContentAggregator.builder() .scoringModel(scoringModel) .maxResults(3) .build();Replaced bydev.langchain4j.store.embedding.azure.documentdb.AzureDocumentDbDocumentin thelangchain4j-azure-documentdbmodule. SeeAzureCosmosDbMongoVCoreEmbeddingStorefor migration details.Azure CosmosDB for MongoDB vCore has been rebranded by Microsoft as Azure DocumentDB. Usedev.langchain4j.store.embedding.azure.documentdb.AzureDocumentDbEmbeddingStorefrom thelangchain4j-azure-documentdbmodule instead. This class is kept for backwards compatibility and will be removed in a future release.Replaced bydev.langchain4j.store.embedding.azure.documentdb.AzureDocumentDbMatchedDocumentin thelangchain4j-azure-documentdbmodule. SeeAzureCosmosDbMongoVCoreEmbeddingStorefor migration details.Only works with the V1 API, use theChromaEmbeddingStore(Builder)constructor instead.UseAbstractElasticsearchEmbeddingStore.fullTextSearchMatches(FullTextSearchRequest)instead. It returns the same text segments, but also the Elasticsearch document ID and the relevance score of each match.UseAbstractElasticsearchEmbeddingStore.fullTextSearchMatches(FullTextSearchRequest)instead. It also applies themaxResults,minScoreandfilterof the request.UseElasticsearchConfiguration.fullTextSearch(ElasticsearchClient, String, FullTextSearchRequest)instead. It also applies themaxResults,minScoreandfilterof the request.dev.langchain4j.store.embedding.elasticsearch.ElasticsearchEmbeddingStore.Builder.dimension(Integer) dimension is not used anymore.In favor ofEmbeddingVectorto avoid naming collisions
-
Deprecated InterfacesInterfaceDescriptionDo not use anymore, use
langchain4j-open-aimodule instead
-
Deprecated ClassesClassDescriptionGPULlama3.java has been succeeded by jitLLM. Use
dev.langchain4j.model.jitllm.JitLLMChatModelfrom thelangchain4j-jitllmmodule instead.Usedev.langchain4j.model.jitllm.JitLLMChatModel.builder()from thelangchain4j-jitllmmodule instead.GPULlama3.java has been succeeded by jitLLM. There is no replacement for this class:dev.langchain4j.model.jitllm.JitLLMChatModelanddev.langchain4j.model.jitllm.JitLLMStreamingChatModelfrom thelangchain4j-jitllmmodule separate the thinking themselves and return it whenreturnThinking(true)is set.GPULlama3.java has been succeeded by jitLLM. Usedev.langchain4j.model.jitllm.JitLLMStreamingChatModelfrom thelangchain4j-jitllmmodule instead.Usedev.langchain4j.model.jitllm.JitLLMStreamingChatModel.builder()from thelangchain4j-jitllmmodule instead.Please useOpenAiChatModelfrom thelangchain4j-open-aimodule instead:ChatModel model = OpenAiChatModel.builder() .apiKey(System.getenv("HF_API_KEY")) .baseUrl("https://router.huggingface.co/v1") .modelName("HuggingFaceTB/SmolLM3-3B:hf-inference") .build();Please useOpenAiChatModelfrom thelangchain4j-open-aimodule instead:ChatModel model = OpenAiChatModel.builder() .apiKey(System.getenv("HF_API_KEY")) .baseUrl("https://router.huggingface.co/v1") .modelName("HuggingFaceTB/SmolLM3-3B:hf-inference") .build();useEmbeddingRequestfromlangchain4j-open-aimodule insteaduseEmbeddingResponsefromlangchain4j-open-aimodule insteadDo not use anymore, uselangchain4j-open-aimodule insteadDo not use anymore, uselangchain4j-open-aimodule insteaduseOpenAiEmbeddingModelfromlangchain4j-open-aimodule insteadReplaced bydev.langchain4j.store.embedding.azure.documentdb.AzureDocumentDbDocumentin thelangchain4j-azure-documentdbmodule. SeeAzureCosmosDbMongoVCoreEmbeddingStorefor migration details.Azure CosmosDB for MongoDB vCore has been rebranded by Microsoft as Azure DocumentDB. Usedev.langchain4j.store.embedding.azure.documentdb.AzureDocumentDbEmbeddingStorefrom thelangchain4j-azure-documentdbmodule instead. This class is kept for backwards compatibility and will be removed in a future release.Replaced bydev.langchain4j.store.embedding.azure.documentdb.AzureDocumentDbMatchedDocumentin thelangchain4j-azure-documentdbmodule. SeeAzureCosmosDbMongoVCoreEmbeddingStorefor migration details.
-
Deprecated Annotation Interfaces
-
Deprecated MethodsMethodDescriptionUse
AgentBuilder.maxToolCallingRoundTrips(int)instead.useDoclingDocumentParser.Builder.documentRequest(DocumentRequest)with aConvertDocumentRequestcarrying the desired options insteadLangChain4j now offloads everything throughDefaultExecutorProvider.getDefaultExecutor()(a plainExecutor); no internal site needs anExecutorServiceanymore. Retained only for backward compatibility with external callers. PreferDefaultExecutorProvider.getDefaultExecutor().Roots are deprecated in MCP protocol version 2026-07-28. This method throwsUnsupportedOperationExceptionwhen the modern protocol is in use.UseMcpClient.subscribeToResources(List)for MCP 2026-07-28 and later. ThrowsUnsupportedOperationExceptionwhen using the modern protocol.UseMcpClient.unsubscribeFromResources(long)for MCP 2026-07-28 and later. ThrowsUnsupportedOperationExceptionwhen using the modern protocol.misspelled method name, useDockerMcpTransport.Builder.dockerTlsVerify(Boolean)instead.This method is not supported on the official MCP registry anymore.This field was removed in the 2025-09-29 version of the schema.This field was moved to the McpOfficialMeta object in schema version 2025-09-29Please usebuilder()instead, and explicitly set the model name and, if necessary, other parameters.Proxy configuration viaproxy(...)is no longer supported since the migration to the langchain4j HttpClient abstraction. Passing a non-null proxy will cause anUnsupportedOperationExceptionwhen the model is built. To configure a proxy, supply a customHttpClientBuilderviaCohereScoringModel.CohereScoringModelBuilder.httpClientBuilder(HttpClientBuilder)instead.Please usebuilder()instead, and explicitly set the model name and, if necessary, other parameters.useChoiceQuestion.from(String, List)insteaduseChoiceQuestion.from(String, Map)insteaduseScaleQuestion.from(String, List)insteaduseYesNoQuestion.from(String)insteaduseYesNoAnswer.from(double)insteadFunctions are deprecated by OpenAI, useOpenAiUtils.toTools(Collection, boolean)insteadPlease usebuilder()instead, and explicitly set the baseUrl and, if necessary, other parameters. The default value for baseUrl will be removed in future releases!topKcannot be used together withScoringModel, which requires exactly one score per input segment (seeVoyageAiScoringModel.scoreAll(List, String)). Asking Voyage AI for fewer documents than were sent makes it impossible to tell which segment each returned score belongs to, soscoreAllnow throws anIllegalArgumentExceptionwhentopKis smaller than the number of segments. Any other value has no effect. To limit how many results a RAG pipeline keeps after re-ranking, useReRankingContentAggregator.ReRankingContentAggregatorBuilder.maxResults(Integer)instead:ReRankingContentAggregator.builder() .scoringModel(scoringModel) .maxResults(3) .build();UseAiServices.maxToolCallingRoundTrips(int)instead.useAiServices.tools(List)instead in order to specifyReturnBehavioruseAiServiceTool.returnBehavior()insteadPlease setToolErrorContext.Builder.invocationContext(InvocationContext)insteadPlease useToolExecution.Builder.result(ToolExecutionResult)insteaduseToolProviderResult.aiServiceTools()to get tool'sReturnBehavioruseToolProviderResult.aiServiceTools()insteaduseToolService.returnBehavior(String)insteadUseToolService.maxToolCallingRoundTrips()instead.UseToolService.maxToolCallingRoundTrips(int)instead.useToolService.toolProviders()insteaduseToolServiceContext.Builder.returnBehaviors(Map)insteaduseToolServiceContext.Builder.effectiveTools(List)insteaduseToolServiceContext.returnBehavior(String)insteaduseToolServiceContext.effectiveTools()insteadPlease useToolServiceResult.aggregateResponse()instead for clarityUseAbstractElasticsearchEmbeddingStore.fullTextSearchMatches(FullTextSearchRequest)instead. It returns the same text segments, but also the Elasticsearch document ID and the relevance score of each match.UseAbstractElasticsearchEmbeddingStore.fullTextSearchMatches(FullTextSearchRequest)instead. It also applies themaxResults,minScoreandfilterof the request.UseElasticsearchConfiguration.fullTextSearch(ElasticsearchClient, String, FullTextSearchRequest)instead. It also applies themaxResults,minScoreandfilterof the request.dev.langchain4j.store.embedding.elasticsearch.ElasticsearchEmbeddingStore.Builder.dimension(Integer) dimension is not used anymore.
-
Deprecated ConstructorsConstructorDescriptionUse the constructor with suppliers for Tika components if you intend to use this parser for multiple files and specify whether to include metadata or not.Use the constructor with suppliers for Tika components if you intend to use this parser for multiple files.use
DoclingDocumentParser.builder()withDoclingDocumentParser.Builder.doclingClient(DoclingServeApi)and aDoclingDocumentParser.Builder.documentRequest(DocumentRequest)carrying aConvertDocumentRequestwith the desiredConvertDocumentOptionsinsteadplease useAnthropicTool(Builder)insteadplease useAnthropicToolSchema(Builder)insteadplease useVertexAiGeminiChatModel(VertexAiGeminiChatModelBuilder)insteadplease useVertexAiGeminiStreamingChatModel(VertexAiGeminiStreamingChatModelBuilder)insteadPlease useVertexAiChatModel(Builder)insteadPlease useVertexAiEmbeddingModel(Builder)insteaduseToolServiceContext(Builder)insteadPlease useToolServiceResult(Builder)insteadOnly works with the V1 API, use theChromaEmbeddingStore(Builder)constructor instead.
-
Deprecated Enum ConstantsEnum ConstantDescriptionDALL-E models have been deprecated by OpenAI. Use
OpenAiImageModelName.GPT_IMAGE_1or other GPT image models instead.DALL-E models have been deprecated by OpenAI. UseOpenAiImageModelName.GPT_IMAGE_1or other GPT image models instead.