Model choice vs editor choice in AI code generation

This title was summarized by AI from the post below.

🏗️ 𝗧𝗵𝗲 𝗖𝗮𝘀𝘂𝗮𝗹 𝗕𝘂𝗶𝗹𝗱𝗲𝗿... 𝗗𝗼𝗲𝘀 𝗧𝗼𝗼𝗹 𝗰𝗵𝗼𝗶𝗰𝗲 𝗯𝗲𝗮𝘁 𝗠𝗼𝗱𝗲𝗹 𝗰𝗵𝗼𝗶𝗰𝗲? From what I am finding through my runs is that the agent's editing primitive matters more than the model you pick. When I used opencode's 𝗲𝗱𝗶𝘁 tool on multi-line function bodies, the model had to produce every replacement line inside a JSON string — no surrounding context, explicit indentation, no guardrails. Result: lines landing at column 0, syntax errors, panicked re-edits, and token count tripling. Switched to 𝘄𝗿𝗶𝘁𝗲 (full file regeneration). Same model, same endpoint — task completed cleanly. 📕The fix wasn't a bigger model. It was a better-shaped tool. I guess use 𝗲𝗱𝗶𝘁 for single-line renames. Use 𝘄𝗿𝗶𝘁𝗲 for anything touching a function body. The format has to match how LLMs naturally generate code. Keep in mind, I am hands-off when I run this and not through interactive sessions. These learnings could be part of the bigger topic of context engineering, where you become specific and tailored to the problem space. These small optimisations can or may go a long way, according to me. 🔗 Full lessons: https://lnkd.in/gjEtWEj5 #AIEngineering #CodingAgents #LLMs #BuildingInPublic

To view or add a comment, sign in

Explore content categories