diff --git a/packages/uipath/pyproject.toml b/packages/uipath/pyproject.toml index b59c5e95b..ffc945cef 100644 --- a/packages/uipath/pyproject.toml +++ b/packages/uipath/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.13.21" +version = "2.13.22" description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/packages/uipath/src/uipath/agent/models/agent.py b/packages/uipath/src/uipath/agent/models/agent.py index 86a0de739..359d05f2a 100644 --- a/packages/uipath/src/uipath/agent/models/agent.py +++ b/packages/uipath/src/uipath/agent/models/agent.py @@ -1417,6 +1417,14 @@ class AgentByomProperties(BaseCfg): connector_key: str = Field(alias="connectorKey") +class ModelSettings(BaseCfg): + """Provider-native model settings bag (``settings.modelSettings``). + + Keys are the target model's own parameter names, forwarded verbatim — no fixed + schema; discovery is the source of truth for the shape. + """ + + class AgentSettings(BaseCfg): """Agent settings model.""" @@ -1427,6 +1435,7 @@ class AgentSettings(BaseCfg): byom_properties: Optional[AgentByomProperties] = Field(None, alias="byomProperties") max_iterations: Optional[int] = Field(None, alias="maxIterations") persona: Optional[str] = Field(None, alias="persona") + model_settings: Optional[ModelSettings] = Field(None, alias="modelSettings") class AgentDefinition(BaseModel): diff --git a/packages/uipath/tests/agent/models/test_agent.py b/packages/uipath/tests/agent/models/test_agent.py index 4333dec38..ec0a6351f 100644 --- a/packages/uipath/tests/agent/models/test_agent.py +++ b/packages/uipath/tests/agent/models/test_agent.py @@ -39,6 +39,7 @@ AgentProcessToolResourceConfig, AgentQuickFormChannelProperties, AgentResourceType, + AgentSettings, AgentToolArgumentPropertiesVariant, AgentToolType, AgentUnknownGuardrail, @@ -4750,3 +4751,30 @@ def test_literal_recipient_without_source_still_parses_to_literal_class(self): ).validate_python(payload) assert isinstance(recipient, CustomAssigneesRecipient) assert not isinstance(recipient, ToolOutputRecipient) + + +class TestAgentModelSettings: + """settings.modelSettings is a native bag forwarded verbatim (no schema).""" + + def _agent_settings(self, **extra: Any) -> dict[str, Any]: + return { + "engine": "basic-v2", + "model": "anthropic.claude-opus-4-6-v1", + "maxTokens": 49047, + "temperature": 0.63, + **extra, + } + + def test_absent_model_settings_is_none(self): + settings = AgentSettings.model_validate(self._agent_settings()) + assert settings.model_settings is None + + def test_native_bag_survives_verbatim_by_alias(self): + native = { + "thinking": {"type": "enabled", "budget_tokens": 2048}, + "output_config": {"effort": "high"}, + } + settings = AgentSettings.model_validate( + self._agent_settings(modelSettings=native) + ) + assert settings.model_dump(by_alias=True)["modelSettings"] == native diff --git a/packages/uipath/uv.lock b/packages/uipath/uv.lock index 0356dc28d..e3ae1a59b 100644 --- a/packages/uipath/uv.lock +++ b/packages/uipath/uv.lock @@ -3,7 +3,7 @@ revision = 3 requires-python = ">=3.11" [options] -exclude-newer = "2026-07-29T07:23:41.8582141Z" +exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values. exclude-newer-span = "P2D" [options.exclude-newer-package] @@ -2599,7 +2599,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.13.21" +version = "2.13.22" source = { editable = "." } dependencies = [ { name = "applicationinsights" },