{"slug": "run-opencode-on-a-local-model-with-qvac-no-cloud-no-api-key-works-offline", "title": "Run OpenCode on a local model with QVAC: no cloud, no API key, works offline", "summary": "OpenCode, an open-source coding agent, can run fully offline on a local model through QVAC, an Apache 2.0 open-source SDK and CLI from Tether that ships an OpenAI-compatible server and a dedicated @qvac/opencode-plugin for one-line configuration. QVAC runs models across NVIDIA, AMD and Intel GPUs via Vulkan and Apple Silicon via Metal, and also serves as a local provider for OpenClaw, Cline, Aider, Continue and Roo, with no API keys, rate limits or per-token cost. In a demonstration with Qwen3.6-35B-A3B downloaded once and the network off, OpenCode built a self-contained page animating 800 glowing particles, explained an unfamiliar solar-system simulation repository, and fixed a shopping cart bug that rendered its total as garbled text.", "body_md": "Run OpenCode Locally With QVAC: A Coding Agent With No Cloud\n\nOpenCode is an open-source coding agent. With the QVAC plugin it runs a model on your own machine, so it needs no cloud or API key and keeps working offline. Setting it up for OpenCode 2 takes three steps.\n\nT\n\nThomas Blanc\n\nWhat OpenCode Is\n\nOpenCode is an open-source coding agent. You give it a goal in plain language, and it plans, reads and writes files, runs commands, and reports back. It runs in your terminal, as a desktop app or in a browser. It works the way a teammate would: open the repo, make the change, run it, fix what broke.\n\nThe detail that matters for this guide is how OpenCode talks to a model. It speaks to any endpoint that exposes an OpenAI-compatible API. That means it is not tied to a single cloud vendor. You point it at whatever model endpoint you want, including one running on your own machine.\n\nThat is the whole idea here. OpenCode for the agent loop, a local model for the intelligence, both on hardware you control.\n\nWhy Local Is The Right Default For A Coding Agent\n\nWhen a model only chats, where it runs is mostly a question of privacy. When a model drives a coding agent that reads your repository and runs commands, it becomes a question of control. The agent acts on your machine. If the model behind it lives in someone else's datacenter, every file it reads and every command it runs depends on a system you do not own: its uptime, its latency, its terms, and its access policy, any of which can change without notice.\n\nRunning the model locally changes the property, not just the policy:\n\nYour code stays on the machine. The files the agent reads, the code it writes, the commands it runs: none of it leaves your disk to reach the model.\n\nIt works offline. Once the model is downloaded, you can disconnect entirely and keep working. Turn off the network and the agent still answers.\n\nNo per-token bill. A long coding session that would run up a metered API costs nothing locally.\n\nNo silent model swaps. The weights are a file on your disk. They do not change under you between sessions.\n\nFor a coding agent, that adds up to a simple property: the work, and the intelligence doing it, are both yours.\n\nQVAC, And The Tools You Already Use\n\nQVAC is the piece that makes the local half practical. It is an open-source SDK and CLI from Tether that runs models on your own device across every major GPU backend (NVIDIA, AMD, and Intel through Vulkan, and Apple Silicon through Metal), and it ships an OpenAI-compatible server. That server is the bridge a coding agent plugs into.\n\nIt is also not a one-tool trick. QVAC is a first-class local provider for OpenCode and OpenClaw, and because the server speaks the standard OpenAI API, it works with the other coding tools developers already use, including Cline, Aider, Continue, and Roo. For OpenCode specifically there is a dedicated plugin, @qvac/opencode-plugin, that wires the whole thing up from one line of config. You bring your own model, running locally, to the agent you already like. QVAC is Apache 2.0, with no API keys, no rate limits, and no per-token cost.\n\nWhat It Looks Like\n\nRunning Qwen3.6-35B-A3B locally through QVAC (downloaded once, then with the network off), OpenCode handled three ordinary developer tasks back to back:\n\nBuild from a prompt. From one sentence, it wrote a self-contained page animating eight hundred glowing particles that drift and react to the cursor, then opened it in the browser. No libraries, every line generated on the machine.\n\nExplain an unfamiliar repo. Asked what a repository does, it read the code and explained it: a solar-system simulation with planets orbiting on circular paths. Opening the page confirmed it.\n\nFind and fix a bug. Handed a shopping cart whose total rendered as garbled text instead of a number, it located the cause, edited the file, and the total added up correctly.\n\nAll of it ran locally, on an open and free stack.\n\nWhich Model To Run\n\nCoding agent work (reading a repo, generating a file, fixing a bug) asks more of a model than a chat does, so it pays to run a capable one. You select a model by its id in the plugin config, and that id flows straight through to OpenCode's model picker, where the default shows as qvac/qwen3.5-9b.\n\nThat id is a QVAC model reference, not a path to a file you supply. On first run, QVAC downloads that model once into its own local store and serves it locally from then on, with no network. Because it pulls QVAC's own copy, a .gguf you may already have from another tool is not reused.\n\nUse case\n\nModel\n\nRAM\n\nDisk\n\nConfig id\n\nRecommended default, runs on most recent laptops\n\nQwen3.5-4B (4-bit)\n\n~8 GB\n\n~3 GB\n\nqwen3.5-4b\n\nBalanced, the plugin's out-of-box default\n\nQwen3.5-9B (4-bit)\n\n~12 GB\n\n~6 GB\n\nqwen3.5-9b\n\nStrongest coding, used in the demo\n\nQwen3.6-35B-A3B (4-bit)\n\n~32 GB\n\n~21 GB\n\nqwen3.6-35b-a3b\n\nThe demo uses Qwen3.6-35B-A3B: 35 billion parameters of knowledge, only about 3 billion active per token, so it stays fast despite its size. For most laptops, Qwen3.5-4B or the 9B default is the better starting point.\n\nThe plugin also accepts gpt-oss-20b and gemma4-31b by short id. Any other QVAC chat model works by its full name, written like QWEN3_5_9B_MULTIMODAL_Q4_K_M, the full name of the 9B.\n\nA GPU helps but is not required. QVAC uses Apple Metal on Apple Silicon and Vulkan on NVIDIA, AMD, and Intel; on a CPU-only machine it still runs, just slower. To check what your hardware supports before you start, run npx -y @qvac/cli doctor (no install needed).\n\nSet It Up\n\nThese steps are for OpenCode 2. OpenCode loads the QVAC plugin from your project config, and the plugin starts a QVAC server on its own and points OpenCode at it.\n\nRequirements:\n\nOpenCode 2. The plugin uses OpenCode 2's plugin system and does not load in OpenCode 1 (see the note after step 3).\n\nNode.js 22 or newer (run node --version, get it from nodejs.org). The plugin runs the QVAC server in a Node process.\n\nDisk and RAM for the model: the default Qwen3.5-9B needs about 6 GB of disk and 12 GB of RAM; the demo's Qwen3.6-35B-A3B needs about 21 GB of disk and 32 GB of RAM.\n\n1. Install OpenCode\n\n```\nnpm install -g @opencode/cli\n```\n\nOpenCode's docs also list a one-line installer and desktop builds.\n\n2. Add The QVAC Plugin To Your Project\n\nIn the folder you want to code in, create an opencode.json. The short version uses the plugin's default model, Qwen3.5-9B. To use another model, such as Qwen3.5-4B on a smaller laptop or Qwen3.6-35B-A3B to match the demo, name it in the plugin's options.\n\n```\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugins\": [\"@qvac/opencode-plugin\"]\n}\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugins\": [\n    {\n      \"package\": \"@qvac/opencode-plugin\",\n      \"options\": { \"model\": \"qwen3.6-35b-a3b\" }\n    }\n  ]\n}\n```\n\nThe key is plugins, plural. Configs written for OpenCode 1 used plugin, and OpenCode 2 does not read that key.\n\n3. Run OpenCode\n\n```\nopencode              # terminal interface\nopencode run \"...\"    # one-shot prompt\nopencode pair         # link to open OpenCode in the browser\n```\n\nOn first run, OpenCode installs the plugin. The plugin downloads the model once and starts a QVAC server in the background. It registers that server as the local qvac provider and makes the model this project's default. There is no qvac serve to run and no provider block to write. The first answer waits for the model to finish loading; the turns after it run at the model's normal speed.\n\nSeveral OpenCode windows share one QVAC server, so a second window does not load the model again. The QVAC server stops when OpenCode closes the project, after about an hour without activity, or when OpenCode itself shuts down. Closing a window does not stop it, and when you come back it starts again on its own.\n\nStill on OpenCode 1? The plugin's 0.3 line is the version for OpenCode 1. Pin it in your existing config as @qvac/[email protected], or move to OpenCode 2 and use the steps above.\n\nTest That It Is Really Local\n\nAsk the agent whether it is running in the cloud or on your machine. Then turn off your network and ask again. It keeps answering, because nothing was being sent anywhere.\n\nWhat To Try Next\n\nFrom here, the same setup handles the rest of what a coding agent does. Point OpenCode at a project folder and have it read and edit code, generate a small app from a prompt, explain an unfamiliar repository, or track down a bug. The agent loop is identical to the cloud experience. The only thing that changed is that the model behind it is yours, on your hardware, with nothing leaving the machine.\n\nNotes And Limits\n\nA model that fits on your machine is not a frontier cloud model. Expect it to need clearer, more focused instructions, and give it single-goal tasks rather than long open-ended ones.\n\nLocal responses can take longer than a cloud API today. On a single local worker, a tool-using turn with the 35B model runs in roughly 20 to 30 seconds; a smaller model is snappier. That gap is closing fast as local hardware speeds up and small models improve.\n\nOne QVAC server runs per machine. If the OpenCode desktop app is open it can hold locks the terminal needs, so quit it when running opencode from the terminal.\n\nChambea won our Lima hackathon, where Peru's Ministry of Labor set a social impact challenge. A worker describes a normal day and the app turns it into a list of skills and the other jobs they open.\n\nA custom Brick for Arduino App Lab, built on the QVAC SDK, lets an App's Python code ask a local language model a question with no API key. The example code is open source and ready to adapt.\n\nScript, voice-over, captions and music usually come from cloud services that bill by the minute or by the character. Our creator toolkit demo, built with the QVAC SDK, makes all four with local AI on one laptop.\n\nChambea won our Lima hackathon, where Peru's Ministry of Labor set a social impact challenge. A worker describes a normal day and the app turns it into a list of skills and the other jobs they open.\n\nA custom Brick for Arduino App Lab, built on the QVAC SDK, lets an App's Python code ask a local language model a question with no API key. The example code is open source and ready to adapt.\n\nScript, voice-over, captions and music usually come from cloud services that bill by the minute or by the character. Our creator toolkit demo, built with the QVAC SDK, makes all four with local AI on one laptop.", "url": "https://wpnews.pro/news/run-opencode-on-a-local-model-with-qvac-no-cloud-no-api-key-works-offline", "canonical_source": "https://qvac.tether.io/blog/run-opencode-locally-with-qvac-a-coding-agent-with-no-cloud", "published_at": "2026-11-30 07:53:10+00:00", "updated_at": "2026-11-30 08:15:36.384903+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models", "ai-infrastructure"], "entities": ["OpenCode", "QVAC", "Tether", "Qwen3.6-35B-A3B", "@qvac/opencode-plugin", "OpenClaw", "Cline", "Aider"], "also_reported_by": [], "takeaway": "Point OpenCode at QVAC's OpenAI-compatible local server via the @qvac/opencode-plugin to run a coding agent such as Qwen3.6-35B-A3B entirely offline, keeping repository files and commands on your own disk with no API key or per-token cost.", "recommendation": {"advice": "Route your coding agent to a local OpenAI-compatible endpoint like QVAC's server when code cannot leave the machine; the source ran Qwen3.6-35B-A3B offline for builds, repo explanation and bug fixes.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/run-opencode-on-a-local-model-with-qvac-no-cloud-no-api-key-works-offline", "markdown": "https://wpnews.pro/news/run-opencode-on-a-local-model-with-qvac-no-cloud-no-api-key-works-offline.md", "text": "https://wpnews.pro/news/run-opencode-on-a-local-model-with-qvac-no-cloud-no-api-key-works-offline.txt", "jsonld": "https://wpnews.pro/news/run-opencode-on-a-local-model-with-qvac-no-cloud-no-api-key-works-offline.jsonld"}}