Skip to content

Commit 3d8b017

Browse files
committed
Change BedrockRecorder to check if the model id contains anthropic instead of a prefix check to allow cross-region reference model ids.
Fixes issue #1639
1 parent 288c566 commit 3d8b017

File tree

1 file changed

+1
-1
lines changed
  • model-providers/bedrock/runtime/src/main/java/io/quarkiverse/langchain4j/bedrock/runtime

1 file changed

+1
-1
lines changed

model-providers/bedrock/runtime/src/main/java/io/quarkiverse/langchain4j/bedrock/runtime/BedrockRecorder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public Supplier<StreamingChatModel> streamingChatModel(final String configName)
130130
var modelId = modelConfig.modelId().orElse("anthropic.claude-v2");
131131

132132
Supplier<StreamingChatModel> supplier;
133-
if (modelId.startsWith("anthropic")) {
133+
if (modelId.contains("anthropic")) {
134134

135135
var paramsBuilder = ChatRequestParameters.builder()
136136
.maxOutputTokens(modelConfig.maxTokens());

0 commit comments

Comments
 (0)