今日已更新 189 条资讯 | 累计 41866 条内容
关于我们

The AI thinks, the gate decides — how I made LLM code edits deterministic (and cut token usage 42 )

Sergio Corruchaga 2026年09月11日 05:18 1 次阅读 来源:Dev.to

title: "The AI thinks, the gate decides — how I made LLM code edits deterministic (and cut token usage 42×)" published: true tags: ai, opensource, typescript, llm The AI thinks, the gate decides D-Engine: a deterministic harness that matches coding agents' quality while burning 14–42× fewer tokens Sergi Corruchaga · September 2026 · D-Engine v0.2.2 (MIT, open source) 1. The number that started it all On September 10, 2026, I ran the same programming task three times, with the same model (DeepSeek V4.1-Flash), the same literal prompt, and the same repository: "En utils.ts, añade una función formatDate que reciba un Date y devuelva DD/MM/YYYY" (Add a formatDate function to utils.ts that takes a Date and returns DD/MM/YYYY) All three runs produced functionally the same code. Here's what each one cost: Tool Architecture Tokens consumed Time D-Engine (my harness) Deterministic pipeline 2,552 ~4 s dsh — Minimal mode Agent (single tool: shell) 34,600 1m 04s dsh — effort Off Full agent, no thinking 37,100 6 s dsh — factory defaults Full agent, thinking High 107,000 28 s DeepSeek's official agent burned 42× more tokens than my tool to produce the same diff. And as you'll see in the controls section, that gap is explained neither by the model, nor by "thinking mode", nor by the agent's toolbox. It's explained by the architecture. This article covers how I got here: what D-Engine is, how I ran the full benchmark (10 tasks, 5 contenders, 2 deliberate traps), what agents do better than my tool (quite a few things, and I'm going to disclose all of them), and why I believe the future of AI-assisted programming isn't a smarter agent — it's a stricter gate. 2. The problem: how an agent spends tokens The dominant AI coding tools (OpenCode, Aider, dsh, Claude Code…) all follow the same pattern: the agentic loop . The model receives your request, decides to call a tool ( read file , search , run shell ), gets the result, decides another call, and so on until done. The commonly overlook

本文内容来源于互联网,版权归原作者所有
查看原文