-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencode.jsonc
More file actions
224 lines (224 loc) · 7.92 KB
/
Copy pathopencode.jsonc
File metadata and controls
224 lines (224 loc) · 7.92 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
{
"$schema": "https://opencode.ai/config.json",
// =========================================================================
// PROVIDER: self-hosted models exposed by the Onyxia platform.
// The gateway is Open WebUI (https://llm.lab.sspcloud.fr): it exposes an
// OpenAI-compatible layer on /v1 (distinct from the native /api API).
//
// baseURL expected by OpenCode: https://llm.lab.sspcloud.fr/v1
// -> OpenCode calls {baseURL}/chat/completions = /v1/chat/completions
// -> Fallback if /v1 is absent: https://llm.lab.sspcloud.fr/api (see INSTALL.md)
//
// The "models" KEYS below are confirmed (curl .../api/models):
// gemma4-26b-moe, qwen3-6-35b-moe, qwen3-vl. The gateway does not publish
// context/output limits; see the note in INSTALL.md if generation truncates.
// =========================================================================
"provider": {
"onyxia": {
"npm": "@ai-sdk/openai-compatible",
"name": "SSPCloud LLM (self-hosted)",
"options": {
"baseURL": "{env:OPENAI_BASE_URL}",
"apiKey": "{env:OPENAI_API_KEY}"
},
"models": {
"qwen3-6-35b-moe": {
"name": "Qwen3 35B MoE — code & reasoning",
"tools": true,
"limit": {
"context": 131072,
"output": 32768
}
},
"gemma4-26b-moe": {
"name": "Gemma 4 26B MoE — fast / review",
"tools": true,
"limit": {
"context": 131072,
"output": 16384
}
},
"qwen3-vl": {
"name": "Qwen3 VL — vision (charts, diagrams, screenshots)",
"tools": true,
"limit": {
"context": 65536,
"output": 16384
}
}
}
}
},
// ---- Default model + small model (titles, summaries, compaction) ----
"model": "onyxia/qwen3-6-35b-moe",
"small_model": "onyxia/gemma4-26b-moe",
// ---- Default agent at startup ----
"default_agent": "plan",
// =========================================================================
// PERMISSIONS — OpenCode is NOT sandboxed: every `bash` runs on the pod.
// Common data science tooling is broadly allowed; anything destructive or
// outbound (network, k8s mutations, rm) asks for confirmation.
// =========================================================================
"permission": {
"edit": "allow",
"webfetch": "ask",
"bash": {
"git *": "allow",
"uv *": "allow",
"pip *": "allow",
"pixi *": "allow",
"python *": "allow",
"python3 *": "allow",
"pytest*": "allow",
"ruff *": "allow",
"mypy *": "allow",
"Rscript *": "allow",
"R -e *": "allow",
"quarto *": "allow",
"make *": "allow",
"mc *": "allow",
"aws s3*": "allow",
"mlflow *": "allow",
"duckdb *": "allow",
// Vault: read-only allowed; put/delete fall through to "*": "ask".
"vault kv get*": "allow",
"vault kv list*": "allow",
// Argo: browsing is free, but submitting a workflow launches containers
// on the cluster -> confirmation (consistent with kubectl apply).
"argo list*": "allow",
"argo get*": "allow",
"argo logs*": "allow",
"argo watch*": "allow",
"argo submit*": "ask",
"argo *": "ask",
"kubectl get*": "allow",
"kubectl describe*": "allow",
"kubectl logs*": "allow",
"kubectl top*": "allow",
"kubectl apply*": "ask",
"kubectl delete*": "ask",
"docker *": "ask",
"rm *": "ask",
"curl *": "ask",
"wget *": "ask",
"*": "ask"
},
"skill": {
"*": "allow"
}
},
// =========================================================================
// AGENTS — 2 primary agents (Tab to switch) + 5 subagents, delegated
// automatically based on their "description" or invoked via @name.
// Each agent's system prompt lives in ./prompts/<agent>.md
//
// python-ds / r-ds / mlops deliberately have NO tool restriction:
// they must execute and verify code; the global bash allowlist above
// (rm/curl/kubectl apply/docker/argo submit on "ask") keeps them in check.
// =========================================================================
"agent": {
"build": {
"mode": "primary",
"model": "onyxia/qwen3-6-35b-moe",
"temperature": 0.2,
"prompt": "./prompts/build.md"
},
"plan": {
"mode": "primary",
"model": "onyxia/gemma4-26b-moe",
"temperature": 0.1,
"prompt": "./prompts/plan.md",
"tools": {
"write": false,
"edit": false
},
"permission": {
"bash": {
"*": "ask"
}
}
},
"python-ds": {
"mode": "subagent",
"description": "Python data science / ML specialist on Onyxia (uv, ruff, polars, pandas, scikit-learn, pyarrow, s3fs). Use to write or refactor Python code for analysis, modelling, or pipelines.",
"model": "onyxia/qwen3-6-35b-moe",
"temperature": 0.2,
"prompt": "./prompts/python-ds.md"
},
"r-ds": {
"mode": "subagent",
"description": "R data science specialist (tidyverse, data.table, targets, renv, testthat, aws.s3, arrow). Use for any R code for analysis, modelling, or reproducible pipelines.",
"model": "onyxia/qwen3-6-35b-moe",
"temperature": 0.2,
"prompt": "./prompts/r-ds.md"
},
"mlops": {
"mode": "subagent",
"description": "Onyxia MLOps engineer: MLflow experiment tracking, parallel training via Argo Workflows (argo submit, CronWorkflow), GitOps deployment via ArgoCD, model packaging and productionization. Use to industrialize/deploy a model or schedule recurring jobs.",
"model": "onyxia/qwen3-6-35b-moe",
"temperature": 0.2,
"prompt": "./prompts/mlops.md"
},
"reviewer": {
"mode": "subagent",
"description": "Read-only code reviewer: quality, reproducibility, security (no hardcoded secrets), R/Python best practices. Use to review a diff or a module before a commit.",
"model": "onyxia/gemma4-26b-moe",
"temperature": 0.1,
"prompt": "./prompts/reviewer.md",
"tools": {
"write": false,
"edit": false,
"bash": false
},
"permission": {
"bash": {
// Read-only diagnostics — no file mutation, no network, no rm
"ruff *lint*": "allow",
"ruff check *": "allow",
"ruff format --check *": "allow",
"mypy *": "allow",
"python -m py_compile *": "allow",
"python -m pytest --collect-only *": "allow",
"python -m pytest -q --collect-only *": "allow",
"Rscript -e *": "allow",
"R -e *": "allow",
"*": "ask"
}
}
},
"dataviz-vision": {
"mode": "subagent",
"description": "Visual analysis (vision model): reads screenshots, matplotlib/ggplot charts, architecture diagrams, or dashboards to interpret them or suggest improvements. Use whenever an image is provided.",
"model": "onyxia/qwen3-vl",
"temperature": 0.3,
"prompt": "./prompts/dataviz-vision.md",
"tools": {
"write": false,
"edit": false,
"bash": false
}
}
},
// =========================================================================
// MCP (optional) — disabled by default.
// Careful: a "local" MCP server executes a command on the pod;
// a "remote" one sends context outside the platform.
// Enable only knowingly (confidentiality of Insee data).
// =========================================================================
"mcp": {
"excalidraw": {
"type": "remote",
"url": "https://api.excalidraw.com/api/v1/mcp",
"enabled": false,
"headers": {
"Authorization": "Bearer {env:EXCALIDRAW_API_KEY}"
}
},
"datagouv": {
"type": "remote",
"url": "https://mcp.data.gouv.fr/mcp",
"enabled": false
}
},
"autoupdate": "notify"
}