@neurocode-ai/web 1.18.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (702) hide show
  1. package/README.md +54 -0
  2. package/astro.config.mjs +324 -0
  3. package/config.mjs +14 -0
  4. package/package.json +44 -0
  5. package/public/apple-touch-icon-v3.png +1 -0
  6. package/public/apple-touch-icon.png +1 -0
  7. package/public/favicon-96x96-v3.png +1 -0
  8. package/public/favicon-96x96.png +1 -0
  9. package/public/favicon-v3.ico +1 -0
  10. package/public/favicon-v3.svg +1 -0
  11. package/public/favicon.ico +1 -0
  12. package/public/favicon.svg +1 -0
  13. package/public/robots.txt +6 -0
  14. package/public/site.webmanifest +1 -0
  15. package/public/social-share-zen.png +1 -0
  16. package/public/social-share.png +1 -0
  17. package/public/theme.json +183 -0
  18. package/public/web-app-manifest-192x192.png +1 -0
  19. package/public/web-app-manifest-512x512.png +1 -0
  20. package/src/assets/lander/check.svg +2 -0
  21. package/src/assets/lander/copy.svg +2 -0
  22. package/src/assets/lander/screenshot-github.png +0 -0
  23. package/src/assets/lander/screenshot-splash.png +0 -0
  24. package/src/assets/lander/screenshot-vscode.png +0 -0
  25. package/src/assets/lander/screenshot.png +0 -0
  26. package/src/assets/logo-dark.svg +18 -0
  27. package/src/assets/logo-light.svg +18 -0
  28. package/src/assets/logo-ornate-dark.svg +18 -0
  29. package/src/assets/logo-ornate-light.svg +18 -0
  30. package/src/assets/web/web-homepage-active-session.png +0 -0
  31. package/src/assets/web/web-homepage-new-session.png +0 -0
  32. package/src/assets/web/web-homepage-see-servers.png +0 -0
  33. package/src/components/Footer.astro +125 -0
  34. package/src/components/Head.astro +54 -0
  35. package/src/components/Header.astro +136 -0
  36. package/src/components/Hero.astro +11 -0
  37. package/src/components/Lander.astro +721 -0
  38. package/src/components/LanguageSelect.astro +29 -0
  39. package/src/components/Share.tsx +644 -0
  40. package/src/components/SiteTitle.astro +59 -0
  41. package/src/components/icons/custom.tsx +87 -0
  42. package/src/components/icons/index.tsx +4454 -0
  43. package/src/components/share/common.tsx +128 -0
  44. package/src/components/share/content-bash.module.css +85 -0
  45. package/src/components/share/content-bash.tsx +67 -0
  46. package/src/components/share/content-code.module.css +26 -0
  47. package/src/components/share/content-code.tsx +30 -0
  48. package/src/components/share/content-diff.module.css +153 -0
  49. package/src/components/share/content-diff.tsx +240 -0
  50. package/src/components/share/content-error.module.css +64 -0
  51. package/src/components/share/content-error.tsx +25 -0
  52. package/src/components/share/content-markdown.module.css +154 -0
  53. package/src/components/share/content-markdown.tsx +74 -0
  54. package/src/components/share/content-text.module.css +63 -0
  55. package/src/components/share/content-text.tsx +38 -0
  56. package/src/components/share/copy-button.module.css +30 -0
  57. package/src/components/share/copy-button.tsx +36 -0
  58. package/src/components/share/part.module.css +428 -0
  59. package/src/components/share/part.tsx +816 -0
  60. package/src/components/share.module.css +832 -0
  61. package/src/content/docs/acp.mdx +156 -0
  62. package/src/content/docs/agents.mdx +781 -0
  63. package/src/content/docs/ar/acp.mdx +156 -0
  64. package/src/content/docs/ar/agents.mdx +754 -0
  65. package/src/content/docs/ar/cli.mdx +616 -0
  66. package/src/content/docs/ar/commands.mdx +322 -0
  67. package/src/content/docs/ar/config.mdx +685 -0
  68. package/src/content/docs/ar/custom-tools.mdx +196 -0
  69. package/src/content/docs/ar/ecosystem.mdx +78 -0
  70. package/src/content/docs/ar/enterprise.mdx +165 -0
  71. package/src/content/docs/ar/formatters.mdx +131 -0
  72. package/src/content/docs/ar/github.mdx +321 -0
  73. package/src/content/docs/ar/gitlab.mdx +195 -0
  74. package/src/content/docs/ar/go.mdx +224 -0
  75. package/src/content/docs/ar/ide.mdx +48 -0
  76. package/src/content/docs/ar/index.mdx +344 -0
  77. package/src/content/docs/ar/keybinds.mdx +194 -0
  78. package/src/content/docs/ar/lsp.mdx +207 -0
  79. package/src/content/docs/ar/mcp-servers.mdx +511 -0
  80. package/src/content/docs/ar/models.mdx +222 -0
  81. package/src/content/docs/ar/network.mdx +57 -0
  82. package/src/content/docs/ar/permissions.mdx +235 -0
  83. package/src/content/docs/ar/plugins.mdx +385 -0
  84. package/src/content/docs/ar/providers.mdx +1983 -0
  85. package/src/content/docs/ar/rules.mdx +180 -0
  86. package/src/content/docs/ar/sdk.mdx +463 -0
  87. package/src/content/docs/ar/server.mdx +287 -0
  88. package/src/content/docs/ar/share.mdx +127 -0
  89. package/src/content/docs/ar/skills.mdx +222 -0
  90. package/src/content/docs/ar/themes.mdx +369 -0
  91. package/src/content/docs/ar/tools.mdx +341 -0
  92. package/src/content/docs/ar/troubleshooting.mdx +299 -0
  93. package/src/content/docs/ar/tui.mdx +426 -0
  94. package/src/content/docs/ar/web.mdx +142 -0
  95. package/src/content/docs/ar/windows-wsl.mdx +113 -0
  96. package/src/content/docs/ar/zen.mdx +332 -0
  97. package/src/content/docs/bs/acp.mdx +156 -0
  98. package/src/content/docs/bs/agents.mdx +754 -0
  99. package/src/content/docs/bs/cli.mdx +614 -0
  100. package/src/content/docs/bs/commands.mdx +316 -0
  101. package/src/content/docs/bs/config.mdx +685 -0
  102. package/src/content/docs/bs/custom-tools.mdx +195 -0
  103. package/src/content/docs/bs/ecosystem.mdx +78 -0
  104. package/src/content/docs/bs/enterprise.mdx +165 -0
  105. package/src/content/docs/bs/formatters.mdx +124 -0
  106. package/src/content/docs/bs/github.mdx +311 -0
  107. package/src/content/docs/bs/gitlab.mdx +188 -0
  108. package/src/content/docs/bs/go.mdx +238 -0
  109. package/src/content/docs/bs/ide.mdx +47 -0
  110. package/src/content/docs/bs/index.mdx +323 -0
  111. package/src/content/docs/bs/keybinds.mdx +194 -0
  112. package/src/content/docs/bs/lsp.mdx +204 -0
  113. package/src/content/docs/bs/mcp-servers.mdx +482 -0
  114. package/src/content/docs/bs/models.mdx +201 -0
  115. package/src/content/docs/bs/network.mdx +51 -0
  116. package/src/content/docs/bs/permissions.mdx +228 -0
  117. package/src/content/docs/bs/plugins.mdx +371 -0
  118. package/src/content/docs/bs/providers.mdx +1993 -0
  119. package/src/content/docs/bs/rules.mdx +180 -0
  120. package/src/content/docs/bs/sdk.mdx +463 -0
  121. package/src/content/docs/bs/server.mdx +284 -0
  122. package/src/content/docs/bs/share.mdx +127 -0
  123. package/src/content/docs/bs/skills.mdx +222 -0
  124. package/src/content/docs/bs/themes.mdx +369 -0
  125. package/src/content/docs/bs/tools.mdx +341 -0
  126. package/src/content/docs/bs/troubleshooting.mdx +300 -0
  127. package/src/content/docs/bs/tui.mdx +432 -0
  128. package/src/content/docs/bs/web.mdx +142 -0
  129. package/src/content/docs/bs/windows-wsl.mdx +113 -0
  130. package/src/content/docs/bs/zen.mdx +350 -0
  131. package/src/content/docs/cli.mdx +733 -0
  132. package/src/content/docs/commands.mdx +323 -0
  133. package/src/content/docs/config.mdx +941 -0
  134. package/src/content/docs/custom-tools.mdx +196 -0
  135. package/src/content/docs/da/acp.mdx +156 -0
  136. package/src/content/docs/da/agents.mdx +755 -0
  137. package/src/content/docs/da/cli.mdx +617 -0
  138. package/src/content/docs/da/commands.mdx +323 -0
  139. package/src/content/docs/da/config.mdx +688 -0
  140. package/src/content/docs/da/custom-tools.mdx +196 -0
  141. package/src/content/docs/da/ecosystem.mdx +78 -0
  142. package/src/content/docs/da/enterprise.mdx +170 -0
  143. package/src/content/docs/da/formatters.mdx +131 -0
  144. package/src/content/docs/da/github.mdx +321 -0
  145. package/src/content/docs/da/gitlab.mdx +195 -0
  146. package/src/content/docs/da/go.mdx +238 -0
  147. package/src/content/docs/da/ide.mdx +48 -0
  148. package/src/content/docs/da/index.mdx +360 -0
  149. package/src/content/docs/da/keybinds.mdx +194 -0
  150. package/src/content/docs/da/lsp.mdx +208 -0
  151. package/src/content/docs/da/mcp-servers.mdx +511 -0
  152. package/src/content/docs/da/models.mdx +223 -0
  153. package/src/content/docs/da/network.mdx +57 -0
  154. package/src/content/docs/da/permissions.mdx +235 -0
  155. package/src/content/docs/da/plugins.mdx +389 -0
  156. package/src/content/docs/da/providers.mdx +1981 -0
  157. package/src/content/docs/da/rules.mdx +180 -0
  158. package/src/content/docs/da/sdk.mdx +463 -0
  159. package/src/content/docs/da/server.mdx +287 -0
  160. package/src/content/docs/da/share.mdx +128 -0
  161. package/src/content/docs/da/skills.mdx +222 -0
  162. package/src/content/docs/da/themes.mdx +369 -0
  163. package/src/content/docs/da/tools.mdx +341 -0
  164. package/src/content/docs/da/troubleshooting.mdx +300 -0
  165. package/src/content/docs/da/tui.mdx +426 -0
  166. package/src/content/docs/da/web.mdx +142 -0
  167. package/src/content/docs/da/windows-wsl.mdx +113 -0
  168. package/src/content/docs/da/zen.mdx +345 -0
  169. package/src/content/docs/de/acp.mdx +156 -0
  170. package/src/content/docs/de/agents.mdx +741 -0
  171. package/src/content/docs/de/cli.mdx +616 -0
  172. package/src/content/docs/de/commands.mdx +323 -0
  173. package/src/content/docs/de/config.mdx +684 -0
  174. package/src/content/docs/de/custom-tools.mdx +170 -0
  175. package/src/content/docs/de/ecosystem.mdx +78 -0
  176. package/src/content/docs/de/enterprise.mdx +170 -0
  177. package/src/content/docs/de/formatters.mdx +131 -0
  178. package/src/content/docs/de/github.mdx +321 -0
  179. package/src/content/docs/de/gitlab.mdx +195 -0
  180. package/src/content/docs/de/go.mdx +226 -0
  181. package/src/content/docs/de/ide.mdx +48 -0
  182. package/src/content/docs/de/index.mdx +356 -0
  183. package/src/content/docs/de/keybinds.mdx +194 -0
  184. package/src/content/docs/de/lsp.mdx +207 -0
  185. package/src/content/docs/de/mcp-servers.mdx +511 -0
  186. package/src/content/docs/de/models.mdx +223 -0
  187. package/src/content/docs/de/network.mdx +57 -0
  188. package/src/content/docs/de/permissions.mdx +235 -0
  189. package/src/content/docs/de/plugins.mdx +384 -0
  190. package/src/content/docs/de/providers.mdx +1987 -0
  191. package/src/content/docs/de/rules.mdx +190 -0
  192. package/src/content/docs/de/sdk.mdx +465 -0
  193. package/src/content/docs/de/server.mdx +291 -0
  194. package/src/content/docs/de/share.mdx +130 -0
  195. package/src/content/docs/de/skills.mdx +222 -0
  196. package/src/content/docs/de/themes.mdx +372 -0
  197. package/src/content/docs/de/tools.mdx +352 -0
  198. package/src/content/docs/de/troubleshooting.mdx +300 -0
  199. package/src/content/docs/de/tui.mdx +429 -0
  200. package/src/content/docs/de/web.mdx +142 -0
  201. package/src/content/docs/de/windows-wsl.mdx +115 -0
  202. package/src/content/docs/de/zen.mdx +327 -0
  203. package/src/content/docs/ecosystem.mdx +83 -0
  204. package/src/content/docs/enterprise.mdx +169 -0
  205. package/src/content/docs/es/acp.mdx +156 -0
  206. package/src/content/docs/es/agents.mdx +755 -0
  207. package/src/content/docs/es/cli.mdx +616 -0
  208. package/src/content/docs/es/commands.mdx +323 -0
  209. package/src/content/docs/es/config.mdx +685 -0
  210. package/src/content/docs/es/custom-tools.mdx +196 -0
  211. package/src/content/docs/es/ecosystem.mdx +78 -0
  212. package/src/content/docs/es/enterprise.mdx +170 -0
  213. package/src/content/docs/es/formatters.mdx +131 -0
  214. package/src/content/docs/es/github.mdx +321 -0
  215. package/src/content/docs/es/gitlab.mdx +195 -0
  216. package/src/content/docs/es/go.mdx +238 -0
  217. package/src/content/docs/es/ide.mdx +48 -0
  218. package/src/content/docs/es/index.mdx +345 -0
  219. package/src/content/docs/es/keybinds.mdx +194 -0
  220. package/src/content/docs/es/lsp.mdx +208 -0
  221. package/src/content/docs/es/mcp-servers.mdx +511 -0
  222. package/src/content/docs/es/models.mdx +223 -0
  223. package/src/content/docs/es/network.mdx +57 -0
  224. package/src/content/docs/es/permissions.mdx +235 -0
  225. package/src/content/docs/es/plugins.mdx +389 -0
  226. package/src/content/docs/es/providers.mdx +1989 -0
  227. package/src/content/docs/es/rules.mdx +180 -0
  228. package/src/content/docs/es/sdk.mdx +463 -0
  229. package/src/content/docs/es/server.mdx +287 -0
  230. package/src/content/docs/es/share.mdx +128 -0
  231. package/src/content/docs/es/skills.mdx +222 -0
  232. package/src/content/docs/es/themes.mdx +369 -0
  233. package/src/content/docs/es/tools.mdx +341 -0
  234. package/src/content/docs/es/troubleshooting.mdx +300 -0
  235. package/src/content/docs/es/tui.mdx +429 -0
  236. package/src/content/docs/es/web.mdx +142 -0
  237. package/src/content/docs/es/windows-wsl.mdx +113 -0
  238. package/src/content/docs/es/zen.mdx +345 -0
  239. package/src/content/docs/formatters.mdx +143 -0
  240. package/src/content/docs/fr/acp.mdx +156 -0
  241. package/src/content/docs/fr/agents.mdx +755 -0
  242. package/src/content/docs/fr/cli.mdx +617 -0
  243. package/src/content/docs/fr/commands.mdx +322 -0
  244. package/src/content/docs/fr/config.mdx +686 -0
  245. package/src/content/docs/fr/custom-tools.mdx +170 -0
  246. package/src/content/docs/fr/ecosystem.mdx +78 -0
  247. package/src/content/docs/fr/enterprise.mdx +165 -0
  248. package/src/content/docs/fr/formatters.mdx +131 -0
  249. package/src/content/docs/fr/github.mdx +322 -0
  250. package/src/content/docs/fr/gitlab.mdx +195 -0
  251. package/src/content/docs/fr/go.mdx +224 -0
  252. package/src/content/docs/fr/ide.mdx +48 -0
  253. package/src/content/docs/fr/index.mdx +344 -0
  254. package/src/content/docs/fr/keybinds.mdx +194 -0
  255. package/src/content/docs/fr/lsp.mdx +208 -0
  256. package/src/content/docs/fr/mcp-servers.mdx +511 -0
  257. package/src/content/docs/fr/models.mdx +222 -0
  258. package/src/content/docs/fr/network.mdx +57 -0
  259. package/src/content/docs/fr/permissions.mdx +235 -0
  260. package/src/content/docs/fr/plugins.mdx +384 -0
  261. package/src/content/docs/fr/providers.mdx +1996 -0
  262. package/src/content/docs/fr/rules.mdx +180 -0
  263. package/src/content/docs/fr/sdk.mdx +463 -0
  264. package/src/content/docs/fr/server.mdx +287 -0
  265. package/src/content/docs/fr/share.mdx +128 -0
  266. package/src/content/docs/fr/skills.mdx +222 -0
  267. package/src/content/docs/fr/themes.mdx +369 -0
  268. package/src/content/docs/fr/tools.mdx +341 -0
  269. package/src/content/docs/fr/troubleshooting.mdx +300 -0
  270. package/src/content/docs/fr/tui.mdx +429 -0
  271. package/src/content/docs/fr/web.mdx +142 -0
  272. package/src/content/docs/fr/windows-wsl.mdx +113 -0
  273. package/src/content/docs/fr/zen.mdx +327 -0
  274. package/src/content/docs/github.mdx +321 -0
  275. package/src/content/docs/gitlab.mdx +195 -0
  276. package/src/content/docs/go.mdx +238 -0
  277. package/src/content/docs/ide.mdx +48 -0
  278. package/src/content/docs/index.mdx +360 -0
  279. package/src/content/docs/it/acp.mdx +155 -0
  280. package/src/content/docs/it/agents.mdx +753 -0
  281. package/src/content/docs/it/cli.mdx +617 -0
  282. package/src/content/docs/it/commands.mdx +322 -0
  283. package/src/content/docs/it/config.mdx +685 -0
  284. package/src/content/docs/it/custom-tools.mdx +196 -0
  285. package/src/content/docs/it/ecosystem.mdx +78 -0
  286. package/src/content/docs/it/enterprise.mdx +165 -0
  287. package/src/content/docs/it/formatters.mdx +132 -0
  288. package/src/content/docs/it/github.mdx +321 -0
  289. package/src/content/docs/it/gitlab.mdx +195 -0
  290. package/src/content/docs/it/go.mdx +236 -0
  291. package/src/content/docs/it/ide.mdx +48 -0
  292. package/src/content/docs/it/index.mdx +344 -0
  293. package/src/content/docs/it/keybinds.mdx +194 -0
  294. package/src/content/docs/it/lsp.mdx +208 -0
  295. package/src/content/docs/it/mcp-servers.mdx +511 -0
  296. package/src/content/docs/it/models.mdx +222 -0
  297. package/src/content/docs/it/network.mdx +57 -0
  298. package/src/content/docs/it/permissions.mdx +235 -0
  299. package/src/content/docs/it/plugins.mdx +388 -0
  300. package/src/content/docs/it/providers.mdx +1964 -0
  301. package/src/content/docs/it/rules.mdx +180 -0
  302. package/src/content/docs/it/sdk.mdx +463 -0
  303. package/src/content/docs/it/server.mdx +284 -0
  304. package/src/content/docs/it/share.mdx +127 -0
  305. package/src/content/docs/it/skills.mdx +222 -0
  306. package/src/content/docs/it/themes.mdx +369 -0
  307. package/src/content/docs/it/tools.mdx +341 -0
  308. package/src/content/docs/it/troubleshooting.mdx +299 -0
  309. package/src/content/docs/it/tui.mdx +426 -0
  310. package/src/content/docs/it/web.mdx +142 -0
  311. package/src/content/docs/it/windows-wsl.mdx +113 -0
  312. package/src/content/docs/it/zen.mdx +345 -0
  313. package/src/content/docs/ja/acp.mdx +155 -0
  314. package/src/content/docs/ja/agents.mdx +751 -0
  315. package/src/content/docs/ja/cli.mdx +616 -0
  316. package/src/content/docs/ja/commands.mdx +322 -0
  317. package/src/content/docs/ja/config.mdx +684 -0
  318. package/src/content/docs/ja/custom-tools.mdx +196 -0
  319. package/src/content/docs/ja/ecosystem.mdx +78 -0
  320. package/src/content/docs/ja/enterprise.mdx +166 -0
  321. package/src/content/docs/ja/formatters.mdx +132 -0
  322. package/src/content/docs/ja/github.mdx +322 -0
  323. package/src/content/docs/ja/gitlab.mdx +195 -0
  324. package/src/content/docs/ja/go.mdx +224 -0
  325. package/src/content/docs/ja/ide.mdx +48 -0
  326. package/src/content/docs/ja/index.mdx +350 -0
  327. package/src/content/docs/ja/keybinds.mdx +194 -0
  328. package/src/content/docs/ja/lsp.mdx +208 -0
  329. package/src/content/docs/ja/mcp-servers.mdx +511 -0
  330. package/src/content/docs/ja/models.mdx +221 -0
  331. package/src/content/docs/ja/network.mdx +55 -0
  332. package/src/content/docs/ja/permissions.mdx +282 -0
  333. package/src/content/docs/ja/plugins.mdx +461 -0
  334. package/src/content/docs/ja/providers.mdx +1998 -0
  335. package/src/content/docs/ja/rules.mdx +179 -0
  336. package/src/content/docs/ja/sdk.mdx +463 -0
  337. package/src/content/docs/ja/server.mdx +282 -0
  338. package/src/content/docs/ja/share.mdx +128 -0
  339. package/src/content/docs/ja/skills.mdx +222 -0
  340. package/src/content/docs/ja/themes.mdx +667 -0
  341. package/src/content/docs/ja/tools.mdx +341 -0
  342. package/src/content/docs/ja/troubleshooting.mdx +300 -0
  343. package/src/content/docs/ja/tui.mdx +423 -0
  344. package/src/content/docs/ja/web.mdx +143 -0
  345. package/src/content/docs/ja/windows-wsl.mdx +116 -0
  346. package/src/content/docs/ja/zen.mdx +327 -0
  347. package/src/content/docs/keybinds.mdx +299 -0
  348. package/src/content/docs/ko/acp.mdx +156 -0
  349. package/src/content/docs/ko/agents.mdx +754 -0
  350. package/src/content/docs/ko/cli.mdx +616 -0
  351. package/src/content/docs/ko/commands.mdx +323 -0
  352. package/src/content/docs/ko/config.mdx +685 -0
  353. package/src/content/docs/ko/custom-tools.mdx +196 -0
  354. package/src/content/docs/ko/ecosystem.mdx +78 -0
  355. package/src/content/docs/ko/enterprise.mdx +165 -0
  356. package/src/content/docs/ko/formatters.mdx +132 -0
  357. package/src/content/docs/ko/github.mdx +321 -0
  358. package/src/content/docs/ko/gitlab.mdx +195 -0
  359. package/src/content/docs/ko/go.mdx +224 -0
  360. package/src/content/docs/ko/ide.mdx +48 -0
  361. package/src/content/docs/ko/index.mdx +344 -0
  362. package/src/content/docs/ko/keybinds.mdx +194 -0
  363. package/src/content/docs/ko/lsp.mdx +208 -0
  364. package/src/content/docs/ko/mcp-servers.mdx +511 -0
  365. package/src/content/docs/ko/models.mdx +223 -0
  366. package/src/content/docs/ko/network.mdx +57 -0
  367. package/src/content/docs/ko/permissions.mdx +235 -0
  368. package/src/content/docs/ko/plugins.mdx +388 -0
  369. package/src/content/docs/ko/providers.mdx +1984 -0
  370. package/src/content/docs/ko/rules.mdx +179 -0
  371. package/src/content/docs/ko/sdk.mdx +463 -0
  372. package/src/content/docs/ko/server.mdx +287 -0
  373. package/src/content/docs/ko/share.mdx +128 -0
  374. package/src/content/docs/ko/skills.mdx +222 -0
  375. package/src/content/docs/ko/themes.mdx +369 -0
  376. package/src/content/docs/ko/tools.mdx +341 -0
  377. package/src/content/docs/ko/troubleshooting.mdx +303 -0
  378. package/src/content/docs/ko/tui.mdx +425 -0
  379. package/src/content/docs/ko/web.mdx +142 -0
  380. package/src/content/docs/ko/windows-wsl.mdx +119 -0
  381. package/src/content/docs/ko/zen.mdx +327 -0
  382. package/src/content/docs/lsp.mdx +214 -0
  383. package/src/content/docs/mcp-servers.mdx +512 -0
  384. package/src/content/docs/models.mdx +223 -0
  385. package/src/content/docs/nb/acp.mdx +156 -0
  386. package/src/content/docs/nb/agents.mdx +754 -0
  387. package/src/content/docs/nb/cli.mdx +617 -0
  388. package/src/content/docs/nb/commands.mdx +323 -0
  389. package/src/content/docs/nb/config.mdx +688 -0
  390. package/src/content/docs/nb/custom-tools.mdx +196 -0
  391. package/src/content/docs/nb/ecosystem.mdx +78 -0
  392. package/src/content/docs/nb/enterprise.mdx +170 -0
  393. package/src/content/docs/nb/formatters.mdx +131 -0
  394. package/src/content/docs/nb/github.mdx +325 -0
  395. package/src/content/docs/nb/gitlab.mdx +195 -0
  396. package/src/content/docs/nb/go.mdx +238 -0
  397. package/src/content/docs/nb/ide.mdx +48 -0
  398. package/src/content/docs/nb/index.mdx +359 -0
  399. package/src/content/docs/nb/keybinds.mdx +194 -0
  400. package/src/content/docs/nb/lsp.mdx +208 -0
  401. package/src/content/docs/nb/mcp-servers.mdx +624 -0
  402. package/src/content/docs/nb/models.mdx +223 -0
  403. package/src/content/docs/nb/network.mdx +57 -0
  404. package/src/content/docs/nb/permissions.mdx +235 -0
  405. package/src/content/docs/nb/plugins.mdx +389 -0
  406. package/src/content/docs/nb/providers.mdx +1956 -0
  407. package/src/content/docs/nb/rules.mdx +180 -0
  408. package/src/content/docs/nb/sdk.mdx +463 -0
  409. package/src/content/docs/nb/server.mdx +287 -0
  410. package/src/content/docs/nb/share.mdx +128 -0
  411. package/src/content/docs/nb/skills.mdx +222 -0
  412. package/src/content/docs/nb/themes.mdx +369 -0
  413. package/src/content/docs/nb/tools.mdx +341 -0
  414. package/src/content/docs/nb/troubleshooting.mdx +225 -0
  415. package/src/content/docs/nb/tui.mdx +429 -0
  416. package/src/content/docs/nb/web.mdx +105 -0
  417. package/src/content/docs/nb/windows-wsl.mdx +113 -0
  418. package/src/content/docs/nb/zen.mdx +345 -0
  419. package/src/content/docs/network.mdx +57 -0
  420. package/src/content/docs/permissions.mdx +256 -0
  421. package/src/content/docs/pl/acp.mdx +158 -0
  422. package/src/content/docs/pl/agents.mdx +754 -0
  423. package/src/content/docs/pl/cli.mdx +617 -0
  424. package/src/content/docs/pl/commands.mdx +323 -0
  425. package/src/content/docs/pl/config.mdx +680 -0
  426. package/src/content/docs/pl/custom-tools.mdx +196 -0
  427. package/src/content/docs/pl/ecosystem.mdx +78 -0
  428. package/src/content/docs/pl/enterprise.mdx +170 -0
  429. package/src/content/docs/pl/formatters.mdx +131 -0
  430. package/src/content/docs/pl/github.mdx +321 -0
  431. package/src/content/docs/pl/gitlab.mdx +195 -0
  432. package/src/content/docs/pl/go.mdx +230 -0
  433. package/src/content/docs/pl/ide.mdx +48 -0
  434. package/src/content/docs/pl/index.mdx +347 -0
  435. package/src/content/docs/pl/keybinds.mdx +194 -0
  436. package/src/content/docs/pl/lsp.mdx +208 -0
  437. package/src/content/docs/pl/mcp-servers.mdx +511 -0
  438. package/src/content/docs/pl/models.mdx +223 -0
  439. package/src/content/docs/pl/network.mdx +57 -0
  440. package/src/content/docs/pl/permissions.mdx +235 -0
  441. package/src/content/docs/pl/plugins.mdx +385 -0
  442. package/src/content/docs/pl/providers.mdx +1986 -0
  443. package/src/content/docs/pl/rules.mdx +180 -0
  444. package/src/content/docs/pl/sdk.mdx +463 -0
  445. package/src/content/docs/pl/server.mdx +287 -0
  446. package/src/content/docs/pl/share.mdx +128 -0
  447. package/src/content/docs/pl/skills.mdx +222 -0
  448. package/src/content/docs/pl/themes.mdx +369 -0
  449. package/src/content/docs/pl/tools.mdx +341 -0
  450. package/src/content/docs/pl/troubleshooting.mdx +300 -0
  451. package/src/content/docs/pl/tui.mdx +429 -0
  452. package/src/content/docs/pl/web.mdx +142 -0
  453. package/src/content/docs/pl/windows-wsl.mdx +113 -0
  454. package/src/content/docs/pl/zen.mdx +344 -0
  455. package/src/content/docs/plugins.mdx +389 -0
  456. package/src/content/docs/policies.mdx +137 -0
  457. package/src/content/docs/providers.mdx +2501 -0
  458. package/src/content/docs/pt-br/acp.mdx +156 -0
  459. package/src/content/docs/pt-br/agents.mdx +755 -0
  460. package/src/content/docs/pt-br/cli.mdx +616 -0
  461. package/src/content/docs/pt-br/commands.mdx +322 -0
  462. package/src/content/docs/pt-br/config.mdx +687 -0
  463. package/src/content/docs/pt-br/custom-tools.mdx +196 -0
  464. package/src/content/docs/pt-br/ecosystem.mdx +78 -0
  465. package/src/content/docs/pt-br/enterprise.mdx +166 -0
  466. package/src/content/docs/pt-br/formatters.mdx +131 -0
  467. package/src/content/docs/pt-br/github.mdx +321 -0
  468. package/src/content/docs/pt-br/gitlab.mdx +195 -0
  469. package/src/content/docs/pt-br/go.mdx +238 -0
  470. package/src/content/docs/pt-br/ide.mdx +48 -0
  471. package/src/content/docs/pt-br/index.mdx +344 -0
  472. package/src/content/docs/pt-br/keybinds.mdx +194 -0
  473. package/src/content/docs/pt-br/lsp.mdx +208 -0
  474. package/src/content/docs/pt-br/mcp-servers.mdx +511 -0
  475. package/src/content/docs/pt-br/models.mdx +222 -0
  476. package/src/content/docs/pt-br/network.mdx +57 -0
  477. package/src/content/docs/pt-br/permissions.mdx +235 -0
  478. package/src/content/docs/pt-br/plugins.mdx +388 -0
  479. package/src/content/docs/pt-br/providers.mdx +1989 -0
  480. package/src/content/docs/pt-br/rules.mdx +180 -0
  481. package/src/content/docs/pt-br/sdk.mdx +463 -0
  482. package/src/content/docs/pt-br/server.mdx +284 -0
  483. package/src/content/docs/pt-br/share.mdx +127 -0
  484. package/src/content/docs/pt-br/skills.mdx +222 -0
  485. package/src/content/docs/pt-br/themes.mdx +369 -0
  486. package/src/content/docs/pt-br/tools.mdx +341 -0
  487. package/src/content/docs/pt-br/troubleshooting.mdx +299 -0
  488. package/src/content/docs/pt-br/tui.mdx +426 -0
  489. package/src/content/docs/pt-br/web.mdx +142 -0
  490. package/src/content/docs/pt-br/windows-wsl.mdx +113 -0
  491. package/src/content/docs/pt-br/zen.mdx +327 -0
  492. package/src/content/docs/references.mdx +157 -0
  493. package/src/content/docs/ru/acp.mdx +156 -0
  494. package/src/content/docs/ru/agents.mdx +754 -0
  495. package/src/content/docs/ru/cli.mdx +617 -0
  496. package/src/content/docs/ru/commands.mdx +323 -0
  497. package/src/content/docs/ru/config.mdx +685 -0
  498. package/src/content/docs/ru/custom-tools.mdx +170 -0
  499. package/src/content/docs/ru/ecosystem.mdx +78 -0
  500. package/src/content/docs/ru/enterprise.mdx +168 -0
  501. package/src/content/docs/ru/formatters.mdx +119 -0
  502. package/src/content/docs/ru/github.mdx +321 -0
  503. package/src/content/docs/ru/gitlab.mdx +195 -0
  504. package/src/content/docs/ru/go.mdx +238 -0
  505. package/src/content/docs/ru/ide.mdx +48 -0
  506. package/src/content/docs/ru/index.mdx +356 -0
  507. package/src/content/docs/ru/keybinds.mdx +194 -0
  508. package/src/content/docs/ru/lsp.mdx +207 -0
  509. package/src/content/docs/ru/mcp-servers.mdx +511 -0
  510. package/src/content/docs/ru/models.mdx +223 -0
  511. package/src/content/docs/ru/network.mdx +57 -0
  512. package/src/content/docs/ru/permissions.mdx +235 -0
  513. package/src/content/docs/ru/plugins.mdx +385 -0
  514. package/src/content/docs/ru/providers.mdx +1987 -0
  515. package/src/content/docs/ru/rules.mdx +180 -0
  516. package/src/content/docs/ru/sdk.mdx +463 -0
  517. package/src/content/docs/ru/server.mdx +287 -0
  518. package/src/content/docs/ru/share.mdx +128 -0
  519. package/src/content/docs/ru/skills.mdx +222 -0
  520. package/src/content/docs/ru/themes.mdx +369 -0
  521. package/src/content/docs/ru/tools.mdx +341 -0
  522. package/src/content/docs/ru/troubleshooting.mdx +300 -0
  523. package/src/content/docs/ru/tui.mdx +429 -0
  524. package/src/content/docs/ru/web.mdx +142 -0
  525. package/src/content/docs/ru/windows-wsl.mdx +113 -0
  526. package/src/content/docs/ru/zen.mdx +345 -0
  527. package/src/content/docs/rules.mdx +188 -0
  528. package/src/content/docs/sdk.mdx +463 -0
  529. package/src/content/docs/server.mdx +287 -0
  530. package/src/content/docs/share.mdx +128 -0
  531. package/src/content/docs/skills.mdx +222 -0
  532. package/src/content/docs/th/acp.mdx +156 -0
  533. package/src/content/docs/th/agents.mdx +744 -0
  534. package/src/content/docs/th/cli.mdx +618 -0
  535. package/src/content/docs/th/commands.mdx +320 -0
  536. package/src/content/docs/th/config.mdx +690 -0
  537. package/src/content/docs/th/custom-tools.mdx +196 -0
  538. package/src/content/docs/th/ecosystem.mdx +78 -0
  539. package/src/content/docs/th/enterprise.mdx +170 -0
  540. package/src/content/docs/th/formatters.mdx +131 -0
  541. package/src/content/docs/th/github.mdx +321 -0
  542. package/src/content/docs/th/gitlab.mdx +195 -0
  543. package/src/content/docs/th/go.mdx +224 -0
  544. package/src/content/docs/th/ide.mdx +48 -0
  545. package/src/content/docs/th/index.mdx +360 -0
  546. package/src/content/docs/th/keybinds.mdx +194 -0
  547. package/src/content/docs/th/lsp.mdx +208 -0
  548. package/src/content/docs/th/mcp-servers.mdx +511 -0
  549. package/src/content/docs/th/models.mdx +223 -0
  550. package/src/content/docs/th/network.mdx +57 -0
  551. package/src/content/docs/th/permissions.mdx +235 -0
  552. package/src/content/docs/th/plugins.mdx +389 -0
  553. package/src/content/docs/th/providers.mdx +2532 -0
  554. package/src/content/docs/th/rules.mdx +180 -0
  555. package/src/content/docs/th/sdk.mdx +463 -0
  556. package/src/content/docs/th/server.mdx +287 -0
  557. package/src/content/docs/th/share.mdx +128 -0
  558. package/src/content/docs/th/skills.mdx +222 -0
  559. package/src/content/docs/th/themes.mdx +369 -0
  560. package/src/content/docs/th/tools.mdx +341 -0
  561. package/src/content/docs/th/troubleshooting.mdx +300 -0
  562. package/src/content/docs/th/tui.mdx +429 -0
  563. package/src/content/docs/th/web.mdx +142 -0
  564. package/src/content/docs/th/windows-wsl.mdx +113 -0
  565. package/src/content/docs/th/zen.mdx +329 -0
  566. package/src/content/docs/themes.mdx +369 -0
  567. package/src/content/docs/tools.mdx +345 -0
  568. package/src/content/docs/tr/acp.mdx +156 -0
  569. package/src/content/docs/tr/agents.mdx +754 -0
  570. package/src/content/docs/tr/cli.mdx +617 -0
  571. package/src/content/docs/tr/commands.mdx +323 -0
  572. package/src/content/docs/tr/config.mdx +687 -0
  573. package/src/content/docs/tr/custom-tools.mdx +196 -0
  574. package/src/content/docs/tr/ecosystem.mdx +78 -0
  575. package/src/content/docs/tr/enterprise.mdx +170 -0
  576. package/src/content/docs/tr/formatters.mdx +131 -0
  577. package/src/content/docs/tr/github.mdx +321 -0
  578. package/src/content/docs/tr/gitlab.mdx +195 -0
  579. package/src/content/docs/tr/go.mdx +224 -0
  580. package/src/content/docs/tr/ide.mdx +48 -0
  581. package/src/content/docs/tr/index.mdx +347 -0
  582. package/src/content/docs/tr/keybinds.mdx +194 -0
  583. package/src/content/docs/tr/lsp.mdx +208 -0
  584. package/src/content/docs/tr/mcp-servers.mdx +511 -0
  585. package/src/content/docs/tr/models.mdx +223 -0
  586. package/src/content/docs/tr/network.mdx +57 -0
  587. package/src/content/docs/tr/permissions.mdx +235 -0
  588. package/src/content/docs/tr/plugins.mdx +388 -0
  589. package/src/content/docs/tr/providers.mdx +1988 -0
  590. package/src/content/docs/tr/rules.mdx +180 -0
  591. package/src/content/docs/tr/sdk.mdx +463 -0
  592. package/src/content/docs/tr/server.mdx +285 -0
  593. package/src/content/docs/tr/share.mdx +127 -0
  594. package/src/content/docs/tr/skills.mdx +222 -0
  595. package/src/content/docs/tr/themes.mdx +369 -0
  596. package/src/content/docs/tr/tools.mdx +341 -0
  597. package/src/content/docs/tr/troubleshooting.mdx +299 -0
  598. package/src/content/docs/tr/tui.mdx +427 -0
  599. package/src/content/docs/tr/web.mdx +142 -0
  600. package/src/content/docs/tr/windows-wsl.mdx +113 -0
  601. package/src/content/docs/tr/zen.mdx +327 -0
  602. package/src/content/docs/troubleshooting.mdx +314 -0
  603. package/src/content/docs/tui.mdx +427 -0
  604. package/src/content/docs/web.mdx +142 -0
  605. package/src/content/docs/windows-wsl.mdx +112 -0
  606. package/src/content/docs/zen.mdx +345 -0
  607. package/src/content/docs/zh-cn/acp.mdx +156 -0
  608. package/src/content/docs/zh-cn/agents.mdx +754 -0
  609. package/src/content/docs/zh-cn/cli.mdx +617 -0
  610. package/src/content/docs/zh-cn/commands.mdx +322 -0
  611. package/src/content/docs/zh-cn/config.mdx +683 -0
  612. package/src/content/docs/zh-cn/custom-tools.mdx +196 -0
  613. package/src/content/docs/zh-cn/ecosystem.mdx +78 -0
  614. package/src/content/docs/zh-cn/enterprise.mdx +165 -0
  615. package/src/content/docs/zh-cn/formatters.mdx +132 -0
  616. package/src/content/docs/zh-cn/github.mdx +321 -0
  617. package/src/content/docs/zh-cn/gitlab.mdx +194 -0
  618. package/src/content/docs/zh-cn/go.mdx +224 -0
  619. package/src/content/docs/zh-cn/ide.mdx +48 -0
  620. package/src/content/docs/zh-cn/index.mdx +343 -0
  621. package/src/content/docs/zh-cn/keybinds.mdx +194 -0
  622. package/src/content/docs/zh-cn/lsp.mdx +208 -0
  623. package/src/content/docs/zh-cn/mcp-servers.mdx +511 -0
  624. package/src/content/docs/zh-cn/models.mdx +222 -0
  625. package/src/content/docs/zh-cn/network.mdx +57 -0
  626. package/src/content/docs/zh-cn/permissions.mdx +235 -0
  627. package/src/content/docs/zh-cn/plugins.mdx +388 -0
  628. package/src/content/docs/zh-cn/providers.mdx +1949 -0
  629. package/src/content/docs/zh-cn/rules.mdx +180 -0
  630. package/src/content/docs/zh-cn/sdk.mdx +463 -0
  631. package/src/content/docs/zh-cn/server.mdx +284 -0
  632. package/src/content/docs/zh-cn/share.mdx +127 -0
  633. package/src/content/docs/zh-cn/skills.mdx +222 -0
  634. package/src/content/docs/zh-cn/themes.mdx +369 -0
  635. package/src/content/docs/zh-cn/tools.mdx +341 -0
  636. package/src/content/docs/zh-cn/troubleshooting.mdx +299 -0
  637. package/src/content/docs/zh-cn/tui.mdx +426 -0
  638. package/src/content/docs/zh-cn/web.mdx +142 -0
  639. package/src/content/docs/zh-cn/windows-wsl.mdx +112 -0
  640. package/src/content/docs/zh-cn/zen.mdx +327 -0
  641. package/src/content/docs/zh-tw/acp.mdx +156 -0
  642. package/src/content/docs/zh-tw/agents.mdx +754 -0
  643. package/src/content/docs/zh-tw/cli.mdx +617 -0
  644. package/src/content/docs/zh-tw/commands.mdx +322 -0
  645. package/src/content/docs/zh-tw/config.mdx +687 -0
  646. package/src/content/docs/zh-tw/custom-tools.mdx +196 -0
  647. package/src/content/docs/zh-tw/ecosystem.mdx +78 -0
  648. package/src/content/docs/zh-tw/enterprise.mdx +165 -0
  649. package/src/content/docs/zh-tw/formatters.mdx +132 -0
  650. package/src/content/docs/zh-tw/github.mdx +321 -0
  651. package/src/content/docs/zh-tw/gitlab.mdx +194 -0
  652. package/src/content/docs/zh-tw/go.mdx +224 -0
  653. package/src/content/docs/zh-tw/ide.mdx +48 -0
  654. package/src/content/docs/zh-tw/index.mdx +343 -0
  655. package/src/content/docs/zh-tw/keybinds.mdx +194 -0
  656. package/src/content/docs/zh-tw/lsp.mdx +208 -0
  657. package/src/content/docs/zh-tw/mcp-servers.mdx +511 -0
  658. package/src/content/docs/zh-tw/models.mdx +222 -0
  659. package/src/content/docs/zh-tw/network.mdx +57 -0
  660. package/src/content/docs/zh-tw/permissions.mdx +235 -0
  661. package/src/content/docs/zh-tw/plugins.mdx +388 -0
  662. package/src/content/docs/zh-tw/providers.mdx +1970 -0
  663. package/src/content/docs/zh-tw/rules.mdx +180 -0
  664. package/src/content/docs/zh-tw/sdk.mdx +463 -0
  665. package/src/content/docs/zh-tw/server.mdx +284 -0
  666. package/src/content/docs/zh-tw/share.mdx +127 -0
  667. package/src/content/docs/zh-tw/skills.mdx +222 -0
  668. package/src/content/docs/zh-tw/themes.mdx +369 -0
  669. package/src/content/docs/zh-tw/tools.mdx +341 -0
  670. package/src/content/docs/zh-tw/troubleshooting.mdx +299 -0
  671. package/src/content/docs/zh-tw/tui.mdx +426 -0
  672. package/src/content/docs/zh-tw/web.mdx +142 -0
  673. package/src/content/docs/zh-tw/windows-wsl.mdx +112 -0
  674. package/src/content/docs/zh-tw/zen.mdx +333 -0
  675. package/src/content/i18n/ar.json +75 -0
  676. package/src/content/i18n/bs.json +75 -0
  677. package/src/content/i18n/da.json +75 -0
  678. package/src/content/i18n/de.json +75 -0
  679. package/src/content/i18n/en.json +75 -0
  680. package/src/content/i18n/es.json +75 -0
  681. package/src/content/i18n/fr.json +75 -0
  682. package/src/content/i18n/it.json +75 -0
  683. package/src/content/i18n/ja.json +75 -0
  684. package/src/content/i18n/ko.json +75 -0
  685. package/src/content/i18n/nb.json +75 -0
  686. package/src/content/i18n/pl.json +75 -0
  687. package/src/content/i18n/pt-BR.json +75 -0
  688. package/src/content/i18n/ru.json +75 -0
  689. package/src/content/i18n/th.json +75 -0
  690. package/src/content/i18n/tr.json +75 -0
  691. package/src/content/i18n/zh-CN.json +75 -0
  692. package/src/content/i18n/zh-TW.json +75 -0
  693. package/src/content.config.ts +16 -0
  694. package/src/i18n/locales.ts +117 -0
  695. package/src/middleware.ts +94 -0
  696. package/src/pages/[...slug].md.ts +34 -0
  697. package/src/pages/s/[id].astro +164 -0
  698. package/src/styles/custom.css +405 -0
  699. package/src/types/lang-map.d.ts +27 -0
  700. package/src/types/starlight-virtual.d.ts +14 -0
  701. package/sst-env.d.ts +10 -0
  702. package/tsconfig.json +9 -0
