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