OpenClaw Cost Optimization: How a Developer Fixed a $750 Mistake with Model Routing

What Went Wrong with the Cost Fix
After burning $750 in 3 days on OpenRouter, the developer initially "fixed" costs by swapping everything to Hunter Alpha (free on OpenRouter). This caused subagents to return zero output — silent completions where jobs showed "success" but results were empty.
A specific failure case: a video production agent wrote code that syntax-checked correctly, ran without errors, but produced a 9-second silent black video with no voiceover, no footage, and no manifest. QA eventually caught it. The lesson: free models don't always fail loudly — sometimes they quietly ship a stub and move on.
The New Model Routing Strategy
The developer stopped thinking "cheap vs expensive" and started thinking "what does this task actually need":
- Main session (orchestration): Sonnet 4.6 — "The manager. Worth the cost."
- Code/complex tasks: Gemini 2.5 Flash at $0.15/M — "Sweet spot for real output."
- Sensitive data (credentials, financials): Claude 3.5 Haiku — "Anthropic doesn't log prompts. Non-negotiable."
- Simple predictable tasks: Hunter Alpha — "Fine when failure is obvious and stakes are low."
Every cron job and subagent spawn now has an explicit model parameter — no defaults.
Security Discovery During the Audit
While investigating the model issues, the developer found credentials committed in their workspace repo — API keys and OAuth tokens. Although not pushed publicly, this was unacceptable. They added a .gitignore for credentials/ and ran git rm --cached. The warning: if you've ever committed a credentials folder, those keys remain in your git history — rotate them.
The Core Lesson
Cost optimization isn't a one-time config change. A $0.15/M model writing your production pipeline is money well spent. A free model that silently passes you a broken video is expensive no matter what it costs per token. Right-size to the job and verify output, not just exit codes.
📖 Read the full source: r/openclaw
👀 See Also

OpenClaw hands-on experience: setup, skills, and cost realities
A developer tested OpenClaw for building a family assistant, finding it can create folder structures, modify configs, write Python scripts, and organize files directly. The experience required WSL on Windows, OpenAI API keys with credits, additional tooling for web browsing, and careful management of different communication channels.

Building an AI Cortex with Claude Code: Architecture and Context Library Insights
A developer built a platform where Claude writes, reviews, and auto-merges code, with the key insight being a structured context library that compounds over time. After six weeks, the AI reportedly knows the company better than a new hire after a year.

Solo Founder Uses Claude Code for FDA Submission and Patent Review
A solo founder building a contactless sleep monitor used Claude Code for a 10-hour session to file an FDA Pre-Submission, create 8 regulatory documents, run a parallel agent patent review, and update 38 document references after regulatory changes.
Claude Code vs Codex: 6-Project Practical Experiment Breakdown
A practical experiment comparing Claude Code and Codex across 6 projects—web, backend, and free challenge—with cross-reviews, self-audits, and scoring.