opencode-schema.json

  1{
  2  "$schema": "http://json-schema.org/draft-07/schema#",
  3  "definitions": {
  4    "agent": {
  5      "description": "Agent configuration",
  6      "properties": {
  7        "maxTokens": {
  8          "description": "Maximum tokens for the agent",
  9          "minimum": 1,
 10          "type": "integer"
 11        },
 12        "model": {
 13          "description": "Model ID for the agent",
 14          "enum": [
 15            "gpt-4.1",
 16            "llama-3.3-70b-versatile",
 17            "azure.gpt-4.1",
 18            "openrouter.gpt-4o",
 19            "openrouter.o1-mini",
 20            "openrouter.claude-3-haiku",
 21            "claude-3-opus",
 22            "gpt-4o",
 23            "gpt-4o-mini",
 24            "o1",
 25            "meta-llama/llama-4-maverick-17b-128e-instruct",
 26            "azure.o3-mini",
 27            "openrouter.gpt-4o-mini",
 28            "openrouter.o1",
 29            "claude-3.5-haiku",
 30            "o4-mini",
 31            "azure.gpt-4.1-mini",
 32            "openrouter.o3",
 33            "grok-3-beta",
 34            "o3-mini",
 35            "qwen-qwq",
 36            "azure.o1",
 37            "openrouter.gemini-2.5-flash",
 38            "openrouter.gemini-2.5",
 39            "o1-mini",
 40            "azure.gpt-4o",
 41            "openrouter.gpt-4.1-mini",
 42            "openrouter.claude-3.5-sonnet",
 43            "openrouter.o3-mini",
 44            "gpt-4.1-mini",
 45            "gpt-4.5-preview",
 46            "gpt-4.1-nano",
 47            "deepseek-r1-distill-llama-70b",
 48            "azure.gpt-4o-mini",
 49            "openrouter.gpt-4.1",
 50            "bedrock.claude-3.7-sonnet",
 51            "claude-3-haiku",
 52            "o3",
 53            "gemini-2.0-flash-lite",
 54            "azure.o3",
 55            "azure.gpt-4.5-preview",
 56            "openrouter.claude-3-opus",
 57            "grok-3-mini-fast-beta",
 58            "claude-4-sonnet",
 59            "azure.o4-mini",
 60            "grok-3-fast-beta",
 61            "claude-3.5-sonnet",
 62            "azure.o1-mini",
 63            "openrouter.claude-3.7-sonnet",
 64            "openrouter.gpt-4.5-preview",
 65            "grok-3-mini-beta",
 66            "claude-3.7-sonnet",
 67            "gemini-2.0-flash",
 68            "openrouter.deepseek-r1-free",
 69            "vertexai.gemini-2.5-flash",
 70            "vertexai.gemini-2.5",
 71            "o1-pro",
 72            "gemini-2.5",
 73            "meta-llama/llama-4-scout-17b-16e-instruct",
 74            "azure.gpt-4.1-nano",
 75            "openrouter.gpt-4.1-nano",
 76            "gemini-2.5-flash",
 77            "openrouter.o4-mini",
 78            "openrouter.claude-3.5-haiku",
 79            "claude-4-opus",
 80            "openrouter.o1-pro",
 81            "copilot.gpt-4o",
 82            "copilot.gpt-4o-mini",
 83            "copilot.gpt-4.1",
 84            "copilot.claude-3.5-sonnet",
 85            "copilot.claude-3.7-sonnet",
 86            "copilot.claude-sonnet-4",
 87            "copilot.o1",
 88            "copilot.o3-mini",
 89            "copilot.o4-mini",
 90            "copilot.gemini-2.0-flash",
 91            "copilot.gemini-2.5-pro"
 92          ],
 93          "type": "string"
 94        },
 95        "reasoningEffort": {
 96          "description": "Reasoning effort for models that support it (OpenAI, Anthropic)",
 97          "enum": [
 98            "low",
 99            "medium",
100            "high"
101          ],
102          "type": "string"
103        }
104      },
105      "required": [
106        "model"
107      ],
108      "type": "object"
109    }
110  },
111  "description": "Configuration schema for the OpenCode application",
112  "properties": {
113    "agents": {
114      "additionalProperties": {
115        "description": "Agent configuration",
116        "properties": {
117          "maxTokens": {
118            "description": "Maximum tokens for the agent",
119            "minimum": 1,
120            "type": "integer"
121          },
122          "model": {
123            "description": "Model ID for the agent",
124            "enum": [
125              "gpt-4.1",
126              "llama-3.3-70b-versatile",
127              "azure.gpt-4.1",
128              "openrouter.gpt-4o",
129              "openrouter.o1-mini",
130              "openrouter.claude-3-haiku",
131              "claude-3-opus",
132              "gpt-4o",
133              "gpt-4o-mini",
134              "o1",
135              "meta-llama/llama-4-maverick-17b-128e-instruct",
136              "azure.o3-mini",
137              "openrouter.gpt-4o-mini",
138              "openrouter.o1",
139              "claude-3.5-haiku",
140              "o4-mini",
141              "azure.gpt-4.1-mini",
142              "openrouter.o3",
143              "grok-3-beta",
144              "o3-mini",
145              "qwen-qwq",
146              "azure.o1",
147              "openrouter.gemini-2.5-flash",
148              "openrouter.gemini-2.5",
149              "o1-mini",
150              "azure.gpt-4o",
151              "openrouter.gpt-4.1-mini",
152              "openrouter.claude-3.5-sonnet",
153              "openrouter.o3-mini",
154              "gpt-4.1-mini",
155              "gpt-4.5-preview",
156              "gpt-4.1-nano",
157              "deepseek-r1-distill-llama-70b",
158              "azure.gpt-4o-mini",
159              "openrouter.gpt-4.1",
160              "bedrock.claude-3.7-sonnet",
161              "claude-3-haiku",
162              "o3",
163              "gemini-2.0-flash-lite",
164              "azure.o3",
165              "azure.gpt-4.5-preview",
166              "openrouter.claude-3-opus",
167              "grok-3-mini-fast-beta",
168              "claude-4-sonnet",
169              "azure.o4-mini",
170              "grok-3-fast-beta",
171              "claude-3.5-sonnet",
172              "azure.o1-mini",
173              "openrouter.claude-3.7-sonnet",
174              "openrouter.gpt-4.5-preview",
175              "grok-3-mini-beta",
176              "claude-3.7-sonnet",
177              "gemini-2.0-flash",
178              "openrouter.deepseek-r1-free",
179              "vertexai.gemini-2.5-flash",
180              "vertexai.gemini-2.5",
181              "o1-pro",
182              "gemini-2.5",
183              "meta-llama/llama-4-scout-17b-16e-instruct",
184              "azure.gpt-4.1-nano",
185              "openrouter.gpt-4.1-nano",
186              "gemini-2.5-flash",
187              "openrouter.o4-mini",
188              "openrouter.claude-3.5-haiku",
189              "claude-4-opus",
190              "openrouter.o1-pro",
191              "copilot.gpt-4o",
192              "copilot.gpt-4o-mini",
193              "copilot.gpt-4.1",
194              "copilot.claude-3.5-sonnet",
195              "copilot.claude-3.7-sonnet",
196              "copilot.claude-sonnet-4",
197              "copilot.o1",
198              "copilot.o3-mini",
199              "copilot.o4-mini",
200              "copilot.gemini-2.0-flash",
201              "copilot.gemini-2.5-pro"
202            ],
203            "type": "string"
204          },
205          "reasoningEffort": {
206            "description": "Reasoning effort for models that support it (OpenAI, Anthropic)",
207            "enum": [
208              "low",
209              "medium",
210              "high"
211            ],
212            "type": "string"
213          }
214        },
215        "required": [
216          "model"
217        ],
218        "type": "object"
219      },
220      "description": "Agent configurations",
221      "properties": {
222        "coder": {
223          "$ref": "#/definitions/agent"
224        },
225        "task": {
226          "$ref": "#/definitions/agent"
227        },
228        "title": {
229          "$ref": "#/definitions/agent"
230        }
231      },
232      "type": "object"
233    },
234    "contextPaths": {
235      "default": [
236        ".github/copilot-instructions.md",
237        ".cursorrules",
238        ".cursor/rules/",
239        "CLAUDE.md",
240        "CLAUDE.local.md",
241        "opencode.md",
242        "opencode.local.md",
243        "OpenCode.md",
244        "OpenCode.local.md",
245        "OPENCODE.md",
246        "OPENCODE.local.md"
247      ],
248      "description": "Context paths for the application",
249      "items": {
250        "type": "string"
251      },
252      "type": "array"
253    },
254    "data": {
255      "description": "Storage configuration",
256      "properties": {
257        "directory": {
258          "default": ".opencode",
259          "description": "Directory where application data is stored",
260          "type": "string"
261        }
262      },
263      "required": [
264        "directory"
265      ],
266      "type": "object"
267    },
268    "debug": {
269      "default": false,
270      "description": "Enable debug mode",
271      "type": "boolean"
272    },
273    "debugLSP": {
274      "default": false,
275      "description": "Enable LSP debug mode",
276      "type": "boolean"
277    },
278    "lsp": {
279      "additionalProperties": {
280        "description": "LSP configuration for a language",
281        "properties": {
282          "args": {
283            "description": "Command arguments for the LSP server",
284            "items": {
285              "type": "string"
286            },
287            "type": "array"
288          },
289          "command": {
290            "description": "Command to execute for the LSP server",
291            "type": "string"
292          },
293          "disabled": {
294            "default": false,
295            "description": "Whether the LSP is disabled",
296            "type": "boolean"
297          },
298          "options": {
299            "description": "Additional options for the LSP server",
300            "type": "object"
301          }
302        },
303        "required": [
304          "command"
305        ],
306        "type": "object"
307      },
308      "description": "Language Server Protocol configurations",
309      "type": "object"
310    },
311    "mcpServers": {
312      "additionalProperties": {
313        "description": "MCP server configuration",
314        "properties": {
315          "args": {
316            "description": "Command arguments for the MCP server",
317            "items": {
318              "type": "string"
319            },
320            "type": "array"
321          },
322          "command": {
323            "description": "Command to execute for the MCP server",
324            "type": "string"
325          },
326          "env": {
327            "description": "Environment variables for the MCP server",
328            "items": {
329              "type": "string"
330            },
331            "type": "array"
332          },
333          "headers": {
334            "additionalProperties": {
335              "type": "string"
336            },
337            "description": "HTTP headers for SSE type MCP servers",
338            "type": "object"
339          },
340          "type": {
341            "default": "stdio",
342            "description": "Type of MCP server",
343            "enum": [
344              "stdio",
345              "sse"
346            ],
347            "type": "string"
348          },
349          "url": {
350            "description": "URL for SSE type MCP servers",
351            "type": "string"
352          }
353        },
354        "required": [
355          "command"
356        ],
357        "type": "object"
358      },
359      "description": "Model Control Protocol server configurations",
360      "type": "object"
361    },
362    "providers": {
363      "additionalProperties": {
364        "description": "Provider configuration",
365        "properties": {
366          "apiKey": {
367            "description": "API key for the provider",
368            "type": "string"
369          },
370          "disabled": {
371            "default": false,
372            "description": "Whether the provider is disabled",
373            "type": "boolean"
374          },
375          "provider": {
376            "description": "Provider type",
377            "enum": [
378              "anthropic",
379              "openai",
380              "gemini",
381              "groq",
382              "openrouter",
383              "bedrock",
384              "azure",
385              "vertexai",
386              "copilot"
387            ],
388            "type": "string"
389          }
390        },
391        "type": "object"
392      },
393      "description": "LLM provider configurations",
394      "type": "object"
395    },
396    "tui": {
397      "description": "Terminal User Interface configuration",
398      "properties": {
399        "theme": {
400          "default": "opencode",
401          "description": "TUI theme name",
402          "enum": [
403            "opencode",
404            "catppuccin",
405            "dracula",
406            "flexoki",
407            "gruvbox",
408            "monokai",
409            "onedark",
410            "tokyonight",
411            "tron"
412          ],
413          "type": "string"
414        }
415      },
416      "type": "object"
417    },
418    "wd": {
419      "description": "Working directory for the application",
420      "type": "string"
421    }
422  },
423  "title": "OpenCode Configuration",
424  "type": "object"
425}