Skip to content

Commit 2a9f650

Browse files
committed
Add DeepSeek-R1 'no_tools' streaming support for ChatBedrockConverse
1 parent ef2a01d commit 2a9f650

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

libs/aws/langchain_aws/chat_models/bedrock_converse.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,9 @@ def set_disable_streaming(cls, values: Dict) -> Any:
492492
# All Meta Llama models
493493
(provider == "meta") or
494494
# All Mistral models
495-
(provider == "mistral")
495+
(provider == "mistral") or
496+
# DeepSeek-R1 models
497+
(provider == "deepseek" and "r1" in model_id_lower)
496498
):
497499
streaming_support = "no_tools"
498500
else:

libs/aws/tests/unit_tests/chat_models/test_bedrock_converse.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ def test_standard_tracing_params() -> None:
481481
("us.meta.llama3-3-70b-instruct-v1:0", "tool_calling"),
482482
("us.amazon.nova-lite-v1:0", False),
483483
("us.amazon.nonstreaming-model-v1:0", True),
484+
("us.deepseek.r1-v1:0", "tool_calling"),
484485
],
485486
)
486487
def test_set_disable_streaming(

0 commit comments

Comments
 (0)