← All applications · Connect apps section on /docs
OpenAIconfigure opencode
OpenCode
Terminal coding agent — provider JSON OpenAI-compatible.
Base URL to paste
Paste exactly one of two formats — wrong URL yields 404 (not 401).
https://vietrouter.com.vn/v1Prerequisites
- Cài opencode
- API key
Recommended model: gpt-5.6-sol
Quick way — command / config
api-cli configure opencode -k 'sk-mtm-...' -m gpt-5.6-solWhere to place file / fill Settings
Filemacos
~/.opencode/config.json
Thêm provider api-cli như snippet.
Filelinux
~/.opencode/config.json
Giống macOS.
Filewindows
%USERPROFILE%\.opencode\config.json
Tạo thư mục nếu thiếu.
Verify connection
- opencode chat thử
- api-cli doctor
Troubleshooting
| Symptom | Reason | How to handle |
|---|---|---|
| 404 | baseURL thiếu /v1. | https://vietrouter.com.vn/v1 |