Aider error
Aider: The LLM did not conform to the edit format
The LLM did not conform to the edit format.Status: WorkaroundLast verified 5 documented fixes3 sources
What it means
The model replied with code changes in a format aider could not parse or apply, so the edits were not written to your files. The docs also describe this as aider saying something like "Failed to apply edit to *filename*". Aider prints a link to the edit-errors doc and sends the parse error back to the model so it can retry.
Causes
- The LLM is disobeying the system prompts and trying to make edits in a format aider doesn't expect (official docs).
- Too much context: above about 25k tokens of context, most models start to become distracted and become less likely to conform to their system prompt (official docs).
- Weaker models, most local models and quantized local models are more prone to disobeying the system prompt instructions (official docs).
- The Ollama context window defaults to be very small and silently discards data if you exceed it (official docs).
How to fix it
- Fix 1.
Only add the files that need to be edited. Use /drop to remove files the task does not need, /clear to remove conversation history, and /tokens to see token usage.
Snippet/drop /clear /tokens - Fix 2.
Use a more capable model. The docs list GPT-4o, o3-mini, Claude 3.7 Sonnet, DeepSeek V3 or DeepSeek R1 as strong and capable models.
- Fix 3.
Switch to the whole edit format.
Terminalaider --edit-format whole - Fix 4.
Try architect mode, which proposes changes and then uses a separate model to handle the file edits.
Terminalaider --architect # or, inside a session: /chat-mode architect - Fix 5.
For local models, set the Ollama context window size as described in the Ollama docs.
More Aider errors
All 17 Aider errorsSearchReplaceNoExactMatch: This SEARCH block failed to exactly match lines in {path}Status: WorkaroundModel gpt-3.5-turbo has hit a token limit!Status: WorkaroundModel foobar: Unknown context window size and costs, using sane defaults.Status: By designModel azure/gpt-4-turbo: Missing these environment variables:Status: By designaider: The term 'aider' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.Status: Workaroundaider-chat 0.23.0 requires somepackage==X.Y.Z, but you have somepackage U.W.V which is incompatible.Status: WorkaroundThe API provider is not able to authenticate you. Check your API key.Status: By designThe API provider has rate limited you. Try again later or check your quotas.Status: By design
Related reading
- Aider vs Claude Code in 2026: Git-First Open Source vs Subagent RuntimeAider vs Claude Code: git-first, model-agnostic Aider against the Claude Code runtime of subagents and hooks. Compare architecture, cost, governance and fit.
- Aider vs Claude Code: Open Source vs Commercial AI Coding CLIAider is open source and works with any model. Claude Code is Anthropic's commercial agent. Here is how they compare for TypeScript.
FAQ
What does "The LLM did not conform to the edit format" mean in Aider?
The model replied with code changes in a format aider could not parse or apply, so the edits were not written to your files. The docs also describe this as aider saying something like "Failed to apply edit to *filename*". Aider prints a link to the edit-errors doc and sends the parse error back to the model so it can retry.
How do I fix "The LLM did not conform to the edit format"?
There are 5 documented fixes. Start with the first: Only add the files that need to be edited. Use /drop to remove files the task does not need, /clear to remove conversation history, and /tokens to see token usage.
Is this Aider error fixed?
Status: Workaround. No release removes the cause. The documented fixes work around it. Affected versions: All versions; model-dependent behavior.
Sources
Last verified against 3 sources: official docs, maintainer replies and release notes.
Newsletter
Fixes for the tools you use, weekly
One email per week. New coding agent releases, what broke, and how developers are working around it.