Skip to main content
Connect OpenCode to Fireworks models and Nexus Auto. Generally available OpenAI Chat Completions Nexus Auto

Quick start

Install and sign in

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.
Sign in with your browser, or paste a Fireworks API key (fw_...).Already set up? Skip to step 2.

Connect OpenCode

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 showing Auto selected and Fireworks DeepSeek, GLM, Kimi, and other models

OpenCode model picker after Nexus CLI, with Auto selected

nexus opencode status shows the provider, where the key comes from, and the configured model.

Use Nexus Auto

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).

MCP and tools

Nexus CLI doesn’t touch MCP. Your servers stay in the mcp block of opencode.json:
Nexus CLI does not add web search to OpenCode. See Web Search.

Microsoft Foundry

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.

Troubleshooting

See Nexus Auto for issues that affect every harness. Upgrading from an earlier version? See Upgrading from earlier versions.

Manual setup (advanced)

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:
~/.config/opencode/opencode.json
opencode run -m fireworks-ai/auto "hello" answers through Nexus Auto.
See what changes without the Nexus CLI.

What the Nexus CLI writes

~/.config/opencode/opencode.json
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.