feat: support Claude 4 Interleaved thinking (beta) (#164)

This commit is contained in:
heisenbergye authored and GitHub committed 2025-07-21 16:44:21 +08:00
1 parent 76a3614f17
commit 3f1b56a526
5 files changed
+115 -3

No files matched your search

+4
View File
@@ -567,6 +567,10 @@ class BedrockModel(BaseChatModel):
assert "function" in chat_request.tool_choice
tool_config["toolChoice"] = {"tool": {"name": chat_request.tool_choice["function"].get("name", "")}}
args["toolConfig"] = tool_config
# add Additional fields to enable extend thinking
if chat_request.extra_body:
# reasoning_config will not be used
args["additionalModelRequestFields"] = chat_request.extra_body
return args
def _create_response(