~/distillery setup → opencode
OpenCode reads ANTHROPIC_BASE_URL from env — set it once and every Claude request routes through The Distillery.
Overview
OpenCode is a terminal-based AI coding assistant. It uses the Anthropic Messages API via the Vercel AI SDK and supports a per-provider `baseURL` override in `~/.opencode/opencode.json`. Setting this value routes OpenCode's Claude traffic through The Distillery.
Prerequisites
You have The Distillery installed and running locally on port 3080. OpenCode is installed with the `anthropic` provider configured and an API key set.
$ configure
step 01 / 02Open `~/.opencode/opencode.json` and add the `provider.anthropic.options.baseURL` key. Create the file if it does not already exist.
{
"provider": {
"anthropic": {
"options": {
"baseURL": "http://localhost:3080"
}
}
}
}~/.opencode/opencode.json%USERPROFILE%\.opencode\opencode.json$ verify
step 02 / 02thedistillery statsEvaluating other Claude Code cost-reduction approaches alongside OpenCode? See how The Distillery compares to Claude Code Router (model-routing approach), Compresr (YC W26), or browse alternatives to Claude Code Router for the full landscape.
Pricing breakdown: thedistillery.com/pricing.