-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencode.json
More file actions
92 lines (92 loc) · 3.26 KB
/
Copy pathopencode.json
File metadata and controls
92 lines (92 loc) · 3.26 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
{
"//": [
"TEMPLATE: opencode.json for the agent-loop delegation framework.",
"Replace every <PLACEHOLDER> token with your own values, then delete all '//' comment keys.",
"<PRIMARY_MODEL> - model route for the heavy tiers: manager, orchestrator, document-master.",
"<SUBAGENT_MODEL> - model route for the read-only tiers: gather, poller.",
"<IMPLEMENT_MODEL> - model route for the implement tier (the one that edits files)."
],
"$schema": "https://opencode.ai/config.json",
"default_agent": "manager",
"agent": {
"title": {
"//": "No re-titling: the manager titles its own session exactly once; every delegate is auto-titled at spawn.",
"disable": true
}
},
"//delegation": "Maximum delegation depth (manager -> orchestrator -> worker tiers).",
"subagent_depth": 3,
"//small_model": "Cheap model for background tasks such as summaries; use your lightest route.",
"small_model": "<SUBAGENT_MODEL>",
"compaction": {
"//": "Automatic context compaction; keep the last few turns verbatim and reserve tokens for them.",
"auto": true,
"prune": false,
"tail_turns": 3,
"reserved": 10000
},
"//tool_output": "Cap on tool output kept in context; anything larger is spilled to a file instead.",
"tool_output": {
"max_lines": 1200,
"max_bytes": 51200
},
"provider": {
"your-provider": {
"//": "Single OpenAI-compatible provider. The key ('your-provider') is the id that prefixes model routes.",
"npm": "@ai-sdk/openai-compatible",
"name": "Model Router",
"options": {
"//": "Point baseURL at your own endpoint; load the API key from an env var, never paste a literal key in here.",
"baseURL": "https://your-provider.example/v1",
"apiKey": "env:ORCAROUTER_API_KEY",
"headerTimeout": 60000,
"chunkTimeout": 300000,
"timeout": 900000
},
"models": {
"<PRIMARY_MODEL>": {
"//": "Replace this key with your primary model's id; adjust flags and limits to match the real model.",
"name": "Primary model",
"reasoning": true,
"tool_call": true,
"attachment": true,
"limit": {
"context": 1000000,
"output": 65536
}
},
"<SUBAGENT_MODEL>": {
"name": "Subagent model",
"reasoning": true,
"tool_call": true,
"attachment": false,
"limit": {
"context": 1000000,
"output": 65536
}
},
"<IMPLEMENT_MODEL>": {
"name": "Implement model",
"reasoning": true,
"tool_call": true,
"attachment": true,
"limit": {
"context": 1000000,
"output": 65536
}
}
}
},
"//local-provider-example": {
"//": "COMMENTED OUT: to run a local OpenAI-compatible server instead, copy this block, give it a real key (not starting with '//'), and replace <PORT>.",
"npm": "@ai-sdk/openai-compatible",
"name": "Local model server",
"options": {
"baseURL": "http://localhost:<PORT>/v1",
"timeout": 3600000
}
}
},
"//model": "Default model for the main session: the full route to your primary model.",
"model": "<PRIMARY_MODEL>"
}