* extract-basic: migrate workflow to llama-cloud v2 SDK
Switch extract-basic to llama-cloud>=2.3.0 and the v2 extract API:
configuration_id replaces extraction_agent_id, ExtractConfig mirrors
ExtractConfiguration (tier/extraction_target/etc), and process_file now
uses client.extract.create + wait_for_completion + get with
expand=["extract_metadata"] and ExtractedData.from_extract_job.
metadata_workflow resolves schemas via client.configurations.retrieve
gated on ExtractV2Parameters.
* extract-basic: update fake server and tests for llama-cloud v2
Rewrite FakeLlamaCloudServer.extract for v2 routes (POST/GET
/api/v2/extract, schema validate/generate, /api/v1/beta/configurations
CRUD) and update split to read categories from the nested
configuration payload. Rewrite test_extract and test_split to the v2
SDK shapes (client.extract.run with inline configuration and
configuration_id; split with configuration={'categories': [...]}).
* extract-basic: split configurations namespace out of extract fake
Move /api/v1/beta/configurations CRUD handlers and StoredConfiguration
state into their own FakeConfigurationsNamespace. FakeExtractNamespace
now takes a FakeConfigurationsNamespace and delegates configuration_id
lookups to it. Server wires both namespaces independently.
* fix: handle nullable union types in _generate_value()
JSON Schema represents nullable fields as type arrays (e.g.,
["number", "null"]). The code compared these arrays against strings,
causing all nullable fields to fall through to the text blob default,
producing invalid data that always failed Pydantic validation.
Extract the first concrete (non-null) type from the array so the
correct generator branch is used.
https://claude.ai/code/session_01NMzCmbJGa6WNS6ceb1aXT7
* test: add unit tests for _generate_value schema handling
Cover nullable union types (["number", "null"]), all basic types,
string formats (date-time, email, uri), composite schemas (object,
array, oneOf, anyOf), and edge cases (depth limit, empty enum,
unknown mapping). 35 tests total.
https://claude.ai/code/session_01NMzCmbJGa6WNS6ceb1aXT7
* test: rewrite deterministic tests as flat parametrized functions
Replace class-based tests with idiomatic pytest: parametrized cases
for basic/nullable types and numeric bounds, a kitchen-sink
integration test, and minimal standalone tests for edge cases.
https://claude.ai/code/session_01NMzCmbJGa6WNS6ceb1aXT7
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat: template with new sdk
* chore: more test updates
* chore: more tests
* chore: update system prompt
* fix: generate_value for nested pydantic models
* chore: template validation
* chore: add ExtractedData
* chore: last tweaks to new sdk template
* feat: add --template flag to bundle-coder.sh (#181)
* feat: add --template flag to bundle-coder.sh
Add a -T/--template flag to select which template to bundle instead of
creating a separate script. This consolidates bundle-coder.sh and
bundle-coder-new-sdk.sh into a single script.
- Default template remains 'extract-basic'
- Use --template extract-basic-new to bundle the new SDK template
- Template name suffix is included in the e2b template name
* Update bundle-coder.sh
---------
Co-authored-by: Claude <noreply@anthropic.com>
* chore: pr suggestions
* chore: package versioning
* chore: move extract-basic-new to extract-basic
* chore: prompt tweaks
* fix: typo
* fix: typo pt2
* chore: pr suggestions
---------
Co-authored-by: Adrian Lyjak <adrianlyjak@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>