OpenCode
Use Aurora as a custom provider in OpenCode, a terminal coding agent. This configuration selects the OpenAI-compatible Chat Completions adapter and assigns both the main and small helper model to Aurora.
Install and prepare
Install OpenCode using its installation guide, then create an Aurora API token and check the model catalog.
export AURORA_API_TOKEN="<your-token>"
Configure the provider
Create opencode.json in your project, or use
~/.config/opencode/opencode.json for all projects. Merge these keys into an
existing configuration:
{
"$schema": "https://opencode.ai/config.json",
"model": "aurora/deepseek/deepseek-v4-flash",
"small_model": "aurora/deepseek/deepseek-v4-flash",
"provider": {
"aurora": {
"npm": "@ai-sdk/openai-compatible",
"name": "Aurora Inference",
"options": {
"baseURL": "",
"apiKey": "{env:AURORA_API_TOKEN}"
},
"models": {
"deepseek/deepseek-v4-flash": {
"name": "DeepSeek V4 Flash"
}
}
}
}
}
The aurora/ prefix selects the local provider. The remaining
deepseek/deepseek-v4-flash is the exact model ID sent to Aurora. The base URL
already includes /v1; OpenCode appends /chat/completions.
To store the credential through OpenCode instead, omit options.apiKey, start
OpenCode, run /connect, select Other, use aurora as the provider ID, and
paste your Aurora token. The credential provider ID must match the config key.
Start a session
From your project directory, in the shell where you exported the token:
opencode
Run /models and select Aurora Inference → DeepSeek V4 Flash. Ask:
Read README.md and summarize the project in three bullets. Do not edit files.
Use a different existing text file if the project has no README. Expect a file read followed by a summary of that file. OpenCode handles response streaming. For a one-shot check:
opencode run --model aurora/deepseek/deepseek-v4-flash "Say hello in one sentence."
Troubleshooting
- Provider missing: Check the configuration location, JSON syntax, and that
the token is available through the environment or
/connect. - Model not found: The model-map key is the Aurora ID; the top-level
modelandsmall_modelinclude the additionalaurora/provider prefix. - Authentication works only in the terminal: A desktop-launched instance may
not inherit the token. Use
/connectin that instance. - Tool calls fail: Check the model's tool support and test a simple file read. Use the shared troubleshooting guide to distinguish a request error from an agent permission or tool error.
Upstream references: Custom providers, configuration.