Repository navigation
feat(documents): support DU Framework v2 behind the DocumentsFrameworkV2 flag - #1929
alexandrujircan wants to merge 5 commits into
Conversation
- send api-version=2.0 and use the v2 tags/{tag} routes
- read PascalCase responses, which v2 returns for orgs with
du-enable-v2-pascal-case-responses on
- percent-encode URL path segments, so a tag cannot change the route
- send allowChangeOfDocumentType inside the validation configuration
- add the FieldGroup and MonetaryQuantity field types returned by IXP v2
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The downstream packages/uipath/uv.lock remains pinned to 0.2.34 and can break its propagated locked CI job.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Migrates DocumentsService to DU Framework v2 while preserving existing APIs.
Changes:
- Updates v2 routes, response casing normalization, and URL encoding.
- Adds v2 field types and validation configuration.
- Expands tests and bumps the package version.
| File | Description |
|---|---|
packages/uipath-platform/src/uipath/platform/documents/_documents_service.py |
Implements Framework v2 requests and normalization. |
packages/uipath-platform/src/uipath/platform/documents/documents.py |
Adds v2 field types and documentation. |
packages/uipath-platform/tests/services/test_documents_service.py |
Updates and expands v2 coverage. |
packages/uipath-platform/tests/services/tests_data/documents_service/ixp_extraction_response_v2.json |
Adds an IXP v2 response fixture. |
packages/uipath-platform/pyproject.toml |
Bumps the package version. |
packages/uipath-platform/uv.lock |
Updates the local locked package version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
… async - pick versioned or tagged routes in one helper per route family instead of repeating the branch in every sync and async method - share the operation status check between the sync and async retrieve - regenerate the uipath lockfile for uipath-platform 0.2.35 - document that field IDs are prefixed by document type and field group Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Epixa-Dogfood ReviewReview unavailable: Not reviewed: What this PR doesThe pull request author describes the intended change as follows: feat(documents): move the documents service to DU Framework v2 This review did not reuse a local review of this change. Set up Epixa local review. Full review: adc6e05 |
…kV2 flag - call Framework API v1.1 by default, and v2 when the DocumentsFrameworkV2 feature flag is on, e.g. UIPATH_FEATURE_DocumentsFrameworkV2=true - read the flag once per service instance, so one operation and the resume of a suspended one use the same API version - route tags and allowChangeOfDocumentType per API version Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0.2.35 was released from main in the meantime. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
🚨 Heads up:
|
🚨 Heads up:
|
|





Summary
DocumentsServicesupports DU Framework API v2 next to v1.1:DocumentsFrameworkV2feature flag:UIPATH_FEATURE_DocumentsFrameworkV2=trueFeatureFlags.configure_flags({"DocumentsFrameworkV2": True})UiPath().documentsand the HITL resume triggers. It is read once per service instance, so an operation and the resume of a suspended one use the same version.Changes:
projects/{id}/tags/{tag}/...shape andallowChangeOfDocumentTypegoes inside the validationconfigurationdu-enable-v2-pascal-case-responseson. Document Processing payloads (ExtractionResult,ClassificationResult) are passed through unchangedFieldTypegainsFieldGroupandMonetaryQuantity, both returned by IXP v2uipath-platform0.2.34 → 0.2.35Method signatures and return types are unchanged, and
DocumentsService.__init__keeps its parameters.What changes with the flag on
These come from the Framework v2 contract:
Invoices.name,Default.Invoice.InvoiceNumber. Look fields up byFieldName, which is unchangedFieldGroupinstead ofTable→Header/Body: rows sit directly under the groupNumber,Date,MonetaryQuantity) instead ofTexteverywhere, so some values are formatted differently, e.g.1→1.00data_projectionhas one entry per row, as on v1.1Framework dependency
data_projectionto contain every row of a field group, both after extraction and after validation.release/service-fabric-26.10.Downstream consumers
All stay on v1.1 until they turn the flag on.
Before opting in:
uipath-agents→uipath-langchain):data_projectionto the LLMdata_projectionvertical-solution-invoice-processingand the FDE Amgen script readdata_projectionone entry per row, which v2 keeps.fins-vertical-solution(automation_functions/utils/extraction_helpers.py) walks the v1Table→Bodytree inresults_document. It needs an update before turning the flag on.DocumentsServicemethods and checks their signatures at startup. None of them change here.Testing
FieldGroup/MonetaryQuantityresults, and tag percent-encodingallowChangeOfDocumentType; and how the flag is resolved (env var, programmatic config, default)uipath-platform: 1797 passed, ruff clean, mypy cleandata_projection: 8 monetary amounts, 16 transactions, 23 wells, 13 item components🤖 Generated with Claude Code