Skip to content

fix: bump uipath-langchain-client to 1.13.1 for rt_ token support#898

Open
cosminacho wants to merge 2 commits into
mainfrom
chore/bump-langchain-client-1.13.1
Open

fix: bump uipath-langchain-client to 1.13.1 for rt_ token support#898
cosminacho wants to merge 2 commits into
mainfrom
chore/bump-langchain-client-1.13.1

Conversation

@cosminacho

Copy link
Copy Markdown
Contributor

Summary

  • Bump uipath-langchain-client (and transitive uipath-llm-client) from 1.13.0 → 1.13.1 across all extras in pyproject.toml and uv.lock.
  • Add tests/chat/test_rt_token_auth.py covering authentication with opaque UiPath reference tokens (rt_ prefix) — the bug fixed in 1.13.1.

Why

UiPath issues two kinds of access tokens: JWT bearer tokens, and opaque reference tokens prefixed rt_ that carry no client-readable claims.

Before 1.13.1, PlatformSettings validation decoded every access token as a JWT (split on ., base64-decode the payload) to check expiry and extract client_id. An rt_ token has no dot-separated payload, so that decode raised ValueError — meaning an agent authenticating with a reference token could never construct a chat model.

1.13.1 parses JWT claims best-effort (try_parse_access_token) and falls back gracefully for opaque tokens, so rt_ tokens now pass validation and are used as the Bearer credential.

Tests

tests/chat/test_rt_token_auth.py pins the behaviour so the dependency can't regress underneath us:

  • rt_ reference token passes PlatformSettings validation (no client_id extracted).
  • The rt_ token is sent verbatim as Authorization: Bearer rt_….
  • Regression guards: JWT client_id claim is still extracted, and an expired JWT is still rejected.

All 262 chat tests pass; ruff check + format clean.

🤖 Generated with Claude Code

Bump the `uipath-langchain-client` dependency (and the transitive
`uipath-llm-client`) from 1.13.0 to 1.13.1 across all extras.

1.13.1 fixes authentication with opaque UiPath reference tokens
(prefixed `rt_`). Previously `PlatformSettings` validation decoded every
access token as a JWT to check expiry and extract the `client_id`, which
raised `ValueError` for non-JWT `rt_` tokens — so agents authenticating
with a reference token could not construct a chat model. 1.13.1 parses
JWT claims best-effort and falls back gracefully for opaque tokens.

Add `tests/chat/test_rt_token_auth.py` pinning this behaviour: an `rt_`
reference token passes validation and is sent verbatim as the Bearer
credential, while JWT parsing (claim extraction and expiry rejection)
stays unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 9, 2026 13:49

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.

Pull request overview

This PR updates the project’s LangChain client dependency to a version that supports UiPath opaque reference tokens (rt_…) in PlatformSettings, and adds regression tests to ensure both reference-token and JWT behaviors remain correct.

Changes:

  • Bump uipath-langchain-client (and transitive uipath-llm-client) from 1.13.0 to 1.13.1 across pyproject.toml and uv.lock.
  • Add a new chat test module validating rt_ bearer auth behavior and preserving existing JWT validation semantics.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
uv.lock Updates locked dependency versions/hashes for uipath-langchain-client and uipath-llm-client to 1.13.1.
pyproject.toml Bumps uipath-langchain-client[...] version constraints to >=1.13.1,<1.14.0 across main deps and extras.
tests/chat/test_rt_token_auth.py Adds regression tests for reference-token (rt_) validation and authorization header behavior, plus JWT guards.

Comment thread tests/chat/test_rt_token_auth.py Outdated
mypy runs with disallow_any_generics, so the bare `dict` annotations in
the JWT helper need explicit type arguments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

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.

2 participants