opencode-schema.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  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. "azure.o1-mini",
  16. "openrouter.gemini-2.5-flash",
  17. "claude-3-haiku",
  18. "o1-mini",
  19. "qwen-qwq",
  20. "llama-3.3-70b-versatile",
  21. "openrouter.claude-3.5-sonnet",
  22. "o3-mini",
  23. "o4-mini",
  24. "gpt-4.1",
  25. "azure.o3-mini",
  26. "openrouter.gpt-4.1-nano",
  27. "openrouter.gpt-4o",
  28. "gemini-2.5",
  29. "azure.gpt-4o",
  30. "azure.gpt-4o-mini",
  31. "claude-3.7-sonnet",
  32. "azure.gpt-4.1-nano",
  33. "openrouter.o1",
  34. "openrouter.claude-3-haiku",
  35. "bedrock.claude-3.7-sonnet",
  36. "gemini-2.5-flash",
  37. "azure.o3",
  38. "openrouter.gemini-2.5",
  39. "openrouter.o3",
  40. "openrouter.o3-mini",
  41. "openrouter.gpt-4.1-mini",
  42. "openrouter.gpt-4.5-preview",
  43. "openrouter.gpt-4o-mini",
  44. "gpt-4.1-mini",
  45. "meta-llama/llama-4-scout-17b-16e-instruct",
  46. "openrouter.o1-mini",
  47. "gpt-4.5-preview",
  48. "o3",
  49. "openrouter.claude-3.5-haiku",
  50. "claude-3-opus",
  51. "o1-pro",
  52. "gemini-2.0-flash",
  53. "azure.o4-mini",
  54. "openrouter.o4-mini",
  55. "claude-3.5-sonnet",
  56. "meta-llama/llama-4-maverick-17b-128e-instruct",
  57. "azure.o1",
  58. "openrouter.gpt-4.1",
  59. "openrouter.o1-pro",
  60. "gpt-4.1-nano",
  61. "azure.gpt-4.5-preview",
  62. "openrouter.claude-3-opus",
  63. "gpt-4o-mini",
  64. "o1",
  65. "deepseek-r1-distill-llama-70b",
  66. "azure.gpt-4.1",
  67. "gpt-4o",
  68. "azure.gpt-4.1-mini",
  69. "openrouter.claude-3.7-sonnet",
  70. "claude-3.5-haiku",
  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. "azure.o1-mini",
  106. "openrouter.gemini-2.5-flash",
  107. "claude-3-haiku",
  108. "o1-mini",
  109. "qwen-qwq",
  110. "llama-3.3-70b-versatile",
  111. "openrouter.claude-3.5-sonnet",
  112. "o3-mini",
  113. "o4-mini",
  114. "gpt-4.1",
  115. "azure.o3-mini",
  116. "openrouter.gpt-4.1-nano",
  117. "openrouter.gpt-4o",
  118. "gemini-2.5",
  119. "azure.gpt-4o",
  120. "azure.gpt-4o-mini",
  121. "claude-3.7-sonnet",
  122. "azure.gpt-4.1-nano",
  123. "openrouter.o1",
  124. "openrouter.claude-3-haiku",
  125. "bedrock.claude-3.7-sonnet",
  126. "gemini-2.5-flash",
  127. "azure.o3",
  128. "openrouter.gemini-2.5",
  129. "openrouter.o3",
  130. "openrouter.o3-mini",
  131. "openrouter.gpt-4.1-mini",
  132. "openrouter.gpt-4.5-preview",
  133. "openrouter.gpt-4o-mini",
  134. "gpt-4.1-mini",
  135. "meta-llama/llama-4-scout-17b-16e-instruct",
  136. "openrouter.o1-mini",
  137. "gpt-4.5-preview",
  138. "o3",
  139. "openrouter.claude-3.5-haiku",
  140. "claude-3-opus",
  141. "o1-pro",
  142. "gemini-2.0-flash",
  143. "azure.o4-mini",
  144. "openrouter.o4-mini",
  145. "claude-3.5-sonnet",
  146. "meta-llama/llama-4-maverick-17b-128e-instruct",
  147. "azure.o1",
  148. "openrouter.gpt-4.1",
  149. "openrouter.o1-pro",
  150. "gpt-4.1-nano",
  151. "azure.gpt-4.5-preview",
  152. "openrouter.claude-3-opus",
  153. "gpt-4o-mini",
  154. "o1",
  155. "deepseek-r1-distill-llama-70b",
  156. "azure.gpt-4.1",
  157. "gpt-4o",
  158. "azure.gpt-4.1-mini",
  159. "openrouter.claude-3.7-sonnet",
  160. "claude-3.5-haiku",
  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. "customTheme": {
  358. "additionalProperties": {
  359. "oneOf": [
  360. {
  361. "pattern": "^#[0-9a-fA-F]{6}$",
  362. "type": "string"
  363. },
  364. {
  365. "additionalProperties": false,
  366. "properties": {
  367. "dark": {
  368. "pattern": "^#[0-9a-fA-F]{6}$",
  369. "type": "string"
  370. },
  371. "light": {
  372. "pattern": "^#[0-9a-fA-F]{6}$",
  373. "type": "string"
  374. }
  375. },
  376. "required": [
  377. "dark",
  378. "light"
  379. ],
  380. "type": "object"
  381. }
  382. ]
  383. },
  384. "description": "Custom theme color definitions",
  385. "type": "object"
  386. },
  387. "theme": {
  388. "default": "opencode",
  389. "description": "TUI theme name",
  390. "enum": [
  391. "opencode",
  392. "catppuccin",
  393. "dracula",
  394. "flexoki",
  395. "gruvbox",
  396. "monokai",
  397. "onedark",
  398. "tokyonight",
  399. "tron",
  400. "custom"
  401. ],
  402. "type": "string"
  403. }
  404. },
  405. "type": "object"
  406. },
  407. "wd": {
  408. "description": "Working directory for the application",
  409. "type": "string"
  410. }
  411. },
  412. "title": "OpenCode Configuration",
  413. "type": "object"
  414. }