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

VibecodedHub: A Discovery Platform Built Entirely with Claude Code
A developer built VibecodedHub, a discovery and launch platform for AI-built projects, using Claude Code as the primary engineer across multiple focused sessions. The platform includes landing page, authentication, feed, project submissions, Stripe integrations, admin panel, SEO, and OG images.

Solo Developer Runs Company with 4 AI Agents on Gemini's Free Tier
A developer in Taiwan built four AI agents using OpenClaw and Gemini 2.5 Flash's free tier (1,500 requests/day) to handle content generation, sales leads, security scanning, and operations for their tech agency, with monthly LLM costs at $0.

OpenClaw AI agent autonomously identifies bug, creates and submits GitHub PR
A developer reports their OpenClaw AI agent diagnosed a recurring issue, traced it to a third-party package, then autonomously created a GitHub branch, made multiple commits, reviewed its own code, and submitted a pull request to the package repository.

Building a Concert Radar with OpenClaw: Scraping Multiple Sources for Artist Shows
A developer built a concert radar using OpenClaw on a VPS that pulls artists from Spotify, scans multiple sources daily, normalizes events, matches artists, deduplicates, and tracks new announcements via cron jobs.