Unexpected fields found in top-level field: "ratelimits"

wrangler 4.43.0 "compatibility_date": "2025-10-14" Added ratelimits field to my wrangler file. The bindings show in the env but when i run the code the binding is undefined. I've tried deploying and the dashboard doesn't show the ratelimit bindings. When building i get the warning Unexpected fields found in top-level field: "ratelimits"
2 Replies
Walshy
Walshy2mo ago
Can you share your Wrangler config
Need_Not
Need_NotOP2mo ago
{
"name": "just-send-to-me",
"main": "./worker/index.ts",
"compatibility_date": "2025-10-14",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"directory": "./dist",
"run_worker_first": ["/api/*"],
"not_found_handling": "single-page-application",
},
"d1_databases": [
{
"binding": "DB",
"database_name": "dev-db",
"database_id": "8f5598f0-eca4-46b4-82ee-840d80f6d2b8",
"experimental_remote": true,
"migrations_dir": "./drizzle",
},
],
"r2_buckets": [
{
"bucket_name": "files-bucket",
"binding": "files_bucket",
"preview_bucket_name": "preview-files-bucket",
"experimental_remote": true,
},
],
"triggers": {
"crons": ["0 * * * *"],
},
"kv_namespaces": [
{
"binding": "PENDING_FILE_UPLOADS",
"id": "1ec2a2d91b8e4ad08ab7bbcf9a1d360a",
},
],
"ratelimits": [
{
"name": "FILE_DOWNLOAD_RATE_LIMITER",
"namespace_id": "1001",
"simple": {
"limit": 300,
"period": 60,
},
},
{
"name": "FILE_UPLOAD_RATE_LIMITER",
"namespace_id": "1002",
"simple": {
"limit": 110,
"period": 60,
},
},
{
"name": "GENERAL_RATE_LIMITER",
"namespace_id": "1003",
"simple": {
"limit": 100,
"period": 60,
},
},
],
}
{
"name": "just-send-to-me",
"main": "./worker/index.ts",
"compatibility_date": "2025-10-14",
"compatibility_flags": ["nodejs_compat"],
"assets": {
"directory": "./dist",
"run_worker_first": ["/api/*"],
"not_found_handling": "single-page-application",
},
"d1_databases": [
{
"binding": "DB",
"database_name": "dev-db",
"database_id": "8f5598f0-eca4-46b4-82ee-840d80f6d2b8",
"experimental_remote": true,
"migrations_dir": "./drizzle",
},
],
"r2_buckets": [
{
"bucket_name": "files-bucket",
"binding": "files_bucket",
"preview_bucket_name": "preview-files-bucket",
"experimental_remote": true,
},
],
"triggers": {
"crons": ["0 * * * *"],
},
"kv_namespaces": [
{
"binding": "PENDING_FILE_UPLOADS",
"id": "1ec2a2d91b8e4ad08ab7bbcf9a1d360a",
},
],
"ratelimits": [
{
"name": "FILE_DOWNLOAD_RATE_LIMITER",
"namespace_id": "1001",
"simple": {
"limit": 300,
"period": 60,
},
},
{
"name": "FILE_UPLOAD_RATE_LIMITER",
"namespace_id": "1002",
"simple": {
"limit": 110,
"period": 60,
},
},
{
"name": "GENERAL_RATE_LIMITER",
"namespace_id": "1003",
"simple": {
"limit": 100,
"period": 60,
},
},
],
}
any idea what i should do? I think I got it... vite plugin

Did you find this page helpful?