Skip to content

refactor(platform): remove the EnableTraceContextHeaders feature flag - #1979

Open
daniel-joica wants to merge 3 commits into
mainfrom
chore/remove-trace-context-headers-ff
Open

daniel-joica wants to merge 3 commits into
mainfrom
chore/remove-trace-context-headers-ff

Conversation

@daniel-joica

@daniel-joica daniel-joica commented Nov 6, 2026 •

Copy link
Copy Markdown

What changed?

build_trace_context_headers() no longer checks the EnableTraceContextHeaders feature flag, so the x-uipath-traceparent-id and x-uipath-tracebaggage headers are always sent on LLM Gateway and guardrail requests.

The flag is on in alpha, staging, com, prod, agov, pgov, dedicated/dev and dedicated/stg. It is on in gxp except for the SapSolexOrganizations segment, and off only in nst (gitops).

uipath-platform is bumped to 0.3.1. Follow-up PRs drop their use of the flag and need this release first: UiPath/uipath-agents-python#870 and UiPath/uipath-langchain-python#1198.

How has this been tested?

  • Removed the flag-off tests in test_llm_trace_context.py and the flag setup in the remaining tests.
  • uv run pytest in packages/uipath-platform: 2054 passed, 7 skipped (they need credentials).

Are there any breaking changes?

  • Orgs where the flag was off (nst, gxp SapSolexOrganizations) now send trace context headers.

🤖 Generated with Claude Code

The flag is on in every important environment, so trace context headers
are now always sent to the LLM Gateway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 6, 2026 09:50
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Nov 6, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 are reported for the trace-context header change.

No open issues 🎉

What changed in this PR

Removes the EnableTraceContextHeaders feature-flag check from uipath-platform, allowing LLM Gateway and guardrail requests to include available trace context regardless of the flag. Releases version 0.3.1 to support downstream adoption.

Changes:

  • Removes the flag check and updates the helper’s documentation.
  • Removes flag-disabled tests and flag setup from the remaining tests.
  • Bumps the package version to 0.3.1 and updates the lockfile.
File Description
packages/​uipath-platform/​uv.lock Updates the package version and lockfile revision.
packages/​uipath-platform/​tests/​services/​test_llm_trace_context.py Removes flag-specific tests and setup.
packages/​uipath-platform/​src/​uipath/​platform/​chat/​llm_trace_context.py Removes the feature-flag check and clarifies header behavior.
packages/​uipath-platform/​pyproject.toml Bumps uipath-platform to 0.3.1.

Review effort: Balanced

daniel-joica and others added 2 commits November 6, 2026 11:53
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 trace-context feature-flag removal and associated package version updates.

No open issues 🎉

Review effort: Balanced

@daniel-joica

Copy link
Copy Markdown
Author

QA: low-code agent with the flag removed

Ran a low-code agent from Studio Web (alpha) on the local robot, with these local branches:

  • uipath-platform: this PR (no EnableTraceContextHeaders gate)
  • uipath-agents: UiPath/uipath-agents-python#870 (no client-side Model run span)

The flag is not set locally, so before this change the trace-context headers wouldn't have been sent.

Result: passed. Trace 5abbd2a25a4f47fb8b0dd5e50c7fa67b:

Agent run
├── LLM call                              (client)
│   ├── Governance evaluation             (LLM Gateway)
│   ├── LLM Request Centralized Guardrail (LLM Gateway)
│   ├── Model run                         (LLM Gateway)
│   └── LLM Response Centralized Guardrail(LLM Gateway)
└── Agent output                          (client)
  • Exactly one Model run, recorded by the LLM Gateway and parented to the client LLM call. The headers reached the gateway, and nothing is duplicated.
  • The gateway Model run has licenseRefId, token usage and model info.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants