Disclosure up front: I run Oathbreaker, which hosts abliterated models behind an OpenAI-compatible API. This walkthrough uses it, but the OpenCode part (a small model for background jobs and a cheap read-only subagent) works the same with any provider.
Why a background model
Alibaba's Qwen team released the open weights of Qwen4-35B-A3B on December 4. It's a mixture of experts with about 3B parameters active per token, which is what makes it cheap to serve. It's also why I wouldn't hand it a long refactor: models with few active parameters lose the thread of long multi-step tasks sooner than big ones.
But most of what a coding agent sends isn't the hard part. Session titles, "where is this configured", "what does this module do": that work can go to a cheap model while a bigger one plans and edits. So that's the setup here: GLM-5.3 Abliterated as the main model, and Qwen4-35B-A3B Abliterated for titles and a read-only subagent.
"Abliterated" means the learned refusal behavior was reduced by editing the model, not the prompt. It doesn't make the model smarter. For background jobs it mostly means fewer runs stalled by a refusal on something ordinary that looks sensitive, like a pentest fixture in your own test suite.
What you need
- OpenCode 1.x (
opencode --version) - An Oathbreaker account with at least $5 of prepaid credit and an API key
1. Put the key in your environment
Every block below reads the key from OATHBREAKER_API_KEY. Set it at a hidden prompt so it stays out of your shell history:
printf 'Oathbreaker API key: '; read -rs OATHBREAKER_API_KEY; export OATHBREAKER_API_KEY; printf '\n' Start OpenCode from that terminal afterwards.
2. Add the provider, the main model and the small model
Merge this into ~/.config/opencode/opencode.json or a project's opencode.json. Don't replace an existing file.
{ "$schema": "https://opencode.ai/config.json", "provider": { "oathbreaker": { "name": "Oathbreaker", "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://oathbreaker.ai/v1", "apiKey": "{env:OATHBREAKER_API_KEY}" }, "models": { "oathbreaker-glm-5.3": { "name": "oathbreaker-glm-5.3", "tool_call": true, "limit": { "context": 131072, "output": 32768 } }, "oathbreaker-qwen4-35b-a3b": { "name": "oathbreaker-qwen4-35b-a3b", "tool_call": true, "limit": { "context": 65536, "output": 24576 } } } } }, "model": "oathbreaker/oathbreaker-glm-5.3", "small_model": "oathbreaker/oathbreaker-qwen4-35b-a3b", "permission": { "bash": { "*": "ask", "git status *": "allow", "git diff *": "allow", "git log *": "allow", "git push *": "deny" }, "webfetch": "ask" } } model is what OpenCode starts with. small_model takes OpenCode's small background jobs, like titling a session. The limit values tell OpenCode when to compact: Qwen4 plans with 65,536 tokens of context, half of GLM-5.3's. The permission block makes every shell command ask unless it's on the short allow list; my GLM-5.3 post explains why that matters more with an abliterated model.
On OpenCode 2.x the provider fields were renamed (providers, package, settings, capabilities). The 2.x block is on the OpenCode setup page.
3. A read-only subagent on the cheap model
Add an agent to the same file:
"agent": { "scout": { "description": "Finds files and explains code. Read-only, runs on the cheap model.", "mode": "subagent", "model": "oathbreaker/oathbreaker-qwen4-35b-a3b", "tools": { "write": false, "edit": false, "bash": false } } } opencode agent list should now show scout (subagent). Type @scout in a message to hand it a job, or let the main agent delegate to it. It can't write, edit or run shell commands, so the cheap model never gets a shell, and the searching and reading it does costs Qwen4 prices instead of GLM-5.3 prices.
4. Check it
opencode run --model oathbreaker/oathbreaker-qwen4-35b-a3b "Reply with OK" If it answers, start a session with opencode. If not:
-
Provide a valid Oathbreaker API key: the key isn't in this terminal's environment. Set it again and restart OpenCode. - HTTP 402
insufficient_credit: the balance can't cover the request. Nothing was charged. - A context error: the conversation outgrew the window. Let OpenCode compact, or start a new session.
5. What a turn costs
Per million tokens, Qwen4-35B-A3B Abliterated is $0.16 input, $0.02 cached input and $0.48 output. GLM-5.3 Abliterated is $3.00, $0.30 and $4.00.
As a token-cost illustration, not a benchmark: a turn of 20,000 input tokens, 80% of them cached, plus 500 output tokens costs about $0.0012 on Qwen4 and about $0.019 on GLM-5.3, roughly 16 times as much. Agents resend the conversation every turn, so the turns a subagent takes add up. Your console's Usage tab shows what each request actually cost.
6. The catch
- Context. Qwen4 plans with a 65,536-token window. That's plenty for a scout job; a long session run entirely on Qwen4 will compact more often than on GLM-5.3.
- Narrow jobs. About 3B active parameters means it's good at "find it, read it, summarize it" and weaker at long chains of edits. Keep planning and real coding on the bigger model.
- Text only. The base model also takes images and video; this API doesn't.
- Reasoning is always on, at
lowby default.
7. The files
The setup files from this post, plus Codex, Claude Code and Hermes versions and a check that compares them with the live model list every week, are in Oathbreaker-AI/qwen4-35b-a3b-abliterated on GitHub.
Which jobs would you move to a cheap model first?
Drafted by an AI assistant and reviewed by me before publishing.