CANDIDATE INTEGRATION
Use AblitAI with OpenCode.
A layered provider file connects OpenCode 1.18.27 to AblitAI without placing the API key in JSON or replacing your existing preferences.
This is a reference-only guide. Local/mock text, streaming, and simulated shell-tool protocol tests pass; standard tool-bearing requests are not release-supported until exact-GPU parser validation. Do not use paid credits with this pending integration.
Before you start
- Use OpenCode
1.18.27; Node.js and npm must already be installed. - The reference model ID is
ablitai/qwen3.8-27b-abliterated. - Release A exposes an 8,192-token total context with up to 4,096 output tokens.
- Tool calls are disabled on the text-only release route; your own OpenCode permission policy still controls local tools.
1. Install the tested version
node --version
npm --version
npm install --global opencode-ai@1.18.27
opencode --version2. Download the provider file
The consumer provider file contains no secret. These commands refuse to overwrite an existing AblitAI file.
PowerShell
$dir = Join-Path $HOME ".config\opencode"
$file = Join-Path $dir "ablitai.json"
New-Item -ItemType Directory -Force $dir | Out-Null
if (Test-Path $file) { throw "$file exists; review and merge it manually." }
Invoke-WebRequest "https://ablitai.com/configs/opencode.json" -OutFile $file
$env:OPENCODE_CONFIG = $filemacOS or Linux
dir="$HOME/.config/opencode"
file="$dir/ablitai.json"
mkdir -p "$dir"
test ! -e "$file" || { echo "$file exists; review and merge it manually." >&2; exit 1; }
curl --fail --proto '=https' --tlsv1.2 https://ablitai.com/configs/opencode.json -o "$file"
chmod 600 "$file"
export OPENCODE_CONFIG="$file"3. Set the key for this terminal
Get the key from your account. Do not put it in the provider file, a command argument, or a support message.
PowerShell
$secret = Read-Host "AblitAI API key" -AsSecureString
$env:ABLITAI_API_KEY = [System.Net.NetworkCredential]::new("", $secret).Password
Remove-Variable secretmacOS or Linux
printf 'AblitAI API key: ' >&2
ablit_stty="$(stty -g)"
trap 'stty "$ablit_stty"' EXIT HUP INT TERM
stty -echo
IFS= read -r ABLITAI_API_KEY
stty "$ablit_stty"
trap - EXIT HUP INT TERM
unset ablit_stty
printf '\n' >&2
export ABLITAI_API_KEY4. Confirm access and credits
Create or import your no-email account, save its offline backup, then open the account page and confirm a positive available balance. A new key starts with zero credits and returns 402; during validation you need a pre-funded private-beta account, and after checkout opens you can add a pack there.
5. Run the closed-gate probe
This probe is expected to return 400 Tool calling is disabled for this deployment. OpenCode includes tools even when the prompt says not to use them. Reaching that exact error proves the reference configuration reached AblitAI, but it is not a launch step and does not establish support.
opencode run --pure `
--model ablitai/qwen3.8-27b-abliterated `
"Reply with exactly ABLITAI_OK. Do not use tools."opencode run --pure \
--model ablitai/qwen3.8-27b-abliterated \
'Reply with exactly ABLITAI_OK. Do not use tools.'In every new terminal used for this diagnostic, set OPENCODE_CONFIG to the downloaded file and prompt for ABLITAI_API_KEY again. Do not start an interactive paid session unless this page is later promoted from reference-only to supported.
Known client behavior
OpenCode 1.18.27 can retry 429 and 503 responses for more than 50 seconds and exposes no supported retry-count setting. Apply an external process timeout in automation. Do not run opencode debug config while the key is set because this version can print the resolved key. Standard tool-bearing requests remain unsupported until exact-GPU parser validation.