Skip to content

fix(v2): drop stale extract params (markdown_ref, idempotency_key) & fix README drift#111

Merged
yzld2002 merged 1 commit into
mainfrom
fix/v2-drop-stale-extract-params
Jul 13, 2026
Merged

fix(v2): drop stale extract params (markdown_ref, idempotency_key) & fix README drift#111
yzld2002 merged 1 commit into
mainfrom
fix/v2-drop-stale-extract-params

Conversation

@yzld2002

Copy link
Copy Markdown
Member

Summary

A tech-writer review comparing the SDK against aide flagged four parameters. Verified each against the tracked spec (specs/v2-aide.json, synced in #110):

  • markdown_ref — dropped from aide (aide#951) but still in the SDK and README. Removed from client.v2.extract / extract_jobs.create (sync + async) and the request-body builder; the "exactly one markdown source" guard now accepts markdown or markdown_url. Deleted the README's "Uploading a file for markdown_ref" section and updated api.md.
  • idempotency_key — dropped from aide (aide#944) but still sent in the extract body. Removed from the same methods. (The idempotency_key machinery in _base_client.py is the generic idempotency-header support, unrelated to this body field — left as is.)
  • priority — the code was already renamed to service_tier in feat(v2): align client.v2 with updated ADE spec (service_tier, billing) #106, but README's jobs example still passed priority="priority", a nonexistent kwarg that raises TypeError. Fixed to service_tier="priority".
  • password — intentionally kept: still present in the tracked spec as a deliberate placeholder until PDF decryption ships (aide#272, aide#390).

Also kept client.v2.files.upload (/v1/files is still in the spec) but reworded its docstrings and api.md entry to stop referencing the removed markdown_ref.

Breaking-change note

Removing markdown_ref/idempotency_key does not break the released public API: the entire client.v2 surface landed after v1.12.0. Verified with the griffe surface-lock (clean against v1.12.0).

Test plan

  • Full test suite: 587 passed, 240 skipped (live contract tests skipped locally — CI should run them)
  • ruff check . clean; mypy clean; pyright errors identical to baseline (pre-existing)
  • ruffen-docs run over README.md / api.md
  • griffe surface-lock clean against v1.12.0

🤖 Generated with Claude Code

A tech-writer review against aide surfaced SDK parameters that were
dropped from the API:

- Remove `markdown_ref` from `client.v2.extract` / `extract_jobs.create`
  (dropped in aide#951); extract now requires exactly one of `markdown`
  or `markdown_url`. Delete the README section documenting it.
- Remove `idempotency_key` from the same methods (dropped in aide#944).
- Fix the README jobs example to use `service_tier="priority"` — the
  code was already renamed from `priority` (aide#899) in #106, but the
  example still passed a nonexistent kwarg that raised TypeError.
- Reword `files.upload` docstrings/api.md to stop referencing the
  removed `markdown_ref` (`/v1/files` itself is still in the spec).

`password` on v2 parse is intentionally kept: it remains in the tracked
spec (specs/v2-aide.json) as a placeholder until PDF decryption ships
(aide#272, aide#390).

No released-surface break: client.v2 shipped after v1.12.0 (griffe
surface-lock clean). Full suite: 587 passed; ruff/mypy clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 13, 2026 12:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the V2 extract SDK and documentation with the tracked API specification.

Changes:

  • Removes stale markdown_ref and idempotency_key parameters.
  • Updates Markdown-source validation and documentation.
  • Corrects the README’s service_tier example.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/api_resources/v2/test_extract.py Updates extract tests for removed parameters.
src/landingai_ade/resources/v2/v2.py Removes stale facade parameters.
src/landingai_ade/resources/v2/files.py Revises upload documentation.
src/landingai_ade/resources/v2/extract.py Updates extract signatures and body construction.
README.md Fixes the jobs example and removes stale guidance.
api.md Updates the documented V2 API surface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/landingai_ade/resources/v2/extract.py
Comment thread api.md
@yzld2002 yzld2002 merged commit b4d102a into main Jul 13, 2026
6 checks passed
@yzld2002 yzld2002 deleted the fix/v2-drop-stale-extract-params branch July 13, 2026 12:15
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