The open source coding agent.
TypeScript
docs: replace deprecated opencode auth login command with /connect across all documentation
Jay V2a8473891b29
diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdxindex 46d0d82685a..82ea391e8a4 100644--- a/packages/web/src/content/docs/config.mdx+++ b/packages/web/src/content/docs/config.mdx@@ -362,7 +362,7 @@ You can disable providers that are loaded automatically through the `disabled_prThe `disabled_providers` option accepts an array of provider IDs. When a provider is disabled:- It won't be loaded even if environment variables are set.-- It won't be loaded even if API keys are configured through `opencode auth login`.+- It won't be loaded even if API keys are configured through the `/connect` command.- The provider's models won't appear in the model selection list.---diff --git a/packages/web/src/content/docs/index.mdx b/packages/web/src/content/docs/index.mdxindex 1e1b67782bd..f37dca19d06 100644--- a/packages/web/src/content/docs/index.mdx+++ b/packages/web/src/content/docs/index.mdx@@ -132,23 +132,21 @@ If you are new to using LLM providers, we recommend using [OpenCode Zen](/docs/zIt's a curated list of models that have been tested and verified by the OpenCodeteam.-1. Run `opencode auth login`, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth).+1. Run the `/connect` command in the TUI, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth).++ ```txt+ /connect+ ```+2. Sign in, add your billing details, and copy your API key.-3. Paste your API key.- ```bash- $ opencode auth login+3. Paste your API key.- ┌ Add credential- │- ◇ Select provider- │ opencode+ ```txt+ ┌ API key│- ● Create an api key at https://opencode.ai/auth│- ◆ Enter your API key- │ _- └+ └ enter```Alternatively, you can select one of the other providers. [Learn more](/docs/providers#directory).diff --git a/packages/web/src/content/docs/models.mdx b/packages/web/src/content/docs/models.mdxindex 38fa2cc4df6..0402d4973ec 100644--- a/packages/web/src/content/docs/models.mdx+++ b/packages/web/src/content/docs/models.mdx@@ -9,7 +9,7 @@ OpenCode uses the [AI SDK](https://ai-sdk.dev/) and [Models.dev](https://models.## Providers-Most popular providers are preloaded by default. If you've added the credentials for a provider through `opencode auth login`, they'll be available when you start OpenCode.+Most popular providers are preloaded by default. If you've added the credentials for a provider through the `/connect` command, they'll be available when you start OpenCode.Learn more about [providers](/docs/providers).diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdxindex 0e801908295..bb284901f53 100644--- a/packages/web/src/content/docs/providers.mdx+++ b/packages/web/src/content/docs/providers.mdx@@ -10,14 +10,14 @@ OpenCode uses the [AI SDK](https://ai-sdk.dev/) and [Models.dev](https://models.To add a provider you need to:-1. Add the API keys for the provider using `opencode auth login`.+1. Add the API keys for the provider using the `/connect` command.2. Configure the provider in your OpenCode config.---### Credentials-When you add a provider's API keys with `opencode auth login`, they are stored+When you add a provider's API keys with the `/connect` command, they are storedin `~/.local/share/opencode/auth.json`.---@@ -57,27 +57,29 @@ tested and verified to work well with OpenCode. [Learn more](/docs/zen).If you are new, we recommend starting with OpenCode Zen.:::-1. Run `opencode auth login`, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth).+1. Run the `/connect` command in the TUI, select opencode, and head to [opencode.ai/auth](https://opencode.ai/auth).++ ```txt+ /connect+ ```+2. Sign in, add your billing details, and copy your API key.-3. Paste your API key.- ```bash- $ opencode auth login+3. Paste your API key.- ┌ Add credential- │- ◇ Select provider- │ opencode+ ```txt+ ┌ API key│- ● Create an api key at https://opencode.ai/auth│- ◆ Enter your API key- │ _- └+ └ enter```4. Run `/models` in the TUI to see the list of models we recommend.+ ```txt+ /models+ ```+It works like any other provider in OpenCode. And is completely optional to useit.@@ -127,47 +129,43 @@ To use Amazon Bedrock with OpenCode:1. Run the `/models` command to select the model you want.+ ```txt+ /models+ ```+---### Anthropic-We recommend signing up for [Claude Pro](https://www.anthropic.com/news/claude-pro) or [Max](https://www.anthropic.com/max), it's the most cost-effective way to use opencode.+We recommend signing up for [Claude Pro](https://www.anthropic.com/news/claude-pro) or [Max](https://www.anthropic.com/max).-Once you've signed up, run `opencode auth login` and select Anthropic.+1. Once you've signed up, run the `/connect` command and select Anthropic.-```bash-$ opencode auth login+ ```txt+ /connect+ ```-┌ Add credential-│-◆ Select provider-│ ● Anthropic-│ ...-└-```+2. Here you can select the **Claude Pro/Max** option and it'll open your browser+ and ask you to authenticate.-Here you can select the **Claude Pro/Max** option and it'll open your browser-and ask you to authenticate.--```bash-$ opencode auth login-┌ Add credential-│-◇ Select provider-│ Anthropic-│-◆ Login method-│ ● Claude Pro/Max-│ ○ Create API Key-│ ○ Manually enter API Key-└-```+ ```txt+ ┌ Select auth method+ │+ │ Claude Pro/Max+ │ Create an API Key+ │ Manually enter API Key+ └+ ```++3. Now all the the Anthropic models should be available when you use the `/models` command.-Now all the the Anthropic models should be available when you use the `/models` command.+ ```txt+ /models+ ```##### Using API keys-You can also select **Create API Key** if you don't have a Pro/Max subscription. It'll also open your browser and ask you to login to Anthropic and give you a code you can paste in your terminal.+You can also select **Create an API Key** if you don't have a Pro/Max subscription. It'll also open your browser and ask you to login to Anthropic and give you a code you can paste in your terminal.Or if you already have an API key, you can select **Manually enter API Key** and paste it in your terminal.@@ -185,32 +183,19 @@ Or if you already have an API key, you can select **Manually enter API Key** andThe deployment name must match the model name for opencode to work properly.:::-3. Run `opencode auth login` and select **Azure**.+3. Run the `/connect` command and search for **Azure**.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● Azure- │ ...- └+ ```txt+ /connect```4. Enter your API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Azure│- ◇ Enter your API key- │ _- └+ └ enter```5. Set your resource name as an environment variable:@@ -227,6 +212,10 @@ Or if you already have an API key, you can select **Manually enter API Key** and6. Run the `/models` command to select your deployed model.+ ```txt+ /models+ ```+---### Azure Cognitive Services@@ -241,32 +230,19 @@ Or if you already have an API key, you can select **Manually enter API Key** andThe deployment name must match the model name for opencode to work properly.:::-3. Run `opencode auth login` and select **Azure**.+3. Run the `/connect` command and search for **Azure Cognitive Services**.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● Azure Cognitive Services- │ ...- └+ ```txt+ /connect```4. Enter your API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Azure Cognitive Services│- ◇ Enter your API key- │ _- └+ └ enter```5. Set your resource name as an environment variable:@@ -283,222 +259,172 @@ Or if you already have an API key, you can select **Manually enter API Key** and6. Run the `/models` command to select your deployed model.+ ```txt+ /models+ ```+---### Baseten1. Head over to the [Baseten](https://app.baseten.co/), create an account, and generate an API key.-2. Run `opencode auth login` and select **Baseten**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **Baseten**.- ┌ Add credential- │- ◆ Select provider- │ ● Baseten- │ ...- └+ ```txt+ /connect```3. Enter your Baseten API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Baseten│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model.+ ```txt+ /models+ ```+---### Cerebras1. Head over to the [Cerebras console](https://inference.cerebras.ai/), create an account, and generate an API key.-2. Run `opencode auth login` and select **Cerebras**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **Cerebras**.- ┌ Add credential- │- ◆ Select provider- │ ● Cerebras- │ ...- └+ ```txt+ /connect```3. Enter your Cerebras API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Cerebras│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _Qwen 3 Coder 480B_.+ ```txt+ /models+ ```+---### Cortecs1. Head over to the [Cortecs console](https://cortecs.ai/), create an account, and generate an API key.-2. Run `opencode auth login` and select **Cortecs**.+2. Run the `/connect` command and search for **Cortecs**.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● Cortecs- │ ...- └+ ```txt+ /connect```3. Enter your Cortecs API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Cortecs│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _Kimi K2 Instruct_.+ ```txt+ /models+ ```+---### DeepSeek1. Head over to the [DeepSeek console](https://platform.deepseek.com/), create an account, and click **Create new API key**.-2. Run `opencode auth login` and select **DeepSeek**.+2. Run the `/connect` command and search for **DeepSeek**.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● DeepSeek- │ ...- └+ ```txt+ /connect```3. Enter your DeepSeek API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ DeepSeek│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a DeepSeek model like _DeepSeek Reasoner_.+ ```txt+ /models+ ```+---### Deep Infra1. Head over to the [Deep Infra dashboard](https://deepinfra.com/dash), create an account, and generate an API key.-2. Run `opencode auth login` and select **Deep Infra**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **Deep Infra**.- ┌ Add credential- │- ◆ Select provider- │ ● Deep Infra- │ ...- └+ ```txt+ /connect```3. Enter your Deep Infra API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Deep Infra│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model.+ ```txt+ /models+ ```+---### Fireworks AI1. Head over to the [Fireworks AI console](https://app.fireworks.ai/), create an account, and click **Create API Key**.-2. Run `opencode auth login` and select **Fireworks AI**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **Fireworks AI**.- ┌ Add credential- │- ◆ Select provider- │ ● Fireworks AI- │ ...- └+ ```txt+ /connect```3. Enter your Fireworks AI API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Fireworks AI│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _Kimi K2 Instruct_.+ ```txt+ /models+ ```+---### GitHub Copilot@@ -512,30 +438,30 @@ subscription](https://github.com/features/copilot/plans) to use.Some models need to be manually enabled in your [GitHub Copilot settings](https://docs.github.com/en/copilot/how-tos/use-ai-models/configure-access-to-ai-models#setup-for-individual-use).:::-1. Run `opencode auth login` and select GitHub Copilot.+1. Run the `/connect` command and search for GitHub Copilot.- ```bash- $ opencode auth login- ┌ Add credential+ ```txt+ /connect+ ```+2. Navigate to [github.com/login/device](https://github.com/login/device) and enter the code.++ ```txt+ ┌ Login with GitHub Copilot│- ◇ Select provider- │ GitHub Copilot+ │ https://github.com/login/device│- ◇ ──────────────────────────────────────────────╮- │ │- │ Please visit: https://github.com/login/device │- │ Enter code: 8F43-6FCF │- │ │- ├─────────────────────────────────────────────────╯+ │ Enter code: 8F43-6FCF│- ◓ Waiting for authorization...+ └ Waiting for authorization...```-2. Navigate to [github.com/login/device](https://github.com/login/device) and enter the code.-3. Now run the `/models` command to select the model you want.+ ```txt+ /models+ ```+---### Google Vertex AI@@ -576,42 +502,37 @@ The `global` region improves availability and reduces errors at no extra cost. U3. Run the `/models` command to select the model you want.+ ```txt+ /models+ ```+---### Groq1. Head over to the [Groq console](https://console.groq.com/), click **Create API Key**, and copy the key.-2. Run `opencode auth login` and select Groq.+2. Run the `/connect` command and search for Groq.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● Groq- │ ...- └+ ```txt+ /connect```3. Enter the API key for the provider.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Groq│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select the one you want.+ ```txt+ /models+ ```+---### Hugging Face@@ -620,36 +541,27 @@ The `global` region improves availability and reduces errors at no extra cost. U1. Head over to [Hugging Face settings](https://huggingface.co/settings/tokens/new?ownUserPermissions=inference.serverless.write&tokenType=fineGrained) to create a token with permission to make calls to Inference Providers.-2. Run `opencode auth login` and select **Hugging Face**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **Hugging Face**.- ┌ Add credential- │- ◆ Select provider- │ ● Hugging Face- │ ...- └+ ```txt+ /connect```3. Enter your Hugging Face token.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Hugging Face│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _Kimi-K2-Instruct_ or _GLM-4.6_.+ ```txt+ /models+ ```+---### llama.cpp@@ -696,36 +608,27 @@ IO.NET offers 17 models optimized for various use cases:1. Head over to the [IO.NET console](https://ai.io.net/), create an account, and generate an API key.-2. Run `opencode auth login` and select **IO.NET**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **IO.NET**.- ┌ Add credential- │- ◆ Select provider- │ ● IO.NET- │ ...- └+ ```txt+ /connect```3. Enter your IO.NET API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ IO.NET│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model.+ ```txt+ /models+ ```+---### LM Studio@@ -768,36 +671,27 @@ To use Kimi K2 from Moonshot AI:1. Head over to the [Moonshot AI console](https://platform.moonshot.ai/console), create an account, and click **Create API key**.-2. Run `opencode auth login` and select **Moonshot AI**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **Moonshot AI**.- ┌ Add credential- │- ◆ Select provider- │ ...- │ ● Moonshot AI- └+ ```txt+ /connect```3. Enter your Moonshot API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Moonshot AI│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select _Kimi K2_.+ ```txt+ /models+ ```+---### Ollama@@ -848,32 +742,19 @@ To use Ollama Cloud with OpenCode:3. Copy the API key for use in OpenCode.-4. Run `opencode auth login` and select **Ollama Cloud**.+4. Run the `/connect` command and search for **Ollama Cloud**.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● Ollama Cloud- │ ...- └+ ```txt+ /connect```5. Enter your Ollama Cloud API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Ollama Cloud│- ◇ Enter your API key- │ _- └+ └ enter```6. **Important**: Before using cloud models in OpenCode, you must pull the model information locally:@@ -884,42 +765,37 @@ To use Ollama Cloud with OpenCode:7. Run the `/models` command to select your Ollama Cloud model.+ ```txt+ /models+ ```+---### OpenAI1. Head over to the [OpenAI Platform console](https://platform.openai.com/api-keys), click **Create new secret key**, and copy the key.-2. Run `opencode auth login` and select OpenAI.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for OpenAI.- ┌ Add credential- │- ◆ Select provider- │ ● OpenAI- │ ...- └+ ```txt+ /connect```3. Enter the API key for the provider.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ OpenAI│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select the one you want.+ ```txt+ /models+ ```+---### OpenCode Zen@@ -928,74 +804,54 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te1. Sign in to **<a href={console}>OpenCode Zen</a>** and click **Create API Key**.-2. Run `opencode auth login` and select **OpenCode Zen**.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for **OpenCode Zen**.- ┌ Add credential- │- ◆ Select provider- │ ● OpenCode Zen- │ ...- └+ ```txt+ /connect```3. Enter your OpenCode API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ OpenCode Zen│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _Qwen 3 Coder 480B_.+ ```txt+ /models+ ```+---### OpenRouter1. Head over to the [OpenRouter dashboard](https://openrouter.ai/settings/keys), click **Create API Key**, and copy the key.-2. Run `opencode auth login` and select OpenRouter.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for OpenRouter.- ┌ Add credential- │- ◆ Select provider- │ ● OpenRouter- │ ○ Anthropic- │ ...- └+ ```txt+ /connect```3. Enter the API key for the provider.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ OpenRouter│- ◇ Enter your API key- │ _- └+ └ enter```4. Many OpenRouter models are preloaded by default, run the `/models` command to select the one you want.+ ```txt+ /models+ ```+You can also add additional models through your opencode config.```json title="opencode.json" {6}@@ -1039,176 +895,164 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te1. Head over to the [OVHcloud panel](https://ovh.com/manager). Navigate to the `Public Cloud` section, `AI & Machine Learning` > `AI Endpoints` and in `API Keys` tab, click **Create a new API key**.-2. Run `opencode auth login` and select **OVHcloud AI Endpoints**.+2. Run the `/connect` command and search for **OVHcloud AI Endpoints**.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● OVHcloud AI Endpoints- │ ...- └+ ```txt+ /connect```3. Enter your OVHcloud AI Endpoints API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ OVHcloud AI Endpoints│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _gpt-oss-120b_.+ ```txt+ /models+ ```+---### Together AI1. Head over to the [Together AI console](https://api.together.ai), create an account, and click **Add Key**.-2. Run `opencode auth login` and select **Together AI**.+2. Run the `/connect` command and search for **Together AI**.- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● Together AI- │ ...- └+ ```txt+ /connect```3. Enter your Together AI API key.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Together AI│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _Kimi K2 Instruct_.+ ```txt+ /models+ ```+----### xAI+### Venice AI-For a limited time, you can use xAI's Grok Code for free with opencode.+1. Head over to the [Venice AI console](https://venice.ai), create an account, and generate an API key.-:::tip-Grok Code is available for free for a limited time on opencode.-:::+2. Run the `/connect` command and search for **Venice AI**.++ ```txt+ /connect+ ```-1. Make sure you are on the latest version of opencode.+3. Enter your Venice AI API key.++ ```txt+ ┌ API key+ │+ │+ └ enter+ ```-2. Run the `/models` command and select **Grok Code Free**.+4. Run the `/models` command to select a model like _Llama 3.3 70B_.-As a part of the trial period, the xAI team will be using the request logs to-monitor and improve Grok Code.+ ```txt+ /models+ ```----### Z.AI+### xAI-1. Head over to the [Z.AI API console](https://z.ai/manage-apikey/apikey-list), create an account, and click **Create a new API key**.+1. Head over to the [xAI console](https://console.x.ai/), create an account, and generate an API key.-2. Run `opencode auth login` and select **Z.AI**.+2. Run the `/connect` command and search for **xAI**.- ```bash- $ opencode auth login+ ```txt+ /connect+ ```- ┌ Add credential+3. Enter your xAI API key.++ ```txt+ ┌ API key│- ◆ Select provider- │ ● Z.AI- │ ...- └+ │+ └ enter```- If you are subscribed to the **GLM Coding Plan**, select **Z.AI Coding Plan**.+4. Run the `/models` command to select a model like _Grok Beta_.- ```bash- $ opencode auth login+ ```txt+ /models+ ```- ┌ Add credential- │- ◆ Select provider- │ ● Z.AI Coding Plan- │ ...- └+---++### Z.AI++1. Head over to the [Z.AI API console](https://z.ai/manage-apikey/apikey-list), create an account, and click **Create a new API key**.++2. Run the `/connect` command and search for **Z.AI**.++ ```txt+ /connect```-3. Enter your Z.AI API key.+ If you are subscribed to the **GLM Coding Plan**, select **Z.AI Coding Plan**.- ```bash- $ opencode auth login+3. Enter your Z.AI API key.- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ Z.AI│- ◇ Enter your API key- │ _- └+ └ enter```4. Run the `/models` command to select a model like _GLM-4.5_.+ ```txt+ /models+ ```+---### ZenMux1. Head over to the [ZenMux dashboard](https://zenmux.ai/settings/keys), click **Create API Key**, and copy the key.-2. Run `opencode auth login` and select ZenMux.-- ```bash- $ opencode auth login+2. Run the `/connect` command and search for ZenMux.- ┌ Add credential- │- ◆ Select provider- │ ● ZenMux- │ ○ Zhipu AI- │ ○ Zhipu AI Coding Plan- │ ...- └+ ```txt+ /connect```3. Enter the API key for the provider.- ```bash- $ opencode auth login-- ┌ Add credential+ ```txt+ ┌ API key│- ◇ Select provider- │ ZenMux│- ◇ Enter your API key- │ _- └+ └ enter```4. Many ZenMux models are preloaded by default, run the `/models` command to select the one you want.+ ```txt+ /models+ ```+You can also add additional models through your opencode config.```json title="opencode.json" {6}@@ -1228,16 +1072,16 @@ monitor and improve Grok Code.## Custom provider-To add any **OpenAI-compatible** provider that's not listed in `opencode auth login`:+To add any **OpenAI-compatible** provider that's not listed in the `/connect` command::::tipYou can use any OpenAI-compatible provider with opencode. Most modern AI providers offer OpenAI-compatible APIs.:::-1. Run `opencode auth login` and scroll down to **Other**.+1. Run the `/connect` command and scroll down to **Other**.```bash- $ opencode auth login+ $ /connect┌ Add credential│@@ -1250,7 +1094,7 @@ You can use any OpenAI-compatible provider with opencode. Most modern AI provide2. Enter a unique ID for the provider.```bash- $ opencode auth login+ $ /connect┌ Add credential│@@ -1266,11 +1110,11 @@ You can use any OpenAI-compatible provider with opencode. Most modern AI provide3. Enter your API key for the provider.```bash- $ opencode auth login+ $ /connect┌ Add credential│- ▲ This only stores a credential for myprovider - you will need configure it in opencode.json, check the docs for examples.+ ▲ This only stores a credential for myprovider - you will need to configure it in opencode.json, check the docs for examples.│◇ Enter your API key│ sk-...@@ -1366,42 +1210,6 @@ If you are having trouble with configuring a provider, check the following:This doesn't apply to providers like Amazon Bedrock, that rely on environment variables for their auth.2. For custom providers, check the opencode config and:- - Make sure the provider ID used in `opencode auth login` matches the ID in your opencode config.+ - Make sure the provider ID used in the `/connect` command matches the ID in your opencode config.- The right npm package is used for the provider. For example, use `@ai-sdk/cerebras` for Cerebras. And for all other OpenAI-compatible providers, use `@ai-sdk/openai-compatible`.- Check correct API endpoint is used in the `options.baseURL` field.-------### Venice AI--1. Head over to the [Venice AI console](https://venice.ai), create an account, and generate an API key.--2. Run `opencode auth login` and select **Venice AI**.-- ```bash- $ opencode auth login-- ┌ Add credential- │- ◆ Select provider- │ ● Venice AI- │ ...- └- ```--3. Enter your Venice AI API key.-- ```bash- $ opencode auth login-- ┌ Add credential- │- ◇ Select provider- │ Venice AI- │- ◇ Enter your API key- │ _- └- ```--4. Run the `/models` command to select a model like _Llama 3.3 70B_.diff --git a/packages/web/src/content/docs/troubleshooting.mdx b/packages/web/src/content/docs/troubleshooting.mdxindex d38b892fc5f..e3476887f47 100644--- a/packages/web/src/content/docs/troubleshooting.mdx+++ b/packages/web/src/content/docs/troubleshooting.mdx@@ -64,7 +64,7 @@ Here are some common issues and how to resolve them.----### opencode won't start+### OpenCode won't start1. Check the logs for error messages2. Try running with `--print-logs` to see output in the terminal@@ -74,7 +74,7 @@ Here are some common issues and how to resolve them.### Authentication issues-1. Try re-authenticating with `opencode auth login <provider>`+1. Try re-authenticating with the `/connect` command in the TUI2. Check that your API keys are valid3. Ensure your network allows connections to the provider's API@@ -113,10 +113,7 @@ To resolve this:rm -rf ~/.local/share/opencode```-3. Re-authenticate with your provider:- ```bash- opencode auth login <provider>- ```+3. Re-authenticate with your provider using the `/connect` command in the TUI.---diff --git a/packages/web/src/content/docs/tui.mdx b/packages/web/src/content/docs/tui.mdxindex 2543df639b2..83b5cd79869 100644--- a/packages/web/src/content/docs/tui.mdx+++ b/packages/web/src/content/docs/tui.mdx@@ -69,6 +69,16 @@ Here are all available slash commands:---+### connect++Add a provider to OpenCode. Allows you to select from available providers and add their API keys.++```bash frame="none"+/connect+```++---+### compactCompact the current session. _Alias_: `/summarize`diff --git a/packages/web/src/content/docs/zen.mdx b/packages/web/src/content/docs/zen.mdxindex 5632bcca45c..5f266b0c239 100644--- a/packages/web/src/content/docs/zen.mdx+++ b/packages/web/src/content/docs/zen.mdx@@ -51,7 +51,7 @@ OpenCode Zen works like any other provider in OpenCode.1. You sign in to **<a href={console}>OpenCode Zen</a>**, add your billingdetails, and copy your API key.-2. You run `opencode auth login`, select opencode, and paste your API key.+2. You run the `/connect` command in the TUI, select OpenCode Zen, and paste your API key.3. Run `/models` in the TUI to see the list of models we recommend.You are charged per request and you can add credits to your account.