Skip to content

fix(guardrails): label guardrail provider errors in validation details [AL-673] - #1189

Merged
apetraru-uipath merged 1 commit into
mainfrom
fix/al-673-guardrail-error-details
Nov 3, 2026
Merged

apetraru-uipath merged 1 commit into
mainfrom
fix/al-673-guardrail-error-details

Conversation

@apetraru-uipath

@apetraru-uipath apetraru-uipath commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to UiPath/uipath-python#1956. Jira: AL-673, from SRE-687087.

Problem. On 2026-10-22 in prod, an LLM-as-Judge guardrail returned PROVIDER_ERROR ("temperature is deprecated for this model.") 90 times. The SDK mapped each one to validation_failed, so the guardrail action ran and the runs were reported as guardrail violations, although the guardrail was never evaluated.

Change. Since uipath-platform 0.2.42, these results are still validation_failed (fail-closed) but now also carry error_type (provider_error, internal_error, rate_limit_exceeded). When error_type is set, _create_validation_command writes Guardrail could not be evaluated (<error_type>): <reason> to guardrail_validation_details. Log and Escalate actions now show that the guardrail could not be evaluated. Routing is unchanged: the run still goes to the failure node and the configured action still runs.

Requires uipath-core>=0.5.34 (the GuardrailValidationErrorType enum); uipath-platform>=0.2.43 was already required. Bumps the version to 0.18.55.

The backend fix that stops the judge from sending temperature to models that reject it is UiPath/Agents#6797.

Tests. A parametrized _create_validation_command test covers each error type: the run routes to the failure node with labelled details. The existing tests confirm that details are unchanged when error_type is not set. Locally: the full suite (4159 passed), ruff and mypy are clean.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings November 2, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the change distinguishing guardrail evaluation errors from policy violations.

No open issues 🎉

What changed in this PR

This PR distinguishes guardrail evaluation errors from policy violations in validation details, while preserving fail-closed routing and configured actions.

Changes:

  • Labels provider, internal, and rate-limit errors as guardrails that could not be evaluated.
  • Adds parametrized tests for labelled details and unchanged failure routing.
  • Bumps the package to 0.18.54 and requires uipath-core>=0.5.34.
File Description
uv.lock Updates package version and minimum core dependency metadata.
tests/​agent/​guardrails/​test_guardrail_nodes.py Tests failure routing and labelled details for all three error types.
src/​uipath_langchain/​agent/​guardrails/​guardrail_nodes.py Labels evaluation errors in guardrail validation details.
pyproject.toml Bumps the release version and minimum core dependency.

Review effort: Balanced

…s [AL-673]

When the backend cannot evaluate a guardrail (provider error, internal error,
rate limit), uipath-platform 0.2.42+ still returns validation_failed (fail-closed)
and sets error_type. The failure node now gets "Guardrail could not be evaluated
(<error_type>): <reason>" as the details, so Log and Escalate actions no longer
report a provider error as a policy violation. Routing is unchanged.

Requires uipath-core>=0.5.34 and bumps to 0.18.55.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apetraru-uipath
apetraru-uipath force-pushed the fix/al-673-guardrail-error-details branch from 57127e1 to 71e91e5 Compare November 2, 2026 21:56
@sonarqubecloud

sonarqubecloud Bot commented Nov 2, 2026

Copy link
Copy Markdown

@apetraru-uipath
apetraru-uipath merged commit 4249b87 into main Nov 3, 2026
57 of 78 checks passed
@apetraru-uipath
apetraru-uipath deleted the fix/al-673-guardrail-error-details branch November 3, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants