1. Install OpenCode using the official script

curl -fsSL https://opencode.ai/install | bash

2. Create the global configuration directory

mkdir -p ~/.config/opencode

3. Write the provider block and model mapping into the global config

cat << ‘EOF’ > ~/.config/opencode/opencode.json { “$schema”: “https://opencode.ai/config.json”, “provider”: { “work_proxy”: { “npm”: “@ai-sdk/openai”, “name”: “Work Corporate Proxy”, “options”: { “baseURL”: “https://your-work-proxy-domain.com/v1”, “apiKey”: “your-provided-work-token” }, “models”: { “deepseek-v4-pro”: { “name”: “DeepSeek v4 Pro” } } } } } EOF

4. Navigate to your target workspace

cd /path/to/your/project

5. Drop a local config file to lock this repository to your proxy model

cat << ‘EOF’ > ./opencode.json { “$schema”: “https://opencode.ai/config.json”, “model”: “work_proxy/deepseek-v4-pro” } EOF