{ "$schema": "node_modules/wrangler/config-schema.json", "name": "modelschemas", "compatibility_date": "2025-09-02", "compatibility_flags": ["nodejs_compat"], "main": "src/worker.ts", "vars": { // Agent JWT audiences are origin-bound. "BETTER_AUTH_URL": "https://modelschemas.com", // FAL rate-card extract runs through this AI Gateway on Unified Billing // (credits on the Cloudflare bill, no provider key). Created by hand in // the dashboard. "AI_GATEWAY_ID": "modelschemas", }, "observability": { "enabled": true, }, "workers_dev": true, "routes": [{ "pattern": "modelschemas.com", "custom_domain": true }], "triggers": { // Fast tier: models poll. Slow tier: spec sync, sharded across four // firings so each shard gets its own invocation budgets — keep in // lockstep with SPEC_SYNC_SHARD_CRONS in src/server/ingest/sync.ts. // FAL llms.txt rate-card extract is its own nightly invocation // (FAL_PRICING_EXTRACT_CRON) so it does not spend the 15-min poll or // FAL spec-sync shard's subrequest/CPU budget. Vercel per-model // /endpoints prices are one daily firing (VERCEL_PRICING_EXTRACT_CRON) // for the same reason: ~60 subrequests must not share the poll budget. "crons": [ "*/15 * * * *", "0 4 * * *", "0 5 * * *", "10 5 * * *", "20 5 * * *", "30 5 * * *", "0 6 * * *", "0 7 * * *", "0 8 * * *", "0 9 * * *", "0 10 * * *", "0 11 * * *", ], }, "limits": { // Default is 30s CPU per invocation; FAL's shard parses and hashes // ~1,400 per-model specs in one run, which can exceed that. Ceiling, // not a floor — unused headroom costs nothing. "cpu_ms": 300000, }, "ai": { "binding": "AI", }, "browser": { "binding": "BROWSER", "remote": true, }, "send_email": [ { "name": "EMAIL", }, ], // Keyed Anthropic/Gemini listing calls, and Anthropic/OpenAI docs loads, // egress through this object, placed in eastern North America: cron // invocations run in any region and some hosts refuse some (issues #356, // #482, #505). See src/server/providers/us-egress.ts. "durable_objects": { "bindings": [{ "name": "US_EGRESS", "class_name": "UsEgress" }], }, "migrations": [{ "tag": "v1", "new_sqlite_classes": ["UsEgress"] }], "kv_namespaces": [ { "binding": "SCHEMA_CACHE", "id": "8c8f93fc618242d9b92d37bba437580f", }, ], "d1_databases": [ { "binding": "DB", "database_name": "modelschemas-us", "database_id": "21cbfe2e-5a9d-41a8-929e-74089a08230b", "migrations_dir": "drizzle", }, ], }