OpenCode is an open-source AI programming agent. It can integrate with various large models for use in terminals, desktop clients, or IDE extensions, assisting developers with tasks such as code analysis and intelligent coding. This article demonstrates how to integrate a model for use with OpenCode, using DeepSeek V4 Pro as an example.
Installing OpenCode
Install OpenCode. For details, see OpenCode Installation Guide. You can choose to download the desktop application Beta version. If OpenCode is already installed, you can skip this step. Obtaining an API Key
Note:
When setting the Access Scope, if you select "Range", ensure that DeepSeek V4 Pro is selected.
2. After creation, be sure to copy and securely store the API Key. This information will be used in the subsequent process of configuring the tool.
Configuring OpenCode
Open OpenCode. In the conversation interface, expand the model list and click the "+" in the upper-right corner to open the model settings page. In the pop-up window that opens, click "Show more providers" and select "Custom".
In the pop-up window that opens, click to fill in the information:
Provider ID: tencent
Display Name: Tencent
Base URL: https://tokenhub-intl.tencentcloudmaas.com/v1
API Key: Enter your API Key.
Model ID: Enter deepseek-v4-pro
Model Display Name: Enter DeepSeek V4 Pro
Restart the OpenCode client. In the model list within the conversation window, locate and select the newly configured model to start using it for conversation.