Skip to content

feat: introduce ToolsConfiguration on AgentMcpResourceConfig#1655

Open
radugheo wants to merge 1 commit into
mainfrom
feat/tools-configuration
Open

feat: introduce ToolsConfiguration on AgentMcpResourceConfig#1655
radugheo wants to merge 1 commit into
mainfrom
feat/tools-configuration

Conversation

@radugheo
Copy link
Copy Markdown
Collaborator

@radugheo radugheo commented May 19, 2026

Summary

Replaces the legacy dynamic_tools enum on AgentMcpResourceConfig with a new tools_configuration: Optional[ToolsConfiguration] field. ToolsConfiguration.cached_behaviour is a discriminated union of:

  • CachedToolsConfig (the old none) — snapshot only
  • SchemaToolsConfig (the old schema) — server discovery filtered by snapshot allowlist; not currently exposed in the frontend but kept in the runtime so the option can be re-enabled later without further model changes
  • DynamicToolsConfig (the old all) — full server-driven discovery

The legacy DynamicToolsMode enum stays exported as a deprecated alias. The dynamic_tools field is removed from the model, but old agent.json files that still serialize dynamicTools continue to validate because BaseCfg keeps extra="allow".

Patch version bumped: 2.10.672.10.68.

Related PRs (must land together)

Test plan

  • packages/uipath/tests/agent/models/test_agent.py — 65 tests passing
  • Downstream consumer tests pass against editable install of this branch (see PR 861)

Development Packages

uipath

[project]
dependencies = [
  # Exact version:
  "uipath==2.10.68.dev1016556496",

  # Any version from PR
  "uipath>=2.10.68.dev1016550000,<2.10.68.dev1016560000"
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }

Copilot AI review requested due to automatic review settings May 19, 2026 13:06
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels May 19, 2026
@radugheo radugheo force-pushed the feat/tools-configuration branch from 1f7ff11 to 083b7d5 Compare May 19, 2026 13:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the agent definition models to replace the legacy dynamic_tools/dynamicTools setting on MCP resources with a new ToolsConfiguration model that represents “cached” vs “dynamic” tool sourcing, while keeping the old enum as a deprecated compatibility artifact.

Changes:

  • Deprecates DynamicToolsMode in favor of a new ToolsConfiguration model.
  • Introduces a discriminated union (Cached / Dynamic) under ToolsConfiguration.cached_behaviour.
  • Replaces AgentMcpResourceConfig.dynamic_tools with AgentMcpResourceConfig.tools_configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/uipath/src/uipath/agent/models/agent.py
Comment thread packages/uipath/src/uipath/agent/models/agent.py
Comment thread packages/uipath/src/uipath/agent/models/agent.py Outdated
@radugheo radugheo force-pushed the feat/tools-configuration branch from 083b7d5 to 18a5756 Compare May 19, 2026 13:45
@radugheo radugheo added the build:dev Create a dev build from the pr label May 19, 2026
@radugheo radugheo force-pushed the feat/tools-configuration branch 7 times, most recently from 6d21593 to 49b9720 Compare May 20, 2026 08:30
Adds Cached / Dynamic discriminated union under a new ToolsConfiguration
model accessed via tools_configuration.cached_behaviour on the MCP resource.
Cached corresponds to the old dynamic_tools=none; Dynamic corresponds to
dynamic_tools=all. Schema mode is dropped from the new model for now and
will be reintroduced in a later sprint.

The old dynamic_tools field is removed from the model. Existing agent.json
files that still serialize dynamicTools (any value) continue to parse
unchanged because BaseCfg keeps extra="allow"; the legacy DynamicToolsMode
enum stays exported as a deprecated alias.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@radugheo radugheo force-pushed the feat/tools-configuration branch from 49b9720 to 5bde334 Compare May 20, 2026 08:37
@github-actions
Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build:dev Create a dev build from the pr test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants