opencode-schema.json 10.0 KB

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