If you want to keep OpenCode as your terminal workflow but choose among several coding-model ecosystems, Ace Data Cloud's Coding Plan is aimed at that integration problem. It is a multi-model API plan—not a Claude, ChatGPT, or other official consumer membership—and its current public pricing starts at ¥99 for 30 days. The documented coverage includes Claude, GPT/Codex, GLM, Kimi, and DeepSeek families, while the configuration center also covers clients such as Claude Code, Codex, Kimi Code, OpenClaw, and OpenCode. The exact model, API scope, and client combination still needs to match.
This guide focuses on one concrete task: configure an OpenAI-compatible provider in OpenCode, verify that the credential and model are visible, and know which layer to inspect when the first request fails. The commands are examples; I have not run them with your credential or project.
Why use a custom OpenCode provider?
A client and a model are separate decisions. OpenCode supplies the terminal interface and agent workflow. The provider configuration decides which endpoint, credential, and model ID the client sends to.
Coding Plan currently exposes Claude Messages, OpenAI Responses, and OpenAI-compatible Chat Completions interfaces. OpenCode's documented Ace Data Cloud setup uses the Chat Completions-compatible route through @ai-sdk/openai-compatible. That does not imply every model works through every protocol: your Coding Application credential has an API scope, each client supports particular protocols, and the model catalog changes over time.
The practical benefit is operational rather than magical: one Coding Application can reduce repeated endpoint and credential setup while you retain OpenCode's workflow. It does not promise unlimited calls, a fixed number of prompts, or every entitlement from an official consumer subscription.
Prerequisites
You need:
- OpenCode installed (
curl -fsSL https://opencode.ai/install | bashornpm install -g opencode-ai) - an active Coding Plan and a credential created for its Coding Application
-
curlfor checking the model catalog - a writable OpenCode configuration at
~/.config/opencode/opencode.json
As of November 7, 2026, the public package data lists Coding Plus at a ¥99 display anchor for 30 days. It currently includes 400 base Credits plus a 100-Credit limited-time bonus; the bonus is marked to end on November 30, 2026 at 23:59:59 UTC+8. Treat the promotion as temporary and recheck the Coding Plan page before purchasing. Credits cannot be translated into a universal prompt count because context, output, caching, tools, and model choice affect consumption.
1. Keep the credential out of the config file
Export the key in your shell using a placeholder here:
export ACEDATACLOUD_API_KEY="YOUR_CODING_APPLICATION_API_KEY"
For persistent local use, add the export through your normal secret-management method. Avoid committing a real key to a dotfiles repository or pasting it into bug reports.
Before editing OpenCode, confirm that the key can reach the current model catalog:
curl -sS https://api.acedata.cloud/v1/models \
-H "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
| jq -r '.data[].id'
Choose an exact id from the response. /v1/models is a global dynamic catalog, so seeing a name is only the first check; you must still confirm that the Coding credential's allowed API scope and the OpenCode-compatible protocol support it.
2. Add the provider
Edit ~/.config/opencode/opencode.json. Replace both occurrences of MODEL_ID with the same exact catalog ID:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"acedatacloud": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ace Data Cloud",
"options": {
"baseURL": "https://api.acedata.cloud/v1",
"apiKey": "{env:ACEDATACLOUD_API_KEY}"
},
"models": {
"MODEL_ID": {
"name": "MODEL_ID"
}
}
}
}
}
There are three important choices here:
-
baseURLends in/v1; copying a different product endpoint can send OpenCode to the wrong interface. - The environment placeholder keeps the secret outside the JSON document.
- The model key and display name use a catalog ID, not a service, API, or Application UUID.
If you already maintain other providers, merge the acedatacloud object instead of replacing the complete file.
3. Validate in layers
Start with configuration discovery rather than a large repository task:
opencode auth list
opencode models acedatacloud
The first command helps confirm that OpenCode sees the provider's authentication setup. The second should list the configured provider models. Neither proves that a generation request can succeed, so run one bounded smoke check:
opencode run \
--model acedatacloud/MODEL_ID \
"Reply only OK"
Only after that succeeds should you open a real project and run opencode. This sequence separates four questions: can OpenCode parse the file, can it find the environment variable, can it resolve the model, and can the credential call the required API?
Common failure points
401 or an authentication error
Check that the variable is exported in the same shell session that launches OpenCode. Also confirm that the key belongs to the Coding Application rather than another application. Do not retry repeatedly with the same invalid key.
The provider appears, but the model does not
Validate the JSON syntax, configuration path, and exact capitalization of the catalog id. Re-query /v1/models rather than relying on a model name copied from an older tutorial.
The model is listed, but the request is rejected
A global catalog entry is not proof of permission. Check the credential's allowed_api_ids, Coding Application API scope, Chat Completions compatibility, and the chosen client's supported protocol. Switching randomly among model names obscures the actual mismatch.
OpenCode keeps using an old endpoint
Make sure you edited the configuration used by the same OS user and workspace, then fully restart the client. If the IDE extension is involved, remember that it reuses the OpenCode runtime configuration.
Insufficient balance
Coding Application usage does not fall back to a general account balance. Renew or purchase the appropriate Coding Plan in the application rather than assuming another balance will cover the request.
Design trade-offs
A custom provider is useful when you want to preserve one terminal workflow while centralizing model access. The cost is that you now own three compatibility checks: credential scope, protocol, and model ID. A static configuration is easy to review, but a dynamic catalog means model names should not be hard-coded forever without a maintenance check.
Start with one model and one smoke prompt. Add another model only when a real task benefits from it, and record which protocol it needs. That is more reliable than filling the config with every visible catalog entry and discovering incompatibilities during a refactor.
For the current client matrix and protocol notes, use the Coding Plan configuration center.
Sources and disclosure
Adapted from Ace Data Cloud's multi-client Coding Plan overview and ¥99 plan fit guide, together with the current configuration documentation. This article was rewritten for DEV Community with AI assistance and human-directed source checking; example commands use placeholder credentials and were not executed against a reader's account.
Top comments (0)