Skip to content

Commit 0f12c98

Browse files
feat: add byom_properties to agent model (#1097)
1 parent a58b8b4 commit 0f12c98

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath"
3-
version = "2.4.11"
3+
version = "2.4.12"
44
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath/agent/models/agent.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,13 +765,21 @@ def normalize_role(cls, v: Any) -> Any:
765765
return v.lower() if isinstance(v, str) else v
766766

767767

768+
class AgentByomProperties(BaseCfg):
769+
"""Agent byom properties model."""
770+
771+
connection_id: str = Field(alias="connectionId")
772+
connector_key: str = Field(alias="connectorKey")
773+
774+
768775
class AgentSettings(BaseCfg):
769776
"""Agent settings model."""
770777

771778
engine: str
772779
model: str
773780
max_tokens: int = Field(..., alias="maxTokens")
774781
temperature: float
782+
byom_properties: Optional[AgentByomProperties] = Field(None, alias="byomProperties")
775783

776784

777785
class AgentDefinition(BaseModel):

tests/agent/models/test_agent.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ def test_agent_with_all_tool_types_loads(self):
100100
"maxTokens": 16384,
101101
"temperature": 0,
102102
"engine": "basic-v1",
103+
"byomProperties": {
104+
"connectionId": "test-byom-connection-id",
105+
"connectorKey": "uipath-openai-openai",
106+
},
103107
},
104108
"resources": [
105109
{
@@ -455,6 +459,11 @@ def test_agent_with_all_tool_types_loads(self):
455459
assert len(config.resources) == 8 # All tool types + escalation + context + mcp
456460
assert config.settings.engine == "basic-v1"
457461
assert config.settings.max_tokens == 16384
462+
assert config.settings.byom_properties is not None
463+
assert (
464+
config.settings.byom_properties.connection_id == "test-byom-connection-id"
465+
)
466+
assert config.settings.byom_properties.connector_key == "uipath-openai-openai"
458467

459468
# Validate resource types
460469
resource_types = [resource.resource_type for resource in config.resources]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)