Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/uipath/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath"
version = "2.13.20"
version = "2.13.21"
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"
Expand Down
9 changes: 9 additions & 0 deletions packages/uipath/src/uipath/agent/models/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand All @@ -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):
Expand Down
28 changes: 28 additions & 0 deletions packages/uipath/tests/agent/models/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
AgentProcessToolResourceConfig,
AgentQuickFormChannelProperties,
AgentResourceType,
AgentSettings,
AgentToolArgumentPropertiesVariant,
AgentToolType,
AgentUnknownGuardrail,
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion packages/uipath/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading