Skip to content

fix(uipath-core): accept minimal conversation message envelope on input#1677

Merged
radu-mocanu merged 1 commit into
mainfrom
fix/conversation-message-optional-fields
May 22, 2026
Merged

fix(uipath-core): accept minimal conversation message envelope on input#1677
radu-mocanu merged 1 commit into
mainfrom
fix/conversation-message-optional-fields

Conversation

@radu-mocanu
Copy link
Copy Markdown
Collaborator

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

Summary

  • messageId / contentPartId default to str(uuid.uuid4()) if absent on input (same UUIDs that uipath dev injects server-side, just moved into the model)
  • createdAt, updatedAt now optional; toolCalls and citations default to []
  • minimal {"role": "user", "contentParts": [{"mimeType": "text/plain", "data": {"inline": "..."}}]} now validates against UiPathConversationMessage

Why

matches the CAS contract

Copilot AI review requested due to automatic review settings May 22, 2026 15:17
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels May 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

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 uipath-core conversation Pydantic models to accept minimal inbound message payloads by making server-allocated fields optional and providing sensible defaults for list fields, aligning model validation with the Conversational Agent Service contract.

Changes:

  • Made createdAt / updatedAt optional on UiPathConversationMessage and UiPathConversationContentPart.
  • Defaulted toolCalls and citations to empty lists to allow omission in inbound payloads.
  • Added a unit test to pin minimal inbound message validation behavior; bumped uipath-core version to 0.5.16 and updated lockfiles accordingly.

Reviewed changes

Copilot reviewed 4 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/uipath/uv.lock Updates lock metadata and bumps editable uipath-core to 0.5.16.
packages/uipath-platform/uv.lock Updates lock metadata and bumps editable uipath-core to 0.5.16.
packages/uipath-core/uv.lock Updates lock metadata and bumps uipath-core to 0.5.16.
packages/uipath-core/tests/chat/test_message.py Adds regression test ensuring minimal inbound user message payload validates and defaults are applied.
packages/uipath-core/src/uipath/core/chat/message.py Makes message timestamps optional and defaults toolCalls to [].
packages/uipath-core/src/uipath/core/chat/content.py Makes content-part timestamps optional and defaults citations to [].
packages/uipath-core/pyproject.toml Bumps uipath-core version from 0.5.15 to 0.5.16.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@radu-mocanu radu-mocanu force-pushed the fix/conversation-message-optional-fields branch from ef3f930 to 90dbf85 Compare May 22, 2026 15:40
@radu-mocanu radu-mocanu changed the title fix(uipath-core): make conversation message server-allocated fields optional fix(uipath-core): accept minimal conversation message envelope on input May 22, 2026
@radu-mocanu radu-mocanu force-pushed the fix/conversation-message-optional-fields branch from 90dbf85 to 346adca Compare May 22, 2026 15:46
@sonarqubecloud
Copy link
Copy Markdown

@radu-mocanu radu-mocanu merged commit b5d462a into main May 22, 2026
166 checks passed
@radu-mocanu radu-mocanu deleted the fix/conversation-message-optional-fields branch May 22, 2026 16:42
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 test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants