[TypeScript SDK] Add partition_pages support for large document parallel processing #595

Open
opened 2026-02-16 00:18:23 -05:00 by yindo · 1 comment
Owner

Originally created by @ghostyfreak on GitHub (Jan 21, 2026).

Summary

The Python SDK supports partition_pages and partition_page_batch_size parameters that split large documents into smaller batches for parallel processing. This feature is not available in the TypeScript SDK.

Problem

When processing large documents (500+ pages) with the TypeScript SDK, there's no way to:

  • Automatically partition a document into smaller chunks
  • Process those chunks as parallel API jobs
  • Aggregate results back together

This can lead to timeouts (30-minute job limit) or DOCUMENT_TOO_LARGE errors.

Python SDK (works)

from llama_cloud_services import LlamaParse

parser = LlamaParse(
    partition_pages=True,
    partition_page_batch_size=50,
)

TypeScript SDK (missing)

const parser = new LlamaParseReader({
  partitionPages: true,          // not available
  partitionPageBatchSize: 50,    // not available
});

Current Workarounds

  • Manually pre-split PDFs before upload
  • Use targetPages with multiple calls and aggregate results manually
  • Use the Python SDK instead

Related

Originally created by @ghostyfreak on GitHub (Jan 21, 2026). ## Summary The Python SDK supports `partition_pages` and `partition_page_batch_size` parameters that split large documents into smaller batches for parallel processing. This feature is not available in the TypeScript SDK. ## Problem When processing large documents (500+ pages) with the TypeScript SDK, there's no way to: - Automatically partition a document into smaller chunks - Process those chunks as parallel API jobs - Aggregate results back together This can lead to timeouts (30-minute job limit) or `DOCUMENT_TOO_LARGE` errors. ## Python SDK (works) ```python from llama_cloud_services import LlamaParse parser = LlamaParse( partition_pages=True, partition_page_batch_size=50, ) ``` ## TypeScript SDK (missing) ```typescript const parser = new LlamaParseReader({ partitionPages: true, // not available partitionPageBatchSize: 50, // not available }); ``` ## Current Workarounds - Manually pre-split PDFs before upload - Use `targetPages` with multiple calls and aggregate results manually - Use the Python SDK instead ## Related - #890
Author
Owner

@ghostyfreak commented on GitHub (Jan 23, 2026):

I implemented partition pages to test it out. However I did not really see any performance gains. Tried with 50 pages, 10 workers.

Is there a capacity limit on how much can be ocr'ed on the starter plan?

@ghostyfreak commented on GitHub (Jan 23, 2026): I implemented partition pages to test it out. However I did not really see any performance gains. Tried with 50 pages, 10 workers. Is there a capacity limit on how much can be ocr'ed on the starter plan?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#595