- extract-reconcile-invoice: index_contract.py called files.get_file /
files.read_file_content / files.upload_file (v1 SDK surface removed in
v2), breaking every Upload Contract click. Switched to files.list +
files.get + files.create.
- Added test_index_contract_workflow and test_metadata_workflow to
exercise the full v2 surface (files.list, files.get, pipelines.upsert,
pipelines.documents.upsert, configurations.retrieve).
- document-parsing and invoice-extraction had only placeholder tests —
wired up llama-cloud-fake and added parametrized tests covering every
tier/mode. invoice-extraction's test drives the HIL step.
- Bumped requires-python to >=3.12 on both (fake floor).
* invoice-extraction: migrate workflow to llama-cloud v2 SDK
- Bump llama-cloud pin from >=1.3.0,<2 to >=2.3.0,<3.
- Replace v1 client.extraction.extract(...) with v2 client.extract.create
(inline ExtractConfigurationParam) + wait_for_completion.
- Translate v1 extraction_mode branches (base/advanced/premium) to v2
ExtractConfigurationParam: base → tier=cost_effective, advanced →
tier=agentic, premium → tier=agentic + cite_sources + confidence_scores.
- Drop the v1-only ExtractConfigParam import.
- Read extracted data from job.extract_result (dict or list) in place of
result.data.
- Use a context manager for the file upload so the file handle is closed.
- Fix "\\n\\n" literal backslash-n in extraction_result and __main__.
Bumps invoice-extraction version 0.1.3 -> 0.2.0.
* drop spurious Any cast on job.extract_result
* refactor: migrate invoice-extraction and document-parsing to llama-cloud
Replace llama-cloud-services with the v1 llama-cloud SDK used by other
templates. Both workflows now use AsyncLlamaCloud directly for parsing
and extraction. Breaking change for consumers; bumped template versions
to 0.2.0.
* refactor: use markdown_full expand in document-parsing and revert version bumps
Use expand=["markdown_full"] to get the full markdown output as a single
string, avoiding the need to join per-page markdown manually.
Revert the version bumps on document-parsing and invoice-extraction, they
will be jumped to 0.2.0 together with a subsequent change.
---------
Co-authored-by: Claude <noreply@anthropic.com>