Skip to content

fix: clear agenthub_config via field_validator so headers are correct (#825)#830

Merged
radu-mocanu merged 1 commit intomainfrom
fix/agenthub-config-field-validator
May 7, 2026
Merged

fix: clear agenthub_config via field_validator so headers are correct (#825)#830
radu-mocanu merged 1 commit intomainfrom
fix/agenthub-config-field-validator

Conversation

@radu-mocanu
Copy link
Copy Markdown
Collaborator

@radu-mocanu radu-mocanu commented May 7, 2026

Summary

  • re-exported chat models no longer leak X-UiPath-AgentHub-Config: agentsruntime on direct construction

Why

Fixes #825

the previous fix used a model_validator(mode="after") to null client_settings.agenthub_config which runs after upstream validators which materialize the inner httpx client during ctor and cache its headers from the still-default agenthub_config="agentsruntime".

moving to field_validator("client_settings", mode="after") clears the field before any model validator accesses the cached client.

Development Package

  • Use uipath pack --nolock to get the latest dev build from this PR (requires version range).
  • Add this package as a dependency in your pyproject.toml:
[project]
dependencies = [
  # Exact version:
  "uipath-langchain==0.10.18.dev1008304470",

  # Any version from PR
  "uipath-langchain>=0.10.18.dev1008300000,<0.10.18.dev1008310000"
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath-langchain = { index = "testpypi" }

[tool.uv]
override-dependencies = [
    "uipath-langchain>=0.10.18.dev1008300000,<0.10.18.dev1008310000",
]

@radu-mocanu radu-mocanu self-assigned this May 7, 2026
@radu-mocanu radu-mocanu force-pushed the fix/agenthub-config-field-validator branch from 39ecab3 to 8d97e34 Compare May 7, 2026 12:37
@radu-mocanu radu-mocanu merged commit 313307d into main May 7, 2026
39 of 45 checks passed
@radu-mocanu radu-mocanu deleted the fix/agenthub-config-field-validator branch May 7, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breaking changes in authentication from uipath-langchain v0.9.24 -> v0.10.15?

3 participants