Repository navigation
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
101 lines (101 loc) · 3.52 KB
/
Copy pathwrangler.jsonc
File metadata and controls
101 lines (101 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "modelschemas",
"compatibility_date": "2025-09-02",
"compatibility_flags": ["nodejs_compat", "enable_ctx_exports"],
"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 Cache. Only the `CachedReads` entrypoint (catalog, schema and
// OpenAPI GETs; see src/worker.ts) is cached; the default entrypoint
// skips the cache lookup so HTML, auth, changes and status pay nothing.
// A request with Authorization is still cached because those responses
// say `public` (Cloudflare's rule). `enable_ctx_exports` is what lets
// the default entrypoint call CachedReads.
"cache": {
"enabled": false,
},
"exports": {
"default": { "type": "worker", "cache": { "enabled": false } },
"CachedReads": { "type": "worker", "cache": { "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",
"database_id": "557c12a0-dbad-4d46-8925-36315d8ecba9",
// Read replication is not a wrangler flag. Turn it on
// (`read_replication.mode: auto`) only after #554 recreates this
// database with a US primary. Public GETs already use
// withSession('first-unconstrained'); until then they run on the primary.
"migrations_dir": "drizzle",
},
],
}