Skip to content

Conversation

@apetraru-uipath
Copy link
Contributor

@apetraru-uipath apetraru-uipath commented Jan 12, 2026

Summary

This PR adds support for entitlements checks in the guardrails service, enabling the SDK to handle cases where guardrail features are disabled or entitlements are missing. The implementation includes support for the new result enum and details fields in GuardrailValidationResult.

Changes

Core Changes

  1. Updated Guardrails Service (src/uipath/platform/guardrails/_guardrails_service.py):

    • Added logic to map API response to populate new result enum field (passed/failed/skipped)
    • Added logic to populate details field with the same value as reason
    • Implemented entitlements checks handling: when skip=True, the result is set to "skipped"
  2. Updated Tests (tests/sdk/services/test_guardrails_service.py):

    • Updated test mocks to include new required result and details fields
    • Added test cases for entitlements scenarios (feature disabled and entitlement missing)
  3. Version Bump (pyproject.toml):

    • Updated version from 2.4.10 to 2.4.11

API Changes

Response Handling

The service now handles the skip field in API responses:

  • When skip=True: Result is set to "skipped" (indicates entitlements were triggered)
  • When skip=False and validation_passed=True: Result is set to "passed"
  • When skip=False and validation_passed=False: Result is set to "failed"

The details field is populated with the same value as the reason field.

Entitlements Scenarios

The implementation handles two entitlements scenarios:

  1. Guardrail feature disabled: Returns skip=True with reason "Guardrail feature is disabled"
  2. Entitlement missing: Returns skip=True with reason "Guardrail entitlement is missing"

In both cases, validation_passed=True and result="skipped" to indicate the validation was skipped due to entitlements.

Testing

  • ✅ All existing tests updated and passing
  • ✅ New test cases added for entitlements scenarios
  • ✅ Linting checks passed
  • ✅ Type checking passed
  • ✅ Build successful

Breaking Changes

None. This is a backward-compatible enhancement that adds new fields to the response model.

Related Issues

N/A

Checklist

  • Code follows project style guidelines
  • Tests added/updated and passing
  • Documentation updated (if needed)
  • Version bumped appropriately
  • All PR checks passing

@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Jan 12, 2026
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_entitlements branch from d0dac52 to 6aa4a1c Compare January 12, 2026 15:12
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_entitlements branch 2 times, most recently from 3a707f8 to 62c0745 Compare January 12, 2026 16:26
Copy link
Contributor

@valentinabojan valentinabojan left a comment

Choose a reason for hiding this comment

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

Please update the PR description to reflect the current state of the PR.
Also, we will need a new package version

@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_entitlements branch 2 times, most recently from 58cebc4 to 2c6db2a Compare January 13, 2026 14:21
@apetraru-uipath apetraru-uipath force-pushed the feat/guardrails_entitlements branch from 2c6db2a to 52681d1 Compare January 13, 2026 14:32
@apetraru-uipath apetraru-uipath enabled auto-merge (squash) January 13, 2026 14:55
@apetraru-uipath apetraru-uipath merged commit 9d15e37 into main Jan 13, 2026
120 of 121 checks passed
@apetraru-uipath apetraru-uipath deleted the feat/guardrails_entitlements branch January 13, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants