{"id":229,"date":"2026-03-21T22:47:23","date_gmt":"2026-03-21T14:47:23","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/providers-opencode\/"},"modified":"2026-03-21T23:08:55","modified_gmt":"2026-03-21T15:08:55","slug":"providers-opencode","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/providers-opencode\/","title":{"rendered":"OpenCode"},"content":{"rendered":"<h1>OpenCode<\/h1>\n<p>OpenCode \u5728 OpenClaw \u4e2d\u63d0\u4f9b\u4e24\u4e2a\u6258\u7ba1\u76ee\u5f55\uff1a<\/p>\n<ul>\n<li><code>opencode\/...<\/code> \u7528\u4e8e <strong>Zen<\/strong> \u76ee\u5f55<\/li>\n<li><code>opencode-go\/...<\/code> \u7528\u4e8e <strong>Go<\/strong> \u76ee\u5f55<\/li>\n<\/ul>\n<p>\u4e24\u4e2a\u76ee\u5f55\u90fd\u4f7f\u7528\u76f8\u540c\u7684 OpenCode API \u5bc6\u94a5\u3002OpenClaw \u4f1a\u5c06\u8fd0\u884c\u65f6\u63d0\u4f9b\u5546 ID<br \/>\n\u4fdd\u6301\u62c6\u5206\uff0c\u4ee5\u4fbf\u4e0a\u6e38\u6309\u6a21\u578b\u8def\u7531\u4fdd\u6301\u6b63\u786e\uff0c\u4f46\u65b0\u624b\u5f15\u5bfc\u548c\u6587\u6863\u5c06\u5b83\u4eec\u89c6\u4e3a<br \/>\n\u540c\u4e00\u4e2a OpenCode \u8bbe\u7f6e\u3002<\/p>\n<h2>CLI \u8bbe\u7f6e<\/h2>\n<h3>Zen \u76ee\u5f55<\/h3>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw onboard &#8211;auth-choice opencode-zen<br \/>\nopenclaw onboard &#8211;opencode-zen-api-key &#8220;$OPENCODE_API_KEY&#8221;<\/p>\n<pre><code>\n### Go \u76ee\u5f55\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw onboard --auth-choice opencode-go\nopenclaw onboard --opencode-go-api-key &quot;$OPENCODE_API_KEY&quot;\n<\/code><\/pre>\n<h2>\u914d\u7f6e\u7247\u6bb5<\/h2>\n<p><code>json5  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n{<br \/>\n  env: { OPENCODE_API_KEY: \"sk-...\" },<br \/>\n  agents: { defaults: { model: { primary: \"opencode\/claude-opus-4-6\" } } },<br \/>\n}<\/code><\/p>\n<h2>\u76ee\u5f55<\/h2>\n<h3>Zen<\/h3>\n<ul>\n<li>\u8fd0\u884c\u65f6\u63d0\u4f9b\u5546\uff1a<code>opencode<\/code><\/li>\n<li>\u793a\u4f8b\u6a21\u578b\uff1a<code>opencode\/claude-opus-4-6<\/code>\u3001<code>opencode\/gpt-5.2<\/code>\u3001<code>opencode\/gemini-3-pro<\/code><\/li>\n<li>\u9002\u5408\u4f60\u60f3\u4f7f\u7528\u7cbe\u9009\u7684 OpenCode \u591a\u6a21\u578b\u4ee3\u7406\u65f6<\/li>\n<\/ul>\n<h3>Go<\/h3>\n<ul>\n<li>\u8fd0\u884c\u65f6\u63d0\u4f9b\u5546\uff1a<code>opencode-go<\/code><\/li>\n<li>\u793a\u4f8b\u6a21\u578b\uff1a<code>opencode-go\/kimi-k2.5<\/code>\u3001<code>opencode-go\/glm-5<\/code>\u3001<code>opencode-go\/minimax-m2.5<\/code><\/li>\n<li>\u9002\u5408\u4f60\u60f3\u4f7f\u7528 OpenCode \u6258\u7ba1\u7684 Kimi\/GLM\/MiniMax \u4ea7\u54c1\u7ebf\u65f6<\/li>\n<\/ul>\n<h2>\u8bf4\u660e<\/h2>\n<ul>\n<li>\u4e5f\u652f\u6301 <code>OPENCODE_ZEN_API_KEY<\/code>\u3002<\/li>\n<li>\u5728\u8bbe\u7f6e\u671f\u95f4\u8f93\u5165\u4e00\u4e2a OpenCode \u5bc6\u94a5\uff0c\u4f1a\u4e3a\u4e24\u4e2a\u8fd0\u884c\u65f6\u63d0\u4f9b\u5546\u90fd\u5b58\u50a8\u51ed\u8bc1\u3002<\/li>\n<li>\u4f60\u9700\u8981\u767b\u5f55 OpenCode\u3001\u6dfb\u52a0\u8ba1\u8d39\u4fe1\u606f\uff0c\u7136\u540e\u590d\u5236\u4f60\u7684 API \u5bc6\u94a5\u3002<\/li>\n<li>\u8ba1\u8d39\u548c\u76ee\u5f55\u53ef\u7528\u6027\u7531 OpenCode \u4eea\u8868\u677f\u7ba1\u7406\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>OpenCode OpenCode \u5728 OpenClaw \u4e2d\u63d0\u4f9b\u4e24\u4e2a\u6258\u7ba1\u76ee\u5f55\uff1a opencode\/&#8230; \u7528\u4e8e [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-229","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=229"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/229\/revisions"}],"predecessor-version":[{"id":524,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/229\/revisions\/524"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}