Skip to content

Commit 0206fa6

Browse files
committed
feat(bedrock): deprecate model-specific chat implementations in favor of Converse API
Following Amazon Bedrock's recommendations, deprecate individual model chat implementations (Anthropic, Cohere, Llama, Titan, etc.) in favor of the unified BedrockProxyChatModel. This change promotes the use of Bedrock's Converse API which offers benefits like model flexibility, extended functionality, and native tool support. The Converse API does not support embedding operations, so these will remain in the current API and the embedding model functionality in the existing InvokeModel API will be maintained
1 parent c5bf644 commit 0206fa6

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic/BedrockAnthropicChatModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@
4040
*
4141
* @author Christian Tzolov
4242
* @since 0.8.0
43+
* @deprecated in favor of the
44+
* {@link org.springframework.ai.bedrock.converse.BedrockProxyChatModel}.
4345
*/
46+
@Deprecated
4447
public class BedrockAnthropicChatModel implements ChatModel, StreamingChatModel {
4548

4649
private final AnthropicChatBedrockApi anthropicChatApi;

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/anthropic3/BedrockAnthropic3ChatModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@
5757
* @author Wei Jiang
5858
* @author Alexandros Pappas
5959
* @since 1.0.0
60+
* @deprecated in favor of the
61+
* {@link org.springframework.ai.bedrock.converse.BedrockProxyChatModel}.
6062
*/
63+
@Deprecated
6164
public class BedrockAnthropic3ChatModel implements ChatModel, StreamingChatModel {
6265

6366
private final Anthropic3ChatBedrockApi anthropicChatApi;

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/cohere/BedrockCohereChatModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
*
4343
* @author Christian Tzolov
4444
* @since 0.8.0
45+
* @deprecated in favor of the
46+
* {@link org.springframework.ai.bedrock.converse.BedrockProxyChatModel}.
4547
*/
48+
@Deprecated
4649
public class BedrockCohereChatModel implements ChatModel, StreamingChatModel {
4750

4851
private final CohereChatBedrockApi chatApi;

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/jurassic2/BedrockAi21Jurassic2ChatModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434
*
3535
* @author Ahmed Yousri
3636
* @since 1.0.0
37+
* @deprecated in favor of the
38+
* {@link org.springframework.ai.bedrock.converse.BedrockProxyChatModel}.
3739
*/
40+
@Deprecated
3841
public class BedrockAi21Jurassic2ChatModel implements ChatModel {
3942

4043
private final Ai21Jurassic2ChatBedrockApi chatApi;

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/llama/BedrockLlamaChatModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
* @author Christian Tzolov
4444
* @author Wei Jiang
4545
* @since 0.8.0
46+
* @deprecated in favor of the
47+
* {@link org.springframework.ai.bedrock.converse.BedrockProxyChatModel}.
4648
*/
49+
@Deprecated
4750
public class BedrockLlamaChatModel implements ChatModel, StreamingChatModel {
4851

4952
private final LlamaChatBedrockApi chatApi;

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/BedrockTitanChatModel.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
*
4444
* @author Christian Tzolov
4545
* @since 0.8.0
46+
* @deprecated in favor of the
47+
* {@link org.springframework.ai.bedrock.converse.BedrockProxyChatModel}.
4648
*/
49+
@Deprecated
4750
public class BedrockTitanChatModel implements ChatModel, StreamingChatModel {
4851

4952
private final TitanChatBedrockApi chatApi;

0 commit comments

Comments
 (0)