This guide explains how to configure OpenCode [https://opencode.ai/es] to use LLM models served from the SCAYLE LLM Portal (OWUI), through the local proxy that handles authentication with Ivanti.
You need to have the following ready:
You can install WSL in two ways:
wsl --install
Once WSL is installed, open the Ubuntu terminal and continue with the installation steps for Ubuntu.
Install openconnect:
sudo apt update
sudo apt install openconnect
From VS Code, open an Ubuntu / WSL terminal.
curl -fsSL https://opencode.ai/install | bash
mkdir -p ~/.config/opencode
nano ~/.config/opencode/opencode.json
Add a configuration like this:
Replace
sk-YOUR_TOKEN_HEREwith your API key [guide on how to obtain it] from the SCAYLE LLM Portal (OpenWebUI).
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"opencode-models-discovery@latest"
],
"provider": {
"scayle": {
"npm": "@ai-sdk/openai-compatible",
"name": "SCAYLE LLM",
"options": {
"baseURL": "http://127.0.0.1:8080/api",
"apiKey": "sk-YOUR_TOKEN_HERE",
"modelsDiscovery": {
"enabled": true
}
}
}
}
}
export OWUI_TOKEN="sk-TU_TOKEN_AQUI"
cd opencode_proxy
chmod +x start_opencode.sh
./start_opencode.sh
You will see output similar to this:
[+] ✅ Session started
[+] Cookie saved in /home/rgonzalez/.ivanti_dsid
[+] When it expires, run this script again
🚀 Starting proxy at http://127.0.0.1:8080 ...
✅ Proxy running (PID: 2132). Logs: /tmp/opencode_proxy.log
Configure OpenCode:
Base URL: http://127.0.0.1:8080/api
Leave that terminal open. The script will monitor the session automatically.
Once configured, run it in Ubuntu/WSL from the project path:
opencode
An interface will open for interacting with the different models and the specified project:

There is an option to deploy this tool directly in VSCode:


![]()

Within OpenCode, you can use:
Tab
To switch between modes:
planbuildYou can also use:
/models
To select the model you want to use.
For example:
Kimi-k2.6GLM-5.3-FlashQwen3.8-Flash-Next