Skip to content

Add annotated partial and parallel field extraction - #372

Merged
enoch3712 merged 1 commit into
mainfrom
codex/parallel-fields
Sep 16, 2026
Merged

enoch3712 merged 1 commit into
mainfrom
codex/parallel-fields

Conversation

@enoch3712

Copy link
Copy Markdown
Owner

Adds FieldExtraction annotations and Extractor.extract_fields for partial/parallel calls. Each top-level field or explicit group can use a different model, vision setting and instructions. Annotated contracts activate this behavior through extract(); ordinary contracts can use extract_fields explicitly. Each source is loaded once before independent worker state is prepared.

Partial schemas retain aliases/descriptions/constraints, while top-level custom validators and defaults run during final assembly. Failed groups do not return a partial contract. Handles existing pagination/continuation strategies and does not clone provider locks when copying schema metadata. Documents concurrency, repeated-context costs, shared-client considerations and grouping.

Validation: 203 offline tests passed on Python 3.12; all ten field-extraction tests also passed on Python 3.9 and 3.13. Includes a barrier-based concurrency test, final cross-field validation, aliases, model policies, image routing, default factories, failures and pagination. Strict documentation build and whitespace checks passed.

Fixes #258
Fixes #121

@enoch3712
enoch3712 merged commit eb64371 into main Sep 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple partial calls Parallel extraction of images (and more)

1 participant