opencode-schema.json 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  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. "claude-3.7-sonnet",
  16. "gpt-4o",
  17. "meta-llama/llama-4-scout-17b-16e-instruct",
  18. "azure.o4-mini",
  19. "openrouter.gpt-4o",
  20. "claude-3-opus",
  21. "azure.o3-mini",
  22. "azure.gpt-4.1-mini",
  23. "azure.o1",
  24. "openrouter.gpt-4.1",
  25. "openrouter.o1-pro",
  26. "openrouter.claude-3.5-sonnet",
  27. "o1-mini",
  28. "bedrock.claude-3.7-sonnet",
  29. "claude-3.5-sonnet",
  30. "openrouter.o3",
  31. "openrouter.claude-3-haiku",
  32. "gpt-4.1",
  33. "openrouter.o1-mini",
  34. "openrouter.claude-3-opus",
  35. "o4-mini",
  36. "gemini-2.5-flash",
  37. "llama-3.3-70b-versatile",
  38. "azure.gpt-4.1",
  39. "azure.o1-mini",
  40. "openrouter.gpt-4o-mini",
  41. "claude-3.5-haiku",
  42. "o1",
  43. "deepseek-r1-distill-llama-70b",
  44. "meta-llama/llama-4-maverick-17b-128e-instruct",
  45. "openrouter.claude-3.5-haiku",
  46. "openrouter.gpt-4.5-preview",
  47. "openrouter.o1",
  48. "gemini-2.0-flash",
  49. "openrouter.o3-mini",
  50. "claude-3-haiku",
  51. "o1-pro",
  52. "o3",
  53. "gemini-2.5",
  54. "openrouter.claude-3.7-sonnet",
  55. "gpt-4.1-mini",
  56. "openrouter.gpt-4.1-mini",
  57. "openrouter.gpt-4.1-nano",
  58. "openrouter.o4-mini",
  59. "azure.gpt-4o-mini",
  60. "gpt-4.5-preview",
  61. "gpt-4o-mini",
  62. "azure.gpt-4.5-preview",
  63. "azure.gpt-4o",
  64. "gpt-4.1-nano",
  65. "qwen-qwq",
  66. "azure.gpt-4.1-nano",
  67. "azure.o3",
  68. "openrouter.gemini-2.5-flash",
  69. "openrouter.gemini-2.5",
  70. "o3-mini",
  71. "gemini-2.0-flash-lite"
  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. "claude-3.7-sonnet",
  106. "gpt-4o",
  107. "meta-llama/llama-4-scout-17b-16e-instruct",
  108. "azure.o4-mini",
  109. "openrouter.gpt-4o",
  110. "claude-3-opus",
  111. "azure.o3-mini",
  112. "azure.gpt-4.1-mini",
  113. "azure.o1",
  114. "openrouter.gpt-4.1",
  115. "openrouter.o1-pro",
  116. "openrouter.claude-3.5-sonnet",
  117. "o1-mini",
  118. "bedrock.claude-3.7-sonnet",
  119. "claude-3.5-sonnet",
  120. "openrouter.o3",
  121. "openrouter.claude-3-haiku",
  122. "gpt-4.1",
  123. "openrouter.o1-mini",
  124. "openrouter.claude-3-opus",
  125. "o4-mini",
  126. "gemini-2.5-flash",
  127. "llama-3.3-70b-versatile",
  128. "azure.gpt-4.1",
  129. "azure.o1-mini",
  130. "openrouter.gpt-4o-mini",
  131. "claude-3.5-haiku",
  132. "o1",
  133. "deepseek-r1-distill-llama-70b",
  134. "meta-llama/llama-4-maverick-17b-128e-instruct",
  135. "openrouter.claude-3.5-haiku",
  136. "openrouter.gpt-4.5-preview",
  137. "openrouter.o1",
  138. "gemini-2.0-flash",
  139. "openrouter.o3-mini",
  140. "claude-3-haiku",
  141. "o1-pro",
  142. "o3",
  143. "gemini-2.5",
  144. "openrouter.claude-3.7-sonnet",
  145. "gpt-4.1-mini",
  146. "openrouter.gpt-4.1-mini",
  147. "openrouter.gpt-4.1-nano",
  148. "openrouter.o4-mini",
  149. "azure.gpt-4o-mini",
  150. "gpt-4.5-preview",
  151. "gpt-4o-mini",
  152. "azure.gpt-4.5-preview",
  153. "azure.gpt-4o",
  154. "gpt-4.1-nano",
  155. "qwen-qwq",
  156. "azure.gpt-4.1-nano",
  157. "azure.o3",
  158. "openrouter.gemini-2.5-flash",
  159. "openrouter.gemini-2.5",
  160. "o3-mini",
  161. "gemini-2.0-flash-lite"
  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. ],
  370. "type": "string"
  371. }
  372. },
  373. "type": "object"
  374. },
  375. "wd": {
  376. "description": "Working directory for the application",
  377. "type": "string"
  378. }
  379. },
  380. "title": "OpenCode Configuration",
  381. "type": "object"
  382. }