From 53117de0c90adb85067702316b9b6015a99ea67b Mon Sep 17 00:00:00 2001 From: Christian Bromann Date: Thu, 13 Nov 2025 17:47:34 -0800 Subject: [PATCH] fix(langchain): fix docs on LLMToolSelectorMiddleware --- src/oss/langchain/middleware/built-in.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/oss/langchain/middleware/built-in.mdx b/src/oss/langchain/middleware/built-in.mdx index f08acb05f7..95e3b865b0 100644 --- a/src/oss/langchain/middleware/built-in.mdx +++ b/src/oss/langchain/middleware/built-in.mdx @@ -1124,11 +1124,11 @@ const agent = createAgent({ - Maximum number of tools to select. Defaults to no limit. + Maximum number of tools to select. If the model selects more, only the first max_tools will be used. No limit if not specified. - List of tool names to always include in the selection + Tool names to always include regardless of selection. These do not count against the max_tools limit. ::: @@ -1137,12 +1137,16 @@ const agent = createAgent({ Model for tool selection. Can be a model identifier string (e.g., `'openai:gpt-4o-mini'`) or a `BaseChatModel` instance. Defaults to the agent's main model. + + Instructions for the selection model. Uses built-in prompt if not specified. + + - Maximum number of tools to select. Defaults to no limit. + Maximum number of tools to select. If the model selects more, only the first maxTools will be used. No limit if not specified. - Array of tool names to always include in the selection + Tool names to always include regardless of selection. These do not count against the maxTools limit. :::