opencode-schema.json 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  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. "gemini-2.0-flash",
  16. "bedrock.claude-3.7-sonnet",
  17. "claude-3-opus",
  18. "claude-3.5-sonnet",
  19. "gpt-4o-mini",
  20. "o1",
  21. "o3-mini",
  22. "o1-pro",
  23. "o4-mini",
  24. "claude-3-haiku",
  25. "gpt-4o",
  26. "o3",
  27. "gpt-4.1-mini",
  28. "gpt-4.5-preview",
  29. "gemini-2.5-flash",
  30. "claude-3.5-haiku",
  31. "gpt-4.1",
  32. "gemini-2.0-flash-lite",
  33. "claude-3.7-sonnet",
  34. "o1-mini",
  35. "gpt-4.1-nano",
  36. "gemini-2.5"
  37. ],
  38. "type": "string"
  39. },
  40. "reasoningEffort": {
  41. "description": "Reasoning effort for models that support it (OpenAI, Anthropic)",
  42. "enum": [
  43. "low",
  44. "medium",
  45. "high"
  46. ],
  47. "type": "string"
  48. }
  49. },
  50. "required": [
  51. "model"
  52. ],
  53. "type": "object"
  54. }
  55. },
  56. "description": "Configuration schema for the OpenCode application",
  57. "properties": {
  58. "agents": {
  59. "additionalProperties": {
  60. "description": "Agent configuration",
  61. "properties": {
  62. "maxTokens": {
  63. "description": "Maximum tokens for the agent",
  64. "minimum": 1,
  65. "type": "integer"
  66. },
  67. "model": {
  68. "description": "Model ID for the agent",
  69. "enum": [
  70. "gemini-2.0-flash",
  71. "bedrock.claude-3.7-sonnet",
  72. "claude-3-opus",
  73. "claude-3.5-sonnet",
  74. "gpt-4o-mini",
  75. "o1",
  76. "o3-mini",
  77. "o1-pro",
  78. "o4-mini",
  79. "claude-3-haiku",
  80. "gpt-4o",
  81. "o3",
  82. "gpt-4.1-mini",
  83. "gpt-4.5-preview",
  84. "gemini-2.5-flash",
  85. "claude-3.5-haiku",
  86. "gpt-4.1",
  87. "gemini-2.0-flash-lite",
  88. "claude-3.7-sonnet",
  89. "o1-mini",
  90. "gpt-4.1-nano",
  91. "gemini-2.5"
  92. ],
  93. "type": "string"
  94. },
  95. "reasoningEffort": {
  96. "description": "Reasoning effort for models that support it (OpenAI, Anthropic)",
  97. "enum": [
  98. "low",
  99. "medium",
  100. "high"
  101. ],
  102. "type": "string"
  103. }
  104. },
  105. "required": [
  106. "model"
  107. ],
  108. "type": "object"
  109. },
  110. "description": "Agent configurations",
  111. "properties": {
  112. "coder": {
  113. "$ref": "#/definitions/agent"
  114. },
  115. "task": {
  116. "$ref": "#/definitions/agent"
  117. },
  118. "title": {
  119. "$ref": "#/definitions/agent"
  120. }
  121. },
  122. "type": "object"
  123. },
  124. "data": {
  125. "description": "Storage configuration",
  126. "properties": {
  127. "directory": {
  128. "default": ".opencode",
  129. "description": "Directory where application data is stored",
  130. "type": "string"
  131. }
  132. },
  133. "required": [
  134. "directory"
  135. ],
  136. "type": "object"
  137. },
  138. "debug": {
  139. "default": false,
  140. "description": "Enable debug mode",
  141. "type": "boolean"
  142. },
  143. "debugLSP": {
  144. "default": false,
  145. "description": "Enable LSP debug mode",
  146. "type": "boolean"
  147. },
  148. "lsp": {
  149. "additionalProperties": {
  150. "description": "LSP configuration for a language",
  151. "properties": {
  152. "args": {
  153. "description": "Command arguments for the LSP server",
  154. "items": {
  155. "type": "string"
  156. },
  157. "type": "array"
  158. },
  159. "command": {
  160. "description": "Command to execute for the LSP server",
  161. "type": "string"
  162. },
  163. "disabled": {
  164. "default": false,
  165. "description": "Whether the LSP is disabled",
  166. "type": "boolean"
  167. },
  168. "options": {
  169. "description": "Additional options for the LSP server",
  170. "type": "object"
  171. }
  172. },
  173. "required": [
  174. "command"
  175. ],
  176. "type": "object"
  177. },
  178. "description": "Language Server Protocol configurations",
  179. "type": "object"
  180. },
  181. "mcpServers": {
  182. "additionalProperties": {
  183. "description": "MCP server configuration",
  184. "properties": {
  185. "args": {
  186. "description": "Command arguments for the MCP server",
  187. "items": {
  188. "type": "string"
  189. },
  190. "type": "array"
  191. },
  192. "command": {
  193. "description": "Command to execute for the MCP server",
  194. "type": "string"
  195. },
  196. "env": {
  197. "description": "Environment variables for the MCP server",
  198. "items": {
  199. "type": "string"
  200. },
  201. "type": "array"
  202. },
  203. "headers": {
  204. "additionalProperties": {
  205. "type": "string"
  206. },
  207. "description": "HTTP headers for SSE type MCP servers",
  208. "type": "object"
  209. },
  210. "type": {
  211. "default": "stdio",
  212. "description": "Type of MCP server",
  213. "enum": [
  214. "stdio",
  215. "sse"
  216. ],
  217. "type": "string"
  218. },
  219. "url": {
  220. "description": "URL for SSE type MCP servers",
  221. "type": "string"
  222. }
  223. },
  224. "required": [
  225. "command"
  226. ],
  227. "type": "object"
  228. },
  229. "description": "Model Control Protocol server configurations",
  230. "type": "object"
  231. },
  232. "providers": {
  233. "additionalProperties": {
  234. "description": "Provider configuration",
  235. "properties": {
  236. "apiKey": {
  237. "description": "API key for the provider",
  238. "type": "string"
  239. },
  240. "disabled": {
  241. "default": false,
  242. "description": "Whether the provider is disabled",
  243. "type": "boolean"
  244. },
  245. "provider": {
  246. "description": "Provider type",
  247. "enum": [
  248. "anthropic",
  249. "openai",
  250. "gemini",
  251. "groq",
  252. "bedrock"
  253. ],
  254. "type": "string"
  255. }
  256. },
  257. "type": "object"
  258. },
  259. "description": "LLM provider configurations",
  260. "type": "object"
  261. },
  262. "wd": {
  263. "description": "Working directory for the application",
  264. "type": "string"
  265. }
  266. },
  267. "title": "OpenCode Configuration",
  268. "type": "object"
  269. }