opencode-schema.json 12 KB

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