-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description
When using wrangler pages deploy from external CI (GitHub Actions), the upload-token API returns max_file_count_allowed: 20000 even though:
- Account has Workers Paid plan
PAGES_WRANGLER_MAJOR_VERSION=4is set in Pages project environment variables
Expected behavior
The upload-token API should return max_file_count_allowed: 100000 for paid plans with PAGES_WRANGLER_MAJOR_VERSION=4 set.
Actual behavior
API returns JWT with max_file_count_allowed: 20000, causing wrangler to reject deployments with >20k files.
{
"max_file_count_allowed": 20000,
...
}Steps to reproduce
- Subscribe to Workers Paid plan
- Set
PAGES_WRANGLER_MAJOR_VERSION=4in Pages project settings (as plain text environment variable) - Run
wrangler pages deploy dist --project-name=<project>with >20k files - Error: "Pages only supports up to 20,000 files in a deployment for your current plan"
Wrangler version
4.62.0
Additional context
The changelog (Jan 23, 2026) states paid plans support 100k files with PAGES_WRANGLER_MAJOR_VERSION=4, but this setting only appears to work for Cloudflare's built-in build system, not for external CI using wrangler pages deploy.
The wrangler source shows that MAX_ASSET_COUNT_DEFAULT = 20000 is used when the JWT doesn't specify a higher limit. The upload-token API endpoint should respect the project's PAGES_WRANGLER_MAJOR_VERSION setting and return the appropriate limit in the JWT.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status