How the integration works
OpenCode supports custom providers through the AI SDK OpenAI-compatible adapter. The provider block below keeps the API key in an environment variable and makes DeepSeek V4 Flash selectable as a normal OpenCode model.
Create and manage it on /developer.
The client talks to its native compatible endpoint.
Provider credentials and routing stay on the server.
Before you start
- OpenCode installed
- A paid DeepSeek-V4.io account with an API key from /developer
- An opencode.json configuration file in the project or ~/.config/opencode
Configure OpenCode
{
"$schema": "https://opencode.ai/config.json",
"model": "deepseek_v4_io/deepseek-v4-flash",
"providers": {
"deepseek_v4_io": {
"name": "DeepSeek-V4.io",
"env": ["DEEPSEEK_V4_API_KEY"],
"package": "@opencode-ai/ai/providers/openai-compatible",
"settings": {
"baseURL": "https://deepseek-v4.io/api/v1"
},
"models": {
"deepseek-v4-flash": {
"name": "DeepSeek V4 Flash",
"capabilities": {
"tools": true,
"input": ["text"],
"output": ["text"]
},
"limit": {
"context": 1048576,
"output": 65536
}
}
}
}
}
}export DEEPSEEK_V4_API_KEY="your-deepseek-v4-io-key"
opencodeVerify the setup
The page remains Experimental until these checks pass against the public DeepSeek-V4.io gateway.
- 1Confirm DeepSeek V4 Flash appears as the active model.
- 2Run a read-only repository question that requires a tool call.
- 3Confirm streamed output and the final tool result both complete.
Troubleshooting
Provider does not appear
Use the current V2 providers object, validate opencode.json, and keep providers, models, and model at the documented nesting levels.
Environment variable is empty
Export DEEPSEEK_V4_API_KEY before launching OpenCode from the same terminal.
Model not found
Use deepseek_v4_io/deepseek-v4-flash in OpenCode and deepseek-v4-flash as the provider model id.
Sources and support boundary
Configuration fields are checked against the tool publisher's documentation. DeepSeek-V4.io owns this gateway guide and support for its endpoint; it does not represent the tool publisher.
OpenCode provider documentationReady to connect OpenCode?
Create a DeepSeek-V4.io API key, copy the configuration above, and verify one read-only tool call before using it on a real project.
Open Developer Dashboard