diff --git a/packages/uipath/pyproject.toml b/packages/uipath/pyproject.toml index 21b06b6bc..dc3dc5795 100644 --- a/packages/uipath/pyproject.toml +++ b/packages/uipath/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.14.35" +version = "2.14.36" 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 1afbcc209..a62bc89eb 100644 --- a/packages/uipath/src/uipath/agent/models/agent.py +++ b/packages/uipath/src/uipath/agent/models/agent.py @@ -1242,10 +1242,11 @@ class AgentInternalJevClassifierSettings(BaseCfg): Only the configuration that is never a call argument: the ``state`` and ``questions`` the tool sends to Jev are declared in the resource's - ``inputSchema`` and supplied through its ``argumentProperties``. + ``inputSchema`` and supplied through its ``argumentProperties``. The model + is required: there is no default Jev model. """ - model: str = Field("jev-latest") + model: str = Field(..., min_length=1) class AgentIntegrationToolResourceConfig(BaseAgentToolResourceConfig): diff --git a/packages/uipath/tests/agent/models/test_jev_classifier_tool.py b/packages/uipath/tests/agent/models/test_jev_classifier_tool.py index e272f7be0..c5e0f0927 100644 --- a/packages/uipath/tests/agent/models/test_jev_classifier_tool.py +++ b/packages/uipath/tests/agent/models/test_jev_classifier_tool.py @@ -83,12 +83,18 @@ def test_settings_hold_only_the_model() -> None: assert _settings(resource).model_dump() == {"model": "jev-1.13.0"} -def test_model_defaults_to_latest() -> None: - assert _settings(_validate(_resource())).model == "jev-latest" +@pytest.mark.parametrize( + "settings", + [pytest.param({}, id="missing"), pytest.param({"model": ""}, id="empty")], +) +def test_model_is_required(settings: dict[str, Any]) -> None: + # No default Jev model: a tool without one fails to load. + with pytest.raises(ValidationError, match="model"): + _validate(_resource(**settings)) def test_tool_type_is_case_insensitive() -> None: - data = _resource() + data = _resource(model="jev-1.13.0") data["properties"]["toolType"] = "Jev-Classifier" assert isinstance( @@ -100,11 +106,15 @@ def test_legacy_state_and_questions_settings_are_ignored_extras() -> None: # BaseCfg allows extra fields: settings written before questions and state # moved to inputSchema still parse, but nothing reads or validates them. resource = _validate( - _resource(state={"type": "number"}, questions=[{"type": "freeform"}]) + _resource( + model="jev-1.13.0", + state={"type": "number"}, + questions=[{"type": "freeform"}], + ) ) settings = _settings(resource) - assert settings.model == "jev-latest" + assert settings.model == "jev-1.13.0" assert not hasattr(AgentInternalJevClassifierSettings, "questions") assert settings.model_extra == { "state": {"type": "number"}, @@ -207,7 +217,7 @@ def test_rejects_invalid_question(question: dict[str, Any]) -> None: def test_parses_object_builder_argument_properties() -> None: - raw = _resource() + raw = _resource(model="jev-1.13.0") raw["argumentProperties"] = { "$['questions']": {"variant": "ObjectBuilder"}, "$['questions']['department']": {"variant": "objectBuilder"}, diff --git a/packages/uipath/uv.lock b/packages/uipath/uv.lock index 9a1aa77c6..eb6d18ede 100644 --- a/packages/uipath/uv.lock +++ b/packages/uipath/uv.lock @@ -2599,7 +2599,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.14.35" +version = "2.14.36" source = { editable = "." } dependencies = [ { name = "applicationinsights" },