Repository navigation
chore(09-08-2026): update schemas - #113
Merged
Merged
Conversation
hewliyang
force-pushed
the
hly/chore/spec-sync
branch
2 times, most recently
from
September 8, 2026 20:31
ff95600 to
7b562f9
Compare
Request side:
- parse: enhance.advanced_chart_agent, table agentic mode, spreadsheet.max_cell_count,
settings.{embed_pdf_metadata_dpi, extract_document_properties, hybrid_vpc, tenant_throttling}
- extract: settings.{force_url_result, page_range}, citations.parent_block, queue_priority
- split: allow_page_overlap, auto_partition, deep_split, force_url_result
- classify: category_groups, force_url_result, model, priority; drop persist_results
- queue_priority enum gains 'standard'
- upload: file may also be a plain string
Response side:
- response_type discriminator on every response model
- usage breakdowns (parse/split/edit/extract/classify), page_billing_breakdown,
non_empty_cell_count, document_properties, merged_tables
- V3Extract confidence fields; ExtractResponse response_confidence and URL results
- SplitResponse/ClassifyResponse URL results, duration, job_id
- job responses carry error (ErrorDetail/ErrorCode) and ChartResponse results; type gains 'Chart'
Endpoints:
- client.job.delete(job_id, include_persisted=...) -> JobDeleteResponse
- client.delete_upload(file_id) -> ClientDeleteUploadResponse
scripts/spec_drift.py now reports no drift against https://reducto.ai/openapi.json.
hewliyang
force-pushed
the
hly/chore/spec-sync
branch
from
September 8, 2026 20:34
7b562f9 to
5750617
Compare
The API returns ExtractResponse (response_type 'extract') from POST /extract for accounts not on V3 extract, though the spec lists only V3ExtractResponse. With response_type modelled as Optional[Literal], that payload failed the V3Extract literal and pydantic fell through to AsyncExtractResponse. - response_type is now a required Literal on every response model; the spec gives it a server default so it is always present - ExtractRunResponse, ParseRunResponse and the job result unions carry PropertyInfo(discriminator='response_type'); ExtractRunResponse includes ExtractResponse - spec_drift.py: a response field with a spec default may be required in the sdk; spec/drift-allowlist.json records intentional deviations with a reason and the script flags stale entries - e2e tests accept either sync extract response class
hewliyang
force-pushed
the
hly/chore/spec-sync
branch
from
September 8, 2026 20:46
49864be to
bd4e6cd
Compare
…parallel - one e2e file, grouped by endpoint; shared responses are module-scoped fixtures (pytest 9 rejects class-scoped fixtures on instance methods) - e2e workflow runs pytest-xdist with --dist loadscope: ~27s -> ~11s
kirthi20
approved these changes
Sep 8, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #111 (which is stacked on #110). Merge those first; this PR retargets automatically.
Summary
Brings
src/reducto/in line with the live spec athttps://reducto.ai/openapi.json. After this change,scripts/spec_drift.pyreports no drift across 19 endpoints (was 57 items). The spec-drift CI check from #111 goes green.Request types
enhance.advanced_chart_agent,TableAgentic.mode,spreadsheet.max_cell_count,settings.embed_pdf_metadata_dpi,settings.extract_document_properties,settings.hybrid_vpc,settings.tenant_throttlingsettings.force_url_result,settings.page_range,citations.parent_block, top-levelqueue_priority(async config +run_job)settings.allow_page_overlap,auto_partition,deep_split,force_url_resultcategory_groups,force_url_result,model,priority; removedpersist_results(dropped from the spec)queue_priorityenum now includesstandardfilealso accepts a plain stringResponse types
response_typediscriminator on every response model.ParseUsage.usage_breakdown,page_billing_breakdown,non_empty_cell_count;ExtractUsage.usage_breakdown; new classify usage model.ParseResponse.document_properties, block-levelmerged_tables.V3Extract.confidence/confidence_reason;ExtractResponse.response_confidence;result/citationsmay be aURLResult.SplitResponseandClassifyResponsegainURLResultresults,duration,job_id;ClassifyResponse.extra_metadata.error: ErrorDetail(with the fullErrorCodeenum),ChartResponsein the result union,typegainsChart.New shared types:
URLResult,ErrorDetail,ErrorCode,ChartResponse,DocumentProperties.New endpoints
client.job.delete(job_id, include_persisted=...)→DELETE /job/{job_id}client.delete_upload(file_id)→DELETE /upload/{file_id}Breaking change
client.classify.run(persist_results=...)no longer exists. The API removed the field.E2E tests
tests/e2e/test_spec_sync_e2e.pyruns 19 tests against the live API (about 30s): every new request param is sent, every new response field is checked, and both DELETE endpoints are exercised, including the 410 after job deletion and the 404 after upload deletion.Verification
REDUCTO_API_KEY=... uv run pytest tests/e2e/test_spec_sync_e2e.py -o addopts=: 19 passed./scripts/lint: clean (ruff, pyright strict, mypy)./scripts/test: 455 passed (Pydantic v2), 452 passed (Pydantic v1)uv run python scripts/spec_drift.py:Checked 19 sdk endpoints. No drift found.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.