@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,2532 @@
1
+ ---
2
+ title: ผู้ให้บริการ
3
+ description: ใช้ผู้ให้บริการ LLM ใน OpenCode
4
+ ---
5
+
6
+ import config from "../../../../config.mjs"
7
+ export const console = config.console
8
+
9
+ OpenCode ใช้ [AI SDK](https://ai-sdk.dev/) และ [Models.dev](https://models.dev) เพื่อรองรับผู้ให้บริการ **75+ LLM** และรองรับการใช้งานโมเดลท้องถิ่น
10
+
11
+ หากต้องการเพิ่มผู้ให้บริการ คุณต้อง:
12
+
13
+ 1. เพิ่มคีย์ API สำหรับผู้ให้บริการโดยใช้คำสั่ง `/connect`
14
+ 2. กำหนดค่าผู้ให้บริการในการกำหนดค่า OpenCode ของคุณ
15
+
16
+ ---
17
+
18
+ ### ข้อมูลรับรอง
19
+
20
+ เมื่อคุณเพิ่มคีย์ API ของผู้ให้บริการด้วยคำสั่ง `/connect` คีย์เหล่านั้นจะถูกเก็บไว้
21
+ ใน `~/.local/share/opencode/auth.json`.
22
+
23
+ ---
24
+
25
+ ### การกำหนดค่า
26
+
27
+ คุณสามารถปรับแต่งผู้ให้บริการได้ผ่านทางส่วน `provider` ใน OpenCode ของคุณ
28
+ กำหนดค่า
29
+
30
+ ---
31
+
32
+ #### Base URL (URL พื้นฐาน)
33
+
34
+ คุณสามารถปรับแต่งฐาน URL สำหรับผู้ให้บริการรายใดก็ได้โดยตั้งค่าตัวเลือก `baseURL` สิ่งนี้มีประโยชน์เมื่อใช้บริการพร็อกซีหรือจุดสิ้นสุดแบบกำหนดเอง
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
+ ## OpenCode Zen
52
+
53
+ OpenCode Zen คือรายชื่อโมเดลที่จัดทำโดยทีมงาน OpenCode ที่ได้รับ
54
+ ทดสอบและตรวจสอบแล้วว่าทำงานได้ดีกับ OpenCode [เรียนรู้เพิ่มเติม](/docs/zen)
55
+
56
+ :::tip
57
+ หากคุณยังใหม่ เราขอแนะนำให้เริ่มต้นด้วย OpenCode Zen
58
+ :::
59
+
60
+ 1. เรียกใช้คำสั่ง `/connect` ใน TUI เลือก opencode และไปที่ [opencode.ai/auth](https://opencode.ai/auth)
61
+
62
+ ```txt
63
+ /connect
64
+ ```
65
+
66
+ 2. ลงชื่อเข้าใช้ เพิ่มรายละเอียดการเรียกเก็บเงินของคุณ และคัดลอกรหัส API ของคุณ
67
+
68
+ 3. วางคีย์ API ของคุณ
69
+
70
+ ```txt
71
+ ┌ API key
72
+
73
+
74
+ └ enter
75
+ ```
76
+
77
+ 4. เรียกใช้ `/models` ใน TUI เพื่อดูรายการรุ่นที่เราแนะนำ
78
+
79
+ ```txt
80
+ /models
81
+ ```
82
+
83
+ มันทำงานเหมือนกับผู้ให้บริการรายอื่นใน OpenCode และเป็นทางเลือกในการใช้งานโดยสมบูรณ์
84
+
85
+ ---
86
+
87
+ ## OpenCode Go
88
+
89
+ OpenCode Go คือแผนการสมัครสมาชิกราคาประหยัดที่ให้การเข้าถึงโมเดลการเขียนโค้ดแบบเปิดยอดนิยมที่เชื่อถือได้ ซึ่งจัดเตรียมโดยทีมงาน OpenCode ที่ได้รับการทดสอบและตรวจสอบแล้วว่าทำงานได้ดีกับ OpenCode
90
+
91
+ 1. เรียกใช้คำสั่ง `/connect` ใน TUI เลือก `OpenCode Go` และไปที่ [opencode.ai/auth](https://opencode.ai/zen)
92
+
93
+ ```txt
94
+ /connect
95
+ ```
96
+
97
+ 2. ลงชื่อเข้าใช้ เพิ่มรายละเอียดการเรียกเก็บเงินของคุณ และคัดลอกรหัส API ของคุณ
98
+
99
+ 3. วางคีย์ API ของคุณ
100
+
101
+ ```txt
102
+ ┌ API key
103
+
104
+
105
+ └ enter
106
+ ```
107
+
108
+ 4. เรียกใช้ `/models` ใน TUI เพื่อดูรายการรุ่นที่เราแนะนำ
109
+
110
+ ```txt
111
+ /models
112
+ ```
113
+
114
+ มันทำงานเหมือนกับผู้ให้บริการรายอื่นใน OpenCode และเป็นทางเลือกในการใช้งานโดยสมบูรณ์
115
+
116
+ ---
117
+
118
+ ## ไดเรกทอรี
119
+
120
+ มาดูรายละเอียดผู้ให้บริการบางรายกัน หากคุณต้องการเพิ่มผู้ให้บริการให้กับ
121
+ รายการอย่าลังเลที่จะเปิดประชาสัมพันธ์
122
+
123
+ :::note
124
+ ไม่เห็นผู้ให้บริการที่นี่ใช่ไหม ส่งพีอาร์.
125
+ :::
126
+
127
+ ---
128
+
129
+ ### 302.AI
130
+
131
+ 1. ไปที่ [302.AI console](https://302.ai/) สร้างบัญชี และสร้างคีย์ API
132
+
133
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **302.AI**
134
+
135
+ ```txt
136
+ /connect
137
+ ```
138
+
139
+ 3. ป้อนคีย์ 302.AI API ของคุณ
140
+
141
+ ```txt
142
+ ┌ API key
143
+
144
+
145
+ └ enter
146
+ ```
147
+
148
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
149
+
150
+ ```txt
151
+ /models
152
+ ```
153
+
154
+ ---
155
+
156
+ ### Amazon Bedrock
157
+
158
+ วิธีใช้ Amazon Bedrock กับ OpenCode:
159
+
160
+ 1. ไปที่ **แค็ตตาล็อกโมเดล** ในคอนโซล Amazon Bedrock และขอ
161
+ เข้าถึงโมเดลที่คุณต้องการ
162
+
163
+ :::tip
164
+ คุณต้องมีสิทธิ์เข้าถึงโมเดลที่คุณต้องการใน Amazon Bedrock
165
+ :::
166
+
167
+ 2. **กำหนดค่าการตรวจสอบสิทธิ์** โดยใช้วิธีใดวิธีหนึ่งต่อไปนี้:
168
+
169
+ #### ตัวแปรสภาพแวดล้อม (เริ่มต้นอย่างรวดเร็ว)
170
+
171
+ ตั้งค่าหนึ่งในตัวแปรสภาพแวดล้อมเหล่านี้ขณะเรียกใช้ opencode:
172
+
173
+ ```bash
174
+ # Option 1: Using AWS access keys
175
+ AWS_ACCESS_KEY_ID=XXX AWS_SECRET_ACCESS_KEY=YYY opencode
176
+
177
+ # Option 2: Using named AWS profile
178
+ AWS_PROFILE=my-profile opencode
179
+
180
+ # Option 3: Using Bedrock bearer token
181
+ AWS_BEARER_TOKEN_BEDROCK=XXX opencode
182
+ ```
183
+
184
+ หรือเพิ่มลงในโปรไฟล์ทุบตีของคุณ:
185
+
186
+ ```bash title="~/.bash_profile"
187
+ export AWS_PROFILE=my-dev-profile
188
+ export AWS_REGION=us-east-1
189
+ ```
190
+
191
+ #### ไฟล์การกำหนดค่า (แนะนำ)
192
+
193
+ สำหรับการกำหนดค่าเฉพาะโครงการหรือแบบถาวร ให้ใช้ `opencode.json`:
194
+
195
+ ```json title="opencode.json"
196
+ {
197
+ "$schema": "https://opencode.ai/config.json",
198
+ "provider": {
199
+ "amazon-bedrock": {
200
+ "options": {
201
+ "region": "us-east-1",
202
+ "profile": "my-aws-profile"
203
+ }
204
+ }
205
+ }
206
+ }
207
+ ```
208
+
209
+ **ตัวเลือกที่มี:**
210
+ - `region` - ​​AWS ภูมิภาค (เช่น `us-east-1`, `eu-west-1`)
211
+ - `profile` - ​​AWS ตั้งชื่อโปรไฟล์จาก `~/.aws/credentials`
212
+ - `endpoint` - ​​จุดสิ้นสุดที่กำหนดเอง URL สำหรับ VPC จุดสิ้นสุด (นามแฝงสำหรับตัวเลือก `baseURL` ทั่วไป)
213
+
214
+ :::tip
215
+ ตัวเลือกไฟล์การกำหนดค่ามีความสำคัญเหนือกว่าตัวแปรสภาพแวดล้อม
216
+ :::
217
+
218
+ #### ขั้นสูง: VPC จุดสิ้นสุด
219
+
220
+ หากคุณใช้จุดสิ้นสุด VPC สำหรับ Bedrock:
221
+
222
+ ```json title="opencode.json"
223
+ {
224
+ "$schema": "https://opencode.ai/config.json",
225
+ "provider": {
226
+ "amazon-bedrock": {
227
+ "options": {
228
+ "region": "us-east-1",
229
+ "profile": "production",
230
+ "endpoint": "https://bedrock-runtime.us-east-1.vpce-xxxxx.amazonaws.com"
231
+ }
232
+ }
233
+ }
234
+ }
235
+ ```
236
+
237
+ :::note
238
+ ตัวเลือก `endpoint` เป็นนามแฝงสำหรับตัวเลือก `baseURL` ทั่วไป โดยใช้คำศัพท์เฉพาะ AWS หากมีการระบุทั้ง `endpoint` และ `baseURL` `endpoint` จะมีความสำคัญเหนือกว่า
239
+ :::
240
+
241
+ #### วิธีการรับรองความถูกต้อง
242
+ - **`AWS_ACCESS_KEY_ID` / `AWS_SECRET_ACCESS_KEY`**: สร้างผู้ใช้ IAM และสร้างคีย์การเข้าถึงในคอนโซล AWS
243
+ - **`AWS_PROFILE`**: ใช้โปรไฟล์ที่มีชื่อจาก `~/.aws/credentials` ขั้นแรกให้กำหนดค่าด้วย `aws configure --profile my-profile` หรือ `aws sso login`
244
+ - **`AWS_BEARER_TOKEN_BEDROCK`**: สร้างคีย์ API ระยะยาวจากคอนโซล Amazon Bedrock
245
+ - **`AWS_WEB_IDENTITY_TOKEN_FILE` / `AWS_ROLE_ARN`**: สำหรับ EKS IRSA (IAM บทบาทสำหรับบัญชีบริการ) หรือสภาพแวดล้อม Kubernetes อื่นๆ ที่มีการเชื่อมโยง OIDC Kubernetes แทรกตัวแปรสภาพแวดล้อมเหล่านี้โดยอัตโนมัติเมื่อใช้คำอธิบายประกอบของบัญชีบริการ
246
+
247
+ #### ลำดับความสำคัญของการรับรองความถูกต้อง
248
+
249
+ Amazon Bedrock ใช้ลำดับความสำคัญในการรับรองความถูกต้องต่อไปนี้:
250
+ 1. **Bearer Token** - `AWS_BEARER_TOKEN_BEDROCK` ตัวแปรสภาพแวดล้อมหรือโทเค็นจากคำสั่ง `/connect`
251
+ 2. **AWS Credential Chain** - โปรไฟล์, คีย์การเข้าถึง, ข้อมูลประจำตัวที่แชร์, บทบาท IAM, โทเค็นข้อมูลประจำตัวของเว็บ (EKS IRSA), ข้อมูลเมตาของอินสแตนซ์
252
+
253
+ :::note
254
+ เมื่อตั้งค่าBearer Token (ผ่าน `/connect` หรือ `AWS_BEARER_TOKEN_BEDROCK`) โทเค็นนั้นจะมีความสำคัญเหนือกว่าวิธีการข้อมูลประจำตัว AWS ทั้งหมด รวมถึงโปรไฟล์ที่กำหนดค่าไว้
255
+ :::
256
+
257
+ 3. รันคำสั่ง `/models` เพื่อเลือกรุ่นที่ต้องการ
258
+
259
+ ```txt
260
+ /models
261
+ ```
262
+
263
+ :::note
264
+ สำหรับโปรไฟล์การอนุมานแบบกำหนดเอง ให้ใช้ชื่อรุ่นและผู้ให้บริการในคีย์และตั้งค่าคุณสมบัติ `id` เป็น arn สิ่งนี้ทำให้มั่นใจได้ว่าแคชถูกต้อง:
265
+
266
+ ```json title="opencode.json"
267
+ {
268
+ "$schema": "https://opencode.ai/config.json",
269
+ "provider": {
270
+ "amazon-bedrock": {
271
+ // ...
272
+ "models": {
273
+ "anthropic-claude-sonnet-4.5": {
274
+ "id": "arn:aws:bedrock:us-east-1:xxx:application-inference-profile/yyy"
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
280
+ ```
281
+
282
+ :::
283
+
284
+ ---
285
+
286
+ ### Anthropic
287
+
288
+ 1. เมื่อคุณสมัครแล้ว ให้รันคำสั่ง `/connect` และเลือก Anthropic
289
+
290
+ ```txt
291
+ /connect
292
+ ```
293
+
294
+ 2. ที่นี่คุณสามารถเลือกตัวเลือก **Claude Pro/Max** และมันจะเปิดเบราว์เซอร์ของคุณ
295
+ และขอให้คุณตรวจสอบสิทธิ์
296
+
297
+ ```txt
298
+ ┌ Select auth method
299
+
300
+ │ Claude Pro/Max
301
+ │ Create an API Key
302
+ │ Manually enter API Key
303
+
304
+ ```
305
+
306
+ 3. ตอนนี้โมเดล Anthropic ทั้งหมดควรจะพร้อมใช้งานเมื่อคุณใช้คำสั่ง `/models`
307
+
308
+ ```txt
309
+ /models
310
+ ```
311
+
312
+ :::info
313
+ การใช้การสมัครสมาชิก Claude Pro/Max ใน OpenCode ไม่ได้รับการสนับสนุนอย่างเป็นทางการจาก [Anthropic](https://anthropic.com)
314
+ :::
315
+
316
+ ##### การใช้ API Key
317
+
318
+ คุณยังสามารถเลือก **สร้าง API คีย์** หากคุณไม่มีการสมัครสมาชิก Pro/Max นอกจากนี้ยังจะเปิดเบราว์เซอร์ของคุณและขอให้คุณเข้าสู่ระบบ Anthropic และให้รหัสที่คุณสามารถวางใน terminal ของคุณ
319
+
320
+ หรือหากคุณมีคีย์ API อยู่แล้ว คุณสามารถเลือก **ป้อนคีย์ API ด้วยตนเอง** และวางลงใน terminal ของคุณ
321
+
322
+ ---
323
+
324
+ ### Atomic Chat
325
+
326
+ คุณสามารถกำหนดค่า opencode ให้ใช้โมเดลท้องถิ่นผ่าน [Atomic Chat](https://atomic.chat) ซึ่งเป็นแอปพลิเคชันเดสก์ท็อปที่เรียกใช้ LLM ในเครื่องภายใต้เซิร์ฟเวอร์ API ที่เข้ากันได้กับ OpenAI (ปลายทางเริ่มต้น `http://127.0.0.1:1337/v1`)
327
+
328
+ ```json title="opencode.json" "atomic-chat" {5, 6, 8, 10-14}
329
+ {
330
+ "$schema": "https://opencode.ai/config.json",
331
+ "provider": {
332
+ "atomic-chat": {
333
+ "npm": "@ai-sdk/openai-compatible",
334
+ "name": "Atomic Chat (local)",
335
+ "options": {
336
+ "baseURL": "http://127.0.0.1:1337/v1"
337
+ },
338
+ "models": {
339
+ "<your-model-id>": {
340
+ "name": "<your-model-name>"
341
+ }
342
+ }
343
+ }
344
+ }
345
+ }
346
+ ```
347
+
348
+ ในตัวอย่างนี้:
349
+
350
+ - `atomic-chat` คือรหัสผู้ให้บริการที่กำหนดเอง สามารถเป็นสตริงใดก็ได้ที่คุณต้องการ
351
+ - `npm` ระบุแพ็กเกจที่จะใช้สำหรับผู้ให้บริการนี้ ที่นี่ใช้ `@ai-sdk/openai-compatible` สำหรับ API ใดๆ ที่เข้ากันได้กับ OpenAI
352
+ - `name` คือชื่อแสดงของผู้ให้บริการในอินเทอร์เฟซ
353
+ - `options.baseURL` คือปลายทางของเซิร์ฟเวอร์ท้องถิ่น เปลี่ยนโฮสต์และพอร์ตให้ตรงกับการตั้งค่า Atomic Chat ของคุณ
354
+ - `models` คือแผนที่ระหว่างรหัสโมเดลกับชื่อแสดง แต่ละรหัสต้องตรงกับ `id` ที่ส่งคืนโดย `GET /v1/models` — รัน `curl http://127.0.0.1:1337/v1/models` เพื่อแสดงรายการรหัสที่โหลดอยู่ใน Atomic Chat
355
+
356
+ :::tip
357
+ หากการเรียกเครื่องมือทำงานได้ไม่ดี ให้เลือกโมเดลที่โหลดแล้วซึ่งรองรับ tool calling ได้ดี (ตัวอย่างเช่น รุ่น Qwen-Coder หรือ DeepSeek-Coder)
358
+ :::
359
+
360
+ ---
361
+
362
+ ### Azure OpenAI
363
+
364
+ :::note
365
+ หากคุณพบข้อผิดพลาด "ฉันขอโทษ แต่ฉันไม่สามารถช่วยเหลือคำขอนั้นได้" ให้ลองเปลี่ยนตัวกรองเนื้อหาจาก **DefaultV2** เป็น **Default** ในทรัพยากร Azure ของคุณ
366
+ :::
367
+
368
+ 1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องการ:
369
+ - **ชื่อทรัพยากร**: นี่จะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://RESOURCE_NAME.openai.azure.com/`)
370
+ - **API key**: `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ
371
+
372
+ 2. ไปที่ [Azure AI Foundry](https://ai.azure.com/) และปรับใช้โมเดล
373
+
374
+ :::note
375
+ ชื่อการปรับใช้จะต้องตรงกับชื่อรุ่นเพื่อให้ opencode ทำงานได้อย่างถูกต้อง
376
+ :::
377
+
378
+ 3. เรียกใช้คำสั่ง `/connect` และค้นหา **Azure**
379
+
380
+ ```txt
381
+ /connect
382
+ ```
383
+
384
+ 4. ป้อน API ของคุณ
385
+
386
+ ```txt
387
+ ┌ API key
388
+
389
+
390
+ └ enter
391
+ ```
392
+
393
+ 5. ตั้งชื่อทรัพยากรของคุณเป็นตัวแปรสภาพแวดล้อม:
394
+
395
+ ```bash
396
+ AZURE_RESOURCE_NAME=XXX opencode
397
+ ```
398
+
399
+ หรือเพิ่มลงในโปรไฟล์ทุบตีของคุณ:
400
+
401
+ ```bash title="~/.bash_profile"
402
+ export AZURE_RESOURCE_NAME=XXX
403
+ ```
404
+
405
+ 6. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ
406
+
407
+ ```txt
408
+ /models
409
+ ```
410
+
411
+ ---
412
+
413
+ ### Azure Cognitive Services
414
+
415
+ 1. ไปที่ [พอร์ทัล Azure](https://portal.azure.com/) และสร้างทรัพยากร **Azure OpenAI** คุณจะต้องการ:
416
+ - **ชื่อทรัพยากร**: นี่จะกลายเป็นส่วนหนึ่งของจุดสิ้นสุด API ของคุณ (`https://AZURE_COGNITIVE_SERVICES_RESOURCE_NAME.cognitiveservices.azure.com/`)
417
+ - **API key**: `KEY 1` หรือ `KEY 2` จากทรัพยากรของคุณ
418
+
419
+ 2. ไปที่ [Azure AI Foundry](https://ai.azure.com/) และปรับใช้โมเดล
420
+
421
+ :::note
422
+ ชื่อการปรับใช้จะต้องตรงกับชื่อรุ่นเพื่อให้ opencode ทำงานได้อย่างถูกต้อง
423
+ :::
424
+
425
+ 3. เรียกใช้คำสั่ง `/connect` และค้นหา **Azure Cognitive Services**
426
+
427
+ ```txt
428
+ /connect
429
+ ```
430
+
431
+ 4. ป้อน API ของคุณ
432
+
433
+ ```txt
434
+ ┌ API key
435
+
436
+
437
+ └ enter
438
+ ```
439
+
440
+ 5. ตั้งชื่อทรัพยากรของคุณเป็นตัวแปรสภาพแวดล้อม:
441
+
442
+ ```bash
443
+ AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX opencode
444
+ ```
445
+
446
+ หรือเพิ่มลงในโปรไฟล์ทุบตีของคุณ:
447
+
448
+ ```bash title="~/.bash_profile"
449
+ export AZURE_COGNITIVE_SERVICES_RESOURCE_NAME=XXX
450
+ ```
451
+
452
+ 6. รันคำสั่ง `/models` เพื่อเลือกโมเดลที่ปรับใช้ของคุณ
453
+
454
+ ```txt
455
+ /models
456
+ ```
457
+
458
+ ---
459
+
460
+ ### Baseten
461
+
462
+ 1. ไปที่ [Baseten](https://app.baseten.co/) สร้างบัญชี และสร้างคีย์ API
463
+
464
+ 2. รันคำสั่ง `/connect` และค้นหา **Baseten**
465
+
466
+ ```txt
467
+ /connect
468
+ ```
469
+
470
+ 3. ป้อนคีย์ Baseten API ของคุณ
471
+
472
+ ```txt
473
+ ┌ API key
474
+
475
+
476
+ └ enter
477
+ ```
478
+
479
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
480
+
481
+ ```txt
482
+ /models
483
+ ```
484
+
485
+ ---
486
+
487
+ ### Cerebras
488
+
489
+ 1. ไปที่ [คอนโซล Cerebras](https://inference.cerebras.ai/) สร้างบัญชี และสร้างคีย์ API
490
+
491
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Cerebras**
492
+
493
+ ```txt
494
+ /connect
495
+ ```
496
+
497
+ 3. ป้อนคีย์ Cerebras API ของคุณ
498
+
499
+ ```txt
500
+ ┌ API key
501
+
502
+
503
+ └ enter
504
+ ```
505
+
506
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่นเช่น _Qwen 3 Coder 480B_
507
+
508
+ ```txt
509
+ /models
510
+ ```
511
+
512
+ ---
513
+
514
+ ### Cloudflare AI Gateway
515
+
516
+ Cloudflare AI Gateway ช่วยให้คุณเข้าถึงโมเดลจาก OpenAI, Anthropic, Workers AI และอื่นๆ อีกมากมายผ่านตำแหน่งข้อมูลแบบรวม ด้วย [การเรียกเก็บเงินแบบรวม](https://developers.cloudflare.com/ai-gateway/features/unified-billing/) คุณไม่จำเป็นต้องใช้คีย์ API แยกต่างหากสำหรับผู้ให้บริการแต่ละราย
517
+
518
+ 1. ไปที่ [แดชบอร์ด Cloudflare](https://dash.cloudflare.com/) ไปที่ **AI** > **AI Gateway** และสร้างเกตเวย์ใหม่
519
+
520
+ 2. ตั้งค่ารหัสบัญชีและรหัสเกตเวย์ของคุณเป็นตัวแปรสภาพแวดล้อม
521
+
522
+ ```bash title="~/.bash_profile"
523
+ export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
524
+ export CLOUDFLARE_GATEWAY_ID=your-gateway-id
525
+ ```
526
+
527
+ 3. รันคำสั่ง `/connect` และค้นหา **Cloudflare AI Gateway**
528
+
529
+ ```txt
530
+ /connect
531
+ ```
532
+
533
+ 4. ป้อน Cloudflare API Token ของคุณ
534
+
535
+ ```txt
536
+ ┌ API key
537
+
538
+
539
+ └ enter
540
+ ```
541
+
542
+ หรือตั้งเป็นตัวแปรสภาพแวดล้อม
543
+
544
+ ```bash title="~/.bash_profile"
545
+ export CLOUDFLARE_API_TOKEN=your-api-token
546
+ ```
547
+
548
+ 5. รันคำสั่ง `/models` เพื่อเลือกรุ่น
549
+
550
+ ```txt
551
+ /models
552
+ ```
553
+
554
+ คุณยังสามารถเพิ่มโมเดลผ่านการกำหนดค่า opencode ของคุณได้
555
+
556
+ ```json title="opencode.json"
557
+ {
558
+ "$schema": "https://opencode.ai/config.json",
559
+ "provider": {
560
+ "cloudflare-ai-gateway": {
561
+ "models": {
562
+ "openai/gpt-4o": {},
563
+ "anthropic/claude-sonnet-4": {}
564
+ }
565
+ }
566
+ }
567
+ }
568
+ ```
569
+
570
+ ---
571
+
572
+ ### Cortecs
573
+
574
+ 1. ไปที่ [คอนโซล Cortecs](https://cortecs.ai/) สร้างบัญชี และสร้างคีย์ API
575
+
576
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Cortecs**
577
+
578
+ ```txt
579
+ /connect
580
+ ```
581
+
582
+ 3. ป้อนคีย์ Cortecs API ของคุณ
583
+
584
+ ```txt
585
+ ┌ API key
586
+
587
+
588
+ └ enter
589
+ ```
590
+
591
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Kimi K2 Instruct_
592
+
593
+ ```txt
594
+ /models
595
+ ```
596
+
597
+ ---
598
+
599
+ ### DeepSeek
600
+
601
+ 1. ไปที่ [คอนโซล DeepSeek](https://platform.deepseek.com/) สร้างบัญชี แล้วคลิก **สร้างคีย์ API ใหม่**
602
+
603
+ 2. รันคำสั่ง `/connect` และค้นหา **DeepSeek**
604
+
605
+ ```txt
606
+ /connect
607
+ ```
608
+
609
+ 3. ป้อนคีย์ DeepSeek API ของคุณ
610
+
611
+ ```txt
612
+ ┌ API key
613
+
614
+
615
+ └ enter
616
+ ```
617
+
618
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดล DeepSeek เช่น _DeepSeek V4 Pro_
619
+
620
+ ```txt
621
+ /models
622
+ ```
623
+
624
+ ---
625
+
626
+ ### Deep Infra
627
+
628
+ 1. ไปที่ [แดชบอร์ด Deep Infra](https://deepinfra.com/dash) สร้างบัญชี และสร้างคีย์ API
629
+
630
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Deep Infra**
631
+
632
+ ```txt
633
+ /connect
634
+ ```
635
+
636
+ 3. ป้อนคีย์ Deep Infra API ของคุณ
637
+
638
+ ```txt
639
+ ┌ API key
640
+
641
+
642
+ └ enter
643
+ ```
644
+
645
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
646
+
647
+ ```txt
648
+ /models
649
+ ```
650
+
651
+ ---
652
+
653
+ ### FrogBot
654
+
655
+ 1. ไปที่ [แดชบอร์ด FrogBot](https://app.frogbot.ai/signup) สร้างบัญชี และสร้างคีย์ API
656
+
657
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **FrogBot**
658
+
659
+ ```txt
660
+ /connect
661
+ ```
662
+
663
+ 3. ป้อนคีย์ FrogBot API ของคุณ
664
+
665
+ ```txt
666
+ ┌ API key
667
+
668
+
669
+ └ enter
670
+ ```
671
+
672
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
673
+
674
+ ```txt
675
+ /models
676
+ ```
677
+
678
+ ---
679
+
680
+ ### Fireworks AI
681
+
682
+ 1. ไปที่ [คอนโซล Fireworks AI](https://app.fireworks.ai/) สร้างบัญชี แล้วคลิก **Create API Key**
683
+
684
+ 2. รันคำสั่ง `/connect` และค้นหา **Fireworks AI**
685
+
686
+ ```txt
687
+ /connect
688
+ ```
689
+
690
+ 3. ป้อนคีย์ Fireworks AI API ของคุณ
691
+
692
+ ```txt
693
+ ┌ API key
694
+
695
+
696
+ └ enter
697
+ ```
698
+
699
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Kimi K2 Instruct_
700
+
701
+ ```txt
702
+ /models
703
+ ```
704
+
705
+ ---
706
+
707
+ ### GitLab Duo
708
+
709
+ GitLab Duo ให้การแชทแบบเอเจนต์ที่ขับเคลื่อนด้วย AI พร้อมความสามารถในการเรียกใช้เครื่องมือแบบเนทีฟผ่านพร็อกซี Anthropic ของ GitLab
710
+
711
+ 1. รันคำสั่ง `/connect` และเลือก GitLab
712
+
713
+ ```txt
714
+ /connect
715
+ ```
716
+
717
+ 2. เลือกวิธีการรับรองความถูกต้องของคุณ:
718
+
719
+ ```txt
720
+ ┌ Select auth method
721
+
722
+ │ OAuth (Recommended)
723
+ │ Personal Access Token
724
+
725
+ ```
726
+
727
+ #### การใช้ OAuth (แนะนำ)
728
+
729
+ เลือก **OAuth** และเบราว์เซอร์ของคุณจะเปิดขึ้นเพื่อรับสิทธิ์
730
+
731
+ #### การใช้ Personal Access Token
732
+
733
+ 1. ไปที่ [GitLab User Settings > Access Tokens](https://gitlab.com/-/user_settings/personal_access_tokens)
734
+ 2. คลิก **เพิ่มโทเค็นใหม่**
735
+ 3. ชื่อ: `OpenCode`, ขอบเขต: `api`
736
+ 4. คัดลอกโทเค็น (เริ่มต้นด้วย `glpat-`)
737
+ 5. ป้อนลงใน terminal
738
+
739
+ 6. รันคำสั่ง `/models` เพื่อดูรุ่นที่มีจำหน่าย
740
+
741
+ ```txt
742
+ /models
743
+ ```
744
+
745
+ มีโมเดลที่ใช้ Claude สามรุ่นให้เลือก:
746
+ - **duo-chat-haiku-4-5** (ค่าเริ่มต้น) - ตอบสนองรวดเร็วสำหรับงานด่วน
747
+ - **duo-chat-sonnet-4-5** - ประสิทธิภาพที่สมดุลสำหรับขั้นตอนการทำงานส่วนใหญ่
748
+ - **duo-chat-opus-4-5** - มีความสามารถมากที่สุดสำหรับการวิเคราะห์ที่ซับซ้อน
749
+
750
+ :::note
751
+ คุณยังสามารถระบุตัวแปรสภาพแวดล้อม 'GITLAB_TOKEN' ได้หากคุณไม่ต้องการ
752
+ เพื่อจัดเก็บโทเค็นในที่เก็บข้อมูลการรับรองความถูกต้องของ opencode
753
+ :::
754
+
755
+ ##### GitLab ที่โฮสต์เอง
756
+
757
+ :::note[บันทึกการปฏิบัติตาม]
758
+ OpenCode ใช้โมเดลขนาดเล็กสำหรับงาน AI บางอย่าง เช่น การสร้างชื่อเซสชัน
759
+ มีการกำหนดค่าให้ใช้ gpt-5-nano ตามค่าเริ่มต้น ซึ่งโฮสต์โดย Zen เพื่อล็อค OpenCode
760
+ หากต้องการใช้เฉพาะอินสแตนซ์ที่โฮสต์บน GitLab ของคุณเอง ให้เพิ่มสิ่งต่อไปนี้ในของคุณ
761
+ `opencode.json` ไฟล์. ขอแนะนำให้ปิดใช้งานการแชร์เซสชันด้วย
762
+
763
+ ```json
764
+ {
765
+ "$schema": "https://opencode.ai/config.json",
766
+ "small_model": "gitlab/duo-chat-haiku-4-5",
767
+ "share": "disabled"
768
+ }
769
+ ```
770
+
771
+ :::
772
+
773
+ สำหรับอินสแตนซ์ GitLab ที่โฮสต์เอง:
774
+
775
+ ```bash
776
+ export GITLAB_INSTANCE_URL=https://gitlab.company.com
777
+ export GITLAB_TOKEN=glpat-...
778
+ ```
779
+
780
+ หากอินสแตนซ์ของคุณใช้งาน AI Gateway แบบกำหนดเอง:
781
+
782
+ ```bash
783
+ GITLAB_AI_GATEWAY_URL=https://ai-gateway.company.com
784
+ ```
785
+
786
+ หรือเพิ่มในโปรไฟล์ทุบตีของคุณ:
787
+
788
+ ```bash title="~/.bash_profile"
789
+ export GITLAB_INSTANCE_URL=https://gitlab.company.com
790
+ export GITLAB_AI_GATEWAY_URL=https://ai-gateway.company.com
791
+ export GITLAB_TOKEN=glpat-...
792
+ ```
793
+
794
+ :::note
795
+ ผู้ดูแลระบบ GitLab ของคุณต้องเปิดใช้งานสิ่งต่อไปนี้:
796
+
797
+ 1. [Duo Agent Platform](https://docs.gitlab.com/user/duo_agent_platform/turn_on_off/) สำหรับผู้ใช้ กลุ่ม หรืออินสแตนซ์
798
+ 2. แฟล็กคุณลักษณะ (ผ่านคอนโซล Rails):
799
+ - `agent_platform_claude_code`
800
+ - `third_party_agents_enabled`
801
+ :::
802
+
803
+ ##### OAuth สำหรับอินสแตนซ์ที่โฮสต์เอง
804
+
805
+ คุณต้องสร้างเพื่อให้ Oauth ทำงานกับอินสแตนซ์ที่โฮสต์เองได้
806
+ แอพพลิเคชั่นใหม่ (Settings → Applications) ด้วย
807
+ โทรกลับ URL `http://127.0.0.1:8080/callback` และขอบเขตต่อไปนี้:
808
+
809
+ - api (เข้าถึง API ในนามของคุณ)
810
+ - read_user (อ่านข้อมูลส่วนตัวของคุณ)
811
+ - read_repository (อนุญาตให้เข้าถึงที่เก็บแบบอ่านอย่างเดียว)
812
+
813
+ จากนั้นเปิดเผย ID แอปพลิเคชันเป็นตัวแปรสภาพแวดล้อม:
814
+
815
+ ```bash
816
+ export GITLAB_OAUTH_CLIENT_ID=your_application_id_here
817
+ ```
818
+
819
+ เอกสารประกอบเพิ่มเติมเกี่ยวกับหน้าแรกของ [opencode-gitlab-auth](https://www.npmjs.com/package/opencode-gitlab-auth)
820
+
821
+ ##### การกำหนดค่า
822
+
823
+ ปรับแต่งผ่าน `opencode.json`:
824
+
825
+ ```json title="opencode.json"
826
+ {
827
+ "$schema": "https://opencode.ai/config.json",
828
+ "provider": {
829
+ "gitlab": {
830
+ "options": {
831
+ "instanceUrl": "https://gitlab.com"
832
+ }
833
+ }
834
+ }
835
+ }
836
+ ```
837
+
838
+ ##### GitLab API Tools (เป็นทางเลือก แต่แนะนำเป็นอย่างยิ่ง)
839
+
840
+ วิธีเข้าถึงเครื่องมือ GitLab (รวมคำขอ ปัญหา ไปป์ไลน์ CI/CD ฯลฯ):
841
+
842
+ ```json title="opencode.json"
843
+ {
844
+ "$schema": "https://opencode.ai/config.json",
845
+ "plugin": ["opencode-gitlab-plugin"]
846
+ }
847
+ ```
848
+
849
+ ปลั๊กอินนี้มอบความสามารถในการจัดการพื้นที่เก็บข้อมูล GitLab ที่ครอบคลุม รวมถึงการตรวจสอบ MR การติดตามปัญหา การตรวจสอบไปป์ไลน์ และอื่นๆ
850
+
851
+ ---
852
+
853
+ ### GitHub Copilot
854
+
855
+ วิธีใช้การสมัครสมาชิก GitHub Copilot ด้วย opencode:
856
+
857
+ :::note
858
+ บางรุ่นอาจต้องมี [Pro+
859
+ subscription](https://github.com/features/copilot/plans) เพื่อใช้งาน
860
+
861
+ บางรุ่นจำเป็นต้องเปิดใช้งานด้วยตนเองใน [การตั้งค่า GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-ai-models/configure-access-to-ai-models#setup-for-individual-use)
862
+ :::
863
+
864
+ 1. รันคำสั่ง `/connect` และค้นหา GitHub Copilot
865
+
866
+ ```txt
867
+ /connect
868
+ ```
869
+
870
+ 2. ไปที่ [github.com/login/device](https://github.com/login/device) และป้อนรหัส
871
+
872
+ ```txt
873
+ ┌ Login with GitHub Copilot
874
+
875
+ │ https://github.com/login/device
876
+
877
+ │ Enter code: 8F43-6FCF
878
+
879
+ │ Waiting for authorization...
880
+ ```
881
+
882
+ 3. ตอนนี้รันคำสั่ง `/models` เพื่อเลือกรุ่นที่คุณต้องการ
883
+
884
+ ```txt
885
+ /models
886
+ ```
887
+
888
+ ---
889
+
890
+ ### Google Vertex AI
891
+
892
+ วิธีใช้ Google Vertex AI กับ OpenCode:
893
+
894
+ 1. ไปที่ **Model Garden** ใน Google Cloud Console แล้วตรวจสอบ
895
+ รุ่นที่มีในภูมิภาคของคุณ
896
+
897
+ :::note
898
+ คุณต้องมีโปรเจ็กต์ Google Cloud ที่เปิดใช้งาน Vertex AI API
899
+ :::
900
+
901
+ 2. ตั้งค่าตัวแปรสภาพแวดล้อมที่ต้องการ:
902
+ - `GOOGLE_CLOUD_PROJECT`: รหัสโครงการ Google Cloud ของคุณ
903
+ - `VERTEX_LOCATION` (เป็นทางเลือก): ภูมิภาคสำหรับ Vertex AI (ค่าเริ่มต้นคือ `global`)
904
+ - การรับรองความถูกต้อง (เลือกหนึ่งรายการ):
905
+ - `GOOGLE_APPLICATION_CREDENTIALS`: เส้นทางไปยังบัญชีบริการของคุณ JSON ไฟล์คีย์
906
+ - ตรวจสอบสิทธิ์โดยใช้ gcloud CLI: `gcloud auth application-default login`
907
+
908
+ ตั้งค่าในขณะที่เรียกใช้ opencode
909
+
910
+ ```bash
911
+ GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json GOOGLE_CLOUD_PROJECT=your-project-id opencode
912
+ ```
913
+
914
+ หรือเพิ่มลงในโปรไฟล์ทุบตีของคุณ
915
+
916
+ ```bash title="~/.bash_profile"
917
+ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
918
+ export GOOGLE_CLOUD_PROJECT=your-project-id
919
+ export VERTEX_LOCATION=global
920
+ ```
921
+
922
+ :::tip
923
+ ภูมิภาค `global` ปรับปรุงความพร้อมใช้งานและลดข้อผิดพลาดโดยไม่มีค่าใช้จ่ายเพิ่มเติม ใช้ตำแหน่งข้อมูลระดับภูมิภาค (เช่น `us-central1`) สำหรับข้อกำหนดด้านถิ่นที่อยู่ของข้อมูล [เรียนรู้เพิ่มเติม](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#regional_and_global_endpoints)
924
+ :::
925
+
926
+ 3. รันคำสั่ง `/models` เพื่อเลือกรุ่นที่ต้องการ
927
+
928
+ ```txt
929
+ /models
930
+ ```
931
+
932
+ ---
933
+
934
+ ### Groq
935
+
936
+ 1. ไปที่ [Groq console](https://console.groq.com/) คลิก **Create API Key** และคัดลอกคีย์
937
+
938
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา Groq
939
+
940
+ ```txt
941
+ /connect
942
+ ```
943
+
944
+ 3. ป้อนคีย์ API สำหรับผู้ให้บริการ
945
+
946
+ ```txt
947
+ ┌ API key
948
+
949
+
950
+ └ enter
951
+ ```
952
+
953
+ 4. รันคำสั่ง `/models` เพื่อเลือกคำสั่งที่คุณต้องการ
954
+
955
+ ```txt
956
+ /models
957
+ ```
958
+
959
+ ---
960
+
961
+ ### Hugging Face
962
+
963
+ [ผู้ให้บริการการอนุมาน Hugging Face](https://huggingface.co/docs/inference-providers) ช่วยให้สามารถเข้าถึงโมเดลแบบเปิดที่รองรับโดยผู้ให้บริการมากกว่า 17 ราย
964
+
965
+ 1. ไปที่ [การตั้งค่า Hugging Face](https://huggingface.co/settings/tokens/new?ownUserPermissions=inference.serverless.write&tokenType=fineGrained) เพื่อสร้างโทเค็นที่มีสิทธิ์ในการโทรไปยังผู้ให้บริการการอนุมาน
966
+
967
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Hugging Face**
968
+
969
+ ```txt
970
+ /connect
971
+ ```
972
+
973
+ 3. ป้อน Hugging Face Token ของคุณ
974
+
975
+ ```txt
976
+ ┌ API key
977
+
978
+
979
+ └ enter
980
+ ```
981
+
982
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดล เช่น _Kimi-K2-Instruct_ หรือ _GLM-4.6_
983
+
984
+ ```txt
985
+ /models
986
+ ```
987
+
988
+ ---
989
+
990
+ ### Helicone
991
+
992
+ [Helicone](https://helicone.ai) เป็นแพลตฟอร์มการติดตาม LLM ที่ให้การบันทึก การตรวจสอบ และการวิเคราะห์สำหรับแอปพลิเคชัน AI ของคุณ Helicone AI Gateway กำหนดเส้นทางคำขอของคุณไปยังผู้ให้บริการที่เหมาะสมโดยอัตโนมัติตามรุ่น
993
+
994
+ 1. ไปที่ [Helicone](https://helicone.ai) สร้างบัญชี และสร้างคีย์ API จากแดชบอร์ดของคุณ
995
+
996
+ 2. รันคำสั่ง `/connect` และค้นหา **Helicone**
997
+
998
+ ```txt
999
+ /connect
1000
+ ```
1001
+
1002
+ 3. ป้อนคีย์ Helicone API ของคุณ
1003
+
1004
+ ```txt
1005
+ ┌ API key
1006
+
1007
+
1008
+ └ enter
1009
+ ```
1010
+
1011
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
1012
+
1013
+ ```txt
1014
+ /models
1015
+ ```
1016
+
1017
+ หากต้องการทราบผู้ให้บริการเพิ่มเติมและฟีเจอร์ขั้นสูง เช่น การแคชและการจำกัดอัตรา โปรดตรวจสอบ [เอกสารประกอบของ Helicone](https://docs.helicone.ai)
1018
+
1019
+ #### การกำหนดค่าเพิ่มเติม
1020
+
1021
+ ในกรณีที่คุณเห็นคุณสมบัติหรือรุ่นจาก Helicone ที่ไม่ได้กำหนดค่าโดยอัตโนมัติผ่าน opencode คุณสามารถกำหนดค่าด้วยตนเองได้ตลอดเวลา
1022
+
1023
+ นี่คือ [Helicone's Model Directory](https://helicone.ai/models) คุณจะต้องใช้สิ่งนี้เพื่อรับ ID ของโมเดลที่คุณต้องการเพิ่ม
1024
+
1025
+ ```jsonc title="~/.config/opencode/opencode.jsonc"
1026
+ {
1027
+ "$schema": "https://opencode.ai/config.json",
1028
+ "provider": {
1029
+ "helicone": {
1030
+ "npm": "@ai-sdk/openai-compatible",
1031
+ "name": "Helicone",
1032
+ "options": {
1033
+ "baseURL": "https://ai-gateway.helicone.ai",
1034
+ },
1035
+ "models": {
1036
+ "gpt-4o": {
1037
+ // Model ID (from Helicone's model directory page)
1038
+ "name": "GPT-4o", // Your own custom name for the model
1039
+ },
1040
+ "claude-sonnet-4-20250514": {
1041
+ "name": "Claude Sonnet 4",
1042
+ },
1043
+ },
1044
+ },
1045
+ },
1046
+ }
1047
+ ```
1048
+
1049
+ #### ส่วนหัวที่กำหนดเอง
1050
+
1051
+ Helicone รองรับส่วนหัวแบบกำหนดเองสำหรับฟีเจอร์ต่างๆ เช่น การแคช การติดตามผู้ใช้ และการจัดการเซสชัน เพิ่มลงในการกำหนดค่าผู้ให้บริการของคุณโดยใช้ `options.headers`:
1052
+
1053
+ ```jsonc title="~/.config/opencode/opencode.jsonc"
1054
+ {
1055
+ "$schema": "https://opencode.ai/config.json",
1056
+ "provider": {
1057
+ "helicone": {
1058
+ "npm": "@ai-sdk/openai-compatible",
1059
+ "name": "Helicone",
1060
+ "options": {
1061
+ "baseURL": "https://ai-gateway.helicone.ai",
1062
+ "headers": {
1063
+ "Helicone-Cache-Enabled": "true",
1064
+ "Helicone-User-Id": "opencode",
1065
+ },
1066
+ },
1067
+ },
1068
+ },
1069
+ }
1070
+ ```
1071
+
1072
+ ##### การติดตามเซสชัน
1073
+
1074
+ คุณลักษณะ [เซสชัน](https://docs.helicone.ai/features/sessions) ของ Helicone ช่วยให้คุณสามารถจัดกลุ่มคำขอ LLM ที่เกี่ยวข้องเข้าด้วยกันได้ ใช้ปลั๊กอิน [opencode-helicone-session](https://github.com/H2Shami/opencode-helicone-session) เพื่อบันทึกการสนทนา OpenCode แต่ละรายการเป็นเซสชันใน Helicone โดยอัตโนมัติ
1075
+
1076
+ ```bash
1077
+ npm install -g opencode-helicone-session
1078
+ ```
1079
+
1080
+ เพิ่มลงในการกำหนดค่าของคุณ
1081
+
1082
+ ```json title="opencode.json"
1083
+ {
1084
+ "plugin": ["opencode-helicone-session"]
1085
+ }
1086
+ ```
1087
+
1088
+ ปลั๊กอินจะแทรกส่วนหัว `Helicone-Session-Id` และ `Helicone-Session-Name` ลงในคำขอของคุณ ในหน้าเซสชันของ Helicone คุณจะเห็นการสนทนา OpenCode แต่ละรายการแยกเป็นเซสชันแยกกัน
1089
+
1090
+ ##### ส่วนหัวของ Helicone ทั่วไป
1091
+
1092
+ | ส่วนหัว | คำอธิบาย |
1093
+ | -------------------------- | ---------------------------------------------------------------- |
1094
+ | `Helicone-Cache-Enabled` | เปิดใช้งานการแคชการตอบกลับ (`true`/`false`) |
1095
+ | `Helicone-User-Id` | ติดตามตัวชี้วัดตามผู้ใช้ |
1096
+ | `Helicone-Property-[Name]` | เพิ่มคุณสมบัติที่กำหนดเอง (เช่น `Helicone-Property-Environment`) |
1097
+ | `Helicone-Prompt-Id` | เชื่อมโยงคำขอกับเวอร์ชันพร้อมท์ |
1098
+
1099
+ ดู [Helicone Header Directory](https://docs.helicone.ai/helicone-headers/header-directory) สำหรับส่วนหัวที่มีอยู่ทั้งหมด
1100
+
1101
+ ---
1102
+
1103
+ ### llama.cpp
1104
+
1105
+ คุณสามารถกำหนดค่า opencode เพื่อใช้โมเดลท้องถิ่นผ่านยูทิลิตี้ [llama.cpp's](https://github.com/ggml-org/llama.cpp) llama-server
1106
+
1107
+ ```json title="opencode.json" "llama.cpp" {5, 6, 8, 10-15}
1108
+ {
1109
+ "$schema": "https://opencode.ai/config.json",
1110
+ "provider": {
1111
+ "llama.cpp": {
1112
+ "npm": "@ai-sdk/openai-compatible",
1113
+ "name": "llama-server (local)",
1114
+ "options": {
1115
+ "baseURL": "http://127.0.0.1:8080/v1"
1116
+ },
1117
+ "models": {
1118
+ "qwen3-coder:a3b": {
1119
+ "name": "Qwen3-Coder: a3b-30b (local)",
1120
+ "limit": {
1121
+ "context": 128000,
1122
+ "output": 65536
1123
+ }
1124
+ }
1125
+ }
1126
+ }
1127
+ }
1128
+ }
1129
+ ```
1130
+
1131
+ ในตัวอย่างนี้:
1132
+
1133
+ - `llama.cpp` คือ ID ผู้ให้บริการที่กำหนดเอง นี่อาจเป็นสตริงใดก็ได้ที่คุณต้องการ
1134
+ - `npm` ระบุแพ็คเกจที่จะใช้สำหรับผู้ให้บริการรายนี้ ในที่นี้ `@ai-sdk/openai-compatible` ใช้สำหรับ API ที่เข้ากันได้กับ OpenAI
1135
+ - `name` คือชื่อที่แสดงของผู้ให้บริการใน UI
1136
+ - `options.baseURL` เป็นจุดสิ้นสุดสำหรับเซิร์ฟเวอร์ภายในเครื่อง
1137
+ - `models` คือแมปของ ID โมเดลกับการกำหนดค่า ชื่อรุ่นจะปรากฏในรายการเลือกรุ่น
1138
+
1139
+ ---
1140
+
1141
+ ### IO.NET
1142
+
1143
+ IO.NET มี 17 โมเดลที่ได้รับการปรับให้เหมาะกับการใช้งานที่หลากหลาย:
1144
+
1145
+ 1. ไปที่ [IO.NET console](https://ai.io.net/) สร้างบัญชี และสร้างคีย์ API
1146
+
1147
+ 2. รันคำสั่ง `/connect` และค้นหา **IO.NET**
1148
+
1149
+ ```txt
1150
+ /connect
1151
+ ```
1152
+
1153
+ 3. ป้อนคีย์ IO.NET API ของคุณ
1154
+
1155
+ ```txt
1156
+ ┌ API key
1157
+
1158
+
1159
+ └ enter
1160
+ ```
1161
+
1162
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
1163
+
1164
+ ```txt
1165
+ /models
1166
+ ```
1167
+
1168
+ ---
1169
+
1170
+ ### LM Studio
1171
+
1172
+ คุณสามารถกำหนดค่า opencode เพื่อใช้โมเดลท้องถิ่นผ่าน LM Studio
1173
+
1174
+ ```json title="opencode.json" "lmstudio" {5, 6, 8, 10-14}
1175
+ {
1176
+ "$schema": "https://opencode.ai/config.json",
1177
+ "provider": {
1178
+ "lmstudio": {
1179
+ "npm": "@ai-sdk/openai-compatible",
1180
+ "name": "LM Studio (local)",
1181
+ "options": {
1182
+ "baseURL": "http://127.0.0.1:1234/v1"
1183
+ },
1184
+ "models": {
1185
+ "google/gemma-3n-e4b": {
1186
+ "name": "Gemma 3n-e4b (local)"
1187
+ }
1188
+ }
1189
+ }
1190
+ }
1191
+ }
1192
+ ```
1193
+
1194
+ ในตัวอย่างนี้:
1195
+
1196
+ - `lmstudio` คือ ID ผู้ให้บริการที่กำหนดเอง นี่อาจเป็นสตริงใดก็ได้ที่คุณต้องการ
1197
+ - `npm` ระบุแพ็คเกจที่จะใช้สำหรับผู้ให้บริการรายนี้ ในที่นี้ `@ai-sdk/openai-compatible` ใช้สำหรับ API ที่เข้ากันได้กับ OpenAI
1198
+ - `name` คือชื่อที่แสดงของผู้ให้บริการใน UI
1199
+ - `options.baseURL` เป็นจุดสิ้นสุดสำหรับเซิร์ฟเวอร์ภายในเครื่อง
1200
+ - `models` คือแมปของ ID โมเดลกับการกำหนดค่า ชื่อรุ่นจะปรากฏในรายการเลือกรุ่น
1201
+
1202
+ ---
1203
+
1204
+ ### Moonshot AI
1205
+
1206
+ วิธีใช้ Kimi K2 จาก Moonshot AI:
1207
+
1208
+ 1. ไปที่ [Moonshot AI console](https://platform.moonshot.ai/console) สร้างบัญชี แล้วคลิก **Create API Key**
1209
+
1210
+ 2. รันคำสั่ง `/connect` และค้นหา **Moonshot AI**
1211
+
1212
+ ```txt
1213
+ /connect
1214
+ ```
1215
+
1216
+ 3. ป้อนคีย์ Moonshot API ของคุณ
1217
+
1218
+ ```txt
1219
+ ┌ API key
1220
+
1221
+
1222
+ └ enter
1223
+ ```
1224
+
1225
+ 4. รันคำสั่ง `/models` เพื่อเลือก _Kimi K2_
1226
+
1227
+ ```txt
1228
+ /models
1229
+ ```
1230
+
1231
+ ---
1232
+
1233
+ ### MiniMax
1234
+
1235
+ 1. ไปที่ [MiniMax API Console](https://platform.minimax.io/login) สร้างบัญชี และสร้างคีย์ API
1236
+
1237
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **MiniMax**
1238
+
1239
+ ```txt
1240
+ /connect
1241
+ ```
1242
+
1243
+ 3. ป้อนคีย์ MiniMax API ของคุณ
1244
+
1245
+ ```txt
1246
+ ┌ API key
1247
+
1248
+
1249
+ └ enter
1250
+ ```
1251
+
1252
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่นเช่น _M2.1_
1253
+
1254
+ ```txt
1255
+ /models
1256
+ ```
1257
+
1258
+ ---
1259
+
1260
+ ### Nebius Token Factory
1261
+
1262
+ 1. ไปที่ [คอนโซล Nebius Token Factory](https://tokenfactory.nebius.com/) สร้างบัญชี แล้วคลิก **Add key**
1263
+
1264
+ 2. รันคำสั่ง `/connect` และค้นหา **Nebius Token Factory**
1265
+
1266
+ ```txt
1267
+ /connect
1268
+ ```
1269
+
1270
+ 3. ป้อนคีย์ Nebius Token Factory API ของคุณ
1271
+
1272
+ ```txt
1273
+ ┌ API key
1274
+
1275
+
1276
+ └ enter
1277
+ ```
1278
+
1279
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Kimi K2 Instruct_
1280
+
1281
+ ```txt
1282
+ /models
1283
+ ```
1284
+
1285
+ ---
1286
+
1287
+ ### Ollama
1288
+
1289
+ คุณสามารถกำหนดค่า opencode เพื่อใช้โมเดลท้องถิ่นผ่าน Ollama
1290
+
1291
+ :::tip
1292
+ Ollama สามารถกำหนดค่าตัวเองสำหรับ OpenCode ได้โดยอัตโนมัติ ดู [เอกสารการบูรณาการ Ollama](https://docs.ollama.com/integrations/opencode) เพื่อดูรายละเอียด
1293
+ :::
1294
+
1295
+ ```json title="opencode.json" "ollama" {5, 6, 8, 10-14}
1296
+ {
1297
+ "$schema": "https://opencode.ai/config.json",
1298
+ "provider": {
1299
+ "ollama": {
1300
+ "npm": "@ai-sdk/openai-compatible",
1301
+ "name": "Ollama (local)",
1302
+ "options": {
1303
+ "baseURL": "http://localhost:11434/v1"
1304
+ },
1305
+ "models": {
1306
+ "llama2": {
1307
+ "name": "Llama 2"
1308
+ }
1309
+ }
1310
+ }
1311
+ }
1312
+ }
1313
+ ```
1314
+
1315
+ ในตัวอย่างนี้:
1316
+
1317
+ - `ollama` คือ ID ผู้ให้บริการที่กำหนดเอง นี่อาจเป็นสตริงใดก็ได้ที่คุณต้องการ
1318
+ - `npm` ระบุแพ็คเกจที่จะใช้สำหรับผู้ให้บริการรายนี้ ในที่นี้ `@ai-sdk/openai-compatible` ใช้สำหรับ API ที่เข้ากันได้กับ OpenAI
1319
+ - `name` คือชื่อที่แสดงของผู้ให้บริการใน UI
1320
+ - `options.baseURL` เป็นจุดสิ้นสุดสำหรับเซิร์ฟเวอร์ภายในเครื่อง
1321
+ - `models` คือแมปของ ID โมเดลกับการกำหนดค่า ชื่อรุ่นจะปรากฏในรายการเลือกรุ่น
1322
+
1323
+ :::tip
1324
+ หากการเรียกใช้เครื่องมือไม่ทำงาน ให้ลองเพิ่ม `num_ctx` ใน Ollama เริ่มต้นประมาณ 16,000 - 32,000
1325
+ :::
1326
+
1327
+ ---
1328
+
1329
+ ### Ollama Cloud
1330
+
1331
+ วิธีใช้ Ollama Cloud กับ OpenCode:
1332
+
1333
+ 1. ไปที่ [https://ollama.com/](https://ollama.com/) แล้วลงชื่อเข้าใช้หรือสร้างบัญชี
1334
+
1335
+ 2. ไปที่ **Settings** > **Keys** แล้วคลิก **Add API Key** เพื่อสร้างคีย์ API ใหม่
1336
+
1337
+ 3. คัดลอกคีย์ API เพื่อใช้ใน OpenCode
1338
+
1339
+ 4. เรียกใช้คำสั่ง `/connect` และค้นหา **Ollama Cloud**
1340
+
1341
+ ```txt
1342
+ /connect
1343
+ ```
1344
+
1345
+ 5. ป้อนคีย์ Ollama Cloud API ของคุณ
1346
+
1347
+ ```txt
1348
+ ┌ API key
1349
+
1350
+
1351
+ └ enter
1352
+ ```
1353
+
1354
+ 6. **สำคัญ**: ก่อนที่จะใช้โมเดลคลาวด์ใน OpenCode คุณต้องดึงข้อมูลโมเดลในเครื่อง:
1355
+
1356
+ ```bash
1357
+ ollama pull gpt-oss:20b-cloud
1358
+ ```
1359
+
1360
+ 7. รันคำสั่ง `/models` เพื่อเลือกโมเดล Ollama Cloud ของคุณ
1361
+
1362
+ ```txt
1363
+ /models
1364
+ ```
1365
+
1366
+ ---
1367
+
1368
+ ### OpenAI
1369
+
1370
+ เราขอแนะนำให้สมัคร [ChatGPT Plus หรือ Pro](https://chatgpt.com/pricing)
1371
+
1372
+ 1. เมื่อคุณสมัครแล้ว ให้รันคำสั่ง `/connect` และเลือก OpenAI
1373
+
1374
+ ```txt
1375
+ /connect
1376
+ ```
1377
+
1378
+ 2. ที่นี่คุณสามารถเลือกตัวเลือก **ChatGPT Plus/Pro** จากนั้นเบราว์เซอร์จะเปิดขึ้นมา
1379
+ และขอให้คุณตรวจสอบสิทธิ์
1380
+
1381
+ ```txt
1382
+ ┌ Select auth method
1383
+
1384
+ │ ChatGPT Plus/Pro
1385
+ │ Manually enter API Key
1386
+
1387
+ ```
1388
+
1389
+ 3. ตอนนี้โมเดล OpenAI ทั้งหมดควรจะพร้อมใช้งานเมื่อคุณใช้คำสั่ง `/models`
1390
+
1391
+ ```txt
1392
+ /models
1393
+ ```
1394
+
1395
+ ##### การใช้ API Key
1396
+
1397
+ หากคุณมีคีย์ API อยู่แล้ว คุณสามารถเลือก **Manually enter API Key** และวางลงใน terminal ของคุณ
1398
+
1399
+ ---
1400
+
1401
+ ### OpenCode Zen
1402
+
1403
+ OpenCode Zen คือรายการโมเดลที่ได้รับการทดสอบและตรวจสอบแล้วโดยทีมงาน OpenCode [เรียนรู้เพิ่มเติม](/docs/zen)
1404
+
1405
+ 1. ลงชื่อเข้าใช้ **<a href={console}>OpenCode Zen</a>** และคลิก **สร้าง API คีย์**
1406
+
1407
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **OpenCode Zen**
1408
+
1409
+ ```txt
1410
+ /connect
1411
+ ```
1412
+
1413
+ 3. ป้อนคีย์ OpenCode API ของคุณ
1414
+
1415
+ ```txt
1416
+ ┌ API key
1417
+
1418
+
1419
+ └ enter
1420
+ ```
1421
+
1422
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Qwen 3 Coder 480B_
1423
+
1424
+ ```txt
1425
+ /models
1426
+ ```
1427
+
1428
+ ---
1429
+
1430
+ ### OpenRouter
1431
+
1432
+ 1. ไปที่ [OpenRouter dashboard](https://openrouter.ai/settings/keys) คลิก **Create API Key** และคัดลอกคีย์
1433
+
1434
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา OpenRouter
1435
+
1436
+ ```txt
1437
+ /connect
1438
+ ```
1439
+
1440
+ 3. ป้อนคีย์ API สำหรับผู้ให้บริการ
1441
+
1442
+ ```txt
1443
+ ┌ API key
1444
+
1445
+
1446
+ └ enter
1447
+ ```
1448
+
1449
+ 4. โมเดล OpenRouter จำนวนมากถูกโหลดไว้ล่วงหน้าตามค่าเริ่มต้น รันคำสั่ง `/models` เพื่อเลือกโมเดลที่คุณต้องการ
1450
+
1451
+ ```txt
1452
+ /models
1453
+ ```
1454
+
1455
+ คุณยังสามารถเพิ่มโมเดลเพิ่มเติมผ่านการกำหนดค่า opencode ของคุณได้
1456
+
1457
+ ```json title="opencode.json" {6}
1458
+ {
1459
+ "$schema": "https://opencode.ai/config.json",
1460
+ "provider": {
1461
+ "openrouter": {
1462
+ "models": {
1463
+ "somecoolnewmodel": {}
1464
+ }
1465
+ }
1466
+ }
1467
+ }
1468
+ ```
1469
+
1470
+ 5. คุณยังสามารถปรับแต่งได้ผ่านการกำหนดค่า opencode ของคุณ นี่คือตัวอย่างการระบุผู้ให้บริการ
1471
+
1472
+ ```json title="opencode.json"
1473
+ {
1474
+ "$schema": "https://opencode.ai/config.json",
1475
+ "provider": {
1476
+ "openrouter": {
1477
+ "models": {
1478
+ "moonshotai/kimi-k2": {
1479
+ "options": {
1480
+ "provider": {
1481
+ "order": ["baseten"],
1482
+ "allow_fallbacks": false
1483
+ }
1484
+ }
1485
+ }
1486
+ }
1487
+ }
1488
+ }
1489
+ }
1490
+ ```
1491
+
1492
+ ---
1493
+
1494
+ ### SAP AI Core
1495
+
1496
+ SAP AI Core ให้การเข้าถึงโมเดลมากกว่า 40 รุ่นจาก OpenAI, Anthropic, Google, Amazon, Meta, Mistral และ AI21 ผ่านแพลตฟอร์มเดียว
1497
+
1498
+ 1. ไปที่ [SAP BTP Cockpit](https://account.hana.ondemand.com/) ของคุณ ไปที่อินสแตนซ์บริการ SAP AI Core และสร้างคีย์บริการ
1499
+
1500
+ :::tip
1501
+ คีย์บริการคือวัตถุ JSON ที่มี `clientid`, `clientsecret`, `url` และ `serviceurls.AI_API_URL` คุณสามารถค้นหาอินสแตนซ์ AI Core ของคุณได้ภายใต้ **Services** > **Instances and Subscriptions** ใน BTP Cockpit
1502
+ :::
1503
+
1504
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **SAP AI Core**
1505
+
1506
+ ```txt
1507
+ /connect
1508
+ ```
1509
+
1510
+ 3. ป้อน JSON คีย์บริการของคุณ
1511
+
1512
+ ```txt
1513
+ ┌ Service key
1514
+
1515
+
1516
+ └ enter
1517
+ ```
1518
+
1519
+ หรือตั้งค่าตัวแปรสภาพแวดล้อม `AICORE_SERVICE_KEY`:
1520
+
1521
+ ```bash
1522
+ AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}' opencode
1523
+ ```
1524
+
1525
+ หรือเพิ่มลงในโปรไฟล์ทุบตีของคุณ:
1526
+
1527
+ ```bash title="~/.bash_profile"
1528
+ export AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}'
1529
+ ```
1530
+
1531
+ 4. เลือกตั้งค่ารหัสการปรับใช้และกลุ่มทรัพยากร:
1532
+
1533
+ ```bash
1534
+ AICORE_DEPLOYMENT_ID=your-deployment-id AICORE_RESOURCE_GROUP=your-resource-group opencode
1535
+ ```
1536
+
1537
+ :::note
1538
+ การตั้งค่าเหล่านี้เป็นทางเลือกและควรกำหนดค่าตามการตั้งค่า SAP AI Core ของคุณ
1539
+ :::
1540
+
1541
+ 5. รันคำสั่ง `/models` เพื่อเลือกจาก 40+ รุ่นที่มีอยู่
1542
+
1543
+ ```txt
1544
+ /models
1545
+ ```
1546
+
1547
+ ---
1548
+
1549
+ ### STACKIT
1550
+
1551
+ STACKIT AI Model Serving มอบสภาพแวดล้อมการโฮสต์ที่มีการจัดการเต็มรูปแบบสำหรับโมเดล AI โดยเน้นที่ LLM เช่น Llama, Mistral และ Qwen โดยมีอธิปไตยของข้อมูลสูงสุดบนโครงสร้างพื้นฐานยุโรป
1552
+
1553
+ 1. ไปที่ [STACKIT Portal](https://portal.stackit.cloud) ไปที่ **AI Model Serving** และสร้างโทเค็นการตรวจสอบสิทธิ์สำหรับโครงการของคุณ
1554
+
1555
+ :::tip
1556
+ คุณต้องมีบัญชีลูกค้า STACKIT บัญชีผู้ใช้ และโครงการก่อนสร้างโทเค็นการตรวจสอบสิทธิ์
1557
+ :::
1558
+
1559
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **STACKIT**
1560
+
1561
+ ```txt
1562
+ /connect
1563
+ ```
1564
+
1565
+ 3. ป้อนโทเค็นการตรวจสอบสิทธิ์ STACKIT AI Model Serving ของคุณ
1566
+
1567
+ ```txt
1568
+ ┌ API key
1569
+
1570
+
1571
+ └ enter
1572
+ ```
1573
+
1574
+ 4. รันคำสั่ง `/models` เพื่อเลือกจากโมเดลที่มีอยู่ เช่น _Qwen3-VL 235B_ หรือ _Llama 3.3 70B_
1575
+
1576
+ ```txt
1577
+ /models
1578
+ ```
1579
+
1580
+ ---
1581
+
1582
+ ### OVHcloud AI Endpoints
1583
+
1584
+ 1. ไปที่ [OVHcloud panel](https://ovh.com/manager) ไปที่ส่วน `Public Cloud`, `AI & Machine Learning` > `AI Endpoints` และในแท็บ `API Keys` ให้คลิก **Create a new API key**
1585
+
1586
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **OVHcloud AI Endpoints**
1587
+
1588
+ ```txt
1589
+ /connect
1590
+ ```
1591
+
1592
+ 3. ป้อนคีย์ API OVHcloud AI Endpoints ของคุณ
1593
+
1594
+ ```txt
1595
+ ┌ API key
1596
+
1597
+
1598
+ └ enter
1599
+ ```
1600
+
1601
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _gpt-oss-120b_
1602
+
1603
+ ```txt
1604
+ /models
1605
+ ```
1606
+
1607
+ ---
1608
+
1609
+ ### Scaleway
1610
+
1611
+ วิธีใช้ [Scaleway Generative APIs](https://www.scaleway.com/en/docs/generative-apis/) กับ Opencode:
1612
+
1613
+ 1. ไปที่ [Scaleway Console IAM settings](https://console.scaleway.com/iam/api-keys) เพื่อสร้างคีย์ API ใหม่
1614
+
1615
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Scaleway**
1616
+
1617
+ ```txt
1618
+ /connect
1619
+ ```
1620
+
1621
+ 3. ป้อนคีย์ Scaleway API ของคุณ
1622
+
1623
+ ```txt
1624
+ ┌ API key
1625
+
1626
+
1627
+ └ enter
1628
+ ```
1629
+
1630
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _devstral-2-123b-instruct-2512_ หรือ _gpt-oss-120b_
1631
+
1632
+ ```txt
1633
+ /models
1634
+ ```
1635
+
1636
+ ---
1637
+
1638
+ ### Together AI
1639
+
1640
+ 1. ไปที่ [Together AI console](https://api.together.ai) สร้างบัญชี และคลิก **Add Key**
1641
+
1642
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Together AI**
1643
+
1644
+ ```txt
1645
+ /connect
1646
+ ```
1647
+
1648
+ 3. ป้อนคีย์ Together AI API ของคุณ
1649
+
1650
+ ```txt
1651
+ ┌ API key
1652
+
1653
+
1654
+ └ enter
1655
+ ```
1656
+
1657
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Kimi K2 Instruct_
1658
+
1659
+ ```txt
1660
+ /models
1661
+ ```
1662
+
1663
+ ---
1664
+
1665
+ ### Venice AI
1666
+
1667
+ 1. ไปที่ [Venice AI console](https://venice.ai) สร้างบัญชี และสร้างคีย์ API
1668
+
1669
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Venice AI**
1670
+
1671
+ ```txt
1672
+ /connect
1673
+ ```
1674
+
1675
+ 3. ป้อนคีย์ Venice AI API ของคุณ
1676
+
1677
+ ```txt
1678
+ ┌ API key
1679
+
1680
+
1681
+ └ enter
1682
+ ```
1683
+
1684
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Llama 3.3 70B_
1685
+
1686
+ ```txt
1687
+ /models
1688
+ ```
1689
+
1690
+ ---
1691
+
1692
+ ### Vercel AI Gateway
1693
+
1694
+ Vercel AI Gateway ช่วยให้คุณเข้าถึงโมเดลจาก OpenAI, Anthropic, Google, xAI และอื่นๆ อีกมากมายผ่านจุดสิ้นสุดแบบรวม โมเดลถูกนำเสนอในราคาปลีกโดยไม่มีการบวกเพิ่ม
1695
+
1696
+ 1. ไปที่ [Vercel dashboard](https://vercel.com/) ไปที่แท็บ **AI Gateway** และคลิก **API keys** เพื่อสร้างคีย์ API ใหม่
1697
+
1698
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Vercel AI Gateway**
1699
+
1700
+ ```txt
1701
+ /connect
1702
+ ```
1703
+
1704
+ 3. ป้อนคีย์ Vercel AI Gateway API ของคุณ
1705
+
1706
+ ```txt
1707
+ ┌ API key
1708
+
1709
+
1710
+ └ enter
1711
+ ```
1712
+
1713
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
1714
+
1715
+ ```txt
1716
+ /models
1717
+ ```
1718
+
1719
+ คุณยังสามารถปรับแต่งโมเดลผ่านการกำหนดค่า opencode ของคุณได้ นี่คือตัวอย่างการระบุลำดับการกำหนดเส้นทางผู้ให้บริการ
1720
+
1721
+ ```json title="opencode.json"
1722
+ {
1723
+ "$schema": "https://opencode.ai/config.json",
1724
+ "provider": {
1725
+ "vercel": {
1726
+ "models": {
1727
+ "anthropic/claude-sonnet-4": {
1728
+ "options": {
1729
+ "order": ["anthropic", "vertex"]
1730
+ }
1731
+ }
1732
+ }
1733
+ }
1734
+ }
1735
+ }
1736
+ ```
1737
+
1738
+ ตัวเลือกการกำหนดเส้นทางที่มีประโยชน์บางประการ:
1739
+
1740
+ | ตัวเลือก | คำอธิบาย |
1741
+ | ------------------- | ---------------------------------------------------------- |
1742
+ | `order` | ลำดับผู้ให้บริการที่จะลอง |
1743
+ | `only` | จำกัดเฉพาะผู้ให้บริการที่ระบุ |
1744
+ | `zeroDataRetention` | ใช้เฉพาะผู้ให้บริการที่มีนโยบายการเก็บรักษาข้อมูลเป็นศูนย์ |
1745
+
1746
+ ---
1747
+
1748
+ ### xAI
1749
+
1750
+ 1. ไปที่ [xAI console](https://console.x.ai/) สร้างบัญชี และสร้างคีย์ API
1751
+
1752
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **xAI**
1753
+
1754
+ ```txt
1755
+ /connect
1756
+ ```
1757
+
1758
+ 3. ป้อนคีย์ xAI API ของคุณ
1759
+
1760
+ ```txt
1761
+ ┌ API key
1762
+
1763
+
1764
+ └ enter
1765
+ ```
1766
+
1767
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Grok Beta_
1768
+
1769
+ ```txt
1770
+ /models
1771
+ ```
1772
+
1773
+ ---
1774
+
1775
+ ### Z.AI
1776
+
1777
+ 1. ไปที่ [Z.AI API console](https://z.ai/manage-apikey/apikey-list) สร้างบัญชี และคลิก **Create a new API key**
1778
+
1779
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Z.AI**
1780
+
1781
+ ```txt
1782
+ /connect
1783
+ ```
1784
+
1785
+ หากคุณสมัครรับ **GLM Coding Plan** ให้เลือก **Z.AI Coding Plan**
1786
+
1787
+ 3. ป้อนคีย์ Z.AI API ของคุณ
1788
+
1789
+ ```txt
1790
+ ┌ API key
1791
+
1792
+
1793
+ └ enter
1794
+ ```
1795
+
1796
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _GLM-4.7_
1797
+
1798
+ ```txt
1799
+ /models
1800
+ ```
1801
+
1802
+ ---
1803
+
1804
+ ### ZenMux
1805
+
1806
+ 1. ไปที่ [ZenMux dashboard](https://zenmux.ai/settings/keys) คลิก **Create API Key** และคัดลอกคีย์
1807
+
1808
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา ZenMux
1809
+
1810
+ ```txt
1811
+ /connect
1812
+ ```
1813
+
1814
+ 3. ป้อนคีย์ API สำหรับผู้ให้บริการ
1815
+
1816
+ ```txt
1817
+ ┌ API key
1818
+
1819
+
1820
+ └ enter
1821
+ ```
1822
+
1823
+ 4. โมเดล ZenMux จำนวนมากถูกโหลดไว้ล่วงหน้าตามค่าเริ่มต้น รันคำสั่ง `/models` เพื่อเลือกโมเดลที่คุณต้องการ
1824
+
1825
+ ```txt
1826
+ /models
1827
+ ```
1828
+
1829
+ คุณยังสามารถเพิ่มโมเดลเพิ่มเติมผ่านการกำหนดค่า opencode ของคุณได้
1830
+
1831
+ ```json title="opencode.json" {6}
1832
+ {
1833
+ "$schema": "https://opencode.ai/config.json",
1834
+ "provider": {
1835
+ "zenmux": {
1836
+ "models": {
1837
+ "somecoolnewmodel": {}
1838
+ }
1839
+ }
1840
+ }
1841
+ }
1842
+ ```
1843
+
1844
+ ---
1845
+
1846
+ ## ผู้ให้บริการที่กำหนดเอง
1847
+
1848
+ หากต้องการเพิ่มผู้ให้บริการที่ **เข้ากันได้กับ OpenAI** ใดๆ ที่ไม่มีรายชื่ออยู่ในคำสั่ง `/connect`:
1849
+
1850
+ :::tip
1851
+ คุณสามารถใช้ผู้ให้บริการที่เข้ากันได้กับ OpenAI กับ opencode ได้ ผู้ให้บริการ AI สมัยใหม่ส่วนใหญ่เสนอ API ที่เข้ากันได้กับ OpenAI
1852
+ :::
1853
+
1854
+ 1. เรียกใช้คำสั่ง `/connect` และเลื่อนลงไปที่ **Other**
1855
+
1856
+ ```bash
1857
+ $ /connect
1858
+
1859
+ ┌ Add credential
1860
+
1861
+ ◆ Select provider
1862
+ │ ...
1863
+ │ ● Other
1864
+
1865
+ ```
1866
+
1867
+ 2. ป้อน ID เฉพาะสำหรับผู้ให้บริการ
1868
+
1869
+ ```bash
1870
+ $ /connect
1871
+
1872
+ ┌ Add credential
1873
+
1874
+ ◇ Enter provider id
1875
+ │ myprovider
1876
+
1877
+ ```
1878
+
1879
+ :::note
1880
+ เลือก ID ที่น่าจดจำ คุณจะใช้ ID นี้ในไฟล์กำหนดค่าของคุณ
1881
+ :::
1882
+
1883
+ 3. ป้อนคีย์ API สำหรับผู้ให้บริการ
1884
+
1885
+ ```bash
1886
+ $ /connect
1887
+
1888
+ ┌ Add credential
1889
+
1890
+ ▲ This only stores a credential for myprovider - you will need to configure it in opencode.json, check the docs for examples.
1891
+
1892
+ ◇ Enter your API key
1893
+ │ sk-...
1894
+
1895
+ ```
1896
+
1897
+ 4. สร้างหรืออัปเดตไฟล์ `opencode.json` ของคุณในไดเร็กทอรีโครงการของคุณ:
1898
+
1899
+ ```json title="opencode.json" ""myprovider"" {5-15}
1900
+ {
1901
+ "$schema": "https://opencode.ai/config.json",
1902
+ "provider": {
1903
+ "myprovider": {
1904
+ "npm": "@ai-sdk/openai-compatible",
1905
+ "name": "My AI ProviderDisplay Name",
1906
+ "options": {
1907
+ "baseURL": "https://api.myprovider.com/v1"
1908
+ },
1909
+ "models": {
1910
+ "my-model-name": {
1911
+ "name": "My Model Display Name"
1912
+ }
1913
+ }
1914
+ }
1915
+ }
1916
+ }
1917
+ ```
1918
+
1919
+ นี่คือตัวเลือกการกำหนดค่า:
1920
+ - **npm**: แพ็คเกจ AI SDK ที่จะใช้ `@ai-sdk/openai-compatible` สำหรับผู้ให้บริการที่เข้ากันได้กับ OpenAI
1921
+ - **name**: ชื่อที่แสดงใน UI
1922
+ - **models**: โมเดลที่มีจำหน่าย
1923
+ - **options.baseURL**: URL จุดสิ้นสุด API
1924
+ - **options.apiKey**: ตั้งค่าคีย์ API ทางเลือก หากไม่ได้ใช้การรับรองความถูกต้อง
1925
+ - **options.headers**: ตั้งค่าส่วนหัวที่กำหนดเองได้ตามต้องการ
1926
+
1927
+ ข้อมูลเพิ่มเติมเกี่ยวกับตัวเลือกขั้นสูงในตัวอย่างด้านล่าง
1928
+
1929
+ 5. รันคำสั่ง `/models` และผู้ให้บริการและโมเดลที่คุณกำหนดเองจะปรากฏในรายการตัวเลือก
1930
+
1931
+ ---
1932
+
1933
+ ##### ตัวอย่าง
1934
+
1935
+ นี่คือตัวอย่างการตั้งค่าตัวเลือก `apiKey`, `headers` และรุ่น `limit`
1936
+
1937
+ ```json title="opencode.json" {9,11,17-20}
1938
+ {
1939
+ "$schema": "https://opencode.ai/config.json",
1940
+ "provider": {
1941
+ "myprovider": {
1942
+ "npm": "@ai-sdk/openai-compatible",
1943
+ "name": "My AI ProviderDisplay Name",
1944
+ "options": {
1945
+ "baseURL": "https://api.myprovider.com/v1",
1946
+ "apiKey": "{env:ANTHROPIC_API_KEY}",
1947
+ "headers": {
1948
+ "Authorization": "Bearer custom-token"
1949
+ }
1950
+ },
1951
+ "models": {
1952
+ "my-model-name": {
1953
+ "name": "My Model Display Name",
1954
+ "limit": {
1955
+ "context": 200000,
1956
+ "output": 65536
1957
+ }
1958
+ }
1959
+ }
1960
+ }
1961
+ }
1962
+ }
1963
+ ```
1964
+
1965
+ รายละเอียดการกำหนดค่า:
1966
+
1967
+ - **apiKey**: ตั้งค่าโดยใช้ไวยากรณ์ตัวแปร `env` [เรียนรู้เพิ่มเติม](/docs/config#env-vars)
1968
+ - **headers**: ส่วนหัวที่กำหนดเองที่ส่งไปกับแต่ละคำขอ
1969
+ - **limit.context**: โทเค็นอินพุตสูงสุดที่โมเดลยอมรับ
1970
+ - **limit.output**: โทเค็นสูงสุดที่โมเดลสามารถสร้างได้
1971
+
1972
+ ฟิลด์ `limit` ช่วยให้ OpenCode เข้าใจว่าคุณมีบริบทเหลืออยู่เท่าใด ผู้ให้บริการมาตรฐานจะดึงข้อมูลเหล่านี้จาก models.dev โดยอัตโนมัติ
1973
+
1974
+ ---
1975
+
1976
+ ## การแก้ไขปัญหา
1977
+
1978
+ หากคุณประสบปัญหาในการกำหนดค่าผู้ให้บริการ ให้ตรวจสอบสิ่งต่อไปนี้:
1979
+
1980
+ 1. **ตรวจสอบการตั้งค่าการรับรองความถูกต้อง**: รัน `opencode auth list` เพื่อดูว่ามีการเพิ่มข้อมูลรับรอง
1981
+ สำหรับผู้ให้บริการในการกำหนดค่าของคุณหรือไม่
1982
+
1983
+ สิ่งนี้ใช้ไม่ได้กับผู้ให้บริการเช่น Amazon Bedrock ซึ่งอาศัยตัวแปรสภาพแวดล้อมสำหรับการตรวจสอบสิทธิ์
1984
+
1985
+ 2. สำหรับผู้ให้บริการที่กำหนดเอง ให้ตรวจสอบการกำหนดค่า opencode และ:
1986
+ - ตรวจสอบให้แน่ใจว่า ID ผู้ให้บริการที่ใช้ในคำสั่ง `/connect` ตรงกับ ID ในการกำหนดค่า opencode ของคุณ
1987
+ - ใช้แพ็คเกจ npm ที่ถูกต้องสำหรับผู้ให้บริการ ตัวอย่างเช่น ใช้ `@ai-sdk/cerebras` สำหรับ Cerebras และสำหรับผู้ให้บริการอื่นๆ ที่เข้ากันได้กับ OpenAI ให้ใช้ `@ai-sdk/openai-compatible`
1988
+ - ตรวจสอบว่าใช้จุดสิ้นสุด API ที่ถูกต้องในฟิลด์ `options.baseURL`
1989
+
1990
+ 3. ป้อนคีย์ OpenCode API ของคุณ
1991
+
1992
+ ```txt
1993
+ ┌ API key
1994
+
1995
+
1996
+ └ enter
1997
+ ```
1998
+
1999
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่นเช่น _Qwen 3 Coder 480B_
2000
+
2001
+ ```txt
2002
+ /models
2003
+ ```
2004
+
2005
+ ---
2006
+
2007
+ ### เปิดเราเตอร์
2008
+
2009
+ 1. ไปที่ [แดชบอร์ด OpenRouter](https://openrouter.ai/settings/keys) คลิก **สร้าง API คีย์** และคัดลอกคีย์
2010
+
2011
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา OpenRouter
2012
+
2013
+ ```txt
2014
+ /connect
2015
+ ```
2016
+
2017
+ 3. ป้อนคีย์ API สำหรับผู้ให้บริการ
2018
+
2019
+ ```txt
2020
+ ┌ API key
2021
+
2022
+
2023
+ └ enter
2024
+ ```
2025
+
2026
+ 4. OpenRouter หลายรุ่นถูกโหลดไว้ล่วงหน้าตามค่าเริ่มต้น ให้รันคำสั่ง `/models` เพื่อเลือกรุ่นที่คุณต้องการ
2027
+
2028
+ ```txt
2029
+ /models
2030
+ ```
2031
+
2032
+ คุณยังสามารถเพิ่มโมเดลเพิ่มเติมผ่านการกำหนดค่า opencode ของคุณ
2033
+
2034
+ ```json title="opencode.json" {6}
2035
+ {
2036
+ "$schema": "https://opencode.ai/config.json",
2037
+ "provider": {
2038
+ "openrouter": {
2039
+ "models": {
2040
+ "somecoolnewmodel": {}
2041
+ }
2042
+ }
2043
+ }
2044
+ }
2045
+ ```
2046
+
2047
+ 5. คุณยังสามารถปรับแต่งได้ผ่านการกำหนดค่า opencode ของคุณ นี่คือตัวอย่างการระบุผู้ให้บริการ
2048
+
2049
+ ```json title="opencode.json"
2050
+ {
2051
+ "$schema": "https://opencode.ai/config.json",
2052
+ "provider": {
2053
+ "openrouter": {
2054
+ "models": {
2055
+ "moonshotai/kimi-k2": {
2056
+ "options": {
2057
+ "provider": {
2058
+ "order": ["baseten"],
2059
+ "allow_fallbacks": false
2060
+ }
2061
+ }
2062
+ }
2063
+ }
2064
+ }
2065
+ }
2066
+ }
2067
+ ```
2068
+
2069
+ ---
2070
+
2071
+ ### SAP เอไอคอร์
2072
+
2073
+ SAP AI Core ให้การเข้าถึงโมเดลมากกว่า 40 โมเดลจาก OpenAI, Anthropic, Google, Amazon, Meta, Mistral และ AI21 ผ่านแพลตฟอร์มแบบครบวงจร
2074
+
2075
+ 1. ไปที่ห้องนักบิน [SAP BTP](https://account.hana.ondemand.com/) นำทางไปยังอินสแตนซ์บริการ SAP AI Core ของคุณ และสร้างรหัสบริการ
2076
+
2077
+ :::tip
2078
+ รหัสบริการคือวัตถุ JSON ที่ประกอบด้วย `clientid`, `clientsecret`, `url` และ `serviceurls.AI_API_URL` คุณสามารถค้นหาอินสแตนซ์ AI Core ของคุณได้ภายใต้ **บริการ** > **อินสแตนซ์และการสมัครสมาชิก** ในห้องควบคุม BTP
2079
+ :::
2080
+
2081
+ 2. รันคำสั่ง `/connect` และค้นหา **SAP AI Core**
2082
+
2083
+ ```txt
2084
+ /connect
2085
+ ```
2086
+
2087
+ 3. ป้อนรหัสบริการของคุณ JSON
2088
+
2089
+ ```txt
2090
+ ┌ Service key
2091
+
2092
+
2093
+ └ enter
2094
+ ```
2095
+
2096
+ หรือตั้งค่าตัวแปรสภาพแวดล้อม `AICORE_SERVICE_KEY`:
2097
+
2098
+ ```bash
2099
+ AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}' opencode
2100
+ ```
2101
+
2102
+ หรือเพิ่มลงในโปรไฟล์ทุบตีของคุณ:
2103
+
2104
+ ```bash title="~/.bash_profile"
2105
+ export AICORE_SERVICE_KEY='{"clientid":"...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}'
2106
+ ```
2107
+
2108
+ 4. ตั้งค่า ID การนำไปใช้งานและกลุ่มทรัพยากรเพิ่มเติม:
2109
+
2110
+ ```bash
2111
+ AICORE_DEPLOYMENT_ID=your-deployment-id AICORE_RESOURCE_GROUP=your-resource-group opencode
2112
+ ```
2113
+
2114
+ :::note
2115
+ การตั้งค่าเหล่านี้เป็นทางเลือกและควรกำหนดค่าตามการตั้งค่า SAP AI Core ของคุณ
2116
+ :::
2117
+
2118
+ 5. รันคำสั่ง `/models` เพื่อเลือกจากรุ่นที่มีให้เลือกมากกว่า 40 รุ่น
2119
+
2120
+ ```txt
2121
+ /models
2122
+ ```
2123
+
2124
+ ---
2125
+
2126
+ ### ตำแหน่งข้อมูล AI ของ OVHcloud
2127
+
2128
+ 1. ไปที่ [แผง OVHcloud](https://ovh.com/manager) ไปที่ส่วน `Public Cloud` `AI & Machine Learning` > `AI Endpoints` และในแท็บ `API Keys` คลิก **สร้างคีย์ API ใหม่**
2129
+
2130
+ 2. รันคำสั่ง `/connect` และค้นหา **OVHcloud AI Endpoints**
2131
+
2132
+ ```txt
2133
+ /connect
2134
+ ```
2135
+
2136
+ 3. ป้อนคีย์ OVHcloud AI Endpoints API ของคุณ
2137
+
2138
+ ```txt
2139
+ ┌ API key
2140
+
2141
+
2142
+ └ enter
2143
+ ```
2144
+
2145
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _gpt-oss-120b_
2146
+
2147
+ ```txt
2148
+ /models
2149
+ ```
2150
+
2151
+ ---
2152
+
2153
+ ### สเกลเวย์
2154
+
2155
+ วิธีใช้ [Scaleway Generative API](https://www.scaleway.com/en/docs/generative-apis/) กับ Opencode:
2156
+
2157
+ 1. ไปที่ [การตั้งค่า Scaleway Console IAM](https://console.scaleway.com/iam/api-keys) เพื่อสร้างคีย์ API ใหม่
2158
+
2159
+ 2. รันคำสั่ง `/connect` และค้นหา **Scaleway**
2160
+
2161
+ ```txt
2162
+ /connect
2163
+ ```
2164
+
2165
+ 3. ป้อนคีย์ Scaleway API ของคุณ
2166
+
2167
+ ```txt
2168
+ ┌ API key
2169
+
2170
+
2171
+ └ enter
2172
+ ```
2173
+
2174
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดล เช่น _devstral-2-123b-instruct-2512_ หรือ _gpt-oss-120b_
2175
+
2176
+ ```txt
2177
+ /models
2178
+ ```
2179
+
2180
+ ---
2181
+
2182
+ ### ร่วมกันเอไอ
2183
+
2184
+ 1. ไปที่ [Together AI console](https://api.together.ai) สร้างบัญชี แล้วคลิก **เพิ่มรหัส**
2185
+
2186
+ 2. เรียกใช้คำสั่ง `/connect` และค้นหา **Together AI**
2187
+
2188
+ ```txt
2189
+ /connect
2190
+ ```
2191
+
2192
+ 3. ป้อนคีย์ Together AI API ของคุณ
2193
+
2194
+ ```txt
2195
+ ┌ API key
2196
+
2197
+
2198
+ └ enter
2199
+ ```
2200
+
2201
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Kimi K2 Instruct_
2202
+
2203
+ ```txt
2204
+ /models
2205
+ ```
2206
+
2207
+ ---
2208
+
2209
+ ### เวนิส เอไอ
2210
+
2211
+ 1. ไปที่ [คอนโซล AI ของเวนิส](https://venice.ai) สร้างบัญชี และสร้างคีย์ API
2212
+
2213
+ 2. รันคำสั่ง `/connect` และค้นหา **Venice AI**
2214
+
2215
+ ```txt
2216
+ /connect
2217
+ ```
2218
+
2219
+ 3. ป้อนคีย์ Venice AI API ของคุณ
2220
+
2221
+ ```txt
2222
+ ┌ API key
2223
+
2224
+
2225
+ └ enter
2226
+ ```
2227
+
2228
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Llama 3.3 70B_
2229
+
2230
+ ```txt
2231
+ /models
2232
+ ```
2233
+
2234
+ ---
2235
+
2236
+ ### เกตเวย์ AI ของ Vercel
2237
+
2238
+ Vercel AI Gateway ช่วยให้คุณเข้าถึงโมเดลจาก OpenAI, Anthropic, Google, xAI และอื่นๆ อีกมากมายผ่านจุดสิ้นสุดแบบรวม โมเดลมีจำหน่ายในราคาปลีกโดยไม่มีส่วนเพิ่ม
2239
+
2240
+ 1. ไปที่ [แดชบอร์ด Vercel](https://vercel.com/) ไปที่แท็บ **เกตเวย์ AI** และคลิก **API คีย์** เพื่อสร้างคีย์ API ใหม่
2241
+
2242
+ 2. รันคำสั่ง `/connect` และค้นหา **Vercel AI Gateway**
2243
+
2244
+ ```txt
2245
+ /connect
2246
+ ```
2247
+
2248
+ 3. ป้อนคีย์ Vercel AI Gateway API ของคุณ
2249
+
2250
+ ```txt
2251
+ ┌ API key
2252
+
2253
+
2254
+ └ enter
2255
+ ```
2256
+
2257
+ 4. รันคำสั่ง `/models` เพื่อเลือกรุ่น
2258
+
2259
+ ```txt
2260
+ /models
2261
+ ```
2262
+
2263
+ คุณยังสามารถปรับแต่งโมเดลผ่านการกำหนดค่า opencode ของคุณได้อีกด้วย นี่คือตัวอย่างการระบุลำดับการกำหนดเส้นทางของผู้ให้บริการ
2264
+
2265
+ ```json title="opencode.json"
2266
+ {
2267
+ "$schema": "https://opencode.ai/config.json",
2268
+ "provider": {
2269
+ "vercel": {
2270
+ "models": {
2271
+ "anthropic/claude-sonnet-4": {
2272
+ "options": {
2273
+ "order": ["anthropic", "vertex"]
2274
+ }
2275
+ }
2276
+ }
2277
+ }
2278
+ }
2279
+ }
2280
+ ```
2281
+
2282
+ ตัวเลือกการกำหนดเส้นทางที่มีประโยชน์:
2283
+
2284
+ | ตัวเลือก | คำอธิบาย |
2285
+ | ------------------- | ------------------------------------------------------- |
2286
+ | `order` | ลำดับผู้ให้บริการที่จะลอง |
2287
+ | `only` | จำกัดเฉพาะผู้ให้บริการบางราย |
2288
+ | `zeroDataRetention` | ใช้ผู้ให้บริการที่ไม่มีนโยบายการเก็บรักษาข้อมูลเท่านั้น |
2289
+
2290
+ ---
2291
+
2292
+ ### xAI
2293
+
2294
+ 1. ไปที่ [xAI console](https://console.x.ai/) สร้างบัญชี และสร้างคีย์ API
2295
+
2296
+ 2. รันคำสั่ง `/connect` และค้นหา **xAI**
2297
+
2298
+ ```txt
2299
+ /connect
2300
+ ```
2301
+
2302
+ 3. ป้อนคีย์ xAI API ของคุณ
2303
+
2304
+ ```txt
2305
+ ┌ API key
2306
+
2307
+
2308
+ └ enter
2309
+ ```
2310
+
2311
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _Grok Beta_
2312
+
2313
+ ```txt
2314
+ /models
2315
+ ```
2316
+
2317
+ ---
2318
+
2319
+ ### ซี.เอ.ไอ
2320
+
2321
+ 1. ไปที่ [Z.AI API console](https://z.ai/manage-apikey/apikey-list) สร้างบัญชี และคลิก **สร้างคีย์ API ใหม่**
2322
+
2323
+ 2. รันคำสั่ง `/connect` และค้นหา **Z.AI**
2324
+
2325
+ ```txt
2326
+ /connect
2327
+ ```
2328
+
2329
+ หากคุณสมัครสมาชิก **GLM Coding Plan** ให้เลือก **Z.AI Coding Plan**
2330
+
2331
+ 3. ป้อนคีย์ Z.AI API ของคุณ
2332
+
2333
+ ```txt
2334
+ ┌ API key
2335
+
2336
+
2337
+ └ enter
2338
+ ```
2339
+
2340
+ 4. รันคำสั่ง `/models` เพื่อเลือกโมเดลเช่น _GLM-4.7_
2341
+
2342
+ ```txt
2343
+ /models
2344
+ ```
2345
+
2346
+ ---
2347
+
2348
+ ### ZenMux
2349
+
2350
+ 1. ไปที่ [แดชบอร์ด ZenMux](https://zenmux.ai/settings/keys) คลิก **สร้าง API คีย์** และคัดลอกคีย์
2351
+
2352
+ 2. รันคำสั่ง `/connect` และค้นหา ZenMux
2353
+
2354
+ ```txt
2355
+ /connect
2356
+ ```
2357
+
2358
+ 3. ป้อนคีย์ API สำหรับผู้ให้บริการ
2359
+
2360
+ ```txt
2361
+ ┌ API key
2362
+
2363
+
2364
+ └ enter
2365
+ ```
2366
+
2367
+ 4. ZenMux หลายรุ่นถูกโหลดไว้ล่วงหน้าตามค่าเริ่มต้น รันคำสั่ง `/models` เพื่อเลือกรุ่นที่คุณต้องการ
2368
+
2369
+ ```txt
2370
+ /models
2371
+ ```
2372
+
2373
+ คุณยังสามารถเพิ่มโมเดลเพิ่มเติมผ่านการกำหนดค่า opencode ของคุณ
2374
+
2375
+ ```json title="opencode.json" {6}
2376
+ {
2377
+ "$schema": "https://opencode.ai/config.json",
2378
+ "provider": {
2379
+ "zenmux": {
2380
+ "models": {
2381
+ "somecoolnewmodel": {}
2382
+ }
2383
+ }
2384
+ }
2385
+ }
2386
+ ```
2387
+
2388
+ ---
2389
+
2390
+ ## ผู้ให้บริการที่กำหนดเอง
2391
+
2392
+ หากต้องการเพิ่มผู้ให้บริการ **รองรับ OpenAI** ที่ไม่อยู่ในคำสั่ง `/connect`:
2393
+
2394
+ :::tip
2395
+ คุณสามารถใช้ผู้ให้บริการที่เข้ากันได้กับ OpenAI ด้วย opencode ผู้ให้บริการ AI สมัยใหม่ส่วนใหญ่เสนอ API ที่เข้ากันได้กับ OpenAI
2396
+ :::
2397
+
2398
+ 1. เรียกใช้คำสั่ง `/connect` และเลื่อนลงไปที่ **อื่นๆ**
2399
+
2400
+ ```bash
2401
+ $ /connect
2402
+
2403
+ ┌ Add credential
2404
+
2405
+ ◆ Select provider
2406
+ │ ...
2407
+ │ ● Other
2408
+
2409
+ ```
2410
+
2411
+ 2. ป้อนรหัสเฉพาะสำหรับผู้ให้บริการ
2412
+
2413
+ ```bash
2414
+ $ /connect
2415
+
2416
+ ┌ Add credential
2417
+
2418
+ ◇ Enter provider id
2419
+ │ myprovider
2420
+
2421
+ ```
2422
+
2423
+ :::note
2424
+ เลือก ID ที่น่าจดจำ คุณจะใช้รหัสนี้ในไฟล์กำหนดค่าของคุณ
2425
+ :::
2426
+
2427
+ 3. ป้อนรหัส API ของคุณสำหรับผู้ให้บริการ
2428
+
2429
+ ```bash
2430
+ $ /connect
2431
+
2432
+ ┌ Add credential
2433
+
2434
+ ▲ This only stores a credential for myprovider - you will need to configure it in opencode.json, check the docs for examples.
2435
+
2436
+ ◇ Enter your API key
2437
+ │ sk-...
2438
+
2439
+ ```
2440
+
2441
+ 4. สร้างหรืออัปเดตไฟล์ `opencode.json` ในไดเรกทอรีโครงการของคุณ:
2442
+
2443
+ ```json title="opencode.json" ""myprovider"" {5-15}
2444
+ {
2445
+ "$schema": "https://opencode.ai/config.json",
2446
+ "provider": {
2447
+ "myprovider": {
2448
+ "npm": "@ai-sdk/openai-compatible",
2449
+ "name": "My AI ProviderDisplay Name",
2450
+ "options": {
2451
+ "baseURL": "https://api.myprovider.com/v1"
2452
+ },
2453
+ "models": {
2454
+ "my-model-name": {
2455
+ "name": "My Model Display Name"
2456
+ }
2457
+ }
2458
+ }
2459
+ }
2460
+ }
2461
+ ```
2462
+
2463
+ นี่คือตัวเลือกการกำหนดค่า:
2464
+ - **npm**: แพ็คเกจ AI SDK ที่จะใช้ `@ai-sdk/openai-compatible` สำหรับผู้ให้บริการที่เข้ากันได้กับ OpenAI
2465
+ - **ชื่อ**: ชื่อที่แสดงใน UI
2466
+ - **รุ่น**: รุ่นที่มีจำหน่าย
2467
+ - **options.baseURL**: API ปลายทาง URL
2468
+ - **options.apiKey**: ตั้งค่าคีย์ API หรือไม่ก็ได้ หากไม่ได้ใช้การตรวจสอบสิทธิ์
2469
+ - **options.headers**: ตั้งค่าส่วนหัวที่กำหนดเองหรือไม่ก็ได้
2470
+
2471
+ ข้อมูลเพิ่มเติมเกี่ยวกับตัวเลือกขั้นสูงในตัวอย่างด้านล่าง
2472
+
2473
+ 5. รันคำสั่ง `/models` จากนั้นผู้ให้บริการและโมเดลที่คุณกำหนดเองจะปรากฏในรายการตัวเลือก
2474
+
2475
+ ---
2476
+
2477
+ ##### ตัวอย่าง
2478
+
2479
+ นี่คือตัวอย่างการตั้งค่าตัวเลือก `apiKey`, `headers` และโมเดล `limit`
2480
+
2481
+ ```json title="opencode.json" {9,11,17-20}
2482
+ {
2483
+ "$schema": "https://opencode.ai/config.json",
2484
+ "provider": {
2485
+ "myprovider": {
2486
+ "npm": "@ai-sdk/openai-compatible",
2487
+ "name": "My AI ProviderDisplay Name",
2488
+ "options": {
2489
+ "baseURL": "https://api.myprovider.com/v1",
2490
+ "apiKey": "{env:ANTHROPIC_API_KEY}",
2491
+ "headers": {
2492
+ "Authorization": "Bearer custom-token"
2493
+ }
2494
+ },
2495
+ "models": {
2496
+ "my-model-name": {
2497
+ "name": "My Model Display Name",
2498
+ "limit": {
2499
+ "context": 200000,
2500
+ "output": 65536
2501
+ }
2502
+ }
2503
+ }
2504
+ }
2505
+ }
2506
+ }
2507
+ ```
2508
+
2509
+ รายละเอียดการกำหนดค่า:
2510
+
2511
+ - **apiKey**: ตั้งค่าโดยใช้ไวยากรณ์ของตัวแปร `env` [เรียนรู้เพิ่มเติม](/docs/config#env-vars)
2512
+ - **ส่วนหัว**: ส่วนหัวที่กำหนดเองส่งไปพร้อมกับคำขอแต่ละรายการ
2513
+ - **limit.context**: Input Tokens สูงสุดที่โมเดลยอมรับ
2514
+ - **limit.output**: Output Tokens สูงสุดที่โมเดลสามารถสร้างได้
2515
+
2516
+ ช่อง `limit` ช่วยให้ OpenCode เข้าใจบริบทที่คุณเหลืออยู่ ผู้ให้บริการมาตรฐานจะดึงข้อมูลเหล่านี้จาก models.dev โดยอัตโนมัติ
2517
+
2518
+ ---
2519
+
2520
+ ## การแก้ไขปัญหา
2521
+
2522
+ หากคุณประสบปัญหาในการกำหนดค่าผู้ให้บริการ ให้ตรวจสอบสิ่งต่อไปนี้:
2523
+
2524
+ 1. **ตรวจสอบการตั้งค่าการรับรองความถูกต้อง**: เรียกใช้ `opencode auth list` เพื่อดูว่ามีข้อมูลรับรองหรือไม่
2525
+ สำหรับผู้ให้บริการจะถูกเพิ่มในการกำหนดค่าของคุณ
2526
+
2527
+ สิ่งนี้ใช้ไม่ได้กับผู้ให้บริการอย่าง Amazon Bedrock ที่ต้องอาศัยตัวแปรสภาพแวดล้อมสำหรับการตรวจสอบสิทธิ์
2528
+
2529
+ 2. สำหรับผู้ให้บริการแบบกำหนดเอง ให้ตรวจสอบการกำหนดค่า opencode และ:
2530
+ - ตรวจสอบให้แน่ใจว่า ID ผู้ให้บริการที่ใช้ในคำสั่ง `/connect` ตรงกับ ID ในการกำหนดค่า opencode ของคุณ
2531
+ - มีการใช้แพ็คเกจ npm ที่ถูกต้องสำหรับผู้ให้บริการ ตัวอย่างเช่น ใช้ `@ai-sdk/cerebras` สำหรับ Cerebras และสำหรับผู้ให้บริการรายอื่นที่เข้ากันได้กับ OpenAI ให้ใช้ `@ai-sdk/openai-compatible`
2532
+ - ตรวจสอบว่ามีการใช้จุดสิ้นสุด API ที่ถูกต้องในช่อง `options.baseURL`