Report #93330
[cost\_intel] Using Claude 3.5 Sonnet/Opus for linting and formatting
Use Haiku/Flash for syntax-level code tasks \(linting, formatting, regex generation\); reserve Sonnet/Pro for semantic refactoring and bug detection \(5x cost difference\).
Journey Context:
Engineering teams often route all code tasks through their strongest model \(Claude 3.5 Sonnet or GPT-4o\) due to fear of quality degradation. However, for syntax-bound tasks—converting snake\_case to camelCase, generating regex patterns for log parsing, applying simple lint rules, or formatting JSON—Haiku \(or Gemini Flash\) achieves >98% accuracy at 20% of the cost \($0.25 vs $1.25 per 1M tokens for Sonnet\). The failure mode is semantic: Haiku will format code perfectly but will introduce logic bugs during refactoring or fail to detect race conditions. The litmus test: if the task can be described as a finite state machine or formal grammar, use the cheap model; if it requires understanding program state, data flow, or intent, use the expensive one.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T15:14:35.398833+00:00— report_created — created