Skip to content

feat: add extraction parameter to SearchInput, deprecate livecrawl - #16

Merged
tyler5673 merged 1 commit into
mainfrom
dx-721-extraction-replace-livecrawl
Aug 21, 2026
Merged

feat: add extraction parameter to SearchInput, deprecate livecrawl#16
tyler5673 merged 1 commit into
mainfrom
dx-721-extraction-replace-livecrawl

Conversation

@tyler5673

Copy link
Copy Markdown
Contributor

What this adds

Adds the extraction parameter to SearchInput, mirroring the SDK's extraction object (shipped in youdotcom 3.1.0). When set, it takes priority over the deprecated livecrawl / livecrawl_formats fields and is passed to you.search_async(extraction=...) instead, avoiding the SDK's ValueError on dual-set.

The legacy livecrawl / livecrawl_formats fields remain accepted for backward compatibility. The server still accepts them, and existing callers need no code change.

Changes

File Change
src/youdotcom_temporal/models.py Add extraction: dict[str, Any] | None = None to SearchInput
src/youdotcom_temporal/activities.py Route extraction or livecrawl/livecrawl_formats to search_async
tests/test_activities.py Add test_search_passes_extraction_to_sdk and test_search_extraction_takes_priority_over_livecrawl
README.md Add extraction row to SearchInput table; mark livecrawl/livecrawl_formats as deprecated
CHANGELOG.md Unreleased entry

Verification

  • uv run ruff check -- passed
  • uv run mypy src -- passed (0 issues)
  • uv run pytest -- 79 passed, 8 deselected (integration)

Stacked on

Related

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

@tyler5673
tyler5673 marked this pull request as ready for review August 21, 2026 19:21
Base automatically changed from chore/sdk-3.1.2-attribution-header to main August 21, 2026 20:42
Add `extraction: dict[str, Any] | None = None` to `SearchInput`,
mirroring the SDK's `extraction` object (shipped in youdotcom 3.1.0).
When set, it takes priority over `livecrawl` / `livecrawl_formats`
and is passed to `you.search_async(extraction=...)` instead, avoiding
the SDK's `ValueError` on dual-set. The legacy fields remain accepted
for backward compatibility.

- Add `extraction` field to `SearchInput` in `models.py`
- Route `extraction` or `livecrawl`/`livecrawl_formats` in `activities.py`
- Add tests for extraction path and priority-over-livecrawl
- Update README SearchInput table with `extraction` row and deprecation notes
- Update CHANGELOG Unreleased section

Closes DX-721

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@tyler5673
tyler5673 force-pushed the dx-721-extraction-replace-livecrawl branch from ac9f267 to 7c88c32 Compare August 21, 2026 20:43
@tyler5673
tyler5673 merged commit 03b928d into main Aug 21, 2026
5 of 6 checks passed
@tyler5673
tyler5673 deleted the dx-721-extraction-replace-livecrawl branch August 21, 2026 20:44
tyler5673 added a commit that referenced this pull request Aug 21, 2026
Rebased onto main with PR #15 (SDK 3.1.2 + attribution header) and
PR #16 (extraction parameter) merged. Squashes the nexus spike into
one clean commit.

- YouDotComService exposes all six Activities as async Nexus Operations
- contract.py holds the Nexus contract with SDK response models
- workflows.py ships six thin backing Workflows with per-Activity ceilings
- Idempotency key support for deduplication of Nexus StartOperation retries
- Unit tests covering contract, handler, and sandbox registration
- Integration tests for live Nexus round-trip (gated behind -m integration)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
tyler5673 added a commit that referenced this pull request Aug 21, 2026
Rebased onto main with PR #15 (SDK 3.1.2 + attribution header) and
PR #16 (extraction parameter) merged. Squashes the nexus spike into
one clean commit.

- YouDotComService exposes all six Activities as async Nexus Operations
- contract.py holds the Nexus contract with SDK response models
- workflows.py ships six thin backing Workflows with per-Activity ceilings
- Idempotency key support for deduplication of Nexus StartOperation retries
- Unit tests covering contract, handler, and sandbox registration
- Integration tests for live Nexus round-trip (gated behind -m integration)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.

1 participant