-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
133 lines (133 loc) · 4.88 KB
/
wrangler.jsonc
File metadata and controls
133 lines (133 loc) · 4.88 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "dodo",
"main": "src/index.ts",
"compatibility_date": "2026-03-10",
"compatibility_flags": ["nodejs_compat", "experimental"],
"durable_objects": {
"bindings": [
{ "name": "CODING_AGENT", "class_name": "CodingAgent" },
{ "name": "USER_CONTROL", "class_name": "UserControl" },
{ "name": "SHARED_INDEX", "class_name": "SharedIndex" }
]
},
"worker_loaders": [{ "binding": "LOADER" }],
"services": [
{
"binding": "OUTBOUND",
"service": "dodo",
"entrypoint": "AllowlistOutbound"
}
],
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": ["CodingAgent"]
},
{
"tag": "v2",
"new_sqlite_classes": ["UserControl", "SharedIndex"]
},
{
"tag": "v3",
"deleted_classes": ["AppControl"]
},
{
"tag": "v4",
"new_sqlite_classes": ["ExploreAgent", "TaskAgent"]
},
{
// No-op tag — server already at v5. Future migrations should bump
// from v6 onward.
"tag": "v5"
},
{
// The deployed worker has an `OutboundProxy` Durable Object class
// registered (added by an out-of-band wrapper-Worker spike on the
// codemode globalOutbound problem). The class is no longer in the
// codebase, so we delete it here. Without this migration the
// deploy fails with code 10064 (missing class).
"tag": "v6",
"deleted_classes": ["OutboundProxy"]
}
],
"r2_buckets": [
// Chat attachments (screenshots, uploaded images, model-generated images)
// are stored in this bucket under the `attachments/` prefix. Run
// `scripts/setup-attachment-lifecycle.sh` once per account to provision
// the 30-day auto-expiry rule — lifecycle rules aren't yet configurable
// from wrangler.jsonc, so they live out-of-band.
{ "binding": "WORKSPACE_BUCKET", "bucket_name": "dodo-workspaces" },
// Fork snapshots — large opaque JSON blobs (often 5–10 MB once a
// cloned repo's git pack files are base64-encoded) used by
// forkSessionInternal to copy a workspace from one CodingAgent into
// another. Previously stored as a single SQLite TEXT row in the
// owner's UserControl DO, which trips SQLITE_TOOBIG above ~2 MB.
// R2 has no relevant size cap at this scale and the snapshot is
// already a one-shot intermediate (deleted after import), so a
// dedicated bucket is the simplest fix.
{ "binding": "FORK_SNAPSHOTS", "bucket_name": "dodo-fork-snapshots" }
],
"browser": {
"binding": "BROWSER"
},
"artifacts": [
{
"binding": "ARTIFACTS",
"namespace": "default"
}
],
"observability": {
"enabled": true,
"head_sampling_rate": 1
},
"triggers": {
"crons": ["0 */6 * * *"]
},
"build": {
"command": "npm run build"
},
"assets": {
"directory": "./public"
},
"ai": {
"binding": "AI"
},
"secrets": {
"required": ["ADMIN_EMAIL"]
},
"vars": {
"DEFAULT_MODEL": "anthropic/claude-sonnet-4",
// Default model used when a new session is created with activeGateway=ai-gateway.
// Workers AI models (`@cf/…`) are only routable via AI Gateway.
"AI_GATEWAY_DEFAULT_MODEL": "@cf/moonshotai/kimi-k2.6",
// Default model for the `explore` / `task` subagents.
//
// Initially set to Kimi K2.6 based on the main-model comparison, but
// the 2026-04-24 demo verification runs showed Kimi as an EXPLORE
// model keeps grep/read-ing and never synthesizes a final summary on
// repos this size — it burned 176k tokens across 12 steps in demo
// 4ffee77a and returned empty output. Haiku 4.5 completes the same
// query in 1 call with ~2k output tokens (demo 03c51aff: 76k total
// parent tokens vs 132k for the Kimi run).
//
// Conclusion: Kimi is great as a main model for investigate-and-report,
// but explore's success criterion (short synthesized summary from tool
// traces) suits an instruction-follower better. Haiku is cheap
// ($0.80/M in, $4/M out), fast, and converges reliably.
//
// Overrides: PUT /config exploreModel=..., or pass model=... per call.
// Auto-routed via AI Gateway for @cf/* models — see
// buildProviderForModel in src/agentic.ts.
"DEFAULT_EXPLORE_MODEL": "anthropic/claude-haiku-4-5",
// Default `task` subagent model. Same choice for the same reason —
// task needs to edit files then summarize; Haiku does both well.
"DEFAULT_TASK_MODEL": "anthropic/claude-haiku-4-5",
"OPENCODE_BASE_URL": "https://opencode.cloudflare.dev/compat",
// AI Gateway unified API base URL — include /{account_id}/{gateway_id}/compat
// so the OpenAI-compatible SDK hits /chat/completions correctly.
"AI_GATEWAY_BASE_URL": "https://gateway.ai.cloudflare.com/v1/4b430e167a301330d13a9bb42f3986a2/jp-gw/compat",
"WORKER_URL": "http://localhost:8787",
"DODO_VERSION": "0.4.0"
}
}