@@ -0,0 +1,2501 @@
1
+ ---
2
+ title: Providers
3
+ description: Using any LLM provider in OpenCode.
4
+ ---
5
+
6
+ import config from "../../../config.mjs"
7
+ export const console = config.console
8
+
9
+ OpenCode uses the [AI SDK](https://ai-sdk.dev/) and [Models.dev](https://models.dev) to support **75+ LLM providers** and it supports running local models.
10
+
11
+ To add a provider you need to:
12
+
13
+ 1. Add the API keys for the provider using the `/connect` command.
14
+ 2. Configure the provider in your OpenCode config.
15
+
16
+ ---
17
+
18
+ ### Credentials
19
+
20
+ When you add a provider's API keys with the `/connect` command, they are stored
21
+ in `~/.local/share/opencode/auth.json`.
22
+
23
+ ---
24
+
25
+ ### Config
26
+
27
+ You can customize the providers through the `provider` section in your OpenCode
28
+ config.
29
+
30
+ ---
31
+
32
+ #### Base URL
33
+
34
+ You can customize the base URL for any provider by setting the `baseURL` option. This is useful when using proxy services or custom endpoints.
35
+
36
+ ```json title="opencode.json" {6}
37
+ {
38
+ "$schema": "https://opencode.ai/config.json",
39
+ "provider": {
40
+ "anthropic": {
41
+ "options": {
42
+ "baseURL": "https://api.anthropic.com/v1"
43
+ }
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ---
50
+
51
+ #### Hiding models
52
+
53
+ You can hide specific models from the `/models` picker for a provider using the `blacklist` option. This is useful when a provider exposes models you don't want to use or select.
54
+
55
+ ```json title="opencode.json" {6}
56
+ {
57
+ "$schema": "https://opencode.ai/config.json",
58
+ "provider": {
59
+ "anthropic": {
60
+ "blacklist": ["claude-opus-4-20250514"]
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ The inverse `whitelist` option hides every model except the ones listed.
67
+
68
+ ```json title="opencode.json" {6}
69
+ {
70
+ "$schema": "https://opencode.ai/config.json",
71
+ "provider": {
72
+ "anthropic": {
73
+ "whitelist": ["claude-sonnet-4-20250514"]
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ Both options take an array of model IDs — the same IDs shown in the `/models` picker.
80
+
81
+ - `blacklist` removes the listed models from the picker.
82
+ - `whitelist` keeps only the listed models and hides the rest.
83
+ - You can combine them: `whitelist` narrows the set, then `blacklist` removes entries from it.
84
+
85
+ ---
86
+
87
+ ## OpenCode Zen
88
+
89
+ OpenCode Zen is a list of models provided by the OpenCode team that have been
90
+ tested and verified to work well with OpenCode. [Learn more](/docs/zen).
91
+
92
+ :::tip
93
+ If you are new, we recommend starting with OpenCode Zen.
94
+ :::
95
+
96
+ 1. Run the `/connect` command in the TUI, select `OpenCode Zen`, and head to [opencode.ai/auth](https://opencode.ai/zen).
97
+
98
+ ```txt
99
+ /connect
100
+ ```
101
+
102
+ 2. Sign in, add your billing details, and copy your API key.
103
+
104
+ 3. Paste your API key.
105
+
106
+ ```txt
107
+ ┌ API key
108
+
109
+
110
+ └ enter
111
+ ```
112
+
113
+ 4. Run `/models` in the TUI to see the list of models we recommend.
114
+
115
+ ```txt
116
+ /models
117
+ ```
118
+
119
+ It works like any other provider in OpenCode and is completely optional to use.
120
+
121
+ ---
122
+
123
+ ## OpenCode Go
124
+
125
+ OpenCode Go is a low cost subscription plan that provides reliable access to popular open coding models provided by the OpenCode team that have been
126
+ tested and verified to work well with OpenCode.
127
+
128
+ 1. Run the `/connect` command in the TUI, select `OpenCode Go`, and head to [opencode.ai/auth](https://opencode.ai/zen).
129
+
130
+ ```txt
131
+ /connect
132
+ ```
133
+
134
+ 2. Sign in, add your billing details, and copy your API key.
135
+
136
+ 3. Paste your API key.
137
+
138
+ ```txt
139
+ ┌ API key
140
+
141
+
142
+ └ enter
143
+ ```
144
+
145
+ 4. Run `/models` in the TUI to see the list of models we recommend.
146
+
147
+ ```txt
148
+ /models
149
+ ```
150
+
151
+ It works like any other provider in OpenCode and is completely optional to use.
152
+
153
+ ---
154
+
155
+ ## Directory
156
+
157
+ Let's look at some of the providers in detail. If you'd like to add a provider to the
158
+ list, feel free to open a PR.
159
+
160
+ :::note
161
+ Don't see a provider here? Submit a PR.
162
+ :::
163
+
164
+ ---
165
+
166
+ ### 302.AI
167
+
168
+ 1. Head over to the [302.AI console](https://302.ai/), create an account, and generate an API key.
169
+
170
+ 2. Run the `/connect` command and search for **302.AI**.
171
+
172
+ ```txt
173
+ /connect
174
+ ```
175
+
176
+ 3. Enter your 302.AI API key.
177
+
178
+ ```txt
179
+ ┌ API key
180
+
181
+
182
+ └ enter
183
+ ```
184
+
185
+ 4. Run the `/models` command to select a model.
186
+
187
+ ```txt
188
+ /models
189
+ ```
190
+
191
+ ---
192
+
193
+ ### Amazon Bedrock
194
+
195
+ To use Amazon Bedrock with OpenCode:
196
+
197
+ 1. Head over to the **Model catalog** in the Amazon Bedrock console and request
198
+ access to the models you want.
199
+
200
+ :::tip
201
+ You need to have access to the model you want in Amazon Bedrock.
202
+ :::
203
+
204
+ 2. **Configure authentication** using one of the following methods:
205
+
206
+ ***
207
+
208
+ #### Environment Variables (Quick Start)
209
+
210
+ Set one of these environment variables while running opencode:
211
+
212
+ ```bash
213
+ # Option 1: Using AWS access keys
214
+ AWS_ACCESS_KEY_ID=XXX AWS_SECRET_ACCESS_KEY=YYY opencode
215
+
216
+ # Option 2: Using named AWS profile
217
+ AWS_PROFILE=my-profile opencode
218
+
219
+ # Option 3: Using Bedrock bearer token
220
+ AWS_BEARER_TOKEN_BEDROCK=XXX opencode
221
+ ```
222
+
223
+ Or add them to your bash profile:
224
+
225
+ ```bash title="~/.bash_profile"
226
+ export AWS_PROFILE=my-dev-profile
227
+ export AWS_REGION=us-east-1
228
+ ```
229
+
230
+ ***
231
+
232
+ #### Configuration File (Recommended)
233
+
234
+ For project-specific or persistent configuration, use `opencode.json`:
235
+
236
+ ```json title="opencode.json"
237
+ {
238
+ "$schema": "https://opencode.ai/config.json",
239
+ "provider": {
240
+ "amazon-bedrock": {
241
+ "options": {
242
+ "region": "us-east-1",
243
+ "profile": "my-aws-profile"
244
+ }
245
+ }
246
+ }
247
+ }
248
+ ```
249
+
250
+ **Available options:**
251
+ - `region` - AWS region (e.g., `us-east-1`, `eu-west-1`)
252
+ - `profile` - AWS named profile from `~/.aws/credentials`
253
+ - `endpoint` - Custom endpoint URL for VPC endpoints (alias for generic `baseURL` option)
254
+
255
+ :::tip
256
+ Configuration file options take precedence over environment variables.
257
+ :::
258
+
259
+ ***
260
+
261
+ #### Advanced: VPC Endpoints
262
+
263
+ If you're using VPC endpoints for Bedrock:
264
+
265
+ ```json title="opencode.json"
266
+ {
267
+ "$schema": "https://opencode.ai/config.json",
268
+ "provider": {
269
+ "amazon-bedrock": {
270
+ "options": {
271
+ "region": "us-east-1",
272
+ "profile": "production",
273
+ "endpoint": "https://bedrock-runtime.us-east-1.vpce-xxxxx.amazonaws.com"
274
+ }
275
+ }
276
+ }
277
+ }
278
+ ```
279
+
280
+ :::note
281
+ The `endpoint` option is an alias for the generic `baseURL` option, using AWS-specific terminology. If both `endpoint` and `baseURL` are specified, `endpoint` takes precedence.
282
+ :::
283
+
284
+ ***
285
+
286
+ #### Authentication Methods
287
+ - **`AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`**: Create an IAM user and generate access keys in the AWS Console
288
+ - **`AWS_PROFILE`**: Use named profiles from `~/.aws/credentials`. First configure with `aws configure --profile my-profile` or `aws sso login`
289
+ - **`AWS_BEARER_TOKEN_BEDROCK`**: Generate long-term API keys from the Amazon Bedrock console
290
+ - **`AWS_WEB_IDENTITY_TOKEN_FILE` / `AWS_ROLE_ARN`**: For EKS IRSA (IAM Roles for Service Accounts) or other Kubernetes environments with OIDC federation. These environment variables are automatically injected by Kubernetes when using service account annotations.
291
+
292
+ ***
293
+
294
+ #### Authentication Precedence
295
+
296
+ Amazon Bedrock uses the following authentication priority:
297
+ 1. **Bearer Token** - `AWS_BEARER_TOKEN_BEDROCK` environment variable or token from `/connect` command
298
+ 2. **AWS Credential Chain** - Profile, access keys, shared credentials, IAM roles, Web Identity Tokens (EKS IRSA), instance metadata
299
+
300
+ :::note
301
+ When a bearer token is set (via `/connect` or `AWS_BEARER_TOKEN_BEDROCK`), it takes precedence over all AWS credential methods including configured profiles.
302
+ :::
303
+
304
+ 3. Run the `/models` command to select the model you want.
305
+
306
+ ```txt
307
+ /models
308
+ ```
309
+
310
+ :::note
311
+ For custom inference profiles, use the model and provider name in the key and set the `id` property to the arn. This ensures correct caching.
312
+ :::
313
+
314
+ ```json title="opencode.json"
315
+ {
316
+ "$schema": "https://opencode.ai/config.json",
317
+ "provider": {
318
+ "amazon-bedrock": {
319
+ // ...
320
+ "models": {
321
+ "anthropic-claude-sonnet-4.5": {
322
+ "id": "arn:aws:bedrock:us-east-1:xxx:application-inference-profile/yyy"
323
+ }
324
+ }
325
+ }
326
+ }
327
+ }
328
+ ```
329
+
330
+ ---
331
+
332
+ ### Anthropic
333
+
334
+ 1. Once you've signed up, run the `/connect` command and select Anthropic.
335
+
336
+ ```txt
337
+ /connect
338
+ ```
339
+
340
+ 2. Here you can select the **Claude Pro/Max** option and it'll open your browser
341
+ and ask you to authenticate.
342
+
343
+ ```txt
344
+ ┌ Select auth method
345
+
346
+ │ Manually enter API Key
347
+
348
+ ```
349
+
350
+ 3. Now all the Anthropic models should be available when you use the `/models` command.
351
+
352
+ ```txt
353
+ /models
354
+ ```
355
+
356
+ :::info
357
+ There are plugins that allow you to use your Claude Pro/Max models with
358
+ OpenCode. Anthropic explicitly prohibits this.
359
+
360
+ Previous versions of OpenCode came bundled with these plugins but that is no
361
+ longer the case as of 1.3.0
362
+
363
+ Other companies support freedom of choice with developer tooling - you can use
364
+ the following subscriptions in OpenCode with zero setup:
365
+
366
+ - ChatGPT Plus
367
+ - Github Copilot
368
+ - Gitlab Duo
369
+ :::
370
+
371
+ ---
372
+
373
+ ### Atomic Chat
374
+
375
+ You can configure opencode to use local models through [Atomic Chat](https://atomic.chat), a desktop application that runs local LLMs behind an OpenAI-compatible API server (default endpoint `http://127.0.0.1:1337/v1`).
376
+
377
+ ```json title="opencode.json" "atomic-chat" {5, 6, 8, 10-14}
378
+ {
379
+ "$schema": "https://opencode.ai/config.json",
380
+ "provider": {
381
+ "atomic-chat": {
382
+ "npm": "@ai-sdk/openai-compatible",
383
+ "name": "Atomic Chat (local)",
384
+ "options": {
385
+ "baseURL": "http://127.0.0.1:1337/v1"
386
+ },
387
+ "models": {
388
+ "<your-model-id>": {
389
+ "name": "<your-model-name>"
390
+ }
391
+ }
392
+ }
393
+ }
394
+ }
395
+ ```
396
+
397
+ In this example:
398
+
399
+ - `atomic-chat` is the custom provider ID. This can be any string you want.
400
+ - `npm` specifies the package to use for this provider. Here, `@ai-sdk/openai-compatible` is used for any OpenAI-compatible API.
401
+ - `name` is the display name for the provider in the UI.
402
+ - `options.baseURL` is the endpoint for the local server. Change the host and port to match your Atomic Chat setup.
403
+ - `models` is a map of model IDs to their display names. Each ID must match the `id` returned by `GET /v1/models` — run `curl http://127.0.0.1:1337/v1/models` to list the ids currently loaded in Atomic Chat.
404
+
405
+ :::tip
406
+ If tool calls aren't working well, pick a loaded model with strong tool-calling support (for example, a Qwen-Coder or DeepSeek-Coder variant).
407
+ :::
408
+
409
+ ---
410
+
411
+ ### Azure OpenAI
412
+
413
+ :::note
414
+ If you encounter "I'm sorry, but I cannot assist with that request" errors, try changing the content filter from **DefaultV2** to **Default** in your Azure resource.
415
+ :::
416
+
417
+ 1. Head over to the [Azure portal](https://portal.azure.com/) and create an **Azure OpenAI** resource. You'll need:
418
+ - **Resource name**: This becomes part of your API endpoint (`https://RESOURCE_NAME.openai.azure.com/`)
419
+ - **API key**: Either `KEY 1` or `KEY 2` from your resource
420
+
421
+ 2. Go to [Azure AI Foundry](https://ai.azure.com/) and deploy a model.
422
+
423
+ :::note
424
+ The deployment name must match the model name for opencode to work properly.
425
+ :::
426
+
427
+ 3. Run the `/connect` command and search for **Azure**.
428
+
429
+ ```txt
430
+ /connect
431
+ ```
432
+
433
+ 4. Enter your API key.
434
+
435
+ ```txt
436
+ ┌ API key
437
+
438
+
439
+ └ enter
440
+ ```
441
+
442
+ 5. Set your resource name as an environment variable:
443
+
444
+ ```bash
445
+ AZURE_RESOURCE_NAME=XXX opencode
446
+ ```
447
+
448
+ Or add it to your bash profile:
449
+
450
+ ```bash title="~/.bash_profile"
451
+ export AZURE_RESOURCE_NAME=XXX
452
+ ```
453
+
454
+ 6. Run the `/models` command to select your deployed model.
455
+
456
+ ```txt
457
+ /models
458
+ ```
459
+
460
+ ---
461
+
462
+ ### Azure Cognitive Services
463
+
464
+ 1. Head over to the [Azure portal](https://portal.azure.com/) and create an **Azure OpenAI** resource. You'll need:
465
+ - **Resource name**: This becomes part of your API endpoint (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`)
466
+ - **API key**: Either `KEY 1` or `KEY 2` from your resource
467
+
468
+ 2. Go to [Azure AI Foundry](https://ai.azure.com/) and deploy a model.
469
+
470
+ :::note
471
+ The deployment name must match the model name for opencode to work properly.
472
+ :::
473
+
474
+ 3. Run the `/connect` command and search for **Azure Cognitive Services**.
475
+
476
+ ```txt
477
+ /connect
478
+ ```
479
+
480
+ 4. Enter your API key.
481
+
482
+ ```txt
483
+ ┌ API key
484
+
485
+
486
+ └ enter
487
+ ```
488
+
489
+ 5. Set your resource name as an environment variable:
490
+
491
+ ```bash
492
+ AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode
493
+ ```
494
+
495
+ Or add it to your bash profile:
496
+
497
+ ```bash title="~/.bash_profile"
498
+ export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX
499
+ ```
500
+
501
+ 6. Run the `/models` command to select your deployed model.
502
+
503
+ ```txt
504
+ /models
505
+ ```
506
+
507
+ ---
508
+
509
+ ### Baseten
510
+
511
+ 1. Head over to the [Baseten](https://app.baseten.co/), create an account, and generate an API key.
512
+
513
+ 2. Run the `/connect` command and search for **Baseten**.
514
+
515
+ ```txt
516
+ /connect
517
+ ```
518
+
519
+ 3. Enter your Baseten API key.
520
+
521
+ ```txt
522
+ ┌ API key
523
+
524
+
525
+ └ enter
526
+ ```
527
+
528
+ 4. Run the `/models` command to select a model.
529
+
530
+ ```txt
531
+ /models
532
+ ```
533
+
534
+ ---
535
+
536
+ ### Cerebras
537
+
538
+ 1. Head over to the [Cerebras console](https://inference.cerebras.ai/), create an account, and generate an API key.
539
+
540
+ 2. Run the `/connect` command and search for **Cerebras**.
541
+
542
+ ```txt
543
+ /connect
544
+ ```
545
+
546
+ 3. Enter your Cerebras API key.
547
+
548
+ ```txt
549
+ ┌ API key
550
+
551
+
552
+ └ enter
553
+ ```
554
+
555
+ 4. Run the `/models` command to select a model like _Qwen 3 Coder 480B_.
556
+
557
+ ```txt
558
+ /models
559
+ ```
560
+
561
+ ---
562
+
563
+ ### Cloudflare AI Gateway
564
+
565
+ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, and more through a unified endpoint. With [Unified Billing](https://developers.cloudflare.com/ai-gateway/features/unified-billing/) you don't need separate API keys for each provider.
566
+
567
+ 1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **AI** > **AI Gateway**, and create a new gateway. Note your **Account ID** and **Gateway ID**.
568
+
569
+ 2. Run the `/connect` command and search for **Cloudflare AI Gateway**.
570
+
571
+ ```txt
572
+ /connect
573
+ ```
574
+
575
+ 3. Enter your **Account ID** when prompted.
576
+
577
+ ```txt
578
+ ┌ Enter your Cloudflare Account ID
579
+
580
+
581
+ └ enter
582
+ ```
583
+
584
+ 4. Enter your **Gateway ID** when prompted.
585
+
586
+ ```txt
587
+ ┌ Enter your Cloudflare AI Gateway ID
588
+
589
+
590
+ └ enter
591
+ ```
592
+
593
+ 5. Enter your **Cloudflare API token**.
594
+
595
+ ```txt
596
+ ┌ Gateway API token
597
+
598
+
599
+ └ enter
600
+ ```
601
+
602
+ 6. Run the `/models` command to select a model.
603
+
604
+ ```txt
605
+ /models
606
+ ```
607
+
608
+ You can also add models through your opencode config.
609
+
610
+ ```json title="opencode.json"
611
+ {
612
+ "$schema": "https://opencode.ai/config.json",
613
+ "provider": {
614
+ "cloudflare-ai-gateway": {
615
+ "models": {
616
+ "openai/gpt-4o": {},
617
+ "anthropic/claude-sonnet-4": {}
618
+ }
619
+ }
620
+ }
621
+ }
622
+ ```
623
+
624
+ Alternatively, you can set environment variables instead of using `/connect`.
625
+
626
+ ```bash title="~/.bash_profile"
627
+ export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
628
+ export CLOUDFLARE_GATEWAY_ID=your-gateway-id
629
+ export CLOUDFLARE_API_TOKEN=your-api-token
630
+ ```
631
+
632
+ ---
633
+
634
+ ### Cloudflare Workers AI
635
+
636
+ Cloudflare Workers AI lets you run AI models on Cloudflare's global network directly via REST API, with no separate provider accounts needed for supported models.
637
+
638
+ 1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **Workers AI**, and select **Use REST API** to get your **Account ID** and create an API token.
639
+
640
+ 2. Run the `/connect` command and search for **Cloudflare Workers AI**.
641
+
642
+ ```txt
643
+ /connect
644
+ ```
645
+
646
+ 3. Enter your **Account ID** when prompted.
647
+
648
+ ```txt
649
+ ┌ Enter your Cloudflare Account ID
650
+
651
+
652
+ └ enter
653
+ ```
654
+
655
+ 4. Enter your **Cloudflare API key**.
656
+
657
+ ```txt
658
+ ┌ API key
659
+
660
+
661
+ └ enter
662
+ ```
663
+
664
+ 5. Run the `/models` command to select a model.
665
+
666
+ ```txt
667
+ /models
668
+ ```
669
+
670
+ Alternatively, you can set environment variables instead of using `/connect`.
671
+
672
+ ```bash title="~/.bash_profile"
673
+ export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
674
+ export CLOUDFLARE_API_KEY=your-api-token
675
+ ```
676
+
677
+ ---
678
+
679
+ ### Cortecs
680
+
681
+ 1. Head over to the [Cortecs console](https://cortecs.ai/), create an account, and generate an API key.
682
+
683
+ 2. Run the `/connect` command and search for **Cortecs**.
684
+
685
+ ```txt
686
+ /connect
687
+ ```
688
+
689
+ 3. Enter your Cortecs API key.
690
+
691
+ ```txt
692
+ ┌ API key
693
+
694
+
695
+ └ enter
696
+ ```
697
+
698
+ 4. Run the `/models` command to select a model like _Kimi K2 Instruct_.
699
+
700
+ ```txt
701
+ /models
702
+ ```
703
+
704
+ ---
705
+
706
+ ### DeepSeek
707
+
708
+ 1. Head over to the [DeepSeek console](https://platform.deepseek.com/), create an account, and click **Create new API key**.
709
+
710
+ 2. Run the `/connect` command and search for **DeepSeek**.
711
+
712
+ ```txt
713
+ /connect
714
+ ```
715
+
716
+ 3. Enter your DeepSeek API key.
717
+
718
+ ```txt
719
+ ┌ API key
720
+
721
+
722
+ └ enter
723
+ ```
724
+
725
+ 4. Run the `/models` command to select a DeepSeek model like _DeepSeek V4 Pro_.
726
+
727
+ ```txt
728
+ /models
729
+ ```
730
+
731
+ ---
732
+
733
+ ### Deep Infra
734
+
735
+ 1. Head over to the [Deep Infra dashboard](https://deepinfra.com/dash), create an account, and generate an API key.
736
+
737
+ 2. Run the `/connect` command and search for **Deep Infra**.
738
+
739
+ ```txt
740
+ /connect
741
+ ```
742
+
743
+ 3. Enter your Deep Infra API key.
744
+
745
+ ```txt
746
+ ┌ API key
747
+
748
+
749
+ └ enter
750
+ ```
751
+
752
+ 4. Run the `/models` command to select a model.
753
+
754
+ ```txt
755
+ /models
756
+ ```
757
+
758
+ ---
759
+
760
+ ### DigitalOcean
761
+
762
+ DigitalOcean's [Inference Engine](https://docs.digitalocean.com/products/inference/) provides access to open models like GPT-OSS, Llama, Qwen, and DeepSeek, plus custom [Inference Routers](https://docs.digitalocean.com/products/genai-platform/concepts/inference-routers/) that route each request to the cheapest, fastest, or best-fit model for a task.
763
+
764
+ OpenCode supports two authentication methods:
765
+
766
+ - **OAuth (Recommended)** — Sign in to your DigitalOcean account; OpenCode uses your DigitalOcean API token directly for inference and discovers your Inference Routers.
767
+ - **Model Access Key** — Paste an existing key from the DigitalOcean console.
768
+
769
+ #### OAuth (Recommended)
770
+
771
+ 1. Run the `/connect` command and search for **DigitalOcean**.
772
+
773
+ ```txt
774
+ /connect
775
+ ```
776
+
777
+ 2. Select **Login with DigitalOcean**.
778
+
779
+ ```txt
780
+ ┌ Select auth method
781
+
782
+ │ Login with DigitalOcean
783
+ │ Paste Model Access Key
784
+
785
+ ```
786
+
787
+ 3. Your browser opens to authorize OpenCode. Sign in and approve.
788
+
789
+ :::note
790
+ OpenCode requests `genai:read` and `inference:query` OAuth scopes. Your DigitalOcean API token is used directly for inference — no separate Model Access Key is created.
791
+ :::
792
+
793
+ :::note
794
+ Inference Routers only appear in the model picker after OAuth. Pasting a Model Access Key manually does not discover routers.
795
+ :::
796
+
797
+ 4. Run the `/models` command. Your Inference Routers appear as the format `router:` in the model selection.
798
+
799
+ ```txt
800
+ /models
801
+ ```
802
+
803
+ 5. To pick up newly created Inference Routers, re-run `/connect` and select **DigitalOcean** again.
804
+
805
+ #### Using a Model Access Key
806
+
807
+ If you'd rather paste a key directly:
808
+
809
+ 1. Head over to the **Manage** page in the Inference section of the [DigitalOcean console](https://cloud.digitalocean.com/) and create a new key.
810
+
811
+ 2. Run the `/connect` command and select **DigitalOcean**, then **Paste Model Access Key**.
812
+
813
+ ```txt
814
+ ┌ Enter your DigitalOcean Model Access Key
815
+
816
+
817
+ └ enter
818
+ ```
819
+
820
+ :::note
821
+ Inference Routers are not auto-discovered with this method. To surface them in the model picker, sign in via OAuth instead.
822
+ :::
823
+
824
+ 3. Run the `/models` command to select a model.
825
+
826
+ ```txt
827
+ /models
828
+ ```
829
+
830
+ #### Environment Variable
831
+
832
+ Alternatively, set your Model Access Key as an environment variable.
833
+
834
+ ```bash frame="none"
835
+ export DIGITALOCEAN_ACCESS_TOKEN=your-model-access-key
836
+ ```
837
+
838
+ #### Inference Routers
839
+
840
+ Inference Routers let you define a routing policy across multiple models — picking the cheapest, fastest, or most appropriate model per request based on the task. After OAuth, OpenCode surfaces each router as `router:<router-name>` in the model picker.
841
+
842
+ Selecting a router model is a drop-in replacement for any other model — OpenCode forwards your request and DigitalOcean picks the underlying model based on your router's policy. Learn more about [Inference Routers](https://docs.digitalocean.com/products/inference/how-to/use-inference-router/)
843
+
844
+ ---
845
+
846
+ ### FrogBot
847
+
848
+ 1. Head over to the [FrogBot dashboard](https://app.frogbot.ai/signup), create an account, and generate an API key.
849
+
850
+ 2. Run the `/connect` command and search for **FrogBot**.
851
+
852
+ ```txt
853
+ /connect
854
+ ```
855
+
856
+ 3. Enter your FrogBot API key.
857
+
858
+ ```txt
859
+ ┌ API key
860
+
861
+
862
+ └ enter
863
+ ```
864
+
865
+ 4. Run the `/models` command to select a model.
866
+
867
+ ```txt
868
+ /models
869
+ ```
870
+
871
+ ---
872
+
873
+ ### Fireworks AI
874
+
875
+ 1. Head over to the [Fireworks AI console](https://app.fireworks.ai/), create an account, and click **Create API Key**.
876
+
877
+ 2. Run the `/connect` command and search for **Fireworks AI**.
878
+
879
+ ```txt
880
+ /connect
881
+ ```
882
+
883
+ 3. Enter your Fireworks AI API key.
884
+
885
+ ```txt
886
+ ┌ API key
887
+
888
+
889
+ └ enter
890
+ ```
891
+
892
+ 4. Run the `/models` command to select a model like _Kimi K2 Instruct_.
893
+
894
+ ```txt
895
+ /models
896
+ ```
897
+
898
+ ---
899
+
900
+ ### GitLab Duo
901
+
902
+ :::caution[Experimental]
903
+ GitLab Duo support in OpenCode is experimental. Features, configuration, and
904
+ behavior may change in future releases.
905
+ :::
906
+
907
+ OpenCode integrates with the [GitLab Duo Agent Platform](https://docs.gitlab.com/user/duo_agent_platform/),
908
+ providing AI-powered agentic chat with native tool calling capabilities.
909
+
910
+ :::note[License requirements]
911
+ GitLab Duo Agent Platform requires a **Premium** or **Ultimate** GitLab
912
+ subscription. It is available on GitLab.com and GitLab Self-Managed.
913
+ See [GitLab Duo Agent Platform prerequisites](https://docs.gitlab.com/user/duo_agent_platform/#prerequisites)
914
+ for full requirements.
915
+ :::
916
+
917
+ 1. Run the `/connect` command and select GitLab.
918
+
919
+ ```txt
920
+ /connect
921
+ ```
922
+
923
+ 2. Choose your authentication method:
924
+
925
+ ```txt
926
+ ┌ Select auth method
927
+
928
+ │ OAuth (Recommended)
929
+ │ Personal Access Token
930
+
931
+ ```
932
+
933
+ #### Using OAuth (Recommended)
934
+
935
+ Select **OAuth** and your browser will open for authorization.
936
+
937
+ #### Using Personal Access Token
938
+ 1. Go to [GitLab User Settings > Access Tokens](https://gitlab.com/-/user_settings/personal_access_tokens)
939
+ 2. Click **Add new token**
940
+ 3. Name: `OpenCode`, Scopes: `api`
941
+ 4. Copy the token (starts with `glpat-`)
942
+ 5. Enter it in the terminal
943
+
944
+ 3. Run the `/models` command to see available models.
945
+
946
+ ```txt
947
+ /models
948
+ ```
949
+
950
+ Three Claude-based models are available:
951
+ - **duo-chat-haiku-4-5** (Default) - Fast responses for quick tasks
952
+ - **duo-chat-sonnet-4-5** - Balanced performance for most workflows
953
+ - **duo-chat-opus-4-5** - Most capable for complex analysis
954
+
955
+ :::note
956
+ You can also specify 'GITLAB_TOKEN' environment variable if you don't want
957
+ to store token in opencode auth storage.
958
+ :::
959
+
960
+ ##### Self-Hosted GitLab
961
+
962
+ :::note[compliance note]
963
+ OpenCode uses a small model for some AI tasks like generating the session title.
964
+ It is configured to use gpt-5-nano by default, hosted by Zen. To lock OpenCode
965
+ to only use your own GitLab-hosted instance, add the following to your
966
+ `opencode.json` file. It is also recommended to disable session sharing.
967
+
968
+ ```json
969
+ {
970
+ "$schema": "https://opencode.ai/config.json",
971
+ "small_model": "gitlab/duo-chat-haiku-4-5",
972
+ "share": "disabled"
973
+ }
974
+ ```
975
+
976
+ :::
977
+
978
+ For self-hosted GitLab instances:
979
+
980
+ ```bash
981
+ export GITLAB_INSTANCE_URL=https://gitlab.company.com
982
+ export GITLAB_TOKEN=glpat-...
983
+ ```
984
+
985
+ If your instance runs a custom AI Gateway:
986
+
987
+ ```bash
988
+ GITLAB_AI_GATEWAY_URL=https://ai-gateway.company.com
989
+ ```
990
+
991
+ Or add to your bash profile:
992
+
993
+ ```bash title="~/.bash_profile"
994
+ export GITLAB_INSTANCE_URL=https://gitlab.company.com
995
+ export GITLAB_AI_GATEWAY_URL=https://ai-gateway.company.com
996
+ export GITLAB_TOKEN=glpat-...
997
+ ```
998
+
999
+ :::note
1000
+ Your GitLab administrator must:
1001
+
1002
+ 1. [Turn on GitLab Duo](https://docs.gitlab.com/user/duo_agent_platform/turn_on_off/#turn-gitlab-duo-on-or-off)
1003
+ for the user, group, or instance
1004
+ 2. [Turn on the Agent Platform](https://docs.gitlab.com/user/duo_agent_platform/turn_on_off/#turn-gitlab-duo-agent-platform-on-or-off)
1005
+ (GitLab 18.8+) or [enable beta and experimental features](https://docs.gitlab.com/user/duo_agent_platform/turn_on_off/#turn-on-beta-and-experimental-features)
1006
+ (GitLab 18.7 and earlier)
1007
+ 3. For Self-Managed, [configure your instance](https://docs.gitlab.com/administration/gitlab_duo/configure/gitlab_self_managed/)
1008
+ :::
1009
+
1010
+ ##### OAuth for Self-Hosted instances
1011
+
1012
+ In order to make Oauth working for your self-hosted instance, you need to create
1013
+ a new application (Settings → Applications) with the
1014
+ callback URL `http://127.0.0.1:8080/callback` and following scopes:
1015
+
1016
+ - api (Access the API on your behalf)
1017
+ - read_user (Read your personal information)
1018
+ - read_repository (Allows read-only access to the repository)
1019
+
1020
+ Then expose application ID as environment variable:
1021
+
1022
+ ```bash
1023
+ export GITLAB_OAUTH_CLIENT_ID=your_application_id_here
1024
+ ```
1025
+
1026
+ More documentation on [opencode-gitlab-auth](https://www.npmjs.com/package/opencode-gitlab-auth) homepage.
1027
+
1028
+ ##### Configuration
1029
+
1030
+ Customize through `opencode.json`:
1031
+
1032
+ ```json title="opencode.json"
1033
+ {
1034
+ "$schema": "https://opencode.ai/config.json",
1035
+ "provider": {
1036
+ "gitlab": {
1037
+ "options": {
1038
+ "instanceUrl": "https://gitlab.com"
1039
+ }
1040
+ }
1041
+ }
1042
+ }
1043
+ ```
1044
+
1045
+ ##### GitLab Duo Agent Platform (DAP) Workflow Models
1046
+
1047
+ DAP workflow models provide an alternative execution path that routes tool calls
1048
+ through GitLab's Duo Workflow Service (DWS) instead of the standard agentic chat.
1049
+ When a `duo-workflow-*` model is selected, OpenCode will:
1050
+
1051
+ 1. Discover available models from your GitLab namespace
1052
+ 2. Present a selection picker if multiple models are available
1053
+ 3. Cache the selected model to disk for fast subsequent startups
1054
+ 4. Route tool execution requests through OpenCode's permission-gated tool system
1055
+
1056
+ Available DAP workflow models follow the `duo-workflow-*` naming convention and
1057
+ are dynamically discovered from your GitLab instance.
1058
+
1059
+ ##### GitLab API Tools (Optional, but highly recommended)
1060
+
1061
+ To access GitLab tools (merge requests, issues, pipelines, CI/CD, etc.):
1062
+
1063
+ ```json title="opencode.json"
1064
+ {
1065
+ "$schema": "https://opencode.ai/config.json",
1066
+ "plugin": ["opencode-gitlab-plugin"]
1067
+ }
1068
+ ```
1069
+
1070
+ This plugin provides comprehensive GitLab repository management capabilities including MR reviews, issue tracking, pipeline monitoring, and more.
1071
+
1072
+ ---
1073
+
1074
+ ### GitHub Copilot
1075
+
1076
+ To use your GitHub Copilot subscription with opencode:
1077
+
1078
+ :::note
1079
+ Some models might need a [Pro+
1080
+ subscription](https://github.com/features/copilot/plans) to use.
1081
+ :::
1082
+
1083
+ 1. Run the `/connect` command and search for GitHub Copilot.
1084
+
1085
+ ```txt
1086
+ /connect
1087
+ ```
1088
+
1089
+ 2. Navigate to [github.com/login/device](https://github.com/login/device) and enter the code.
1090
+
1091
+ ```txt
1092
+ ┌ Login with GitHub Copilot
1093
+
1094
+ │ https://github.com/login/device
1095
+
1096
+ │ Enter code: 8F43-6FCF
1097
+
1098
+ └ Waiting for authorization...
1099
+ ```
1100
+
1101
+ 3. Now run the `/models` command to select the model you want.
1102
+
1103
+ ```txt
1104
+ /models
1105
+ ```
1106
+
1107
+ ---
1108
+
1109
+ ### GMI Cloud
1110
+
1111
+ To use GMI Cloud with OpenCode:
1112
+
1113
+ 1. Head over to the [GMI Cloud console](https://console.gmicloud.ai/) to create an API key. You can also review the [API reference](https://docs.gmicloud.ai/inference-engine/api-reference/llm-api-reference) for the endpoint details.
1114
+
1115
+ 2. Run the `/connect` command and search for **GMI Cloud**.
1116
+
1117
+ ```txt
1118
+ /connect
1119
+ ```
1120
+
1121
+ 3. Enter your GMI Cloud API key.
1122
+
1123
+ ```txt
1124
+ ┌ API key
1125
+
1126
+
1127
+ └ enter
1128
+ ```
1129
+
1130
+ 4. Run the `/models` command to select the model you want.
1131
+
1132
+ ```txt
1133
+ /models
1134
+ ```
1135
+
1136
+ ---
1137
+
1138
+ ### Google Vertex AI
1139
+
1140
+ To use Google Vertex AI with OpenCode:
1141
+
1142
+ 1. Head over to the **Model Garden** in the Google Cloud Console and check the
1143
+ models available in your region.
1144
+
1145
+ :::note
1146
+ You need to have a Google Cloud project with Vertex AI API enabled.
1147
+ :::
1148
+
1149
+ 2. Set the required environment variables:
1150
+ - `GOOGLE_CLOUD_PROJECT`: Your Google Cloud project ID
1151
+ - `VERTEX_LOCATION` (optional): The region for Vertex AI (defaults to `global`)
1152
+ - Authentication (choose one):
1153
+ - `GOOGLE_APPLICATION_CREDENTIALS`: Path to your service account JSON key file
1154
+ - Authenticate using gcloud CLI: `gcloud auth application-default login`
1155
+
1156
+ Set them while running opencode.
1157
+
1158
+ ```bash
1159
+ GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json GOOGLE_CLOUD_PROJECT=your-project-id opencode
1160
+ ```
1161
+
1162
+ Or add them to your bash profile.
1163
+
1164
+ ```bash title="~/.bash_profile"
1165
+ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
1166
+ export GOOGLE_CLOUD_PROJECT=your-project-id
1167
+ export VERTEX_LOCATION=global
1168
+ ```
1169
+
1170
+ :::tip
1171
+ The `global` region improves availability and reduces errors at no extra cost. Use regional endpoints (e.g., `us-central1`) for data residency requirements. [Learn more](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#regional_and_global_endpoints)
1172
+ :::
1173
+
1174
+ 3. Run the `/models` command to select the model you want.
1175
+
1176
+ ```txt
1177
+ /models
1178
+ ```
1179
+
1180
+ ---
1181
+
1182
+ ### Groq
1183
+
1184
+ 1. Head over to the [Groq console](https://console.groq.com/), click **Create API Key**, and copy the key.
1185
+
1186
+ 2. Run the `/connect` command and search for Groq.
1187
+
1188
+ ```txt
1189
+ /connect
1190
+ ```
1191
+
1192
+ 3. Enter the API key for the provider.
1193
+
1194
+ ```txt
1195
+ ┌ API key
1196
+
1197
+
1198
+ └ enter
1199
+ ```
1200
+
1201
+ 4. Run the `/models` command to select the one you want.
1202
+
1203
+ ```txt
1204
+ /models
1205
+ ```
1206
+
1207
+ ---
1208
+
1209
+ ### Hugging Face
1210
+
1211
+ [Hugging Face Inference Providers](https://huggingface.co/docs/inference-providers) provides access to open models supported by 17+ providers.
1212
+
1213
+ 1. Head over to [Hugging Face settings](https://huggingface.co/settings/tokens/new?ownUserPermissions=inference.serverless.write&tokenType=fineGrained) to create a token with permission to make calls to Inference Providers.
1214
+
1215
+ 2. Run the `/connect` command and search for **Hugging Face**.
1216
+
1217
+ ```txt
1218
+ /connect
1219
+ ```
1220
+
1221
+ 3. Enter your Hugging Face token.
1222
+
1223
+ ```txt
1224
+ ┌ API key
1225
+
1226
+
1227
+ └ enter
1228
+ ```
1229
+
1230
+ 4. Run the `/models` command to select a model like _Kimi-K2-Instruct_ or _GLM-4.6_.
1231
+
1232
+ ```txt
1233
+ /models
1234
+ ```
1235
+
1236
+ ---
1237
+
1238
+ ### Helicone
1239
+
1240
+ [Helicone](https://helicone.ai) is an LLM observability platform that provides logging, monitoring, and analytics for your AI applications. The Helicone AI Gateway routes your requests to the appropriate provider automatically based on the model.
1241
+
1242
+ 1. Head over to [Helicone](https://helicone.ai), create an account, and generate an API key from your dashboard.
1243
+
1244
+ 2. Run the `/connect` command and search for **Helicone**.
1245
+
1246
+ ```txt
1247
+ /connect
1248
+ ```
1249
+
1250
+ 3. Enter your Helicone API key.
1251
+
1252
+ ```txt
1253
+ ┌ API key
1254
+
1255
+
1256
+ └ enter
1257
+ ```
1258
+
1259
+ 4. Run the `/models` command to select a model.
1260
+
1261
+ ```txt
1262
+ /models
1263
+ ```
1264
+
1265
+ For more providers and advanced features like caching and rate limiting, check the [Helicone documentation](https://docs.helicone.ai).
1266
+
1267
+ #### Optional Configs
1268
+
1269
+ In the event you see a feature or model from Helicone that isn't configured automatically through opencode, you can always configure it yourself.
1270
+
1271
+ Here's [Helicone's Model Directory](https://helicone.ai/models), you'll need this to grab the IDs of the models you want to add.
1272
+
1273
+ ```jsonc title="~/.config/opencode/opencode.jsonc"
1274
+ {
1275
+ "$schema": "https://opencode.ai/config.json",
1276
+ "provider": {
1277
+ "helicone": {
1278
+ "npm": "@ai-sdk/openai-compatible",
1279
+ "name": "Helicone",
1280
+ "options": {
1281
+ "baseURL": "https://ai-gateway.helicone.ai",
1282
+ },
1283
+ "models": {
1284
+ "gpt-4o": {
1285
+ // Model ID (from Helicone's model directory page)
1286
+ "name": "GPT-4o", // Your own custom name for the model
1287
+ },
1288
+ "claude-sonnet-4-20250514": {
1289
+ "name": "Claude Sonnet 4",
1290
+ },
1291
+ },
1292
+ },
1293
+ },
1294
+ }
1295
+ ```
1296
+
1297
+ #### Custom Headers
1298
+
1299
+ Helicone supports custom headers for features like caching, user tracking, and session management. Add them to your provider config using `options.headers`:
1300
+
1301
+ ```jsonc title="~/.config/opencode/opencode.jsonc"
1302
+ {
1303
+ "$schema": "https://opencode.ai/config.json",
1304
+ "provider": {
1305
+ "helicone": {
1306
+ "npm": "@ai-sdk/openai-compatible",
1307
+ "name": "Helicone",
1308
+ "options": {
1309
+ "baseURL": "https://ai-gateway.helicone.ai",
1310
+ "headers": {
1311
+ "Helicone-Cache-Enabled": "true",
1312
+ "Helicone-User-Id": "opencode",
1313
+ },
1314
+ },
1315
+ },
1316
+ },
1317
+ }
1318
+ ```
1319
+
1320
+ ##### Session tracking
1321
+
1322
+ Helicone's [Sessions](https://docs.helicone.ai/features/sessions) feature lets you group related LLM requests together. Use the [opencode-helicone-session](https://github.com/H2Shami/opencode-helicone-session) plugin to automatically log each OpenCode conversation as a session in Helicone.
1323
+
1324
+ ```bash
1325
+ npm install -g opencode-helicone-session
1326
+ ```
1327
+
1328
+ Add it to your config.
1329
+
1330
+ ```json title="opencode.json"
1331
+ {
1332
+ "plugin": ["opencode-helicone-session"]
1333
+ }
1334
+ ```
1335
+
1336
+ The plugin injects `Helicone-Session-Id` and `Helicone-Session-Name` headers into your requests. In Helicone's Sessions page, you'll see each OpenCode conversation listed as a separate session.
1337
+
1338
+ ##### Common Helicone headers
1339
+
1340
+ | Header | Description |
1341
+ | -------------------------- | ------------------------------------------------------------- |
1342
+ | `Helicone-Cache-Enabled` | Enable response caching (`true`/`false`) |
1343
+ | `Helicone-User-Id` | Track metrics by user |
1344
+ | `Helicone-Property-[Name]` | Add custom properties (e.g., `Helicone-Property-Environment`) |
1345
+ | `Helicone-Prompt-Id` | Associate requests with prompt versions |
1346
+
1347
+ See the [Helicone Header Directory](https://docs.helicone.ai/helicone-headers/header-directory) for all available headers.
1348
+
1349
+ ---
1350
+
1351
+ ### llama.cpp
1352
+
1353
+ You can configure opencode to use local models through [llama.cpp's](https://github.com/ggml-org/llama.cpp) llama-server utility
1354
+
1355
+ ```json title="opencode.json" "llama.cpp" {5, 6, 8, 10-15}
1356
+ {
1357
+ "$schema": "https://opencode.ai/config.json",
1358
+ "provider": {
1359
+ "llama.cpp": {
1360
+ "npm": "@ai-sdk/openai-compatible",
1361
+ "name": "llama-server (local)",
1362
+ "options": {
1363
+ "baseURL": "http://127.0.0.1:8080/v1"
1364
+ },
1365
+ "models": {
1366
+ "qwen3-coder:a3b": {
1367
+ "name": "Qwen3-Coder: a3b-30b (local)",
1368
+ "limit": {
1369
+ "context": 128000,
1370
+ "output": 65536
1371
+ }
1372
+ }
1373
+ }
1374
+ }
1375
+ }
1376
+ }
1377
+ ```
1378
+
1379
+ In this example:
1380
+
1381
+ - `llama.cpp` is the custom provider ID. This can be any string you want.
1382
+ - `npm` specifies the package to use for this provider. Here, `@ai-sdk/openai-compatible` is used for any OpenAI-compatible API.
1383
+ - `name` is the display name for the provider in the UI.
1384
+ - `options.baseURL` is the endpoint for the local server.
1385
+ - `models` is a map of model IDs to their configurations. The model name will be displayed in the model selection list.
1386
+
1387
+ ---
1388
+
1389
+ ### IO.NET
1390
+
1391
+ IO.NET offers 17 models optimized for various use cases:
1392
+
1393
+ 1. Head over to the [IO.NET console](https://ai.io.net/), create an account, and generate an API key.
1394
+
1395
+ 2. Run the `/connect` command and search for **IO.NET**.
1396
+
1397
+ ```txt
1398
+ /connect
1399
+ ```
1400
+
1401
+ 3. Enter your IO.NET API key.
1402
+
1403
+ ```txt
1404
+ ┌ API key
1405
+
1406
+
1407
+ └ enter
1408
+ ```
1409
+
1410
+ 4. Run the `/models` command to select a model.
1411
+
1412
+ ```txt
1413
+ /models
1414
+ ```
1415
+
1416
+ ---
1417
+
1418
+ ### LM Studio
1419
+
1420
+ You can configure opencode to use local models through LM Studio.
1421
+
1422
+ ```json title="opencode.json" "lmstudio" {5, 6, 8, 10-14}
1423
+ {
1424
+ "$schema": "https://opencode.ai/config.json",
1425
+ "provider": {
1426
+ "lmstudio": {
1427
+ "npm": "@ai-sdk/openai-compatible",
1428
+ "name": "LM Studio (local)",
1429
+ "options": {
1430
+ "baseURL": "http://127.0.0.1:1234/v1"
1431
+ },
1432
+ "models": {
1433
+ "google/gemma-3n-e4b": {
1434
+ "name": "Gemma 3n-e4b (local)"
1435
+ }
1436
+ }
1437
+ }
1438
+ }
1439
+ }
1440
+ ```
1441
+
1442
+ In this example:
1443
+
1444
+ - `lmstudio` is the custom provider ID. This can be any string you want.
1445
+ - `npm` specifies the package to use for this provider. Here, `@ai-sdk/openai-compatible` is used for any OpenAI-compatible API.
1446
+ - `name` is the display name for the provider in the UI.
1447
+ - `options.baseURL` is the endpoint for the local server.
1448
+ - `models` is a map of model IDs to their configurations. The model name will be displayed in the model selection list.
1449
+
1450
+ ---
1451
+
1452
+ ### Moonshot AI
1453
+
1454
+ To use Kimi K2 from Moonshot AI:
1455
+
1456
+ 1. Head over to the [Moonshot AI console](https://platform.moonshot.ai/console), create an account, and click **Create API key**.
1457
+
1458
+ 2. Run the `/connect` command and search for **Moonshot AI**.
1459
+
1460
+ ```txt
1461
+ /connect
1462
+ ```
1463
+
1464
+ 3. Enter your Moonshot API key.
1465
+
1466
+ ```txt
1467
+ ┌ API key
1468
+
1469
+
1470
+ └ enter
1471
+ ```
1472
+
1473
+ 4. Run the `/models` command to select _Kimi K2_.
1474
+
1475
+ ```txt
1476
+ /models
1477
+ ```
1478
+
1479
+ ---
1480
+
1481
+ ### MiniMax
1482
+
1483
+ 1. Head over to the [MiniMax API Console](https://platform.minimax.io/login), create an account, and generate an API key.
1484
+
1485
+ 2. Run the `/connect` command and search for **MiniMax**.
1486
+
1487
+ ```txt
1488
+ /connect
1489
+ ```
1490
+
1491
+ 3. Enter your MiniMax API key.
1492
+
1493
+ ```txt
1494
+ ┌ API key
1495
+
1496
+
1497
+ └ enter
1498
+ ```
1499
+
1500
+ 4. Run the `/models` command to select a model like _M2.1_.
1501
+
1502
+ ```txt
1503
+ /models
1504
+ ```
1505
+
1506
+ ---
1507
+
1508
+ ### NVIDIA
1509
+
1510
+ NVIDIA provides access to Nemotron models and many other open models through [build.nvidia.com](https://build.nvidia.com) for free.
1511
+
1512
+ 1. Head over to [build.nvidia.com](https://build.nvidia.com), create an account, and generate an API key.
1513
+
1514
+ 2. Run the `/connect` command and search for **NVIDIA**.
1515
+
1516
+ ```txt
1517
+ /connect
1518
+ ```
1519
+
1520
+ 3. Enter your NVIDIA API key.
1521
+
1522
+ ```txt
1523
+ ┌ API key
1524
+
1525
+
1526
+ └ enter
1527
+ ```
1528
+
1529
+ 4. Run the `/models` command to select a model like nemotron-3-super-120b-a12b.
1530
+
1531
+ ```txt
1532
+ /models
1533
+ ```
1534
+
1535
+ #### On-Prem / NIM
1536
+
1537
+ You can also use NVIDIA models locally via [NVIDIA NIM](https://docs.nvidia.com/nim/) by setting a custom base URL.
1538
+
1539
+ ```json title="opencode.json" {6}
1540
+ {
1541
+ "$schema": "https://opencode.ai/config.json",
1542
+ "provider": {
1543
+ "nvidia": {
1544
+ "options": {
1545
+ "baseURL": "http://localhost:8000/v1"
1546
+ }
1547
+ }
1548
+ }
1549
+ }
1550
+ ```
1551
+
1552
+ #### Environment Variable
1553
+
1554
+ Alternatively, set your API key as an environment variable.
1555
+
1556
+ ```bash frame="none"
1557
+ export NVIDIA_API_KEY=nvapi-your-key-here
1558
+ ```
1559
+
1560
+ ---
1561
+
1562
+ ### Nebius Token Factory
1563
+
1564
+ 1. Head over to the [Nebius Token Factory console](https://tokenfactory.nebius.com/), create an account, and click **Add Key**.
1565
+
1566
+ 2. Run the `/connect` command and search for **Nebius Token Factory**.
1567
+
1568
+ ```txt
1569
+ /connect
1570
+ ```
1571
+
1572
+ 3. Enter your Nebius Token Factory API key.
1573
+
1574
+ ```txt
1575
+ ┌ API key
1576
+
1577
+
1578
+ └ enter
1579
+ ```
1580
+
1581
+ 4. Run the `/models` command to select a model like _Kimi K2 Instruct_.
1582
+
1583
+ ```txt
1584
+ /models
1585
+ ```
1586
+
1587
+ ---
1588
+
1589
+ ### Ollama
1590
+
1591
+ You can configure opencode to use local models through Ollama.
1592
+
1593
+ :::tip
1594
+ Ollama can automatically configure itself for OpenCode. See the [Ollama integration docs](https://docs.ollama.com/integrations/opencode) for details.
1595
+ :::
1596
+
1597
+ ```json title="opencode.json" "ollama" {5, 6, 8, 10-14}
1598
+ {
1599
+ "$schema": "https://opencode.ai/config.json",
1600
+ "provider": {
1601
+ "ollama": {
1602
+ "npm": "@ai-sdk/openai-compatible",
1603
+ "name": "Ollama (local)",
1604
+ "options": {
1605
+ "baseURL": "http://localhost:11434/v1"
1606
+ },
1607
+ "models": {
1608
+ "llama2": {
1609
+ "name": "Llama 2"
1610
+ }
1611
+ }
1612
+ }
1613
+ }
1614
+ }
1615
+ ```
1616
+
1617
+ In this example:
1618
+
1619
+ - `ollama` is the custom provider ID. This can be any string you want.
1620
+ - `npm` specifies the package to use for this provider. Here, `@ai-sdk/openai-compatible` is used for any OpenAI-compatible API.
1621
+ - `name` is the display name for the provider in the UI.
1622
+ - `options.baseURL` is the endpoint for the local server.
1623
+ - `models` is a map of model IDs to their configurations. The model name will be displayed in the model selection list.
1624
+
1625
+ :::tip
1626
+ If tool calls aren't working, try increasing `num_ctx` in Ollama. Start around 16k - 32k.
1627
+ :::
1628
+
1629
+ ---
1630
+
1631
+ ### Ollama Cloud
1632
+
1633
+ To use Ollama Cloud with OpenCode:
1634
+
1635
+ 1. Head over to [https://ollama.com/](https://ollama.com/) and sign in or create an account.
1636
+
1637
+ 2. Navigate to **Settings** > **Keys** and click **Add API Key** to generate a new API key.
1638
+
1639
+ 3. Copy the API key for use in OpenCode.
1640
+
1641
+ 4. Run the `/connect` command and search for **Ollama Cloud**.
1642
+
1643
+ ```txt
1644
+ /connect
1645
+ ```
1646
+
1647
+ 5. Enter your Ollama Cloud API key.
1648
+
1649
+ ```txt
1650
+ ┌ API key
1651
+
1652
+
1653
+ └ enter
1654
+ ```
1655
+
1656
+ 6. **Important**: Before using cloud models in OpenCode, you must pull the model information locally:
1657
+
1658
+ ```bash
1659
+ ollama pull gpt-oss:20b-cloud
1660
+ ```
1661
+
1662
+ 7. Run the `/models` command to select your Ollama Cloud model.
1663
+
1664
+ ```txt
1665
+ /models
1666
+ ```
1667
+
1668
+ ---
1669
+
1670
+ ### OpenAI
1671
+
1672
+ We recommend signing up for [ChatGPT Plus or Pro](https://chatgpt.com/pricing).
1673
+
1674
+ 1. Once you've signed up, run the `/connect` command and select OpenAI.
1675
+
1676
+ ```txt
1677
+ /connect
1678
+ ```
1679
+
1680
+ 2. Here you can select the **ChatGPT Plus/Pro** option and it'll open your browser
1681
+ and ask you to authenticate.
1682
+
1683
+ ```txt
1684
+ ┌ Select auth method
1685
+
1686
+ │ ChatGPT Plus/Pro
1687
+ │ Manually enter API Key
1688
+
1689
+ ```
1690
+
1691
+ 3. Now all the OpenAI models should be available when you use the `/models` command.
1692
+
1693
+ ```txt
1694
+ /models
1695
+ ```
1696
+
1697
+ ##### Using API keys
1698
+
1699
+ If you already have an API key, you can select **Manually enter API Key** and paste it in your terminal.
1700
+
1701
+ ---
1702
+
1703
+ ### OpenCode Zen
1704
+
1705
+ OpenCode Zen is a list of tested and verified models provided by the OpenCode team. [Learn more](/docs/zen).
1706
+
1707
+ 1. Sign in to **<a href={console}>OpenCode Zen</a>** and click **Create API Key**.
1708
+
1709
+ 2. Run the `/connect` command and search for **OpenCode Zen**.
1710
+
1711
+ ```txt
1712
+ /connect
1713
+ ```
1714
+
1715
+ 3. Enter your OpenCode API key.
1716
+
1717
+ ```txt
1718
+ ┌ API key
1719
+
1720
+
1721
+ └ enter
1722
+ ```
1723
+
1724
+ 4. Run the `/models` command to select a model like _Qwen 3 Coder 480B_.
1725
+
1726
+ ```txt
1727
+ /models
1728
+ ```
1729
+
1730
+ ---
1731
+
1732
+ ### OpenRouter
1733
+
1734
+ 1. Head over to the [OpenRouter dashboard](https://openrouter.ai/settings/keys), click **Create API Key**, and copy the key.
1735
+
1736
+ 2. Run the `/connect` command and search for OpenRouter.
1737
+
1738
+ ```txt
1739
+ /connect
1740
+ ```
1741
+
1742
+ 3. Enter the API key for the provider.
1743
+
1744
+ ```txt
1745
+ ┌ API key
1746
+
1747
+
1748
+ └ enter
1749
+ ```
1750
+
1751
+ 4. Many OpenRouter models are preloaded by default, run the `/models` command to select the one you want.
1752
+
1753
+ ```txt
1754
+ /models
1755
+ ```
1756
+
1757
+ You can also add additional models through your opencode config.
1758
+
1759
+ ```json title="opencode.json" {6}
1760
+ {
1761
+ "$schema": "https://opencode.ai/config.json",
1762
+ "provider": {
1763
+ "openrouter": {
1764
+ "models": {
1765
+ "somecoolnewmodel": {}
1766
+ }
1767
+ }
1768
+ }
1769
+ }
1770
+ ```
1771
+
1772
+ 5. You can also customize them through your opencode config. Here's an example of specifying a provider
1773
+
1774
+ ```json title="opencode.json"
1775
+ {
1776
+ "$schema": "https://opencode.ai/config.json",
1777
+ "provider": {
1778
+ "openrouter": {
1779
+ "models": {
1780
+ "moonshotai/kimi-k2": {
1781
+ "options": {
1782
+ "provider": {
1783
+ "order": ["baseten"],
1784
+ "allow_fallbacks": false
1785
+ }
1786
+ }
1787
+ }
1788
+ }
1789
+ }
1790
+ }
1791
+ }
1792
+ ```
1793
+
1794
+ ---
1795
+
1796
+ ### LLM Gateway
1797
+
1798
+ 1. Head over to the [LLM Gateway dashboard](https://llmgateway.io/dashboard), click **Create API Key**, and copy the key.
1799
+
1800
+ 2. Run the `/connect` command and search for LLM Gateway.
1801
+
1802
+ ```txt
1803
+ /connect
1804
+ ```
1805
+
1806
+ 3. Enter the API key for the provider.
1807
+
1808
+ ```txt
1809
+ ┌ API key
1810
+
1811
+
1812
+ └ enter
1813
+ ```
1814
+
1815
+ 4. Many LLM Gateway models are preloaded by default, run the `/models` command to select the one you want.
1816
+
1817
+ ```txt
1818
+ /models
1819
+ ```
1820
+
1821
+ You can also add additional models through your opencode config.
1822
+
1823
+ ```json title="opencode.json" {6}
1824
+ {
1825
+ "$schema": "https://opencode.ai/config.json",
1826
+ "provider": {
1827
+ "llmgateway": {
1828
+ "models": {
1829
+ "somecoolnewmodel": {}
1830
+ }
1831
+ }
1832
+ }
1833
+ }
1834
+ ```
1835
+
1836
+ 5. You can also customize them through your opencode config. Here's an example of specifying a provider
1837
+
1838
+ ```json title="opencode.json"
1839
+ {
1840
+ "$schema": "https://opencode.ai/config.json",
1841
+ "provider": {
1842
+ "llmgateway": {
1843
+ "models": {
1844
+ "glm-4.7": {
1845
+ "name": "GLM 4.7"
1846
+ },
1847
+ "gpt-5.2": {
1848
+ "name": "GPT-5.2"
1849
+ },
1850
+ "gemini-2.5-pro": {
1851
+ "name": "Gemini 2.5 Pro"
1852
+ },
1853
+ "claude-3-5-sonnet-20241022": {
1854
+ "name": "Claude 3.5 Sonnet"
1855
+ }
1856
+ }
1857
+ }
1858
+ }
1859
+ }
1860
+ ```
1861
+
1862
+ ---
1863
+
1864
+ ### SAP AI Core
1865
+
1866
+ SAP AI Core provides access to 40+ models from OpenAI, Anthropic, Google, Amazon, Meta, Mistral, and AI21 through a unified platform.
1867
+
1868
+ 1. Go to your [SAP BTP Cockpit](https://account.hana.ondemand.com/), navigate to your SAP AI Core service instance, and create a service key.
1869
+
1870
+ :::tip
1871
+ The service key is a JSON object containing `clientid`, `clientsecret`, `url`, and `serviceurls.AI_API_URL`. You can find your AI Core instance under **Services** > **Instances and Subscriptions** in the BTP Cockpit.
1872
+ :::
1873
+
1874
+ 2. Run the `/connect` command and search for **SAP AI Core**.
1875
+
1876
+ ```txt
1877
+ /connect
1878
+ ```
1879
+
1880
+ 3. Enter your service key JSON.
1881
+
1882
+ ```txt
1883
+ ┌ Service key
1884
+
1885
+
1886
+ └ enter
1887
+ ```
1888
+
1889
+ Or set the `AICORE_SERVICE_KEY` environment variable:
1890
+
1891
+ ```bash
1892
+ AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}' opencode
1893
+ ```
1894
+
1895
+ Or add it to your bash profile:
1896
+
1897
+ ```bash title="~/.bash_profile"
1898
+ export AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}'
1899
+ ```
1900
+
1901
+ 4. Optionally set deployment ID and resource group:
1902
+
1903
+ ```bash
1904
+ AICORE_DEPLOYMENT_ID=your-deployment-id AICORE_RESOURCE_GROUP=your-resource-group opencode
1905
+ ```
1906
+
1907
+ :::note
1908
+ These settings are optional and should be configured according to your SAP AI Core setup.
1909
+ :::
1910
+
1911
+ 5. Run the `/models` command to select from 40+ available models.
1912
+
1913
+ ```txt
1914
+ /models
1915
+ ```
1916
+
1917
+ ---
1918
+
1919
+ ### STACKIT
1920
+
1921
+ STACKIT AI Model Serving provides fully managed sovereign hosting environment for AI models, focusing on LLMs like Llama, Mistral, and Qwen, with maximum data sovereignty on European infrastructure.
1922
+
1923
+ 1. Head over to [STACKIT Portal](https://portal.stackit.cloud), navigate to **AI Model Serving**, and create an auth token for your project.
1924
+
1925
+ :::tip
1926
+ You need a STACKIT customer account, user account, and project before creating auth tokens.
1927
+ :::
1928
+
1929
+ 2. Run the `/connect` command and search for **STACKIT**.
1930
+
1931
+ ```txt
1932
+ /connect
1933
+ ```
1934
+
1935
+ 3. Enter your STACKIT AI Model Serving auth token.
1936
+
1937
+ ```txt
1938
+ ┌ API key
1939
+
1940
+
1941
+ └ enter
1942
+ ```
1943
+
1944
+ 4. Run the `/models` command to select from available models like _Qwen3-VL 235B_ or _Llama 3.3 70B_.
1945
+
1946
+ ```txt
1947
+ /models
1948
+ ```
1949
+
1950
+ ---
1951
+
1952
+ ### OVHcloud AI Endpoints
1953
+
1954
+ 1. Head over to the [OVHcloud panel](https://ovh.com/manager). Navigate to the `Public Cloud` section, `AI & Machine Learning` > `AI Endpoints` and in `API Keys` tab, click **Create a new API key**.
1955
+
1956
+ 2. Run the `/connect` command and search for **OVHcloud AI Endpoints**.
1957
+
1958
+ ```txt
1959
+ /connect
1960
+ ```
1961
+
1962
+ 3. Enter your OVHcloud AI Endpoints API key.
1963
+
1964
+ ```txt
1965
+ ┌ API key
1966
+
1967
+
1968
+ └ enter
1969
+ ```
1970
+
1971
+ 4. Run the `/models` command to select a model like _gpt-oss-120b_.
1972
+
1973
+ ```txt
1974
+ /models
1975
+ ```
1976
+
1977
+ ---
1978
+
1979
+ ### Scaleway
1980
+
1981
+ To use [Scaleway Generative APIs](https://www.scaleway.com/en/docs/generative-apis/) with Opencode:
1982
+
1983
+ 1. Head over to the [Scaleway Console IAM settings](https://console.scaleway.com/iam/api-keys) to generate a new API key.
1984
+
1985
+ 2. Run the `/connect` command and search for **Scaleway**.
1986
+
1987
+ ```txt
1988
+ /connect
1989
+ ```
1990
+
1991
+ 3. Enter your Scaleway API key.
1992
+
1993
+ ```txt
1994
+ ┌ API key
1995
+
1996
+
1997
+ └ enter
1998
+ ```
1999
+
2000
+ 4. Run the `/models` command to select a model like _devstral-2-123b-instruct-2512_ or _gpt-oss-120b_.
2001
+
2002
+ ```txt
2003
+ /models
2004
+ ```
2005
+
2006
+ ---
2007
+
2008
+ ### Snowflake Cortex
2009
+
2010
+ [Snowflake Cortex](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-rest-api) gives you access to frontier models (Claude, OpenAI GPT-5, and more) via an OpenAI-compatible API. All inference runs within the Snowflake perimeter and is billed in Snowflake credits. For per-model rates, see the [Snowflake Service Consumption Table](https://www.snowflake.com/legal-files/CreditConsumptionTable.pdf).
2011
+
2012
+ Don't have a Snowflake account? [Sign up for a free trial](https://signup.snowflake.com/?utm_source=opencode&utm_medium=docs&utm_campaign=cortex-provider).
2013
+
2014
+ opencode's core workflow for coding, editing files, and running commands relies on tool calling. Only the Claude and OpenAI families within Snowflake Cortex support this. The provider is limited to those families to support the core workflow.
2015
+
2016
+ OpenCode supports two authentication methods:
2017
+
2018
+ - **Browser OAuth (Recommended)** — sign in with your IdP/SSO; no secrets to manage, tokens refresh automatically.
2019
+ - **Manual bearer token** — paste a PAT or JWT from the Snowflake console.
2020
+
2021
+ #### Browser OAuth (Recommended)
2022
+
2023
+ 1. Run the `/connect` command and search for **Snowflake Cortex**.
2024
+
2025
+ ```txt
2026
+ /connect
2027
+ ```
2028
+
2029
+ 2. Select **Login with Snowflake (External Browser)**.
2030
+
2031
+ ```txt
2032
+ ┌ Select auth method
2033
+
2034
+ │ Login with Snowflake (External Browser)
2035
+ │ Paste PAT or bearer token manually
2036
+
2037
+ ```
2038
+
2039
+ 3. Enter your [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) when prompted, for example `myorg-myaccount` or `xy12345.us-east-1`.
2040
+
2041
+ ```txt
2042
+ ┌ Snowflake Account Identifier
2043
+
2044
+
2045
+ └ enter
2046
+ ```
2047
+
2048
+ 4. Optionally enter a Snowflake role to scope the session (e.g. `SYSADMIN`). Leave blank to use your default role.
2049
+
2050
+ 5. Complete sign-in in the browser that opens. OpenCode captures the OAuth callback automatically and stores the token — no copy/paste needed.
2051
+
2052
+ 6. Run the `/models` command to select a model.
2053
+
2054
+ ```txt
2055
+ /models
2056
+ ```
2057
+
2058
+ :::note
2059
+ Browser OAuth uses Snowflake's built-in `SNOWFLAKE$LOCAL_APPLICATION` security integration ([docs](https://docs.snowflake.com/en/user-guide/oauth-local-applications)), which is rolling out to all accounts. To check availability in your account:
2060
+
2061
+ ```sql
2062
+ SHOW SECURITY INTEGRATIONS LIKE 'SNOWFLAKE$LOCAL_APPLICATION';
2063
+ ```
2064
+
2065
+ If the result is empty, use the **Manual bearer token** method below while the integration rolls out to your account.
2066
+ :::
2067
+
2068
+ #### Manual bearer token
2069
+
2070
+ If you prefer to paste a token directly, or if `SNOWFLAKE$LOCAL_APPLICATION` is not yet available in your account:
2071
+
2072
+ 1. Generate a [Programmatic Access Token (PAT)](https://docs.snowflake.com/en/user-guide/programmatic-access-tokens) in your Snowflake account.
2073
+
2074
+ 2. Run the `/connect` command, search for **Snowflake Cortex**, and select **Paste PAT or bearer token manually**.
2075
+
2076
+ 3. Enter your [account identifier](https://docs.snowflake.com/en/user-guide/admin-account-identifier) when prompted.
2077
+
2078
+ 4. Paste your PAT.
2079
+
2080
+ 5. Run the `/models` command to select a model.
2081
+
2082
+ ```txt
2083
+ /models
2084
+ ```
2085
+
2086
+ #### Environment variable
2087
+
2088
+ For CI or headless environments, set a PAT or JWT before starting opencode:
2089
+
2090
+ ```bash
2091
+ export SNOWFLAKE_ACCOUNT=myorg-myaccount
2092
+ export SNOWFLAKE_CORTEX_TOKEN=your-pat-or-jwt
2093
+ ```
2094
+
2095
+ :::note
2096
+ `SNOWFLAKE_CORTEX_TOKEN` accepts a PAT or JWT only — the browser OAuth flow is available via `/connect` only and cannot be configured through an environment variable. `SNOWFLAKE_CORTEX_PAT` is still supported for backward compatibility.
2097
+ :::
2098
+
2099
+ The model catalog is provided automatically. A minimal `opencode.json` is all that's needed:
2100
+
2101
+ ```json title="opencode.json"
2102
+ {
2103
+ "$schema": "https://opencode.ai/config.json",
2104
+ "model": "snowflake-cortex/claude-sonnet-4-6",
2105
+ "small_model": "snowflake-cortex/claude-haiku-4-5"
2106
+ }
2107
+ ```
2108
+
2109
+ ---
2110
+
2111
+ ### Together AI
2112
+
2113
+ 1. Head over to the [Together AI console](https://api.together.ai), create an account, and click **Add Key**.
2114
+
2115
+ 2. Run the `/connect` command and search for **Together AI**.
2116
+
2117
+ ```txt
2118
+ /connect
2119
+ ```
2120
+
2121
+ 3. Enter your Together AI API key.
2122
+
2123
+ ```txt
2124
+ ┌ API key
2125
+
2126
+
2127
+ └ enter
2128
+ ```
2129
+
2130
+ 4. Run the `/models` command to select a model like _Kimi K2 Instruct_.
2131
+
2132
+ ```txt
2133
+ /models
2134
+ ```
2135
+
2136
+ ---
2137
+
2138
+ ### Venice AI
2139
+
2140
+ 1. Head over to the [Venice AI console](https://venice.ai), create an account, and generate an API key.
2141
+
2142
+ 2. Run the `/connect` command and search for **Venice AI**.
2143
+
2144
+ ```txt
2145
+ /connect
2146
+ ```
2147
+
2148
+ 3. Enter your Venice AI API key.
2149
+
2150
+ ```txt
2151
+ ┌ API key
2152
+
2153
+
2154
+ └ enter
2155
+ ```
2156
+
2157
+ 4. Run the `/models` command to select a model like _Llama 3.3 70B_.
2158
+
2159
+ ```txt
2160
+ /models
2161
+ ```
2162
+
2163
+ ---
2164
+
2165
+ ### Vercel AI Gateway
2166
+
2167
+ Vercel AI Gateway lets you access models from OpenAI, Anthropic, Google, xAI, and more through a unified endpoint. Models are offered at list price with no markup.
2168
+
2169
+ 1. Head over to the [Vercel dashboard](https://vercel.com/), navigate to the **AI Gateway** tab, and click **API keys** to create a new API key.
2170
+
2171
+ 2. Run the `/connect` command and search for **Vercel AI Gateway**.
2172
+
2173
+ ```txt
2174
+ /connect
2175
+ ```
2176
+
2177
+ 3. Enter your Vercel AI Gateway API key.
2178
+
2179
+ ```txt
2180
+ ┌ API key
2181
+
2182
+
2183
+ └ enter
2184
+ ```
2185
+
2186
+ 4. Run the `/models` command to select a model.
2187
+
2188
+ ```txt
2189
+ /models
2190
+ ```
2191
+
2192
+ You can also customize models through your opencode config. Here's an example of specifying provider routing order.
2193
+
2194
+ ```json title="opencode.json"
2195
+ {
2196
+ "$schema": "https://opencode.ai/config.json",
2197
+ "provider": {
2198
+ "vercel": {
2199
+ "models": {
2200
+ "anthropic/claude-sonnet-4": {
2201
+ "options": {
2202
+ "order": ["anthropic", "vertex"]
2203
+ }
2204
+ }
2205
+ }
2206
+ }
2207
+ }
2208
+ }
2209
+ ```
2210
+
2211
+ Some useful routing options:
2212
+
2213
+ | Option | Description |
2214
+ | ------------------- | ---------------------------------------------------- |
2215
+ | `order` | Provider sequence to try |
2216
+ | `only` | Restrict to specific providers |
2217
+ | `zeroDataRetention` | Only use providers with zero data retention policies |
2218
+
2219
+ ---
2220
+
2221
+ ### xAI
2222
+
2223
+ Three ways to authenticate: a SuperGrok subscription via browser OAuth, the same SuperGrok subscription via a headless device-code flow (for VPS / SSH / Docker), or a pay-as-you-go API key from the xAI console.
2224
+
2225
+ #### Option A — SuperGrok OAuth (browser login)
2226
+
2227
+ 1. Run the `/connect` command and search for **xAI**.
2228
+
2229
+ ```txt
2230
+ /connect
2231
+ ```
2232
+
2233
+ 2. Select **xAI Grok OAuth (SuperGrok Subscription)**. OpenCode opens xAI's consent screen in your browser and waits for the callback on `http://127.0.0.1:56121/callback`.
2234
+
2235
+ 3. Run the `/models` command to select a Grok model.
2236
+
2237
+ ```txt
2238
+ /models
2239
+ ```
2240
+
2241
+ OpenCode refreshes the OAuth access token automatically. Any Grok or X Premium plan that includes Grok API access works; you do not need a separate `XAI_API_KEY`.
2242
+
2243
+ #### Option B — SuperGrok device-code (headless / remote server / VPS)
2244
+
2245
+ Use this when OpenCode is running somewhere a browser can't reach the loopback redirect: a VPS, a remote dev box over SSH, inside Docker, in CI, etc. No callback port is opened on the host running OpenCode — instead xAI hands the CLI a short code that you type into a browser on any other device (laptop, phone, …).
2246
+
2247
+ 1. Run the `/connect` command on the remote host and search for **xAI**.
2248
+
2249
+ ```txt
2250
+ /connect
2251
+ ```
2252
+
2253
+ 2. Select **xAI Grok OAuth (Headless / Remote / VPS)**. OpenCode prints a verification URL and a short user code.
2254
+
2255
+ ```txt
2256
+ Open https://x.ai/device on any device and enter code: ABCD-1234
2257
+ ```
2258
+
2259
+ 3. Open the URL on a device that has a browser (your laptop or phone), enter the code, and approve the consent screen. OpenCode polls xAI's token endpoint and stores the resulting OAuth tokens once you approve. Token refresh works the same as Option A.
2260
+
2261
+ #### Option C — API key
2262
+
2263
+ 1. Head over to the [xAI console](https://console.x.ai/), create an account, and generate an API key.
2264
+
2265
+ 2. Run the `/connect` command and search for **xAI**.
2266
+
2267
+ ```txt
2268
+ /connect
2269
+ ```
2270
+
2271
+ 3. Select **Manually enter API Key** and paste your xAI API key.
2272
+
2273
+ ```txt
2274
+ ┌ API key
2275
+
2276
+
2277
+ └ enter
2278
+ ```
2279
+
2280
+ 4. Run the `/models` command to select a model like _Grok Beta_.
2281
+
2282
+ ```txt
2283
+ /models
2284
+ ```
2285
+
2286
+ ---
2287
+
2288
+ ### Z.AI
2289
+
2290
+ 1. Head over to the [Z.AI API console](https://z.ai/manage-apikey/apikey-list), create an account, and click **Create a new API key**.
2291
+
2292
+ 2. Run the `/connect` command and search for **Z.AI**.
2293
+
2294
+ ```txt
2295
+ /connect
2296
+ ```
2297
+
2298
+ If you are subscribed to the **GLM Coding Plan**, select **Z.AI Coding Plan**.
2299
+
2300
+ 3. Enter your Z.AI API key.
2301
+
2302
+ ```txt
2303
+ ┌ API key
2304
+
2305
+
2306
+ └ enter
2307
+ ```
2308
+
2309
+ 4. Run the `/models` command to select a model like _GLM-4.7_.
2310
+
2311
+ ```txt
2312
+ /models
2313
+ ```
2314
+
2315
+ ---
2316
+
2317
+ ### ZenMux
2318
+
2319
+ 1. Head over to the [ZenMux dashboard](https://zenmux.ai/settings/keys), click **Create API Key**, and copy the key.
2320
+
2321
+ 2. Run the `/connect` command and search for ZenMux.
2322
+
2323
+ ```txt
2324
+ /connect
2325
+ ```
2326
+
2327
+ 3. Enter the API key for the provider.
2328
+
2329
+ ```txt
2330
+ ┌ API key
2331
+
2332
+
2333
+ └ enter
2334
+ ```
2335
+
2336
+ 4. Many ZenMux models are preloaded by default, run the `/models` command to select the one you want.
2337
+
2338
+ ```txt
2339
+ /models
2340
+ ```
2341
+
2342
+ You can also add additional models through your opencode config.
2343
+
2344
+ ```json title="opencode.json" {6}
2345
+ {
2346
+ "$schema": "https://opencode.ai/config.json",
2347
+ "provider": {
2348
+ "zenmux": {
2349
+ "models": {
2350
+ "somecoolnewmodel": {}
2351
+ }
2352
+ }
2353
+ }
2354
+ }
2355
+ ```
2356
+
2357
+ ---
2358
+
2359
+ ## Custom provider
2360
+
2361
+ To add any **OpenAI-compatible** provider that's not listed in the `/connect` command:
2362
+
2363
+ :::tip
2364
+ You can use any OpenAI-compatible provider with opencode. Most modern AI providers offer OpenAI-compatible APIs.
2365
+ :::
2366
+
2367
+ 1. Run the `/connect` command and scroll down to **Other**.
2368
+
2369
+ ```bash
2370
+ $ /connect
2371
+
2372
+ ┌ Add credential
2373
+
2374
+ ◆ Select provider
2375
+ │ ...
2376
+ │ ● Other
2377
+
2378
+ ```
2379
+
2380
+ 2. Enter a unique ID for the provider.
2381
+
2382
+ ```bash
2383
+ $ /connect
2384
+
2385
+ ┌ Add credential
2386
+
2387
+ ◇ Enter provider id
2388
+ │ myprovider
2389
+
2390
+ ```
2391
+
2392
+ :::note
2393
+ Choose a memorable ID, you'll use this in your config file.
2394
+ :::
2395
+
2396
+ 3. Enter your API key for the provider.
2397
+
2398
+ ```bash
2399
+ $ /connect
2400
+
2401
+ ┌ Add credential
2402
+
2403
+ ▲ This only stores a credential for myprovider - you will need to configure it in opencode.json, check the docs for examples.
2404
+
2405
+ ◇ Enter your API key
2406
+ │ sk-...
2407
+
2408
+ ```
2409
+
2410
+ 4. Create or update your `opencode.json` file in your project directory:
2411
+
2412
+ ```json title="opencode.json" ""myprovider"" {5-15}
2413
+ {
2414
+ "$schema": "https://opencode.ai/config.json",
2415
+ "provider": {
2416
+ "myprovider": {
2417
+ "npm": "@ai-sdk/openai-compatible",
2418
+ "name": "My AI ProviderDisplay Name",
2419
+ "options": {
2420
+ "baseURL": "https://api.myprovider.com/v1"
2421
+ },
2422
+ "models": {
2423
+ "my-model-name": {
2424
+ "name": "My Model Display Name"
2425
+ }
2426
+ }
2427
+ }
2428
+ }
2429
+ }
2430
+ ```
2431
+
2432
+ Here are the configuration options:
2433
+ - **npm**: AI SDK package to use, `@ai-sdk/openai-compatible` for OpenAI-compatible providers (for `/v1/chat/completions`). If your provider/model uses `/v1/responses`, use `@ai-sdk/openai`.
2434
+ - **name**: Display name in UI.
2435
+ - **models**: Available models.
2436
+ - **options.baseURL**: API endpoint URL.
2437
+ - **options.apiKey**: Optionally set the API key, if not using auth.
2438
+ - **options.headers**: Optionally set custom headers.
2439
+
2440
+ More on the advanced options in the example below.
2441
+
2442
+ 5. Run the `/models` command and your custom provider and models will appear in the selection list.
2443
+
2444
+ ---
2445
+
2446
+ ##### Example
2447
+
2448
+ Here's an example setting the `apiKey`, `headers`, and model `limit` options.
2449
+
2450
+ ```json title="opencode.json" {9,11,17-20}
2451
+ {
2452
+ "$schema": "https://opencode.ai/config.json",
2453
+ "provider": {
2454
+ "myprovider": {
2455
+ "npm": "@ai-sdk/openai-compatible",
2456
+ "name": "My AI ProviderDisplay Name",
2457
+ "options": {
2458
+ "baseURL": "https://api.myprovider.com/v1",
2459
+ "apiKey": "{env:ANTHROPIC_API_KEY}",
2460
+ "headers": {
2461
+ "Authorization": "Bearer custom-token"
2462
+ }
2463
+ },
2464
+ "models": {
2465
+ "my-model-name": {
2466
+ "name": "My Model Display Name",
2467
+ "limit": {
2468
+ "context": 200000,
2469
+ "output": 65536
2470
+ }
2471
+ }
2472
+ }
2473
+ }
2474
+ }
2475
+ }
2476
+ ```
2477
+
2478
+ Configuration details:
2479
+
2480
+ - **apiKey**: Set using `env` variable syntax, [learn more](/docs/config#env-vars).
2481
+ - **headers**: Custom headers sent with each request.
2482
+ - **limit.context**: Maximum input tokens the model accepts.
2483
+ - **limit.output**: Maximum tokens the model can generate.
2484
+
2485
+ The `limit` fields allow OpenCode to understand how much context you have left. Standard providers pull these from models.dev automatically.
2486
+
2487
+ ---
2488
+
2489
+ ## Troubleshooting
2490
+
2491
+ If you are having trouble with configuring a provider, check the following:
2492
+
2493
+ 1. **Check the auth setup**: Run `opencode auth list` to see if the credentials
2494
+ for the provider are added to your config.
2495
+
2496
+ This doesn't apply to providers like Amazon Bedrock, that rely on environment variables for their auth.
2497
+
2498
+ 2. For custom providers, check the opencode config and:
2499
+ - Make sure the provider ID used in the `/connect` command matches the ID in your opencode config.
2500
+ - The right npm package is used for the provider. For example, use `@ai-sdk/cerebras` for Cerebras. And for all other OpenAI-compatible providers, use `@ai-sdk/openai-compatible` (for `/v1/chat/completions`); if a model uses `/v1/responses`, use `@ai-sdk/openai`. For mixed setups under one provider, you can override per model via `provider.npm`.
2501
+ - Check correct API endpoint is used in the `options.baseURL` field.