CANDIDATE INTEGRATION

OpenCode reference-only setup.

A layered provider file connects OpenCode 1.18.29 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; tools are on; treat harness use as reference-only until sustained exact-GPU evidence is published. Do not use paid credits with this pending integration.

Before you start

1. Install the tested version

PowerShell, macOS, or Linux
node --version
npm --version
npm install --global opencode-ai@1.18.29
opencode --version

2. Download the provider file

The consumer provider file contains no secret. These commands refuse to overwrite an existing AblitAI file.

PowerShell

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 = $file

macOS or Linux

macOS / 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

PowerShell
$secret = Read-Host "AblitAI API key" -AsSecureString
$env:ABLITAI_API_KEY = [System.Net.NetworkCredential]::new("", $secret).Password
Remove-Variable secret

macOS or Linux

macOS / 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_KEY

4. Confirm account access

Create or import your no-email account and save its offline backup. A valid key is required. This closed-tool diagnostic does not require funded credits and should return the documented 400 before inference or charging. Text inference separately requires a positive available balance.

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.

PowerShell
opencode run --pure `
  --model ablitai/qwen3.8-27b-abliterated `
  "Reply with exactly ABLITAI_OK. Do not use tools."
macOS / Linux
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

Historical OpenCode 1.18.27 checks found it 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 1.18.27 was observed to print the resolved key. Standard tool-bearing requests remain unsupported until exact-GPU parser validation.

The 429/503 retry and resolved-key diagnostic observations came from 1.18.27 and have not been revalidated on 1.18.29. The current pin was rechecked for the closed tool gate and readable 402/413 failures. Keep the diagnostic and process-timeout precautions.