Repository navigation
Use Reducto’s reported usage for Extract cost - #166
Merged
Merged
Conversation
Member
|
We checked whether Reducto actually applies the dense-field surcharge. We ran 2 short Deep Extract docs, both well over 100 fields/page (192 and ~250). Reducto billed $0.24 for 6 pages, a flat $0.04/page, with no surcharge. So we price Deep Extract at the flat page rate. One gap on Reducto's side: their pricing docs say dense extractions "may incur a per-field surcharge", but the API no longer returns credits or cost per job ( |
Author
|
lol ok, then I'm gonna put back the 4-cent fallbacks I'm sure Reducto won't mind us making them look cheaper if that's wrong |
5 tasks done
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.
What changed
Remove the legacy Deep Extract formula that can override Reducto’s reported credits. Apply this fallback order:
usage.credits, including zero, at Reducto’s published $0.01 per credit. Reducto announcementusage.usage_breakdown.extract_pagesusing the reported Extract product and tier. List ratesusage.num_pageswhen the Extract mode is known. Usage export unitsBoth page paths produce list-price estimates even for dense jobs or missing field counts. The pricing helper retains a finite field limit, and ExtractBench passes infinity. Two dense Deep Extract jobs totaled $0.24 over six pages in Reducto’s dashboard, which matched the $0.04/page base rate. Spot check · Surcharge policy
Why
The old public adapter calculated Deep Extract cost as:
The 30-credit minimum applied to extraction, and the final
+ pagesadded one parse credit per page. A two-page job with zero extracted fields came to(30 + 2) × $0.015 = $0.48, even if Reducto returned a different credit total. Old adapterReducto announced the switch to per-product pricing on August 25, 2026, effective September 1. The migration guide lists Deep Extract at $40 per 1,000 pages with parsing included. The announcement sets the new list credit value at $0.01. The migration guide says contracted credit-based pricing remains in place until renewal. Responses on per-product pricing carry
usage_breakdownwithcredits: null, so the new page-rate path uses no credit conversion. The $0.015 figure in the formula above is the historical benchmark conversion. Reducto announcement · Pricing migration and API response shapesTesting
70 local tests passed across Reducto pricing, deadline handling, and attempt accounting. Coverage includes both page fallbacks, dense and missing field counts, and the finite-limit policy. Ruff and diff checks passed.