Skip to content

[pull] main from firecrawl:main - #745

Merged
pull[bot] merged 2 commits into
code:mainfrom
firecrawl:main
Aug 21, 2026
Merged

[pull] main from firecrawl:main#745
pull[bot] merged 2 commits into
code:mainfrom
firecrawl:main

Conversation

@pull

@pull pull Bot commented Aug 21, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

abimaelmartell and others added 2 commits August 20, 2026 22:26
…n document.markdown (#4365)

* feat(v2): pageMarkers PDF parser option — per-page attribution in document.markdown

Adds `parsers: [{ type: "pdf", pageMarkers: true }]` (default false) to
v2 /parse and /scrape. When set, PDF pages in document.markdown are
joined with `\n\n---\n\n<!-- page N -->\n\n` where N is the 1-based
physical page of the content that follows. No new response field.

Semantics: markers appear between pages only (no leading marker for
page 1); numbering may skip pages merged by cross-page stitching —
callers that need every physical page should use `pages: true`.
Composes with pages, blocks, maxPages, and mode.

Plumbing follows the pages/blocks precedent (#4347):
- schema field flows through the pageMarkdown-alias transform +
  getPDFPageMarkers() accessor
- firePDF sync engine sends page_markers; async /jobs submit sends
  pageMarkers; both force the fire-pdf engine (no silent MinerU
  fallback without markers)
- excluded from URL-index reads/writes and agentIndexOnly (index
  markdown never carries markers)
- PDF cache: pageMarkers mutates markdown itself (unlike the
  pages/blocks sidecars), so marker requests read/write a fully
  disjoint …markers… variant family — a base-variant entry is never
  served for a marker request and vice versa (mode:ocr precedent)
- JS/Python SDK parser types updated

Requires fire-pdf's page_markers support on the sync /ocr path to be
deployed first (older fire-pdf builds ignore unknown fields).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* review: fail loud on missing page_markers echo, drop SDK changes, fix fallback log

- Revert JS/Python SDK changes — this PR is API-only for now; SDK
  support lands separately.
- Validate the new fire-pdf page_markers response echo
  (firecrawl/fire-pdf#629): markers are baked into markdown and their
  absence is not detectable by content, so a build that ignores the
  unknown request field must fail loud instead of silently caching
  unmarked markdown under marker cache variants.
- Document why the async /jobs option is camelCase pageMarkers: that is
  the field fire-pdf's jobs schema defines, and its handler 400s
  unknown option keys, so snake_case would be rejected.
- Mention markers in the async→sync fallback warn message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* review: validate the page_markers echo on the async /jobs result too

The sync path validates fire-pdf's page_markers acknowledgment, but the
async path cached results with none — an api/worker version skew
(submit accepts the pageMarkers option, an older worker silently
ignores the stored key) would persist unmarked markdown under marker
cache variants.

fire-pdf now echoes page_markers on the /jobs result JSON
(firecrawl/fire-pdf#629); reject marker results lacking the echo and
fall back to the sync path, where the same contract applies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Expose the v2 PDF parser pageMarkers option across the JS, Python, Go,
Java, Ruby, PHP, Rust, and .NET SDKs so scrape/parse requests can join
PDF pages in document.markdown with <!-- page N --> separators. Bump
each package version so merge auto-publishes.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Abimael Martell <abimaelmartell@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Aug 21, 2026
@pull pull Bot added the ⤵️ pull label Aug 21, 2026
@pull
pull Bot merged commit 35a461f into code:main Aug 21, 2026
1 of 15 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant