Skip to content

Conversation

@saksharthakkar
Copy link
Contributor

@saksharthakkar saksharthakkar commented Jan 31, 2026

Motivation

Span upserts were failing with 400 Bad Request due to model mismatch:

Error converting value "runtime" to type 'UiPath.LLMOps.DataAccess.Models.SourceEnum'. Path '[0].Source'

The backend expects Source as an integer (SourceEnum), but Python SDK was passing the string "runtime" from attributes.

Summary

  • Default source=4 (SourceEnum.Robots) for coded agents
  • uipath.source attribute (int) overrides top-level Source - low-code agents can pass uipath.source=1 (Agents)
  • source attribute (string like "runtime"/"playground") passes through in Attributes JSON
  • Matching existing source=Robots URL param in LLM export

Related

Test plan

  • Verify coded agent spans have Source: 4
  • Verify low-code agents can override with uipath.source=1 in attributes
  • Confirm source string values still appear in Attributes JSON

🤖 Generated with Claude Code

@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Jan 31, 2026
@saksharthakkar saksharthakkar marked this pull request as ready for review January 31, 2026 01:03
@saksharthakkar saksharthakkar changed the title (wip) fix: use fixed source=4 (Robots) for UiPathSpan fix: Change top level Source to Int to match LLMOps Span Model Jan 31, 2026
saksharthakkar and others added 5 commits February 2, 2026 11:37
…om attributes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Default source=4 (Robots) for coded agents
- Integer source in attributes (e.g., source=1 for Agents) overrides default
- String values like "runtime" are ignored for top-level Source

Addresses review comment from @JosephMar
Related: UiPath/uipath-agents-python#196

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Default source=4 (Robots) for coded agents
- topLevelSource attribute (int) overrides top-level Source
- source attribute (string) passes through in Attributes JSON

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
saksharthakkar and others added 2 commits February 2, 2026 12:04
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@saksharthakkar saksharthakkar merged commit 46c987f into main Feb 2, 2026
97 of 121 checks passed
@saksharthakkar saksharthakkar deleted the fix/source-str-to-int branch February 2, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants