You don't need another AI subscription to turn your gaming PC into a coding assistant
A gaming PC spends an astonishing amount of time doing absolutely nothing. Even when you're working, a graphics card capable of running modern games might be sitting idle while you pay a remote server to generate a few lines of code.
That doesn't mean every powerful AI model can fit on your desktop. It does mean local AI coding is worth considering, particularly for the small jobs that don't demand a frontier model.
Ollama and OpenCode solve two different problems
Ollama runs compatible language models on your machine. OpenCode provides the interface and agent tools that help a model interact with a software project. Combining them gives you an alternative to a purely cloud-based coding workflow.
OpenCode's current model documentation describes automatic discovery of locally served Ollama models. The distinction is important: downloading a model alone doesn't give it a complete coding environment, and installing a desktop agent doesn't automatically make its inference local.
Here's how to put the pieces together
- Install Ollama using its official download for your operating system.
- Pick a compatible coding-oriented model that supports the tool use required by your agent. Check its model card and hardware requirements. For example, you could start by investigating a smaller Qwen3 model from Ollama's model library.
- Open a terminal and download the selected model with Ollama. For the example tag, run:
ollama pull qwen3:8b
ollama list
Keep the Ollama service running locally. Install OpenCode using its official guide, open a test project and select the discovered Ollama model. Current OpenCode versions can identify local models when Ollama is available at its usual loopback endpoint, http://127.0.0.1:11434. If discovery fails, consult the configuration instructions for your installed version.
Start with a request to explain one source file, then ask the agent to write a small unit test. Confirm it can invoke tools reliably before allowing larger edits. These are suggested setup steps, not measured performance results.
A 16GB graphics card is useful, but it isn't magic
Model size on disk isn't the entire memory requirement. Quantization, context length, runtime buffers and concurrent workloads all matter. A compact quantized model is a sensible starting point for a GPU with 8GB or 16GB of VRAM. Larger models may spill into system memory or run slowly. Even when a model technically loads, it may struggle with a long agent session.
I would prioritize a responsive model that completes a simple edit correctly over one that spends several minutes generating an impressive-looking plan. If the local setup keeps failing at tool calls or changes unrelated files, a hosted model is a better choice for that task.
Local isn't automatically private
Running inference locally can keep model prompts off a hosted inference service, provided the selected endpoint really is local. But agent tools can still contact websites, package repositories, remote Git servers and configured integrations. Some providers may have cloud-backed options. Check the model, network connections and permissions rather than assuming a desktop app never sends data outside the machine.
Never give a new agent access to production credentials simply because it runs on your PC. Use a branch or disposable copy of a project with secrets removed.
The sensible approach is a hybrid one
A local model is a reasonable first stop for documentation, simple validation and narrow code edits. A stronger hosted model may be worth paying for when you're dealing with unfamiliar architecture or a complex bug.
There is no per-request cloud inference fee for genuinely local generation, but electricity, hardware and your time are still costs. The attraction is not that everything suddenly becomes free. It's that you can reserve paid AI for the work that actually needs it.