Skip to content

Restore extract.ai web search and schema guidance - #1148

Merged
mborodii-prog merged 5 commits into
mainfrom
codex/extract-ai-web-search-recovery
Aug 27, 2026
Merged

Restore extract.ai web search and schema guidance#1148
mborodii-prog merged 5 commits into
mainfrom
codex/extract-ai-web-search-recovery

Conversation

@ebhills

@ebhills ebhills commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Restores the extract.ai Responses API enhancements from #1142 after their revert in #1147, on a clean branch from current main.

  • adds opt-in native Responses web search with automatic web_search_sources provenance
  • clarifies all extract.ai recipe schema hints
  • distinguishes whole-record record_examples from field-level examples
  • exposes behavior-facing instructions while retaining messages as a compatibility alias
  • safely handles a successful HTTP response whose body is malformed JSON

Behavior and API impact

  • web_search: true enables the Responses web-search tool and always adds the reserved web_search_sources output column. Each row receives a deduplicated list of {title, url} objects or an empty list.
  • record_examples accepts complete input/output examples with optional name and notes.
  • Field-level examples retains scalar/list compatibility and also accepts paired input/output examples with optional name and notes.
  • instructions accepts a string or list of strings. Existing messages callers remain supported as an alias; supplying both names is rejected.
  • Malformed successful Responses payloads now return the existing structured failure result without reusing source data from an earlier retry.

Compatibility

Web search remains disabled by default. Existing recipes that use messages, top-level examples, or output-only field examples continue to work. The automatic provenance column is added only when web search is enabled.

Validation

  • 1557 passed, 112 deselected using the repository local/offline pytest configuration
  • 74 passed across focused extraction, definition, cache, recipe, and schema tests
  • generated recipe schema completed and the resulting extract.ai contract was inspected
  • Python compilation, notebook JSON parsing, pip check, and git diff --check passed
  • live OpenAI Responses web-search smoke test returned a structured answer and 12 source records, all with URLs

The first broad local run encountered two failures from ignored SQLite databases left by an earlier run. After removing only those generated test artifacts, the clean suite passed.

Risk and rollback

The main behavioral risk is provider response-shape variation for web-search provenance. Unit tests cover source extraction, deduplication, empty-source behavior, retries, cache behavior, recipe output, and malformed JSON. Rollback is a normal revert of this PR; web search is opt-in and does not affect existing recipes by default.

@ebhills
ebhills requested a review from mborodii-prog August 27, 2026 15:13
@ebhills ebhills self-assigned this Aug 27, 2026
pyarrow moved to requirements-full.txt as an optional dependency, but
scripts/container_smoke.py imports it directly to validate NumPy/
Pandas/PyArrow wheel interop in the slim, compiler-free test image.
Install it alongside the core package so the smoke check still passes.
@mborodii-prog
mborodii-prog merged commit c643665 into main Aug 27, 2026
13 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.

2 participants