opencode-schema.json 11 KB

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