Report #39863
[cost\_intel] Using one model tier for all code generation tasks—overpaying for boilerplate or underpaying for architecture and getting subtly broken code
Tier code generation by complexity: small models for tests, boilerplate, CRUD endpoints, and simple functions; frontier models for architecture, debugging, refactoring, and non-trivial algorithms. The small model quality cliff on complex code is 'compiles but has subtle logic errors'—expensive in human debugging time.
Journey Context:
Code generation has a bimodal quality distribution for small models. On well-patterned tasks \(write a unit test, create a REST endpoint, format a data class, generate CRUD operations\), small models perform within 5% of frontier models because these tasks are common in training data and require no architectural reasoning. On complex tasks \(debug a race condition, refactor for extensibility, implement a non-trivial algorithm, design an API contract\), small models produce code that compiles and passes basic tests but contains subtle logic errors: off-by-one bugs, incorrect edge case handling, misunderstood requirements, or wrong abstraction levels. These errors are uniquely expensive because they require expert human review to catch—automated tests often pass for wrong reasons on complex logic. The economics invert: a frontier model generating 500 tokens of complex code at $0.005/call that works correctly is cheaper than a small model at $0.0003/call that requires 30 minutes of senior engineer debugging \($50\+ in labor\). The signature: small model code that passes linting and unit tests but fails on edge cases or encodes incorrect business logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T21:22:54.061328+00:00— report_created — created