Add automatic per-request MCP selection
This commit is contained in:
@@ -93,17 +93,16 @@ now = int(time.time())
|
||||
filter_ids = [
|
||||
"reasoning_default_off",
|
||||
"thinking",
|
||||
"auto_tool_selector",
|
||||
"stability_guard",
|
||||
"secret_redaction",
|
||||
"local_performance_metrics",
|
||||
]
|
||||
|
||||
# Open WebUI addresses a global MCP server as server:mcp:<connection-id>.
|
||||
# Attach the bounded web relay and, when its dedicated secret exists, the four
|
||||
# read-only official GitHub tools. This is not Open WebUI's built-in web search.
|
||||
default_tool_ids = ["server:mcp:web-local"]
|
||||
if github_enabled:
|
||||
default_tool_ids.append("server:mcp:github-local")
|
||||
# The Auto Tool Selector attaches a bounded, relevant MCP set per request.
|
||||
# Keeping this list empty prevents unrelated schemas from consuming context.
|
||||
# Users can still enable additional tools manually in a chat.
|
||||
default_tool_ids = []
|
||||
|
||||
def capabilities(vision: bool) -> dict:
|
||||
return {
|
||||
@@ -310,8 +309,7 @@ with con:
|
||||
"tags": [{"name": tag} for tag in profile["tags"]],
|
||||
"toolIds": default_tool_ids,
|
||||
# Built-in features remain available but are not forced on every
|
||||
# request. Only the bounded web MCP and four read-only GitHub
|
||||
# repository tools are attached by default.
|
||||
# request. The Auto Tool Selector supplies relevant MCPs per turn.
|
||||
"defaultFeatureIds": [],
|
||||
"filterIds": filter_ids,
|
||||
"actionIds": ["quick_actions"],
|
||||
|
||||
Reference in New Issue
Block a user