You need Node.js 22 or later, git, and bash. On Windows, run the installer from Git Bash. PowerShell breaks the script’s line endings.
nexus login
Sign in with your browser, or paste a Fireworks API key (fw_...).Already set up? Skip to step 2.
Connect OpenCode
nexus opencodenexus opencode status
Restart and pick a model
Restart OpenCode and pick a model with /models. The default is auto, stored as fireworks-ai/auto. To change the default, run nexus opencode --model glm-latest.Models that OpenCode already lists from models.dev keep their full ID, such as fireworks-ai/accounts/fireworks/routers/glm-latest, so nothing shows twice. Nexus CLI adds the rest, such as auto, under short IDs.
OpenCode model picker after Nexus CLI, with Auto selected
nexus opencode status shows the provider, where the key comes from, and the configured model.
Nexus Auto (auto) is supported on the Chat Completions API.
Anthropic and OpenAI model turns: save a key with nexus auto --anthropic-api-key or --openai-api-key (each prompts for the key), then run nexus opencode again. Nexus CLI adds the saved key to the provider headers in opencode.json. Or connect a Provider Key, which needs nothing saved locally.
Environment keys: Nexus CLI never sends ANTHROPIC_API_KEY or OPENAI_API_KEY from your environment.
Manual setup: send x-anthropic-api-key and x-openai-api-key headers yourself. See Manual setup (advanced).
Nexus CLI can connect OpenCode to Fireworks models deployed in your Azure subscription. See Nexus for Microsoft Foundry. Nexus Auto is not available on Foundry.
Fastest: in OpenCode, run /connect, search fireworks.ai, paste your key, and pick a model with /models.Or edit the config to add models and set a default:
The x-anthropic-api-key and x-openai-api-key headers appear only for keys you saved with nexus auto. Nexus CLI also adds its own attribution headers. If your opencode.json uses OpenCode v2’s providers map, Nexus CLI writes the Fireworks provider there too, so the models appear in /models.The file is saved with mode 0600. Nexus CLI never changes auth.json. off restores opencode.json byte-for-byte from the snapshot under ~/.nexus/opencode/. Use --config-path for a config stored elsewhere.
Was this page helpful?
⌘I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Fireworks AI Docs","description":"Official Fireworks AI documentation for inference, deployments, training, Fireworks Nexus, APIs, SDKs, and CLI tools.","colors":{"primary":"#9249e7","light":"#9249e7","dark":"#9249e7"},"logo":{"light":"https://mintcdn.com/fireworksai-docs/k8IlrNKHdagCbcj7/logo/logo.svg?fit=max\u0026auto=format\u0026n=k8IlrNKHdagCbcj7\u0026q=85\u0026s=aa60cf6047af1412adca3c341c1af7cf","dark":"https://mintcdn.com/fireworksai-docs/k8IlrNKHdagCbcj7/logo/logo.svg?fit=max\u0026auto=format\u0026n=k8IlrNKHdagCbcj7\u0026q=85\u0026s=aa60cf6047af1412adca3c341c1af7cf"},"favicon":"https://mintcdn.com/fireworksai-docs/Zmr1JwZl0XCOo6P5/favicon.ico?fit=max\u0026auto=format\u0026n=Zmr1JwZl0XCOo6P5\u0026q=85\u0026s=391f22495764acdbdfd5caf684bd1965","api":{"openapi":["openapi.yml","merged.openapi.yaml"],"playground":{"display":"interactive","proxy":false}},"navbar":{"links":[{"href":"https://discord.gg/fireworks-ai","label":"Community"},{"href":"https://status.fireworks.ai/","label":"Status"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.fireworks.ai/login"}},"footer":{"socials":{"x":"https://x.com/FireworksAI_HQ","discord":"https://discord.gg/fireworks-ai","github":"https://github.com/fw-ai","youtube":"https://www.youtube.com/@fireworksai","linkedin":"https://www.linkedin.com/company/fireworks-ai"},"links":[{"header":"Legal","items":[{"label":"Terms of Service","href":"https://fireworks.ai/terms-of-service"},{"label":"Privacy Policy","href":"https://fireworks.ai/privacy-policy"},{"label":"Licenses","href":"https://fireworks.ai/licenses"},{"label":"Trust","href":"https://trust.fireworks.ai/"}]},{"header":"Contact Us","items":[{"label":"Inquiry Form","href":"https://fireworks.ai/contact"}]},{"header":"Resources","items":[{"label":"Blog","href":"https://fireworks.ai/blog"},{"label":"Cookbook","href":"https://github.com/fw-ai/cookbook"},{"label":"Pricing","href":"https://fireworks.ai/pricing"}]}]},"integrations":{"ga4":{"measurementId":"G-2P32PRKZ57"},"koala":{"publicApiKey":"pk_59d6417e241a5b81e050226345f38b26d984"},"posthog":{"apiKey":"phc_OQKVIlbmI9arhxBb1xjo2Wz3zJG40X4RVNPTVHS1Gej","apiHost":"https://app.fireworks.ai/relay-1Gej"}},"contextual":{"options":["copy","view"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fireworksai-docs","hasAudioNarration":false,"actualSubdomain":"fireworksai-docs","customDomains":["fireworks.ai"],"gitSource":{"type":"github","owner":"fw-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae172aca726fe79c3ada3e5","collectionId":"6271848a-11eb-463c-b80c-a575c8c98dc5","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae172aca726fe79c3ada3e5"},"feedback":{"thumbs":true,"edits":false},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae18a52937c113a46a9df61","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"API \u0026 SDK Reference","count":123},{"language":"default","tag":"CLI Reference","count":114},{"language":"default","tag":"firectl CLI","count":114},{"language":"default","tag":"Documentation","count":94},{"language":"default","tag":"Deployments","count":50},{"language":"default","tag":"Training","count":37},{"language":"default","tag":"Resources","count":37},{"language":"default","tag":"FAQ","count":32},{"language":"default","tag":"Nexus","count":29},{"language":"default","tag":"Admin","count":23}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"@keyframes fw-skill-cta-in{0%{transform:translateY(14px);opacity:0}55%{transform:translateY(-5px);opacity:1}75%{transform:translateY(2px)}to{transform:translateY(0)}}#content-area.max-w-xl{max-width:48rem}p[data-component-part=step-title]{margin-bottom:16px}[data-component-part=step-content]>:first-child{margin-top:0}.fw-skill-cta{position:fixed;z-index:30;right:max(1rem,env(safe-area-inset-right));bottom:max(5rem,env(safe-area-inset-bottom));width:16.5rem;max-width:calc(100vw - 2rem);margin:0;padding:0;color:#1c1917;font:inherit;line-height:1.2}.fw-skill-cta.is-toc{right:auto;bottom:max(1.5rem,env(safe-area-inset-bottom))}.fw-skill-cta-bar{position:relative;display:flex;flex-direction:column;align-items:center;gap:.65rem;box-sizing:border-box;width:100%;padding:.9rem .85rem .85rem;border:1px solid rgba(146,73,231,.28);border-radius:1rem;background:#faf7ff;animation:fw-skill-cta-in .7s cubic-bezier(.2,.85,.3,1) both}.fw-skill-cta-title{margin:0;color:#171717;font-size:.95rem;font-weight:700;line-height:1.25;text-align:center;text-wrap:balance}.fw-skill-cta-badge,.fw-skill-cta-logos{display:flex;align-items:center;justify-content:center}.fw-skill-cta-logos{gap:1rem}.fw-skill-cta-badge{flex:none}.fw-skill-cta-logo{display:block;flex:none;height:1.2rem;width:auto}.fw-skill-cta-badge.is-claude .fw-skill-cta-logo{height:.9rem}.fw-skill-cta-copy{display:flex;align-items:center;justify-content:center;gap:.35rem;box-sizing:border-box;width:100%;min-height:0;padding:.32rem .65rem;border:0;border-radius:.5rem;background:#7c3aed;color:#fff;font:inherit;font-size:.78rem;font-weight:600;cursor:pointer;transition:background-color .15s ease}.fw-skill-cta-copy:hover{background:#6d28d9}.fw-skill-cta-copy.is-copied{background:#ede4ff;color:#5b21b6;cursor:default}.fw-skill-cta-action-icon{flex:none;width:.85rem;height:.85rem}.fw-skill-cta-dismiss{position:absolute;top:-.6rem;right:-.6rem;display:flex;align-items:center;justify-content:center;width:1.35rem;height:1.35rem;padding:0;border:1px solid rgba(146,73,231,.28);border-radius:999px;background:#fff;color:#7c3aed;font:inherit;font-size:.9rem;line-height:1;cursor:pointer}.fw-skill-cta-dismiss:hover{background:#f3edff;color:#1c1917}html.dark .fw-skill-cta-dismiss,html[data-theme=dark] .fw-skill-cta-dismiss{background:#1c1917;border-color:rgba(167,139,250,.45);color:#c4b5fd}.fw-skill-cta-dismiss[hidden],.fw-skill-cta-prompt[hidden]{display:none}.fw-skill-cta-prompt{box-sizing:border-box;width:100%;padding:.45rem .6rem;border:1px solid rgba(146,73,231,.22);border-radius:.55rem;background:#fff}.fw-skill-cta-prompt-text{display:block;overflow-x:auto;color:#57534e;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.68rem;line-height:1.4;white-space:nowrap;scrollbar-width:none;-webkit-mask-image:linear-gradient(to right,#000 85%,transparent);mask-image:linear-gradient(to right,#000 85%,transparent)}.fw-skill-cta-prompt-text::-webkit-scrollbar{display:none}.fw-skill-cta-copy:focus-visible,.fw-skill-cta-dismiss:focus-visible,.fw-skill-cta-prompt:focus-visible{outline:2px solid #9249e7;outline-offset:2px}html.dark .fw-skill-cta-bar,html[data-theme=dark] .fw-skill-cta-bar{background:#1c1917;border-color:rgba(167,139,250,.45)}html.dark .fw-skill-cta-logo.is-mono,html[data-theme=dark] .fw-skill-cta-logo.is-mono{filter:invert(1)}html.dark .fw-skill-cta-title,html[data-theme=dark] .fw-skill-cta-title{color:#fafaf9}html.dark .fw-skill-cta-copy.is-copied,html[data-theme=dark] .fw-skill-cta-copy.is-copied{background:rgba(167,139,250,.18);color:#ddd6fe}html.dark .fw-skill-cta-prompt,html[data-theme=dark] .fw-skill-cta-prompt{background:#292524;border-color:rgba(167,139,250,.35)}html.dark .fw-skill-cta-prompt-text,html[data-theme=dark] .fw-skill-cta-prompt-text{color:#d6d3d1}@media (max-width:480px){.fw-skill-cta{left:max(1rem,env(safe-area-inset-left));width:auto}}@media (prefers-reduced-motion:reduce){.fw-skill-cta-bar{animation:none}}@media print{.fw-skill-cta{display:none}}"},{"filePath":"brand-v2/brand-v2.css","href":"/docs/_mintlify/custom/fireworksai-docs/f58986b31aae7bd4/brand-v2/brand-v2.css"}],"page":{"pagePath":"nexus/harnesses/opencode","slug":"/nexus/harnesses/opencode","pageMetadata":{"title":"OpenCode","sidebarTitle":"OpenCode","description":"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.","href":"/nexus/harnesses/opencode"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,Badge,Check,CodeBlock,Frame,Heading,OptimizedImage,Step,Steps}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Badge)_missingMdxReference(`Badge`,true);if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Connect OpenCode to Fireworks models and Nexus Auto.`}),`\n`,_jsx(Badge,{color:`green`,children:`Generally available`}),`\n`,_jsx(Badge,{color:`orange`,children:`OpenAI Chat Completions`}),`\n`,_jsx(Badge,{color:`green`,children:`Nexus Auto`}),`\n`,_jsx(Heading,{level:`2`,id:`quick-start`,children:`Quick start`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Install and sign in`,icon:`download`,children:[_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -fsSL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://nexus.fireworks.ai/install.sh`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` bash`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`You need Node.js 22 or later, `,_jsx(_components.code,{children:`git`}),`, and `,_jsx(_components.code,{children:`bash`}),`. On Windows, run the installer from Git Bash. PowerShell breaks the script’s line endings.`]}),_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nexus`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Sign in with your browser, or paste a Fireworks API key (`,_jsx(_components.code,{children:`fw_...`}),`).`]}),_jsx(_components.p,{children:`Already set up? Skip to step 2.`})]}),_jsx(Step,{title:`Connect OpenCode`,icon:`plug`,children:_jsx(CodeBlock,{filename:``,wrap:`true`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nexus`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` opencode`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`nexus`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` opencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` status`})]}),`\n`]})})})}),_jsxs(Step,{title:`Restart and pick a model`,icon:`sparkles`,children:[_jsxs(_components.p,{children:[`Restart OpenCode and pick a model with `,_jsx(_components.code,{children:`/models`}),`. The default is `,_jsx(_components.code,{children:`auto`}),`, stored as `,_jsx(_components.code,{children:`fireworks-ai/auto`}),`. To change the default, run `,_jsx(_components.code,{children:`nexus opencode --model glm-latest`}),`.`]}),_jsxs(_components.p,{children:[`Models that OpenCode already lists from models.dev keep their full ID, such as `,_jsx(_components.code,{children:`fireworks-ai/accounts/fireworks/routers/glm-latest`}),`, so nothing shows twice. Nexus CLI adds the rest, such as `,_jsx(_components.code,{children:`auto`}),`, under short IDs.`]}),_jsx(Frame,{caption:`OpenCode model picker after Nexus CLI, with Auto selected`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/opencode-model-picker.png?fit=max\u0026auto=format\u0026n=wK7OMV3yh2TYEQdX\u0026q=85\u0026s=0943c64694fde3d877f80f1e8a23e5be`,alt:`OpenCode model picker showing Auto selected and Fireworks DeepSeek, GLM, Kimi, and other models`,\"data-og-width\":`1432`,width:`1432`,\"data-og-height\":`640`,height:`640`,\"data-path\":`images/nexus/opencode-model-picker.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/opencode-model-picker.png?w=280\u0026fit=max\u0026auto=format\u0026n=wK7OMV3yh2TYEQdX\u0026q=85\u0026s=49607eac68ddc264e81843cc3c4dd4bb 280w, https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/opencode-model-picker.png?w=560\u0026fit=max\u0026auto=format\u0026n=wK7OMV3yh2TYEQdX\u0026q=85\u0026s=94671a6e96b57b13b9921c8db58bd3bb 560w, https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/opencode-model-picker.png?w=840\u0026fit=max\u0026auto=format\u0026n=wK7OMV3yh2TYEQdX\u0026q=85\u0026s=25d06f957de20734ad6bddf588e422b2 840w, https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/opencode-model-picker.png?w=1100\u0026fit=max\u0026auto=format\u0026n=wK7OMV3yh2TYEQdX\u0026q=85\u0026s=3de96304bec2bb66e15482752ae2a0e7 1100w, https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/opencode-model-picker.png?w=1650\u0026fit=max\u0026auto=format\u0026n=wK7OMV3yh2TYEQdX\u0026q=85\u0026s=b92c2eb82eca95e5e8f4597ec563b4aa 1650w, https://mintcdn.com/fireworksai-docs/wK7OMV3yh2TYEQdX/images/nexus/opencode-model-picker.png?w=2500\u0026fit=max\u0026auto=format\u0026n=wK7OMV3yh2TYEQdX\u0026q=85\u0026s=76b8f14ff6273acc8c38c7d9f50b8b9d 2500w`})}),_jsxs(Check,{children:[_jsx(_components.code,{children:`nexus opencode status`}),` shows the provider, where the key comes from, and the configured model.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`use-nexus-auto`,children:`Use Nexus Auto`}),`\n`,_jsxs(_components.p,{children:[`Nexus Auto (`,_jsx(_components.code,{children:`auto`}),`) is supported on the Chat Completions API.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Anthropic and OpenAI model turns:`}),` save a key with `,_jsx(_components.code,{children:`nexus auto --anthropic-api-key`}),` or `,_jsx(_components.code,{children:`--openai-api-key`}),` (each prompts for the key), then run `,_jsx(_components.code,{children:`nexus opencode`}),` again. Nexus CLI adds the saved key to the provider headers in `,_jsx(_components.code,{children:`opencode.json`}),`. Or connect a `,_jsx(_components.a,{href:`/nexus/provider-keys`,children:`Provider Key`}),`, which needs nothing saved locally.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Environment keys:`}),` Nexus CLI never sends `,_jsx(_components.code,{children:`ANTHROPIC_API_KEY`}),` or `,_jsx(_components.code,{children:`OPENAI_API_KEY`}),` from your environment.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Manual setup:`}),` send `,_jsx(_components.code,{children:`x-anthropic-api-key`}),` and `,_jsx(_components.code,{children:`x-openai-api-key`}),` headers yourself. See `,_jsx(_components.a,{href:`#manual-setup-advanced`,children:`Manual setup (advanced)`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`mcp-and-tools`,children:`MCP and tools`}),`\n`,_jsxs(_components.p,{children:[`Nexus CLI doesn’t touch MCP. Your servers stay in the `,_jsx(_components.code,{children:`mcp`}),` block of `,_jsx(_components.code,{children:`opencode.json`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// ~/.config/opencode/opencode.json`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mcp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"docs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"local\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"command\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"npx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"-y\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-mcp-server\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Nexus CLI does not add web search to OpenCode. See `,_jsx(_components.a,{href:`/nexus/web-search`,children:`Web Search`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`microsoft-foundry`,children:`Microsoft Foundry`}),`\n`,_jsxs(_components.p,{children:[`Nexus CLI can connect OpenCode to Fireworks models deployed in your Azure subscription. See `,_jsx(_components.a,{href:`/nexus/microsoft-foundry`,children:`Nexus for Microsoft Foundry`}),`. Nexus Auto is not available on Foundry.`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/nexus/auto#troubleshooting`,children:`Nexus Auto`}),` for issues that affect every harness. Upgrading from an earlier version? See `,_jsx(_components.a,{href:`/nexus/cli#upgrading-from-earlier-versions`,children:`Upgrading from earlier versions`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`manual-setup-advanced`,children:`Manual setup (advanced)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Fastest:`}),` in OpenCode, run `,_jsx(_components.code,{children:`/connect`}),`, search `,_jsx(_components.strong,{children:`fireworks.ai`}),`, paste your key, and pick a model with `,_jsx(_components.code,{children:`/models`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Or edit the config`}),` to add models and set a default:`]}),`\n`,_jsx(CodeBlock,{filename:`~/.config/opencode/opencode.json`,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"$schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://opencode.ai/config.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fireworks-ai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"options\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"apiKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{env:FIREWORKS_API_KEY}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"models\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"glm-latest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GLM (Latest)\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Nexus Auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fireworks-ai/glm-latest\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Check,{children:[_jsx(_components.code,{children:`opencode run -m fireworks-ai/auto \"hello\"`}),` answers through Nexus Auto.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/nexus/manual-setup#what-changes-without-the-nexus-cli`,children:`what changes without the Nexus CLI`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-the-nexus-cli-writes`,children:`What the Nexus CLI writes`}),`\n`,_jsxs(Accordion,{title:`See what Nexus CLI writes`,id:`see-what-nexus-cli-writes`,children:[_jsx(CodeBlock,{filename:`~/.config/opencode/opencode.json`,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"fireworks-ai\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"options\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fw_...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"headers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"x-anthropic-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sk-ant-...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"models\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Auto\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"limit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"context\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1048575`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"output\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`131072`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"modalities\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"input\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fireworks-ai/auto\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`x-anthropic-api-key`}),` and `,_jsx(_components.code,{children:`x-openai-api-key`}),` headers appear only for keys you saved with `,_jsx(_components.code,{children:`nexus auto`}),`. Nexus CLI also adds its own attribution headers. If your `,_jsx(_components.code,{children:`opencode.json`}),` uses OpenCode v2’s `,_jsx(_components.code,{children:`providers`}),` map, Nexus CLI writes the Fireworks provider there too, so the models appear in `,_jsx(_components.code,{children:`/models`}),`.`]}),_jsxs(_components.p,{children:[`The file is saved with mode `,_jsx(_components.code,{children:`0600`}),`. Nexus CLI never changes `,_jsx(_components.code,{children:`auth.json`}),`. `,_jsx(_components.code,{children:`off`}),` restores `,_jsx(_components.code,{children:`opencode.json`}),` byte-for-byte from the snapshot under `,_jsx(_components.code,{children:`~/.nexus/opencode/`}),`. Use `,_jsx(_components.code,{children:`--config-path`}),` for a config stored elsewhere.`]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"OpenCode","sidebarTitle":"OpenCode","description":"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.","href":"/nexus/harnesses/opencode"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Quick start","slug":"quick-start","depth":2,"children":[]},{"title":"Use Nexus Auto","slug":"use-nexus-auto","depth":2,"children":[]},{"title":"MCP and tools","slug":"mcp-and-tools","depth":2,"children":[]},{"title":"Microsoft Foundry","slug":"microsoft-foundry","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Manual setup (advanced)","slug":"manual-setup-advanced","depth":2,"children":[]},{"title":"What the Nexus CLI writes","slug":"what-the-nexus-cli-writes","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/fireworksai-docs/0fd851b923cc8880/training-skill-cta.js","/docs/_mintlify/custom/fireworksai-docs/4b5856b7e8267204/brand-v2/brand-v2.js"],"subdomain":"fireworksai-docs","siteName":"Fireworks AI Docs","title":"OpenCode - Fireworks AI Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T03:48:23.751Z","originalFileLocation":"nexus/harnesses/opencode.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Fireworks AI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"OpenCode - Fireworks AI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Fireworks AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://fireworks.ai/docs/nexus/harnesses/opencode\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://fireworksai-docs.mintlify.app/_mintlify/api/og/v2?division=Code\u0026amp;title=OpenCode\u0026amp;description=Connect+OpenCode+to+Fireworks+models+and+Nexus+Auto+with+the+Nexus+CLI+or+manual+setup.\u0026amp;theme=e6fc9d8dc703196e3eb71e6d\u0026amp;signature=746b97e484ac9bdd4087fa49afe56cfdf06e25c320d469cdb6e04884bd5855d8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"OpenCode - Fireworks AI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://fireworksai-docs.mintlify.app/_mintlify/api/og/v2?division=Code\u0026amp;title=OpenCode\u0026amp;description=Connect+OpenCode+to+Fireworks+models+and+Nexus+Auto+with+the+Nexus+CLI+or+manual+setup.\u0026amp;theme=e6fc9d8dc703196e3eb71e6d\u0026amp;signature=746b97e484ac9bdd4087fa49afe56cfdf06e25c320d469cdb6e04884bd5855d8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/fireworksai-docs/1wzeLeQ_X9KQpzOR/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Fireworks AI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9249e7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://fireworks.ai/docs/nexus/harnesses/opencode\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/nexus/harnesses/opencode.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://fireworks.ai/#organization\",\"name\":\"Fireworks AI Docs\",\"url\":\"https://fireworks.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/fireworksai-docs/k8IlrNKHdagCbcj7/logo/logo.svg?fit=max\u0026auto=format\u0026n=k8IlrNKHdagCbcj7\u0026q=85\u0026s=aa60cf6047af1412adca3c341c1af7cf\"}},{\"@type\":\"WebSite\",\"@id\":\"https://fireworks.ai/docs#website\",\"name\":\"Fireworks AI Docs\",\"url\":\"https://fireworks.ai/docs\",\"publisher\":{\"@id\":\"https://fireworks.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://fireworks.ai/docs/nexus/harnesses/opencode#webpage\",\"url\":\"https://fireworks.ai/docs/nexus/harnesses/opencode\",\"name\":\"OpenCode\",\"description\":\"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.\",\"dateModified\":\"2026-10-23T03:48:23.751Z\",\"isPartOf\":{\"@id\":\"https://fireworks.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://fireworks.ai/docs/nexus/harnesses/opencode#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://fireworks.ai/docs/nexus/harnesses/opencode#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Harness Support\",\"item\":\"https://fireworks.ai/docs/nexus/harnesses\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Code\",\"item\":\"https://fireworks.ai/docs/nexus/harnesses/claude-code\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"OpenCode\",\"item\":\"https://fireworks.ai/docs/nexus/harnesses/opencode\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://fireworks.ai/docs/nexus/harnesses/opencode#article\",\"headline\":\"OpenCode\",\"name\":\"OpenCode\",\"description\":\"Connect OpenCode to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.\",\"url\":\"https://fireworks.ai/docs/nexus/harnesses/opencode\",\"mainEntityOfPage\":{\"@id\":\"https://fireworks.ai/docs/nexus/harnesses/opencode#webpage\"},\"dateModified\":\"2026-10-23T03:48:23.751Z\",\"publisher\":{\"@id\":\"https://fireworks.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://fireworks.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Fireworks AI Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Fireworks AI Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/getting-started/introduction"}]},{"tab":"Nexus","groups":[{"group":"Get started","pages":[{"title":"Overview","sidebarTitle":"Overview","href":"/nexus"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/nexus/quickstart"}]},{"group":"Nexus CLI","pages":[{"title":"Nexus CLI","sidebarTitle":"CLI Setup","href":"/nexus/cli"},{"title":"Manual setup (advanced)","href":"/nexus/manual-setup"},{"title":"CLI Reference","sidebarTitle":"CLI Reference","href":"/nexus/cli-reference"},{"title":"Release Notes","sidebarTitle":"Release Notes","href":"/nexus/release-notes"}]},{"group":"Model Orchestration","pages":[{"title":"Nexus Auto","sidebarTitle":"Nexus Auto","href":"/nexus/auto"},{"title":"Open Models","sidebarTitle":"Open Models","href":"/nexus/open-models"}]},{"group":"Harness Support","pages":[{"title":"Coding Harnesses","sidebarTitle":"Coding Harnesses","href":"/nexus/harnesses"},{"group":"Code","pages":[{"title":"Claude Code","sidebarTitle":"Claude Code","href":"/nexus/harnesses/claude-code"},{"title":"Codex","sidebarTitle":"Codex","description":"Connect the Codex CLI to Fireworks with the Nexus CLI or manual setup, and see who pays for OpenAI model turns with Nexus Auto.","href":"/nexus/harnesses/codex"},{"title":"OpenCode","sidebarTitle":"OpenCode","href":"/nexus/harnesses/opencode"},{"title":"Pi","sidebarTitle":"Pi","description":"Connect Pi to Fireworks models and Nexus Auto with the Nexus CLI or manual setup.","href":"/nexus/harnesses/pi"},{"title":"DeepSeek Harness","sidebarTitle":"DeepSeek Harness","href":"/nexus/harnesses/deepseek"},{"title":"Cursor IDE","sidebarTitle":"Cursor IDE","href":"/nexus/harnesses/cursor"},{"title":"VS Code","sidebarTitle":"VS Code","href":"/nexus/harnesses/vscode"},{"title":"Copilot App","sidebarTitle":"Copilot App","href":"/nexus/harnesses/copilot-app"},{"title":"Copilot CLI","sidebarTitle":"Copilot CLI","href":"/nexus/harnesses/copilot-cli"}]},{"group":"Cowork","pages":[{"title":"ChatGPT desktop app","sidebarTitle":"ChatGPT Desktop","href":"/nexus/harnesses/chatgpt"},{"title":"Claude Desktop","sidebarTitle":"Claude Desktop","href":"/nexus/harnesses/claude-desktop"}]}]},{"group":"Nexus settings","pages":[{"group":"Model Providers","pages":[{"title":"Provider Keys","sidebarTitle":"Connect Providers","href":"/nexus/provider-keys"},{"title":"Amazon Bedrock Setup","sidebarTitle":"Amazon Bedrock Setup","href":"/nexus/provider-keys/bedrock"}]},{"title":"Spend Limits","sidebarTitle":"Spend Limits","href":"/nexus/usage-limits"}]},{"group":"More","pages":[{"title":"APIs and SDKs","sidebarTitle":"APIs and SDKs","href":"/nexus/apis-and-sdks"},{"title":"LLM Gateways","sidebarTitle":"LLM Gateways","href":"/nexus/llm-gateways"},{"title":"Nexus for Microsoft Foundry","sidebarTitle":"Nexus for Foundry","href":"/nexus/microsoft-foundry"},{"title":"Usage and Cost","sidebarTitle":"Usage and Cost","href":"/nexus/metrics"},{"title":"Effort","sidebarTitle":"Effort","href":"/nexus/orchestration-preferences"},{"title":"Estimated Savings","sidebarTitle":"Estimated Savings","href":"/nexus/estimated-savings"}]}]},{"tab":"API \u0026 SDK Reference","pages":[{"title":"API \u0026 SDK Reference","href":"/api-reference/introduction"}]},{"tab":"CLI Reference","pages":[{"title":"CLI Reference","href":"/tools-sdks/firectl/firectl"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/updates/changelog"}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/tools-sdks/openai-compatibility"}]}]},"title":"OpenCode - Fireworks AI Docs","buildId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","deploymentId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-Dit-D9cD.js","DynamicMarkdown-B3juXLG8.js","zoom-image-lightbox-D2y4WbiL.js","lightbox-handle-r17bVUz3.js"]}