Skip to content

chore(10-24-2026): update schemas - #122

Merged
hewliyang merged 1 commit into
mainfrom
hly/chore/spec-sync-10-24
Oct 24, 2026
Merged

hewliyang merged 1 commit into
mainfrom
hly/chore/spec-sync-10-24

Conversation

@hewliyang

@hewliyang hewliyang commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Brings src/reducto/ in line with the live spec at https://reducto.ai/openapi.json (v1.12.20-329-g39692c7ddfb9). Before this PR, scripts/spec_drift.py --live reported 6 drift items. Now it reports no drift across 20 endpoints.

New endpoint

  • client.classify.run_job(...) → POST /classify_async. It takes the same params as run(), plus async_ (metadata, priority, webhook). It returns AsyncClassifyResponse {job_id}. Get the result with client.job.get(job_id).

Request types

Area Change
parse settings.return_citations added. It gives per-word extra['word_citations'] and, for tables, extra['cell_citations']. It needs settings.model="r-1"
parse FigureAgentic.return_overlays removed (the spec dropped it)

Response types

  • duration added to ExtractResponse and V3Extract.

Drift allowlist

  • Added POST /classify request.async. Both endpoints use ClassifyConfig, but the spec says async is only for /classify_async. So only run_job takes async_.
  • Changed the existing extract entry to object(8 fields), because ExtractResponse gained duration.

Breaking change

FigureAgentic.return_overlays is no longer in the types. Code that still sends it works at runtime, but type checkers report it.

Tests

  • Mock tests for classify.run_job (sync and async, raw and streaming).
  • New e2e tests against the live API: TestClassifyAsync (submit, poll, check the ClassifyResponse), TestParse.test_return_citations and TestExtract.test_duration. The full e2e suite gives 35 passed.
  • ruff, pyright and mypy are clean. Unit tests: 455 passed.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…xtract duration

- add client.classify.run_job() for POST /classify_async (AsyncClassifyResponse)
- add settings.return_citations
- add duration to ExtractResponse and V3Extract
- remove FigureAgentic.return_overlays (dropped from the spec)
- refresh spec/openapi.json and drift allowlist
- e2e tests for the new surface
@hewliyang hewliyang mentioned this pull request Oct 24, 2026
@hewliyang
hewliyang merged commit 14c1850 into main Oct 24, 2026
8 checks passed
@hewliyang
hewliyang deleted the hly/chore/spec-sync-10-24 branch October 24, 2026 18:45
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