Skip to content

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

Merged
daniel-joica merged 5 commits into
mainfrom
chore/remove-trace-context-headers-ff
Nov 9, 2026
Merged

daniel-joica merged 5 commits into
mainfrom
chore/remove-trace-context-headers-ff

Conversation

@daniel-joica

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

Copy link
Copy Markdown
Contributor

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 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>

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
Contributor 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.

daniel-joica and others added 2 commits November 9, 2026 09:20
0.3.1 was already published from main (#1958).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

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 block the removal of feature-flag gating from trace-context headers.

No open issues 🎉

Review effort: Balanced

@daniel-joica
daniel-joica merged commit dc62d0e into main Nov 9, 2026
501 of 557 checks passed
@daniel-joica
daniel-joica deleted the chore/remove-trace-context-headers-ff branch November 9, 2026 12:18
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.

3 participants