From dd1a31aca480ee61a13fdac8051f9001f5818a92 Mon Sep 17 00:00:00 2001 From: eva Date: Thu, 11 Jun 2026 19:33:00 +0400 Subject: [PATCH 1/3] docs: add AnyAPI provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds AnyAPI (anyapi.ai) as a documented OpenAI-compatible provider. AnyAPI provides access to 400+ models through a single API endpoint and is already available on models.dev. No runtime code changes needed — opencode supports it through the bundled @ai-sdk/openai-compatible. --- packages/web/src/content/docs/providers.mdx | 38 +++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index 628e2244e03c..af7ae45d1931 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -1728,6 +1728,44 @@ OpenCode Zen is a list of tested and verified models provided by the OpenCode te --- +### AnyAPI + +[AnyAPI](https://anyapi.ai) is a unified AI platform providing access to 400+ models from OpenAI, Anthropic, Google, Meta, DeepSeek and more through a single OpenAI-compatible API. Models are listed on [models.dev](https://models.dev) under the `anyapi` provider. + +1. Head over to the [AnyAPI Dashboard](https://dash.anyapi.ai), create an account, and generate an API key in [API Keys](https://dash.anyapi.ai/?page=api-keys). + +2. Run the `/connect` command and search for AnyAPI. + +```txt +/connect +``` + +3. Enter your AnyAPI API key. + +```txt +┌ API key +│ +│ +└ enter +``` + +4. Run the `/models` command to select a model. + +```txt +/models +``` + +AnyAPI models are dynamically fetched from the catalog. You can also set a specific model via config: + +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "model": "anyapi/openai/gpt-4o" +} +``` + +--- + ### LLM Gateway 1. Head over to the [LLM Gateway dashboard](https://llmgateway.io/dashboard), click **Create API Key**, and copy the key. From 09d5098c3d159fe063742ee9dc02b8e5c36223b2 Mon Sep 17 00:00:00 2001 From: eva Date: Thu, 11 Jun 2026 20:22:52 +0400 Subject: [PATCH 2/3] feat: add AnyAPI provider Adds AnyAPI (anyapi.ai) as a built-in OpenAI-compatible provider. AnyAPI is already listed on models.dev and works through the bundled @ai-sdk/openai-compatible. --- packages/opencode/src/provider/provider.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 86515068d46e..ed64acb47086 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -588,6 +588,15 @@ function custom(dep: CustomDep): Record { }, }, }), + anyapi: () => + Effect.succeed({ + options: { + headers: { + "HTTP-Referer": "https://opencode.ai/", + "X-Title": "opencode", + }, + }, + }), gitlab: Effect.fnUntraced(function* (input: Info) { const { VERSION: GITLAB_PROVIDER_VERSION, From 5db540158d80f7febb066309643d20294dd23836 Mon Sep 17 00:00:00 2001 From: eva Date: Thu, 11 Jun 2026 20:32:21 +0400 Subject: [PATCH 3/3] fix: add missing autoload field --- packages/opencode/src/provider/provider.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index ed64acb47086..864ab7a74ae3 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -590,6 +590,7 @@ function custom(dep: CustomDep): Record { }), anyapi: () => Effect.succeed({ + autoload: false, options: { headers: { "HTTP-Referer": "https://opencode.ai/",