If you want to run Qwen 3.5 35B-A3B locally with Claude Code, this guide shows the exact setup I use on my own machine. The flow is simple: install LM Studio, load unsloth/qwen3.5-35b-a3b, expose the local API on port 1234, map Claude Code to that endpoint, and verify the model is active.
This setup gives you a private local coding workflow with no external model calls for normal usage. You keep control of the model, context, and runtime behavior while still working inside the Claude Code interface.
What You’ll Build
By the end, Claude Code will send requests to your LM Studio local server instead of a remote endpoint, using:
LM Studio -> localhost:1234 -> Claude Code.
- Model:
unsloth/qwen3.5-35b-a3b - Server endpoint:
http://localhost:1234 - Local auth token:
lmstudio - Claude Code model mapping: all Anthropic defaults pointed to the same local model
Prerequisites
- A machine with enough disk and memory headroom for a
21.6GBmodel - LM Studio installed
- Model access page: unsloth/qwen3.5-35b-a3b
- Claude Code installed and available in your shell
- Port
1234free on your system
Step 1 - Install LM Studio
Install LM Studio from the official site, launch it, and complete first-run setup. If you have already installed it, move directly to model download.
Step 2 - Download unsloth/qwen3.5-35b-a3b (21.6GB)
In LM Studio, open model search, find unsloth/qwen3.5-35b-a3b, and download it. Double-check the identifier before loading so Claude Code later targets the exact same model name.
Step 3 - Load the Model and Enable Local Server (Port 1234)
Load the model in LM Studio, then enable the local server and set the port to 1234. Keep LM Studio running while you use Claude Code.
Optional quick check from terminal:
curl http://localhost:1234/v1/models
If the server is healthy, you should get a JSON response listing available model IDs.
Step 4 - Configure Claude Code Environment Variables
Export the following variables in the same shell session where you run Claude Code:
export LM_MODEL="unsloth/qwen3.5-35b-a3b"
export ANTHROPIC_BASE_URL=http://localhost:1234
export ANTHROPIC_AUTH_TOKEN=lmstudio
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=128000
export ANTHROPIC_DEFAULT_OPUS_MODEL="$LM_MODEL"
export ANTHROPIC_DEFAULT_SONNET_MODEL="$LM_MODEL"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="$LM_MODEL"
export ANTHROPIC_MODEL="$LM_MODEL"
export CLAUDE_CODE_SUBAGENT_MODEL="$LM_MODEL"
To make this persistent, add the same block to your shell profile (for example, ~/.zshrc) and reload it.
Step 5 - Run Claude Code and Verify Local Model Usage
Start Claude Code as usual. Then run a short prompt and inspect model/context output. You should see unsloth/qwen3.5-35b-a3b listed in the active session, confirming calls are going through your local LM Studio endpoint.
- Expected base URL behavior: requests routed to
http://localhost:1234 - Expected model behavior: the local model name appears in Claude Code session details
Screenshot Proof in Claude Code
Here is the working state in Claude Code with the local model active:
unsloth/qwen3.5-35b-a3b active via local LM Studio server on port 1234.Common Issues and Fixes
- Connection refused on localhost:1234: LM Studio local server is not running, or port is different.
- Claude Code still uses cloud models: exports were not applied in the current terminal session.
- Wrong model responds: model ID mismatch between LM Studio loaded model and
LM_MODEL. - Unauthorized/local auth errors: keep
ANTHROPIC_AUTH_TOKEN=lmstudioset for local compatibility. - Slow first response: initial warm-up is normal for local inference on large models.
Final Thoughts
This is one of the cleanest ways to run a local coding assistant while preserving your existing Claude Code workflow. If you want more local setup context, read my earlier posts on LM Studio local workflows and AI coding field notes with Claude Code and MCP.