mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
feat(anthropic): support mcp_toolset in bind_tools (#34284)
This commit is contained in:
Binary file not shown.
@@ -1801,18 +1801,15 @@ def test_remote_mcp(output_version: Literal["v0", "v1"]) -> None:
|
||||
"type": "url",
|
||||
"url": "https://mcp.deepwiki.com/mcp",
|
||||
"name": "deepwiki",
|
||||
"tool_configuration": {"enabled": True, "allowed_tools": ["ask_question"]},
|
||||
"authorization_token": "PLACEHOLDER",
|
||||
},
|
||||
]
|
||||
|
||||
llm = ChatAnthropic(
|
||||
model="claude-sonnet-4-5-20250929", # type: ignore[call-arg]
|
||||
betas=["mcp-client-2025-04-04"],
|
||||
mcp_servers=mcp_servers,
|
||||
max_tokens=10_000, # type: ignore[call-arg]
|
||||
output_version=output_version,
|
||||
)
|
||||
).bind_tools([{"type": "mcp_toolset", "mcp_server_name": "deepwiki"}])
|
||||
|
||||
input_message = {
|
||||
"role": "user",
|
||||
|
||||
Reference in New Issue
Block a user