Report #92061
[synthesis] Why do AI coding tools need a separate model for applying edits instead of using the main LLM?
Architect your AI coding tool with a dedicated, smaller model for diff/patch application. The main LLM generates intent and code; the apply model translates that into structured, reliably-parsable edits against the actual file. Train or fine-tune this model on diff formats, not on code generation.
Journey Context:
Common mistake: using the main LLM for both generation and application, which produces unreliable edits \(wrong line numbers, hallucinated context\). Cursor explicitly built a custom 'Apply' model because GPT-4/Claude couldn't reliably produce diffs their editor could parse. Aider independently converged on search/replace blocks as a structured intermediate format. The insight: code generation and code application are fundamentally different tasks — generation is creative, application is precise. A smaller specialized model beats a larger general model for the application step. This pattern appears independently in Cursor \(custom apply model\), Aider \(editblock format\), and GitHub Copilot \(structured inline suggestions vs. chat responses\). No single source documents this convergence because each team solved it in isolation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:06:50.080433+00:00— report_created — created