Model Releases
Run Claude Code on Ollama models with per-model context scaling and cost tracking
I've been running Claude Code as my daily driver and wanted Ollama models in the loop without giving up the harness. So I built gremlord, a small Go binary that points the unmodified claude binary at
I've been running Claude Code as my daily driver and wanted Ollama models in the loop without giving up the harness. So I built gremlord, a small Go binary that points the unmodified claude binary at a local router via ANTHROPIC_BASE_URL (officially supported, no fork, auto-updates keep working). Anthropic traffic passes through byte-faithful; Ollama and anything OpenAI-compatible go through full request/stream translation. The setup I actually run: main loop stays on Claude, background work and subagents go to a local 32K qwen at zero marginal cost. The Ollama-relevant parts: Declare context_window and effective_context per model and the router scales Claude Code's context accounting, so a 32K model auto-compacts at the right moment instead of overflowing. Claude Code sizes everything for ~200K otherwise. A cheap classifier routes each turn to the smallest model that can hold the request - planning on a big model, mechanical edits on the local one. Requests too big for every configured model get refused before they go out. gremlord cost prices every token as it streams - local models log as $0.00, so you can see exactly what the offload saves per day. Hard budget caps for the paid models: hit the daily cap and the router refuses the next request. In-flight responses are never cut. Honest caveats: local models run through translation and Claude Code's prompts are tuned for Claude, so they're clunkier as the main loop - they shine as background workers and subagents. There's a paired blinded eval command (gremlord eval) for finding which local model is actually good enough for which task class instead of guessing. Honest numbers since there's no telemetry: 66 binary downloads across 26 releases, most of them my own updates - realistic genuine installs are maybe 10-20. GitHub traffic: 91 clones, 56 unique, per 14 days, 13 stars. Free, MIT: https://github.com/gremlord/gremlord - demos at https://gremlord.com. Happy to go deep on the translation layer, that's where the weird bugs live. submitted by /u/Objective_Patient220 [link] [comments]
Related
- how to create .md files and set context window more than 64k for ollama and claude running locally.
- Help on running Claude Code using ollama
- claudely: launch Claude Code against Local LLM provider like LM Studio / Ollama / llama.cpp without trashing your real claude config
Source: r/ollama | 2026-09-09