<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lynkr</title>
    <description>The latest articles on DEV Community by Lynkr (@lynkr).</description>
    <link>https://dev.to/lynkr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3645387%2F794ced23-25c9-41ed-863a-401839a48d59.png</url>
      <title>DEV Community: Lynkr</title>
      <link>https://dev.to/lynkr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lynkr"/>
    <language>en</language>
    <item>
      <title>Best Code Editors for 2027: 8 Editors That Actually Matter in 2027</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Thu, 26 Nov 2026 23:37:44 +0000</pubDate>
      <link>https://dev.to/lynkr/best-code-editors-for-2027-8-editors-that-actually-matter-in-2027-3ghh</link>
      <guid>https://dev.to/lynkr/best-code-editors-for-2027-8-editors-that-actually-matter-in-2027-3ghh</guid>
      <description>&lt;p&gt;2027 is not going to be won by the editor with the longest feature list. It will be won by the editor that best answers three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Who runs the agent — you, or the editor?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Where do your keys, your code, and your money go?&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Can you switch models and agents without switching editors?&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is the shift that happened in 2026. Editors stopped being just places to type code. They became agent control planes, agent hosts, or — in the best cases — both.&lt;/p&gt;

&lt;p&gt;I tested and researched the field as of November 2026 for this list. Prices below are list prices checked in November 2026, and they will move — re-check before you pay. The ranking is my judgement for a working developer in 2027, not a benchmark: there is still no single independent benchmark that compares complete editors, models, repos, prompts, and agent permissions head-to-head.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The shortlist:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;T3 Code&lt;/li&gt;
&lt;li&gt;Caret&lt;/li&gt;
&lt;li&gt;Cursor&lt;/li&gt;
&lt;li&gt;Visual Studio Code + GitHub Copilot&lt;/li&gt;
&lt;li&gt;Zed&lt;/li&gt;
&lt;li&gt;JetBrains IDEs&lt;/li&gt;
&lt;li&gt;Google Antigravity&lt;/li&gt;
&lt;li&gt;Devin Desktop (formerly Windsurf)&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. T3 Code — Best overall for 2027
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is:&lt;/strong&gt; An open-source control plane for coding agents — not a model, and not an agent itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Free, MIT-licensed. You pay for the agents you already use; T3 Code resells no tokens.&lt;br&gt;
&lt;strong&gt;Platforms:&lt;/strong&gt; macOS, Windows, Linux, web, iOS, and Android.&lt;br&gt;
&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/pingdotgg/t3code" rel="noopener noreferrer"&gt;https://github.com/pingdotgg/t3code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;T3 Code is #1 here for a simple reason: in 2027, most developers will not use one agent. They will use Claude Code for one task, Codex for another, Cursor or OpenCode for a third — and they need one place to run them all without losing track.&lt;/p&gt;

&lt;p&gt;T3 Code, built by Theo Browne and T3 Tools and launched in early 2026, does exactly that. It runs a small server on your computer that starts the official CLIs you already have installed and logged in to, and gives them one fast interface. As of 21 November 2026 its GitHub repo showed about 69,397 stars.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every agent in one place:&lt;/strong&gt; Claude Code, Codex, Cursor, OpenCode, Grok Build, Google Antigravity, Kiro, Pi, Muse Code, fx, and any Agent Client Protocol (ACP) agent. Change models in the middle of a thread. Let Claude hand a task to Codex.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your subscriptions, not a new bill:&lt;/strong&gt; T3 Code drives the agents you are already signed in to. No token resale, no new subscription on top.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel threads in isolated worktrees:&lt;/strong&gt; Each thread can get its own git worktree and branch, so several agents can work on several features in the same repo without stepping on each other. The sidebar shows every thread across projects — working, waiting for approval, waiting for your input, or done.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission modes and approvals:&lt;/strong&gt; Supervised (the agent asks before commands and file changes), Auto-accept edits, Auto (the agent's own reviewer approves routine actions), and Full access — picked right in the composer, per thread.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review every turn, revert any message:&lt;/strong&gt; A checkpoint is saved around each turn, so the diff panel shows exactly what the latest turn changed, not just everything uncommitted. Next to the diff there is a file browser with an editor, a terminal per thread, and a browser panel for previewing the app the agent is running.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch agents mid-thread:&lt;/strong&gt; Move a thread from one agent to another — for example, plan with Claude and let Codex do the edits. Short threads transfer in full; long ones keep the original request, the latest messages, and the command results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agents that delegate to other agents:&lt;/strong&gt; An agent can start child agents on any connected provider or model and wait for their results, each child running as its own thread. A built-in MCP server lets agents create, message, wait on, read, search, and interrupt threads, and outside agents can connect to it by URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commit, push, and open a PR in one click:&lt;/strong&gt; One button commits, pushes, and opens a pull request with a generated description. Draft PRs, stacked PRs, and amending an existing PR are supported, and a Pull Requests view shows changes and comments and lets you request reviewers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usage and limits:&lt;/strong&gt; A Usage page reads the history of all your agents and shows tokens, cache savings, a breakdown by model, and an estimated API-equivalent cost. Queued messages are kept through usage limits and can resume when they reset.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Desktop, web, and phone:&lt;/strong&gt; One server, and every client shows the same threads. Start a thread at your desk, then approve the next step from your phone. Remote access works over your local network, Tailscale, or T3 Connect, or by running the headless server from the CLI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast, by design:&lt;/strong&gt; Performance is treated as a feature — the project says it measures it, and treats a dropped frame as a bug.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Install
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew install --cask t3-code        &lt;span class="c"&gt;# macOS&lt;/span&gt;
winget install T3Tools.T3Code      &lt;span class="c"&gt;# Windows&lt;/span&gt;
npx t3@latest                      &lt;span class="c"&gt;# try it once, no install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then sign in to at least one agent you already use — for example, install Claude Code and run &lt;code&gt;claude auth login&lt;/code&gt;, or install the Codex CLI and run &lt;code&gt;codex login&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest caveats
&lt;/h3&gt;

&lt;p&gt;T3 Code is still very early software — its own README says "We are very very early in this project. Expect bugs." It has no model of its own, so it is only as good as the agents and subscriptions you bring. New threads have started in Full access mode in some versions, and anonymous usage telemetry has been on by default — check both settings first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Developers who already pay for two or more coding agents and want one window, one approval flow, and one PR flow for all of them.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Caret — Best open-source AI editor for 2027
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What it is:&lt;/strong&gt; A Cursor-class AI code editor with a Rust core — open source, MIT-licensed, and built to be fast and private.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Free and open source. Bring your own keys, or your own subscription — nothing goes through a Caret server.&lt;br&gt;
&lt;strong&gt;Platforms:&lt;/strong&gt; macOS (Apple Silicon and Intel), Windows, and Linux.&lt;br&gt;
&lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/Fast-Editor/Caret" rel="noopener noreferrer"&gt;https://github.com/Fast-Editor/Caret&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Full tour:&lt;/strong&gt; &lt;a href="https://dev.to/lynkr/caret-an-open-source-cursor-class-ai-code-editor-54fe"&gt;https://dev.to/lynkr/caret-an-open-source-cursor-class-ai-code-editor-54fe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Caret is #2 because it is the most complete answer to a different 2027 question: what if you want the full Cursor experience — Tab, Cmd+K, a real agent, review, rules, MCP — without Electron, without a bundled Chromium, and without routing your own API keys through somebody else's server?&lt;/p&gt;

&lt;p&gt;It is a Tauri 2 application. The core is one Rust process with tokio and mimalloc. The UI is React 19, Monaco, and xterm, rendered by the operating system's WebView — WKWebView on macOS, WebView2 on Windows, WebKitGTK on Linux. There is no Node at runtime and no extension host process.&lt;/p&gt;

&lt;p&gt;Measured on a release build (method in &lt;code&gt;docs/PERFORMANCE.md&lt;/code&gt;): Rust core about 110 MB RSS idle with a workspace open, first paint about 330 ms, Quick Open 8 ms, project-wide search 33 ms, hybrid codebase search 82 ms. One honest caveat from the project itself: the whole process family, including the WebKit content process, is about 490 MB with a TypeScript file and a terminal open, against about 393 MB for Cursor idle on the same machine. The Rust side is small; the system WebView is not free.&lt;/p&gt;

&lt;p&gt;Version 0.2.0 shipped in November 2026. Everything below is in the public repository.&lt;/p&gt;

&lt;h3&gt;
  
  
  Features
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The editor you expect, first&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Monaco editing:&lt;/strong&gt; VS Code's editor core, with split groups, a diff editor, breadcrumbs, and an outline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lean LSP client:&lt;/strong&gt; TypeScript, Rust, Python, Go, C and C++, Java, and more — diagnostics, go-to-definition, and completions without a heavy extension host.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run and Debug:&lt;/strong&gt; A Debug Adapter Protocol client with breakpoints, stepping, variables, watch, call stack, and a debug console for Node/TypeScript and Python, reading your existing &lt;code&gt;launch.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source control:&lt;/strong&gt; Commit UI, AI commit messages, branches, history, stashes, worktrees, blame, and a Bugbot-style review of the working tree, a branch, or a commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic terminal:&lt;/strong&gt; xterm.js with splits. It understands command boundaries, so output is grouped into blocks with exit status. File paths in output are clickable and open at the right line. Ghost-text suggestions come from your history and the model. A failed command gets a fix-it chip. History persists across sessions and you can search it in plain English.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ports panel:&lt;/strong&gt; Lists local servers listening on your machine, with open-in-browser, copy URL, and stop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Tab and inline edit&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tab:&lt;/strong&gt; Multi-line ghost-text completions from any configured model, with partial accept (Cmd+Right) and next-edit prediction ("Tab to jump"). Context comes from recent edits, open files, and diagnostics, and it extends the language server's own suggestion instead of fighting it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cmd+K:&lt;/strong&gt; Inline edit / generate with a streaming inline diff and accept/reject, plus quick questions. &lt;strong&gt;Terminal Cmd+K&lt;/strong&gt; turns natural language into shell commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The agent, and what keeps it honest&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent pane:&lt;/strong&gt; Agent, Ask, Plan, and Debug modes, plus custom modes. Streaming transcript and tool calls — read, list, grep, fuzzy file search, codebase search, edit/write/delete, shell with approvals, web search/fetch, todo list, memory, rules, skills, subagents, MCP tools, and browser automation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checkpoints and review:&lt;/strong&gt; Checkpoints per turn, review changes with per-file accept/reject, queued messages, context-window summarisation, and live usage and cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verified diffs:&lt;/strong&gt; After a turn, Caret runs the project's checks before you accept — build, tests, lint, type-check, whatever it detects — and shows what passed, with the evidence attached. You stop reading "I ran the tests" in a chat bubble and start seeing the exit code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;@-mentions:&lt;/strong&gt; Files, Folders, Code/selection, Codebase, Git (diff, staged, branch diff, commits), Web, Docs, Terminals, Lint errors, Recent changes, Past chats, Rules, Links, Notes, MCP resources, Skills — plus images (vision).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rules and knowledge:&lt;/strong&gt; &lt;code&gt;.caret/rules/*.mdc&lt;/code&gt; (Always / Auto Attached / Agent Requested / Manual), legacy &lt;code&gt;.cursorrules&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, and user rules. Memories, hooks (&lt;code&gt;beforeSubmitPrompt&lt;/code&gt;, &lt;code&gt;beforeShellExecution&lt;/code&gt;, &lt;code&gt;beforeMCPExecution&lt;/code&gt;, &lt;code&gt;beforeReadFile&lt;/code&gt;, &lt;code&gt;afterFileEdit&lt;/code&gt;, &lt;code&gt;afterAgentResponse&lt;/code&gt;, &lt;code&gt;stop&lt;/code&gt;, and more), slash commands, skills (&lt;code&gt;SKILL.md&lt;/code&gt;), subagents, and plans.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codebase indexing:&lt;/strong&gt; Ignore-aware walker, language-aware chunking, BM25 (tantivy) plus optional embeddings (Ollama / any OpenAI-compatible endpoint), hybrid retrieval, incremental updates, and an &lt;strong&gt;&lt;a class="mentioned-user" href="https://dev.to/docs"&gt;@docs&lt;/a&gt;&lt;/strong&gt; crawler.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP:&lt;/strong&gt; stdio / streamable-HTTP / SSE servers from &lt;code&gt;.caret/mcp.json&lt;/code&gt; (and Cursor's &lt;code&gt;.cursor/mcp.json&lt;/code&gt;), with tools, resources, prompts, per-tool enable, and logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Background agents:&lt;/strong&gt; Parallel sessions, optional git worktree isolation, and a chat-centric Agents layout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bugbot-style review:&lt;/strong&gt; Review the working tree, staged changes, a branch, or a commit for real defects, with jump-to-line and "Fix in chat".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bring your own keys, or your own subscription&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Providers:&lt;/strong&gt; Anthropic (Messages API with adaptive thinking, effort, prompt caching, and refusal fallbacks), OpenAI, OpenAI-compatible (Ollama, OpenRouter, LM Studio, vLLM, proxies), Azure OpenAI, and Gemini. Keys live in a local JSON file and never leave your machine except in the request to the provider you chose. Local models work fully offline for chat, Tab, and embeddings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External agents over ACP:&lt;/strong&gt; Drive Claude Code, Codex, Cursor, Grok Build, Gemini CLI, OpenCode, and Pi — plus GLM and any Agent Client Protocol agent — from inside Caret, with the login you already have. Pick the agent's model, effort, and permission mode from the composer. Their streaming text, thoughts, tool calls, permission prompts, diffs, and terminals all flow through Caret's UI, with a second account per provider when you need one. Caret drives the vendor's own CLI; it never replays a subscription token against a vendor API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto routing:&lt;/strong&gt; Pick "Auto" as the model and a managed Lynkr sidecar scores every request and routes it to one of your own models per tier (SIMPLE → REASONING), with session pins and fallback climbing. Every reply shows &lt;code&gt;Auto → model · TIER&lt;/code&gt;. It is routing among the keys you configured, not a hosted proxy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Safety is a first-class feature&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Command safety and sandbox:&lt;/strong&gt; Every agent shell command is parsed (POSIX shell AST, including nested &lt;code&gt;sh -c&lt;/code&gt; / &lt;code&gt;eval&lt;/code&gt; / &lt;code&gt;$( )&lt;/code&gt;) and classified below the model — safe / caution / destructive / blocked, with labels. Destructive commands always ask, blocked ones never run. Approved commands run under macOS Seatbelt / Linux bubblewrap (writes limited to workspace + temp + caches, credential folders unreadable, optional no-network). MCP tool-description pinning re-approves tools that silently change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permission modes:&lt;/strong&gt; Supervised, Auto-accept edits, Auto, and Full access — set per thread, per project, and capped for a whole team.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Threads for long agent sessions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pin, snooze with a wake time, settle finished work, and archive with a five-second Undo. The list folds into Working, Pinned, day buckets, Snoozed, and Settled, and can group by project across every workspace. Message search covers every session on disk.&lt;/li&gt;
&lt;li&gt;While a turn runs you can queue a follow-up, or steer the running turn with Alt+Enter. Cmd+Shift+Enter sends the draft to a new thread in the background.&lt;/li&gt;
&lt;li&gt;Fork from any message, hand a thread to another agent or model with a budgeted context transfer, or send one prompt to several models at once and read the answers side by side, each in its own thread and, if you like, its own git worktree. Desktop notifications fire when a thread finishes, fails, needs an approval, or asks a question.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Usage, and driving Caret from the outside&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Usage page:&lt;/strong&gt; A local ledger records tokens and cost for every request Caret makes — agent turns, inline edits, Tab, review, commit messages — plus the histories your other agents keep on disk (Claude Code, Codex including its rate-limit windows, and OpenCode), read-only, so you see what a week actually cost across all of them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caret as an MCP server:&lt;/strong&gt; On loopback with a bearer token, any connected agent gets tools to create threads, send work, wait for the reply, read transcripts, and resolve approvals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;caret serve&lt;/code&gt;:&lt;/strong&gt; Puts the whole editor in a browser on your LAN or over Tailscale. The Mac keeps running everything; browsers pair once with a six-digit code and hold a revocable token.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cursor compatibility:&lt;/strong&gt; Reads &lt;code&gt;.cursor/rules&lt;/code&gt;, &lt;code&gt;.cursor/mcp.json&lt;/code&gt;, &lt;code&gt;.cursor/hooks.json&lt;/code&gt;, &lt;code&gt;.cursor/commands&lt;/code&gt;, &lt;code&gt;.cursor/skills&lt;/code&gt;, &lt;code&gt;.cursor/agents&lt;/code&gt;, &lt;code&gt;.cursorignore&lt;/code&gt;, and &lt;code&gt;.cursorindexingignore&lt;/code&gt;, so existing Cursor projects work unchanged.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Install
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/Fast-Editor/Caret/main/scripts/install.sh &lt;span class="o"&gt;|&lt;/span&gt; sh
&lt;span class="c"&gt;# or, with Homebrew 7+&lt;/span&gt;
brew tap fast-editor/caret &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; brew trust fast-editor/caret &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; brew install --cask caret
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows (&lt;code&gt;.msi&lt;/code&gt; / &lt;code&gt;-setup.exe&lt;/code&gt;) and Linux (&lt;code&gt;.deb&lt;/code&gt;, &lt;code&gt;.rpm&lt;/code&gt;, &lt;code&gt;.AppImage&lt;/code&gt;) installers are attached to every release. The app updates itself in place after that: Settings → About → Check for updates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest caveats
&lt;/h3&gt;

&lt;p&gt;No VS Code extension marketplace yet — language support is the built-in LSP client, debugging is DAP, and tools come from MCP and ACP. Builds are ad-hoc signed until a Developer ID is configured, so a browser-downloaded DMG needs &lt;code&gt;xattr -dr com.apple.quarantine&lt;/code&gt; once (the install script and Homebrew cask handle it). Windows and Linux installers are built by the same workflow as macOS and have had far less runtime testing. No voice input, no computer use, no hosted cloud agents, and no phone app — remote access is a browser over your own network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Developers who want a full AI editor they can inspect, fork, and run entirely on their own keys — and who care about memory, startup time, and not paying a middleman for their own models.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Cursor — Best AI-first editor (paid)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Free (limited); Plus $8/month (Grok models only); Premium $30/month; Super $100/month; Ultra $200/month. Teams from $30/user/month.&lt;br&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; A VS Code fork built around AI agents, with Tab completion, chat, background agents, and AI code review in one editor.&lt;/p&gt;

&lt;p&gt;Cursor is still the daily-velocity benchmark for full-stack developers: ultra-low-latency Tab predictions, multi-file Composer agents, seamless model switching, cloud agents, and Bugbot code review. Most VS Code extensions and shortcuts carry over.&lt;/p&gt;

&lt;p&gt;Two 2026 changes to know before you pay: SpaceX completed its acquisition of Cursor on 14 August 2026, and Cursor's pricing changed in October 2026 — the old $20 Pro plan is now legacy, and the $8 Plus plan only includes Grok models. Claude, GPT, and Gemini models in Cursor are billed separately at API list price from Premium up. OpenAI also said it would stop supplying its models to Cursor in November 2026.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Developers who want AI built into the editor and are happy to pay for it — and who are comfortable with Grok as the included model, or with paying API rates for third-party models.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Visual Studio Code + GitHub Copilot — Best default
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; VS Code is free. Copilot Free gives 2,000 completions a month plus limited chat and agent use. Copilot Pro is $10/month, Pro+ $39/month, Max $100/month.&lt;br&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; The editor most developers already use, with the assistant that lives where the code already lives.&lt;/p&gt;

&lt;p&gt;VS Code was used regularly by 75.9% of developers in the Stack Overflow 2026 survey — still the safest starting point for polyglot work, web projects, and teams. Free for private and commercial use, cross-platform, with the largest extension ecosystem, LSP, debugging, tasks, Git, and SSH / containers / WSL remote development.&lt;/p&gt;

&lt;p&gt;Copilot is now built in: completions, chat, agent mode, and a cloud agent that opens pull requests. It also runs across Visual Studio, JetBrains IDEs, Xcode, Neovim, Eclipse, and Zed — and Claude Code and OpenAI Codex both run inside VS Code too, so you can switch agents without switching editors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Teams, polyglot developers, and anyone who does not want to standardise on one editor or one AI vendor.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Zed — Best fast, open-source editor
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Personal plan free; Pro $10/month; Business $30/seat/month.&lt;br&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; An open-source editor written in Rust with its own GPU-rendered UI.&lt;/p&gt;

&lt;p&gt;Zed starts and scrolls noticeably faster than Electron-based editors, and it has built-in real-time collaboration. It supports many languages built in (Rust, Go, TypeScript, Python, C/C++, and more) plus extensions, and its AI panel works with your own API keys (Anthropic, OpenAI, Google, and others) or external agents such as Claude Agent and Codex CLI. It can import VS Code, JetBrains, Sublime Text, and Vim keymaps.&lt;/p&gt;

&lt;p&gt;The trade-off is the extension catalog: it is growing, but it is not VS Code's. If speed, collaboration, and openness matter more than a huge extension catalog, Zed is the pick — it had the highest loyalty (57.3% admired) of any widely used AI editor in the Stack Overflow 2026 survey.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Speed-first developers, pair programmers, and anyone who wants a Rust-native editor with bring-your-own-key AI.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. JetBrains IDEs — Best for large, single-language codebases
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Core features free; IntelliJ IDEA Ultimate personal is $199 in the first year, $159 in the second, $119 from the third. JetBrains AI Free is included with Ultimate; AI Pro is a $100/year add-on for individuals.&lt;br&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; IntelliJ IDEA, PyCharm, and the other JetBrains IDEs — the deepest language tooling, especially for Java, Kotlin, and Python.&lt;/p&gt;

&lt;p&gt;No editor in this list refactors as safely as a JetBrains IDE: semantic rename, structural search, framework-aware completion, inspections, and integrated debugging and test running are daily work, not plugins. Junie, JetBrains' agent, brings bring-your-own-key model choice into that IDE, with the same depth of codebase understanding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; A large Java, Kotlin, Python, PHP, JavaScript/TypeScript, Go, Ruby, C/C++, .NET, or Rust codebase where safe refactoring matters more than a light install.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. Google Antigravity — Best free agent-first platform
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Free for individuals with a weekly quota; Google AI Pro $19.99/month; Ultra $99.99 or $199.99/month.&lt;br&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; Google's agent-first development platform — a desktop app, an IDE, a terminal CLI (&lt;code&gt;agy&lt;/code&gt;), editor extensions, and a Python SDK, all sharing one agent harness.&lt;/p&gt;

&lt;p&gt;Antigravity is not just an editor. Agents plan, edit code, run the terminal, and drive a browser, and report through artifacts: implementation plans, diffs, screenshots, and browser recordings you can comment on. It runs several agents in parallel, supports MCP servers, and its permission engine — Deny, Ask, and Allow lists with a no-network sandbox by default — is one of the clearer ones in this field. Models are Gemini-led, with select third-party models on paid plans.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Google Cloud customers, and developers who want the most generous free agent option and are happy to live inside Google's model family.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Devin Desktop (formerly Windsurf) — Best for running local + cloud agents together
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Free (light agent quota); Pro $20/month; Max $200/month.&lt;br&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; Cognition's AI code editor — the IDE called Windsurf until 2 June 2026, rebuilt so its main screen is a board of local and cloud agent sessions.&lt;/p&gt;

&lt;p&gt;Devin Desktop opens on an Agent Command Center, a view for starting, watching, and reviewing several coding agents, with the full Windsurf IDE still underneath. Devin Local is now the main local agent (Cascade is legacy), with subagents, ACP for outside agents, and cloud handoff to Devin Cloud — a session that keeps going on its own VM after you close your laptop. Tab completions and inline edits are unlimited on all listed self-serve plans.&lt;/p&gt;

&lt;p&gt;Billing changed in March 2026 to daily and weekly usage quotas instead of monthly credits, so long agent sessions on frontier models use quota up fast — the main thing to watch before you pay.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Developers who want local and cloud agents in one editor and do not need a perfectly predictable monthly bill.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to choose in 2027
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If you want…&lt;/th&gt;
&lt;th&gt;Pick&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;One window for all your agents, on desktop and phone&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;T3 Code (#1)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A full AI editor you own — open source, BYOK, no Electron&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Caret (#2)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The fastest AI-first editor, and you will pay for it&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Cursor (#3)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The safest default, with any agent, for any team&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;VS Code + Copilot (#4)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Raw speed and collaboration, open source&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Zed (#5)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The deepest refactoring for one big language&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;JetBrains (#6)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The most generous free agent platform&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Antigravity (#7)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local + cloud agents on one board&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Devin Desktop (#8)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My own setup for 2027 would be T3 Code for orchestrating agents, Caret as the daily editor when I want the agent inside the code I am reading, and VS Code kept around for the one extension or remote workflow nothing else does yet. That is the point of this list: in 2027, the best setup is rarely one editor. It is one control plane, one editor you trust, and the freedom to swap the model underneath both.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed in 2026 — and why this list looks different
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windsurf became Devin Desktop&lt;/strong&gt; (2 June 2026, Cognition).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SpaceX acquired Cursor&lt;/strong&gt; (14 August 2026), and Cursor's pricing moved to Grok-only at $8/month, Premium at $30/month.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google moved individual Gemini CLI / Code Assist users to Antigravity&lt;/strong&gt; (June 2026).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-source control planes went mainstream:&lt;/strong&gt; T3 Code passed tens of thousands of GitHub stars in months, and Caret shipped a full Cursor-class editor on Rust/Tauri 2 with no Electron.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing moved to usage:&lt;/strong&gt; Copilot, Cursor, and Devin Desktop all now bill agent work by credits or daily/weekly quota, not just a flat seat. The editor is often free; the agent work is what you pay for.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Prices, quotas, and model availability in this article were checked in November 2026. If you are reading this in 2027, re-check the vendor page before you commit — and try the free tier of your top two before you pay for either.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What is your editor for 2027? Tell me in the comments — especially if you have tried T3 Code or Caret and found something this list missed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sources checked November 2026:&lt;/strong&gt; Caret README and v0.2.0 tour, T3 Code README, and November 2026 comparisons of AI coding tools and IDEs — &lt;a href="https://www.infyways.com/best-ai-coding-tools/" rel="noopener noreferrer"&gt;https://www.infyways.com/best-ai-coding-tools/&lt;/a&gt; · &lt;a href="https://reverbico.com/blog/best-ai-coding-assistants/" rel="noopener noreferrer"&gt;https://reverbico.com/blog/best-ai-coding-assistants/&lt;/a&gt; · &lt;a href="https://devhunt.org/blog/comparing-popular-ide-tools-for-developers" rel="noopener noreferrer"&gt;https://devhunt.org/blog/comparing-popular-ide-tools-for-developers&lt;/a&gt; · &lt;a href="https://theairankings.com/best-ai-ide/" rel="noopener noreferrer"&gt;https://theairankings.com/best-ai-ide/&lt;/a&gt; · &lt;a href="https://fastero.com/blog/google-antigravity" rel="noopener noreferrer"&gt;https://fastero.com/blog/google-antigravity&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Caret: an open-source Cursor class AI code editor</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Tue, 10 Nov 2026 03:35:07 +0000</pubDate>
      <link>https://dev.to/lynkr/caret-an-open-source-cursor-class-ai-code-editor-54fe</link>
      <guid>https://dev.to/lynkr/caret-an-open-source-cursor-class-ai-code-editor-54fe</guid>
      <description>&lt;p&gt;I wanted the Cursor experience without shipping a second copy of Chromium and without a monthly fee for routing my own API keys through somebody else's server. So I built Caret: an AI code editor with a Rust core, a React and Monaco front end running in the operating system's WebView, and every model call going straight from your machine to the provider you picked.&lt;/p&gt;

&lt;p&gt;Version 0.2.0 shipped this week. This post is the tour: what Caret does, how it is built, what it still cannot do, and how to install it. Everything below is in the public repository under the MIT license: &lt;a href="https://github.com/Fast-Editor/Caret" rel="noopener noreferrer"&gt;github.com/Fast-Editor/Caret&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not fork VS Code
&lt;/h2&gt;

&lt;p&gt;Every serious AI editor today is a VS Code fork, which means an Electron app: a bundled Chromium, a Node runtime, and a baseline of a few hundred megabytes before you open a file. That is a reasonable trade for a company with a cloud backend to sell. It is a poor one for a tool whose whole pitch is "your keys, your machine".&lt;/p&gt;

&lt;p&gt;Caret is a Tauri 2 application. The core is one Rust process with tokio and mimalloc. The UI is React 19, Monaco and xterm, rendered by WKWebView on macOS, WebView2 on Windows and WebKitGTK on Linux. There is no Node at run time and no extension host process.&lt;/p&gt;

&lt;p&gt;Measured on a release build (the method is in &lt;a href="https://caret-ochre.vercel.app/docs/performance" rel="noopener noreferrer"&gt;docs/PERFORMANCE.md&lt;/a&gt;):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Measurement&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Rust core, idle with a workspace open&lt;/td&gt;
&lt;td&gt;about 110 MB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;First paint&lt;/td&gt;
&lt;td&gt;about 330 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Quick Open&lt;/td&gt;
&lt;td&gt;8 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Project-wide search&lt;/td&gt;
&lt;td&gt;33 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hybrid codebase search (BM25 plus embeddings)&lt;/td&gt;
&lt;td&gt;82 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;One honest caveat: the whole process family, including the WebKit content process, is about 490 MB with a TypeScript file and a terminal open, against about 393 MB for Cursor idle on the same machine. The Rust side is small; the system WebView is not free. The plan for closing that gap is in the same document.&lt;/p&gt;

&lt;h2&gt;
  
  
  The editor you expect
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6l3qv2hmvuv1nobe3m6i.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6l3qv2hmvuv1nobe3m6i.jpg" alt="Caret with a file open and the agent pane" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Caret is a real editor first. Monaco with split groups, a diff editor, breadcrumbs and an outline. A lean Language Server Protocol client for TypeScript, Rust, Python, Go, C and C++, Java and others. A Debug Adapter Protocol client with breakpoints, stepping, variables, a watch list and a debug console for Node, TypeScript and Python, reading your existing &lt;code&gt;launch.json&lt;/code&gt;. Source control with a commit UI, branches, stashes, worktrees, blame and a Bugbot-style review of the working tree, a branch or a commit.&lt;/p&gt;

&lt;p&gt;The terminal is the piece I ended up enjoying most. It understands command boundaries, so output is grouped into blocks with exit status. File paths in output are clickable and open at the right line. Ghost-text suggestions come from your history and the model. A failed command gets a fix-it chip. History persists across sessions and you can search it in plain English.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tab and inline edit
&lt;/h2&gt;

&lt;p&gt;Tab gives multi-line ghost-text completions from any configured model, with partial accept and next-edit prediction. It reads your recent edits, open files and diagnostics for context, and it extends the language server's own suggestion instead of fighting it, so the LSP popup and the ghost text agree.&lt;/p&gt;

&lt;p&gt;Cmd+K is inline edit: describe the change, watch a streaming diff appear in place, accept or reject. The same gesture in the terminal turns plain English into a shell command.&lt;/p&gt;

&lt;h2&gt;
  
  
  The agent, and what keeps it honest
&lt;/h2&gt;

&lt;p&gt;The agent pane has Agent, Ask, Plan and Debug modes with streaming tool calls, checkpoints per turn, per-file review, queued messages, context summarisation and a live cost readout. Rules come from &lt;code&gt;.caret&lt;/code&gt; files, &lt;code&gt;.cursorrules&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt; and &lt;code&gt;CLAUDE.md&lt;/code&gt;; there are memories, hooks, slash commands, skills and subagents. MCP servers connect over stdio or streamable HTTP from &lt;code&gt;.caret/mcp.json&lt;/code&gt; or Cursor's own config.&lt;/p&gt;

&lt;p&gt;Two things make it different from the agents I had used before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verified diffs.&lt;/strong&gt; After a turn, Caret runs the project's checks before you accept: build, tests, lint, type-check, whatever it detects. The result shows up as a risk tier next to the change set with the evidence attached. You stop reading "I ran the tests" in a chat bubble and start seeing the exit code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A shell classifier in front of every command.&lt;/strong&gt; Every command an agent wants to run is parsed into segments and classified before anything executes. Blocked and denylisted commands never run. Destructive ones, like a recursive delete or a &lt;code&gt;git clean&lt;/code&gt;, always ask, and the approval card shows which segment is the dangerous one and why. Everything else runs inside the macOS Seatbelt or Linux bubblewrap sandbox with the workspace writable and the rest of your home read-only. This applies to external agents too: a command that Claude Code or Codex runs through a Caret terminal goes through the same gate.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5p3gkyldjeiukujrc1yv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5p3gkyldjeiukujrc1yv.jpg" alt="Permission modes in the composer" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Permission modes sit on top of the classifier. Supervised asks for everything. Auto-accept edits applies edits inside the workspace. Auto lets the classifier decide and still stops on destructive commands. Full access runs everything except what is blocked. You pick a mode per thread from the composer, set a default in settings, and a project can cap the mode in its own &lt;code&gt;.caret/settings.json&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bring your own keys, or your own subscription
&lt;/h2&gt;

&lt;p&gt;Caret talks directly to Anthropic, OpenAI, Google, OpenRouter, Ollama, LM Studio, vLLM and any OpenAI-compatible endpoint. Keys live in a local JSON file and never leave your machine except in the request to the provider you chose. Local models work fully offline for chat, Tab and embeddings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvd0ufgicvzwgkr685vcu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvd0ufgicvzwgkr685vcu.jpg" alt="Settings, Agents: Cursor and Grok Build with their sign-in state" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you already pay for Claude Code, a ChatGPT plan with Codex, Cursor or Grok, you can drive those agents from inside Caret through the Agent Client Protocol. Claude Code, Codex, Cursor, Grok Build, Gemini CLI, OpenCode and Pi each run as a local process with their own login. Their text, tool calls, permission prompts, diffs and terminals flow through Caret's UI. Settings shows the signed-in state read from each vendor's CLI, a Sign in button that runs the vendor's login in a Caret terminal, and Add account for a second Codex, Claude or Grok account with its own config home.&lt;/p&gt;

&lt;p&gt;The rule that does not change: Caret drives the vendor's own CLI. It never replays a subscription token against a vendor API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Auto routing
&lt;/h2&gt;

&lt;p&gt;Pick "Auto" as the model and a managed Lynkr sidecar scores each request and routes it to one of your own models per tier, with session pins and fallback. Every reply shows which model answered. It is routing among the keys you configured, not a hosted proxy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Threads for long agent sessions
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnrq34hzm57uqmcy8kx3c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnrq34hzm57uqmcy8kx3c.jpg" alt="The thread list with Pinned, Snoozed and Settled sections and the Snooze menu" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Agent sessions are not chats; they are work items that run for a while. 0.2.0 treats them that way. Pin, snooze with a wake time, settle finished work, archive with a five-second Undo. The list folds into Working, Pinned, day buckets, Snoozed and Settled, and can group by project across every workspace. Message search covers every session on disk.&lt;/p&gt;

&lt;p&gt;While a turn runs you can queue a follow-up, or steer the running turn with Alt+Enter so the message lands before the agent's next step. Cmd+Shift+Enter sends the draft to a new thread in the background. Queued messages are editable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyhss2pzscdtra4bcth3q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fyhss2pzscdtra4bcth3q.jpg" alt="Three models answering the same prompt side by side" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can fork from any message, hand a thread to another agent or model with a budgeted context transfer, or send one prompt to several models at once and read the answers side by side, each in its own thread and, if you like, its own git worktree. Worktrees have branch templates and cleanup policies. Scratch threads start in a throwaway repository and can become a project later. Desktop notifications fire when a thread finishes, fails, needs an approval or asks a question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage, across everything
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmybgnetq0uqxlaauuums.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmybgnetq0uqxlaauuums.jpg" alt="Settings, Usage" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A local ledger records tokens and cost for every request Caret makes: agent turns, inline edits, Tab, review, commit messages. The Usage page adds the histories your other agents keep on disk, Claude Code, Codex (including its rate-limit windows) and OpenCode, read-only, so you see what a week actually cost across all of them. Unknown models get a price editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Driving Caret from the outside
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnrfqdp0raw608s4nruun.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnrfqdp0raw608s4nruun.jpg" alt="Settings, MCP: Caret as an MCP server" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Caret can act as an MCP server on loopback with a bearer token. Any connected agent, Claude Code in a terminal for example, gets tools to create threads, send work, wait for the reply, read transcripts, and resolve approvals, with each thread running on whichever provider or external agent you configured. Settings prints the one-line configs for Claude Code, Codex and Cursor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmwyhry97ex3cjge06u7e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmwyhry97ex3cjge06u7e.jpg" alt="Settings, Remote" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;caret serve&lt;/code&gt; puts the whole editor in a browser on your LAN or over Tailscale. The Mac keeps running everything; the browser loads the same bundle with a shim that relays every command through the desktop webview over an authenticated WebSocket, so nothing is reimplemented. Browsers pair once with a six-digit code and hold a revocable token.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it is built
&lt;/h2&gt;

&lt;p&gt;The repository is a single Tauri 2 app. The Rust side is organised by domain: &lt;code&gt;ai&lt;/code&gt; (providers, the agent runner, tools, the router), &lt;code&gt;acp&lt;/code&gt; (the Agent Client Protocol client and bridge), &lt;code&gt;sandbox&lt;/code&gt; (the classifier and the Seatbelt and bubblewrap wrappers), &lt;code&gt;verify&lt;/code&gt; (the diff verification engine), &lt;code&gt;index&lt;/code&gt; (a tantivy index plus optional embeddings), &lt;code&gt;core&lt;/code&gt; (filesystem, git through libgit2, pty, settings, sessions), &lt;code&gt;mcp&lt;/code&gt;, &lt;code&gt;debug&lt;/code&gt;, &lt;code&gt;orchestrator&lt;/code&gt; and &lt;code&gt;remote&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The contract between the two halves is deliberately boring. Every Tauri command is &lt;code&gt;domain_action&lt;/code&gt; in snake_case with a TypeScript wrapper in one file, every struct that crosses the boundary is a serde type mirrored one to one in &lt;code&gt;src/types.ts&lt;/code&gt;, streams use Tauri channels, and low-frequency broadcasts are named events. UI modules talk to each other only through a command registry and a small bus. That discipline is what made it possible to build the remote mode as a transport shim rather than a second client.&lt;/p&gt;

&lt;p&gt;There are close to six hundred automated tests across cargo and vitest, and the agent core runs headless, which is how the orchestrator and remote servers are tested end to end over real HTTP and WebSockets.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is not there yet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No VS Code extension marketplace. Language support is the built-in LSP client, debugging is DAP, tools come from MCP and ACP. An extension host without Chromium is planned, not built.&lt;/li&gt;
&lt;li&gt;Builds are ad-hoc signed until a Developer ID is configured, so a browser-downloaded DMG needs &lt;code&gt;xattr -dr com.apple.quarantine&lt;/code&gt; once. The install script and the Homebrew cask handle it.&lt;/li&gt;
&lt;li&gt;Windows and Linux installers are built by the same workflow as macOS and have had far less runtime testing.&lt;/li&gt;
&lt;li&gt;No voice input, no computer use, no hosted cloud agents, no phone app. Remote access is a browser over your own network.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;macOS one-liner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://caret-ochre.vercel.app/install.sh &lt;span class="o"&gt;|&lt;/span&gt; sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Homebrew (Homebrew 7 asks you to trust a third-party tap once):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap fast-editor/caret
brew trust fast-editor/caret
brew install --cask caret
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows and Linux installers, plus winget, scoop, AUR and Nix manifests, are on the &lt;a href="https://caret-ochre.vercel.app/download" rel="noopener noreferrer"&gt;download page&lt;/a&gt;. The app updates itself in place after that.&lt;/p&gt;

&lt;p&gt;If you are weighing it against the editors you know, there is a feature-by-feature &lt;a href="https://caret-ochre.vercel.app/compare" rel="noopener noreferrer"&gt;comparison with T3 Code and Cursor&lt;/a&gt;, and the &lt;a href="https://caret-ochre.vercel.app/docs" rel="noopener noreferrer"&gt;docs&lt;/a&gt; are rendered from the same Markdown that ships in the repository.&lt;/p&gt;

&lt;p&gt;Issues, ideas and pull requests: &lt;a href="https://github.com/Fast-Editor/Caret" rel="noopener noreferrer"&gt;github.com/Fast-Editor/Caret&lt;/a&gt;. I read all of them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How I Built a Free OpenAI-Compatible API on Top of OpenCode</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Wed, 09 Sep 2026 05:58:16 +0000</pubDate>
      <link>https://dev.to/lynkr/how-i-built-a-free-openai-compatible-api-on-top-of-opencode-67a</link>
      <guid>https://dev.to/lynkr/how-i-built-a-free-openai-compatible-api-on-top-of-opencode-67a</guid>
      <description>&lt;p&gt;&lt;em&gt;One command, zero API keys, and a surprising amount of protocol translation.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;I kept reaching for an LLM API for the small stuff — renaming sessions, summarizing compaction output, little throwaway scripts, glue code in automation. Paying per-token for that felt silly, and the free tiers out there all wanted signups, keys, and dashboards.&lt;/p&gt;

&lt;p&gt;Meanwhile, OpenCode had quietly shipped a free-tier model (&lt;code&gt;muse-spark-1.3-contributor-free&lt;/code&gt;). The catch: it was only reachable through the OpenCode CLI. There was no HTTP API for it that my other tools could talk to.&lt;/p&gt;

&lt;p&gt;So I built the missing piece: &lt;strong&gt;OpenCode-Wrap&lt;/strong&gt;, a small server that puts an OpenAI-compatible API in front of &lt;code&gt;opencode serve&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core idea
&lt;/h2&gt;

&lt;p&gt;Everything in the LLM tooling world speaks one protocol: OpenAI's &lt;code&gt;/v1/chat/completions&lt;/code&gt;. If I could translate that protocol to whatever &lt;code&gt;opencode serve&lt;/code&gt; speaks, then overnight, every script, agent framework, and coding tool I own would gain a free backend.&lt;/p&gt;

&lt;p&gt;The architecture is dead simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;caller → OpenCode-Wrap (:8000/v1) → opencode serve (:4100) → free model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The wrapper is a single Node process, zero npm dependencies, and it reuses the auth your &lt;code&gt;opencode&lt;/code&gt; CLI already has. No API key to manage, no config to write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx opencode-wrap
&lt;span class="c"&gt;# -&amp;gt; OpenAI-compatible API at http://127.0.0.1:8000/v1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If no &lt;code&gt;opencode serve&lt;/code&gt; is reachable, it spawns its own on &lt;code&gt;:4100&lt;/code&gt; automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Translating the protocols
&lt;/h2&gt;

&lt;p&gt;This is where the real work lives. OpenAI's chat-completions format and opencode's session/event model are shaped differently, so every request goes through a translation layer:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Sessions are per-request.&lt;/strong&gt; The wrapper is stateless — each incoming request creates a fresh opencode session, replays the full message history into it, and deletes the session when done. It's a little wasteful on paper, but it makes the server trivially simple and crash-safe: there's no session state to corrupt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Streaming is real streaming.&lt;/strong&gt; When &lt;code&gt;stream: true&lt;/code&gt; comes in, backend &lt;code&gt;message.part.delta&lt;/code&gt; events are forwarded as OpenAI SSE chunks the moment they arrive — no buffering the whole response first. If the event bus is unreachable, it falls back to buffered replay, and if the backend dies mid-stream (headers already sent), the failure is delivered in-band as an &lt;code&gt;error&lt;/code&gt; chunk. That last case was a fun edge: you can't change the HTTP status after streaming starts, so the error has to ride inside the stream.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Tool calling is the fiddliest part.&lt;/strong&gt; &lt;code&gt;opencode serve&lt;/code&gt; has no custom-tool passthrough, so caller-supplied tools get translated via instruction injection plus &lt;code&gt;tool_call&lt;/code&gt; fence parsing — the wrapper tells the model about the available tools in the prompt, then parses the fenced tool calls out of the response and returns them as proper OpenAI &lt;code&gt;tool_calls&lt;/code&gt;. Opencode-native tools (bash/read/edit) just execute server-side automatically. One behavioral quirk worth knowing: under &lt;code&gt;tool_choice: auto&lt;/code&gt; the model sometimes answers from knowledge instead of calling the tool — use &lt;code&gt;required&lt;/code&gt; or a named tool to force it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Errors are OpenAI-shaped.&lt;/strong&gt; The free tier flakes — transient 500s happen. The wrapper retries those 3x with backoff on fresh sessions, and persistent failures surface as &lt;code&gt;429&lt;/code&gt; (rate-limited) or &lt;code&gt;502&lt;/code&gt; (bad gateway) so callers can apply their own retry/cascade logic without learning a new error vocabulary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Small kindnesses.&lt;/strong&gt; Model IDs get trimmed and aliased (&lt;code&gt;wrap/muse-spark-free&lt;/code&gt; and friends fall back to the backend model with a log line), explicit &lt;code&gt;opencode/&amp;lt;id&amp;gt;&lt;/code&gt; typos fail fast with HTTP 400 plus a suggestion, and empty contentless turns are retried on a fresh session instead of being served as a confusing &lt;code&gt;stop&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it fits in my stack
&lt;/h2&gt;

&lt;p&gt;I also built Lynkr, an LLM gateway for stretching subscriptions across providers. OpenCode-Wrap slots into it two ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Point Lynkr at &lt;code&gt;http://127.0.0.1:8000/v1&lt;/code&gt; as a generic OpenAI endpoint, and the free model becomes just another provider in the routing tier.&lt;/li&gt;
&lt;li&gt;Or skip the gateway for chores: my &lt;code&gt;opencode.jsonc&lt;/code&gt; defines a direct &lt;code&gt;wrap&lt;/code&gt; provider and sets it as &lt;code&gt;small_model&lt;/code&gt;, so session titles and compaction go straight to the free backend while the main model stays on Lynkr routing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That second pattern is my favorite — the boring background work costs literally nothing now.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fair-use part
&lt;/h2&gt;

&lt;p&gt;This sits in front of a shared free-tier backend, so the wrapper is opinionated about being a good citizen: personal/light use only, it backs off and returns &lt;code&gt;429&lt;/code&gt; when the backend says slow down, request bodies are capped at 8MB, and it reuses your CLI credentials — so localhost only, never expose it to a network you don't trust.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd do differently
&lt;/h2&gt;

&lt;p&gt;Honestly? The per-request session replay is the obvious inefficiency. A session pool with incremental history would cut latency for chatty workloads. But it would also add exactly the kind of stateful complexity that makes 2am debugging miserable, and for personal use the replay cost is negligible. Simple won.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx opencode-wrap

curl http://127.0.0.1:8000/v1/chat/completions &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"model":"opencode/muse-spark-1.3-contributor-free",
       "messages":[{"role":"user","content":"Explain closures in one paragraph."}]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/Fast-Editor/OpenCode-Wrap" rel="noopener noreferrer"&gt;https://github.com/Fast-Editor/OpenCode-Wrap&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you build something on it, I'd love to hear what you wired it into.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>llm</category>
      <category>openai</category>
    </item>
    <item>
      <title>LLM Inference Is Reinventing the Operating System</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Fri, 04 Sep 2026 22:54:56 +0000</pubDate>
      <link>https://dev.to/lynkr/llm-inference-is-reinventing-the-operating-system-10a2</link>
      <guid>https://dev.to/lynkr/llm-inference-is-reinventing-the-operating-system-10a2</guid>
      <description>&lt;p&gt;Operating systems solved a problem decades ago:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do you make a limited amount of fast memory appear much larger to applications?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;LLM inference is now facing a surprisingly similar problem.&lt;/p&gt;

&lt;p&gt;Except instead of CPU processes and memory pages, we have &lt;strong&gt;inference requests and KV-cache blocks&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CPU → RAM → Disk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we increasingly have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU HBM → CPU DRAM → NVMe → Remote Memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And instead of simply executing instructions, the system must continuously decide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What state should stay in GPU memory?&lt;/li&gt;
&lt;li&gt;What can be shared?&lt;/li&gt;
&lt;li&gt;What should be evicted?&lt;/li&gt;
&lt;li&gt;What should be prefetched?&lt;/li&gt;
&lt;li&gt;Which request should run next?&lt;/li&gt;
&lt;li&gt;Where should its state live?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is how LLM inference is turning into an operating-system problem.&lt;/p&gt;




&lt;h1&gt;
  
  
  1. The KV Cache Turns Inference Into a Memory-Management Problem
&lt;/h1&gt;

&lt;p&gt;To understand everything else, we first need to understand the &lt;strong&gt;KV cache&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Transformers use self-attention.&lt;/p&gt;

&lt;p&gt;For every token, attention produces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a Query (Q)&lt;/li&gt;
&lt;li&gt;a Key (K)&lt;/li&gt;
&lt;li&gt;a Value (V)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During autoregressive generation, previously generated tokens don't need to have their Keys and Values recomputed every time.&lt;/p&gt;

&lt;p&gt;So inference engines store them.&lt;/p&gt;

&lt;p&gt;That's the KV cache.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Token 1 → K1, V1
Token 2 → K2, V2
Token 3 → K3, V3
Token 4 → K4, V4
...
Token N → KN, VN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When generating token &lt;code&gt;N+1&lt;/code&gt;, the model can reuse:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;K1...KN
V1...VN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;instead of recomputing them.&lt;/p&gt;

&lt;p&gt;This dramatically reduces computation.&lt;/p&gt;

&lt;p&gt;But it creates a new problem:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The longer the context, the more memory the KV cache consumes.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A simplified KV-cache memory calculation is:&lt;/p&gt;

&lt;p&gt;Mₖᵥ = 2 × L × T × Hₖᵥ × D × B&lt;/p&gt;

&lt;p&gt;where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;(L) = number of transformer layers&lt;/li&gt;
&lt;li&gt;(T) = number of tokens&lt;/li&gt;
&lt;li&gt;(H_{KV}) = number of KV heads&lt;/li&gt;
&lt;li&gt;(D) = head dimension&lt;/li&gt;
&lt;li&gt;(B) = bytes per element&lt;/li&gt;
&lt;li&gt;2 = Key + Value&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice the important variable:&lt;/p&gt;

&lt;p&gt;Double the context length and you roughly double the KV memory.&lt;/p&gt;

&lt;p&gt;Now imagine thousands of simultaneous requests.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request A → 10K tokens
Request B → 50K tokens
Request C → 2K tokens
Request D → 100K tokens
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model weights may be static.&lt;/p&gt;

&lt;p&gt;The KV cache is &lt;strong&gt;dynamic memory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that is where the operating-system analogy begins.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. PagedAttention Turns KV Cache Into Pages
&lt;/h1&gt;

&lt;p&gt;A naive inference engine might allocate one large contiguous region of memory for every request.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU Memory

┌─────────┬─────────┬─────────┬─────────┐
│ Request │ Request │ Request │ Request │
│    A    │    B    │    C    │    D    │
└─────────┴─────────┴─────────┴─────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But requests don't behave nicely.&lt;/p&gt;

&lt;p&gt;Request A may finish.&lt;/p&gt;

&lt;p&gt;Request C may grow.&lt;/p&gt;

&lt;p&gt;Request D may be paused.&lt;/p&gt;

&lt;p&gt;A new request may arrive.&lt;/p&gt;

&lt;p&gt;Eventually memory becomes fragmented.&lt;/p&gt;

&lt;p&gt;You can have plenty of free memory but not enough contiguous memory for a large allocation.&lt;/p&gt;

&lt;p&gt;Operating systems solved a similar problem with &lt;strong&gt;paging&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of requiring a process to occupy one contiguous region:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Process A:

[A][A][A][A][A]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the OS divides it into pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[A0][A1][A2][A3][A4]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and stores those pages wherever free physical frames are available:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Physical memory:

[A0][C2][B1][A3][D4][A1][FREE][A2]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A page table maps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Virtual page → Physical frame
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modern LLM serving systems use a similar idea for KV cache.&lt;/p&gt;

&lt;p&gt;The KV cache is divided into blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request A:

[A0][A1][A2][A3][A4]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those blocks can be placed independently in GPU memory.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A0 → GPU block 17
A1 → GPU block 42
A2 → GPU block 5
A3 → GPU block 91
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The original vLLM/PagedAttention work explicitly uses the virtual-memory analogy to manage KV cache efficiently.&lt;/p&gt;

&lt;p&gt;The important idea is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Logical token state doesn't need to correspond to one contiguous physical memory region.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That single change makes KV memory dramatically easier to manage.&lt;/p&gt;




&lt;h1&gt;
  
  
  3. KV Cache Sharing Turns Into Shared Memory
&lt;/h1&gt;

&lt;p&gt;Now consider multiple requests with the same prefix.&lt;/p&gt;

&lt;p&gt;For example, thousands of users might send requests beginning with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are an expert financial analyst.

Here is the company's annual report:
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The beginning of every request is identical.&lt;/p&gt;

&lt;p&gt;Without sharing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request A:
[P][P][P][A]

Request B:
[P][P][P][B]

Request C:
[P][P][P][C]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same prefix is stored three times.&lt;/p&gt;

&lt;p&gt;That's wasteful.&lt;/p&gt;

&lt;p&gt;Instead, we can share the prefix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              ┌── Request A
              │
[P][P][P] ────┼── Request B
              │
              └── Request C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One physical set of KV blocks.&lt;/p&gt;

&lt;p&gt;Multiple logical requests.&lt;/p&gt;

&lt;p&gt;This is conceptually similar to &lt;strong&gt;shared memory&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It also resembles copy-on-write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Shared prefix
      │
 ┌────┼────┐
 A    B    C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As long as requests only read the shared blocks, they can reuse them.&lt;/p&gt;

&lt;p&gt;If they diverge, new blocks can be allocated.&lt;/p&gt;

&lt;p&gt;Systems such as SGLang's RadixAttention exploit prefix reuse to avoid recomputing common KV state.&lt;/p&gt;

&lt;p&gt;Now the inference runtime isn't simply asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"How much memory does this request need?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It can also ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"How much of this request can I reuse from memory I already have?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a much more sophisticated memory-management problem.&lt;/p&gt;




&lt;h1&gt;
  
  
  4. KV Eviction Turns Into a Cache-Management Problem
&lt;/h1&gt;

&lt;p&gt;GPU HBM is limited.&lt;/p&gt;

&lt;p&gt;Eventually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HBM

████████████████████
100% FULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Something must leave.&lt;/p&gt;

&lt;p&gt;This introduces &lt;strong&gt;KV-cache eviction&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Suppose we have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[A][B][C][D][E][F][G][H]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and a new request needs another block.&lt;/p&gt;

&lt;p&gt;Which one should we remove?&lt;/p&gt;

&lt;p&gt;Possible policies include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LRU
LFU
FIFO
TTL
Priority
Reuse probability
Cost-aware eviction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The simplest approach is something like LRU:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Evict the least recently used block.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But LLM workloads are more complicated.&lt;/p&gt;

&lt;p&gt;Imagine:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request A → active
Request B → paused
Request C → active
Request D → paused
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Request B might not have been used recently.&lt;/p&gt;

&lt;p&gt;But perhaps B is an agent waiting for a database query.&lt;/p&gt;

&lt;p&gt;In two seconds it may resume and need its entire KV history.&lt;/p&gt;

&lt;p&gt;So blindly evicting B could be expensive.&lt;/p&gt;

&lt;p&gt;There are now multiple possible costs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;KEEP
 ↓
consume valuable HBM

EVICT
 ↓
reload later

RECOMPUTE
 ↓
use GPU compute

TRANSFER
 ↓
move from another memory tier
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The runtime is therefore solving something like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
Bottleneck = min(Cₘₑₘₒᵣᵧ, Cᵣₑₗₒₐd, Cᵣₑcₒₘₚᵤₜₑ, Cₜᵣₐₙₛfₑᵣ)&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is no longer simply "run the neural network."&lt;/p&gt;

&lt;p&gt;It is &lt;strong&gt;cache management&lt;/strong&gt;.&lt;/p&gt;


&lt;h1&gt;
  
  
  5. Hierarchical KV Cache Creates a Memory Hierarchy
&lt;/h1&gt;

&lt;p&gt;Once HBM becomes insufficient, we need somewhere else to put KV state.&lt;/p&gt;

&lt;p&gt;Modern systems can increasingly use multiple memory tiers.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  GPU
                   │
             ┌─────▼─────┐
             │    HBM    │
             │   HOT     │
             └─────┬─────┘
                   │
             ┌─────▼─────┐
             │   DRAM    │
             │   WARM    │
             └─────┬─────┘
                   │
             ┌─────▼─────┐
             │   NVMe    │
             │   COLD    │
             └─────┬─────┘
                   │
             ┌─────▼──────┐
             │   Remote    │
             │   Storage   │
             └─────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This looks remarkably similar to a computer memory hierarchy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CPU cache
   ↓
RAM
   ↓
SSD
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Except now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU HBM
   ↓
CPU DRAM
   ↓
NVMe
   ↓
Network
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each level has different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;latency&lt;/li&gt;
&lt;li&gt;bandwidth&lt;/li&gt;
&lt;li&gt;capacity&lt;/li&gt;
&lt;li&gt;cost&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the runtime needs to decide:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Where should this KV block live?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hot blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HBM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Warm blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DRAM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cold blocks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NVMe / remote storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;SGLang's HiCache is an example of a system explicitly exploring multi-level KV-cache management.&lt;/p&gt;

&lt;p&gt;At this point, LLM inference is starting to look less like a simple GPU program and more like a &lt;strong&gt;memory hierarchy manager&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  6. KV Prefetching Turns Into an I/O Problem
&lt;/h1&gt;

&lt;p&gt;Moving KV state between memory tiers can be expensive.&lt;/p&gt;

&lt;p&gt;Suppose a request needs a block currently stored in CPU memory.&lt;/p&gt;

&lt;p&gt;A naive implementation does:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Need KV
   ↓
Request transfer
   ↓
Wait
   ↓
KV arrives
   ↓
Compute
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The GPU is waiting.&lt;/p&gt;

&lt;p&gt;A better system tries to predict what will be needed next.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;               COMPUTE
                  │
                  │
                  ▼
             ┌─────────┐
             │   GPU   │
             └────┬────┘
                  ▲
                  │
              PREFETCH
                  │
                  │
             ┌────┴────┐
             │  DRAM   │
             └─────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;While the GPU is computing, the runtime asynchronously moves future KV blocks closer.&lt;/p&gt;

&lt;p&gt;This is classic &lt;strong&gt;prefetching&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The objective is to hide:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
T_{memory}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;behind:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
T_{compute}&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Ideally:&lt;/p&gt;

&lt;p&gt;T_effective ≈ max(T_compute, T_memory)&lt;/p&gt;

&lt;p&gt;rather than:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;T_{effective}= T_{compute} + T_{memory}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modern inference research is actively exploring asynchronous KV-cache prefetching because memory movement increasingly becomes a bottleneck.&lt;/p&gt;

&lt;p&gt;The inference engine now needs to answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What will this request need next?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's a prediction problem.&lt;/p&gt;

&lt;p&gt;And prediction determines memory performance.&lt;/p&gt;




&lt;h1&gt;
  
  
  7. Cache-Aware Scheduling Turns Into an OS Scheduler Problem
&lt;/h1&gt;

&lt;p&gt;Traditional request scheduling might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Queue:

A
B
C
D
E
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The scheduler chooses which request runs next.&lt;/p&gt;

&lt;p&gt;But with KV caching, requests aren't independent.&lt;/p&gt;

&lt;p&gt;Suppose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A shares prefix with B
A shares nothing with C
A shares nothing with D
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A → B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;might be much more efficient than:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A → C → D → B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;because A and B can reuse the same KV state.&lt;/p&gt;

&lt;p&gt;So the scheduler now needs to consider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU utilization
+
request latency
+
batch size
+
KV residency
+
prefix reuse
+
memory pressure
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The scheduling problem becomes:&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
Choose(request)= f(latency,compute,memory,cache reuse)&lt;/p&gt;

&lt;p&gt;``&lt;/p&gt;

&lt;p&gt;This is very similar to an OS scheduler making decisions based on resource availability.&lt;/p&gt;

&lt;p&gt;But now the scheduler is also trying to maximize &lt;strong&gt;memory locality&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That's a major conceptual shift.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The inference scheduler isn't just scheduling compute. It's scheduling data locality.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h1&gt;
  
  
  8. Prefill/Decode Disaggregation Turns Into Resource Scheduling
&lt;/h1&gt;

&lt;p&gt;LLM inference has two very different phases.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prefill
&lt;/h2&gt;

&lt;p&gt;The model processes the user's prompt.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10,000 input tokens
        ↓
parallel processing
        ↓
KV cache generated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tends to be relatively compute-intensive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Decode
&lt;/h2&gt;

&lt;p&gt;The model generates output one token at a time:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Token 1
   ↓
Token 2
   ↓
Token 3
   ↓
Token 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Decode is much more sensitive to memory bandwidth and latency.&lt;/p&gt;

&lt;p&gt;So the same GPU is being asked to serve two fundamentally different workloads.&lt;/p&gt;

&lt;p&gt;This leads to &lt;strong&gt;prefill/decode disaggregation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                Requests
                    │
             ┌──────┴──────┐
             │             │
          PREFILL        DECODE
             │             │
             ▼             ▼
        GPU cluster    GPU cluster
             │             │
             └──────┬──────┘
                    │
                 KV state
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the system can optimize the two phases separately.&lt;/p&gt;

&lt;p&gt;You can dedicate resources to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prefill:
compute throughput
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Decode:
memory bandwidth
latency
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is another classic systems principle:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Different workloads should not necessarily compete for the same resource pool.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is similar to how operating systems and distributed systems isolate different classes of work.&lt;/p&gt;




&lt;h1&gt;
  
  
  9. Agentic Workloads Turn KV Management Into a Process-Lifetime Problem
&lt;/h1&gt;

&lt;p&gt;This is where things get really interesting.&lt;/p&gt;

&lt;p&gt;A normal chatbot looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Request
   ↓
LLM
   ↓
Response
   ↓
Done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An agent looks more like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM
 ↓
Tool call
 ↓
Wait
 ↓
LLM
 ↓
Database
 ↓
Wait
 ↓
LLM
 ↓
Browser
 ↓
LLM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The request can be inactive for seconds or minutes.&lt;/p&gt;

&lt;p&gt;But inactive does not mean finished.&lt;/p&gt;

&lt;p&gt;Suppose the agent has accumulated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;50,000 tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and is now waiting for a tool.&lt;/p&gt;

&lt;p&gt;Should we keep all 50K tokens in HBM?&lt;/p&gt;

&lt;p&gt;Maybe.&lt;/p&gt;

&lt;p&gt;But if thousands of agents are simultaneously waiting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent A → waiting
Agent B → waiting
Agent C → waiting
...
Agent 10,000 → waiting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we cannot keep everything in HBM.&lt;/p&gt;

&lt;p&gt;So we need to understand &lt;strong&gt;request lifetime&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This starts looking like process management.&lt;/p&gt;

&lt;p&gt;Traditional OS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RUNNING
   ↓
WAITING
   ↓
RUNNABLE
   ↓
RUNNING
   ↓
TERMINATED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GENERATING
   ↓
TOOL WAIT
   ↓
READY
   ↓
GENERATING
   ↓
TOOL WAIT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And memory policy now needs to understand those states.&lt;/p&gt;

&lt;p&gt;A request that is waiting might have a high probability of becoming active again.&lt;/p&gt;

&lt;p&gt;Therefore:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
P(\text{reuse soon})&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;becomes relevant to eviction.&lt;/p&gt;

&lt;p&gt;This is fundamentally different from simple LRU.&lt;/p&gt;

&lt;p&gt;Agentic AI is therefore pushing inference toward &lt;strong&gt;application-aware memory management&lt;/strong&gt;.&lt;/p&gt;


&lt;h1&gt;
  
  
  10. Distributed KV Turns Inference Into a Distributed Operating System
&lt;/h1&gt;

&lt;p&gt;Now scale beyond one GPU.&lt;/p&gt;

&lt;p&gt;A production system may have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU 0 ─── GPU 1
 │          │
 │          │
GPU 2 ─── GPU 3
      │
      │
   CPU RAM
      │
      │
   Network
      │
      ▼
Distributed storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now KV cache might exist:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPU HBM
CPU DRAM
another GPU
another machine
NVMe
remote storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The runtime needs to understand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;capacity
latency
bandwidth
topology
locality
contention
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Moving a KV block from local HBM might be cheap.&lt;/p&gt;

&lt;p&gt;Moving it from another machine could be much more expensive.&lt;/p&gt;

&lt;p&gt;So:&lt;/p&gt;

&lt;p&gt;``&lt;br&gt;
Cost(block) =f(distance,bandwidth,latency,contention)&lt;/p&gt;

&lt;p&gt;``&lt;/p&gt;

&lt;p&gt;Now memory management and network scheduling become connected.&lt;/p&gt;

&lt;p&gt;This resembles distributed operating systems and NUMA systems, where memory isn't uniformly accessible.&lt;/p&gt;

&lt;p&gt;The runtime must answer:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Where should this state live, and where should computation happen?&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That is a distributed-systems problem.&lt;/p&gt;


&lt;h1&gt;
  
  
  The Bigger Picture
&lt;/h1&gt;

&lt;p&gt;Put all ten layers together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  LLM APPLICATION
                         │
                       AGENT
                         │
                INFERENCE RUNTIME
                         │
          ┌──────────────┴──────────────┐
          │                             │
      SCHEDULER                    MEMORY MANAGER
          │                             │
          │                     ┌───────┴───────┐
          │                     │               │
          │                    HBM             DRAM
          │                     │               │
          │                    NVMe          Network
          │                     │               │
          └──────────────┬──────┴───────────────┘
                         │
                      GPU
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the ten transformations are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. KV Cache
   ↓
   Dynamic memory

2. PagedAttention
   ↓
   Paging

3. Prefix sharing
   ↓
   Shared memory

4. KV eviction
   ↓
   Cache management

5. Hierarchical KV
   ↓
   Memory hierarchy

6. KV prefetching
   ↓
   I/O management

7. Cache-aware scheduling
   ↓
   OS-style scheduling

8. Prefill/decode disaggregation
   ↓
   Resource scheduling

9. Agentic workloads
   ↓
   Process lifetime management

10. Distributed KV
    ↓
    Distributed memory management
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is why I think the phrase &lt;strong&gt;“inference OS”&lt;/strong&gt; isn't as crazy as it initially sounds.&lt;/p&gt;

&lt;p&gt;We are building increasingly sophisticated software to manage:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;compute&lt;/li&gt;
&lt;li&gt;memory&lt;/li&gt;
&lt;li&gt;state&lt;/li&gt;
&lt;li&gt;scheduling&lt;/li&gt;
&lt;li&gt;locality&lt;/li&gt;
&lt;li&gt;data movement&lt;/li&gt;
&lt;li&gt;sharing&lt;/li&gt;
&lt;li&gt;eviction&lt;/li&gt;
&lt;li&gt;prefetching&lt;/li&gt;
&lt;li&gt;distributed resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model is only one component.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Most Important Difference
&lt;/h1&gt;

&lt;p&gt;There is one major difference between traditional operating systems and LLM inference.&lt;/p&gt;

&lt;p&gt;Operating systems mostly manage &lt;strong&gt;passive data&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;LLMs generate their own working state.&lt;/p&gt;

&lt;p&gt;Every token can create more KV cache:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Token
  ↓
KV state
  ↓
More memory
  ↓
More pressure
  ↓
Eviction / transfer
  ↓
Potential recomputation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the workload itself continuously changes the memory requirements.&lt;/p&gt;

&lt;p&gt;That's unusual.&lt;/p&gt;

&lt;p&gt;And it means the inference runtime must understand both:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;computation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;memory.&lt;/strong&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;We spent decades optimizing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CPU → Memory → Storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then AI gave us:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPU → HBM → CPU Memory → Storage → Network&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And now the most interesting part of LLM infrastructure may not be the model itself.&lt;/p&gt;

&lt;p&gt;It may be the system managing the model's working state.&lt;/p&gt;

&lt;p&gt;Paging.&lt;/p&gt;

&lt;p&gt;Caching.&lt;/p&gt;

&lt;p&gt;Prefetching.&lt;/p&gt;

&lt;p&gt;Eviction.&lt;/p&gt;

&lt;p&gt;Scheduling.&lt;/p&gt;

&lt;p&gt;Memory hierarchies.&lt;/p&gt;

&lt;p&gt;Shared state.&lt;/p&gt;

&lt;p&gt;Resource allocation.&lt;/p&gt;

&lt;p&gt;Distributed memory.&lt;/p&gt;

&lt;p&gt;These are all classic operating-system and systems concepts.&lt;/p&gt;

&lt;p&gt;But they're being applied to something new:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;the runtime state of a neural network.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The model generates tokens.&lt;/p&gt;

&lt;p&gt;The tokens generate state.&lt;/p&gt;

&lt;p&gt;The state consumes memory.&lt;/p&gt;

&lt;p&gt;The memory determines scheduling.&lt;/p&gt;

&lt;p&gt;The scheduler determines throughput.&lt;/p&gt;

&lt;p&gt;And the entire system feeds back into the model's performance.&lt;/p&gt;

&lt;p&gt;So perhaps the next generation of AI infrastructure won't just be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;better models + faster GPUs&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It will be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;better inference operating systems.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The model is the intelligence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The runtime is the machine that makes that intelligence usable.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to run Claude Desktop and ChatGPT desktop app for free with llama.cpp and other local LLMs.</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Sun, 30 Aug 2026 07:11:41 +0000</pubDate>
      <link>https://dev.to/lynkr/how-we-added-claude-desktop-and-chatgptapp-support-to-one-llm-gateway-4llg</link>
      <guid>https://dev.to/lynkr/how-we-added-claude-desktop-and-chatgptapp-support-to-one-llm-gateway-4llg</guid>
      <description>&lt;p&gt;Most desktop AI apps still assume the backend is fixed.&lt;/p&gt;

&lt;p&gt;Claude Desktop assumes Anthropic. ChatGPT.app assumes OpenAI.&lt;/p&gt;

&lt;p&gt;That works until you want to route the same desktop app across local and cloud models, keep one gateway for caching and fallback, and pin stronger or cheaper models without changing frontend UX.&lt;/p&gt;

&lt;p&gt;That is the problem we just solved in Lynkr.&lt;/p&gt;

&lt;p&gt;Lynkr is an open-source LLM gateway. In the latest code changes, we added native support for two desktop surfaces that normally do not give you much backend control: &lt;strong&gt;Claude Desktop&lt;/strong&gt; and &lt;strong&gt;ChatGPT.app (Codex Desktop)&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude Desktop: using the hidden third-party gateway path
&lt;/h2&gt;

&lt;p&gt;Claude Desktop does not expose a normal bring-your-own-provider flow. The new Lynkr support works by using Claude Desktop's undocumented third-party gateway mode — the same general mechanism Ollama's Claude Desktop launcher relies on.&lt;/p&gt;

&lt;p&gt;The new install flow is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lynkr desktop-token &amp;lt;oauth-token&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Under the hood, Lynkr edits config in &lt;code&gt;~/Library/Application Support/&lt;/code&gt; and manages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Claude/claude_desktop_config.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Claude-3p/claude_desktop_config.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Claude-3p/configLibrary/_meta.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Claude-3p/configLibrary/&amp;lt;uuid&amp;gt;.json&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The installer also writes &lt;code&gt;Claude-3p/configLibrary/.lynkr-backup.json&lt;/code&gt;, which means restore is not a blind delete. Lynkr saves the original deployment mode and applied profile, then restores them exactly later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;lynkr desktop-token &lt;span class="nt"&gt;--restore&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That restore command removes the Lynkr profile, resets deployment bookkeeping, and puts Claude Desktop back into its previous mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Claude Desktop needs a token
&lt;/h2&gt;

&lt;p&gt;Once Desktop is switched into third-party gateway mode (&lt;code&gt;deploymentMode: "3p"&lt;/code&gt;), it is no longer talking directly to Anthropic. Lynkr becomes the API layer receiving Desktop traffic.&lt;/p&gt;

&lt;p&gt;That is why the install command expects a Claude OAuth token. The current implementation explicitly validates that the token starts with &lt;code&gt;sk-ant-oat&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Lynkr does not mint or refresh that token. It installs the token into Claude Desktop's gateway profile so Desktop can send it to Lynkr, and Lynkr can forward it when a request routes to an Anthropic-backed tier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude Desktop's model picker becomes a tier selector
&lt;/h2&gt;

&lt;p&gt;Instead of treating the picker as cosmetic, Lynkr uses it as a routing control surface.&lt;/p&gt;

&lt;p&gt;The docs describe fixed picker entries that map to Lynkr tiers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto -&amp;gt; no pin, normal content-based scoring&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude-opus-5&lt;/code&gt; -&amp;gt; &lt;code&gt;REASONING&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude-sonnet-5&lt;/code&gt; -&amp;gt; &lt;code&gt;COMPLEX&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude-sonnet-4-6&lt;/code&gt; -&amp;gt; &lt;code&gt;MEDIUM&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;claude-haiku-4-5-20251001&lt;/code&gt; -&amp;gt; &lt;code&gt;SIMPLE&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because Claude Desktop validates model ids against its own catalog, Lynkr cannot advertise made-up ids like &lt;code&gt;lynkr-medium&lt;/code&gt;. Instead, it reuses real Claude-family ids and treats them as tier pins.&lt;/p&gt;

&lt;p&gt;So the contract becomes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auto&lt;/strong&gt; = gateway decides&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;specific model&lt;/strong&gt; = user decides&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the user picks anything other than Auto, Lynkr bypasses classifier-based routing for that request and pins the tier directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude Desktop detection is gated, not global
&lt;/h2&gt;

&lt;p&gt;Lynkr does not force this behavior onto every Anthropic-compatible caller. The Claude Desktop gateway logic only intercepts callers that look like Desktop specifically — for example requests carrying an &lt;code&gt;anthropic-version&lt;/code&gt; header or an explicit &lt;code&gt;?format=anthropic&lt;/code&gt; path.&lt;/p&gt;

&lt;p&gt;Other Anthropic-format clients still fall through to the normal model list behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  ChatGPT.app: one backend for Desktop and CLI
&lt;/h2&gt;

&lt;p&gt;ChatGPT.app required a different strategy.&lt;/p&gt;

&lt;p&gt;The key detail is that Codex Desktop and Codex CLI share the same config surface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.codex/config.toml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That means Lynkr can be added once as a provider block and then back both interfaces with the same gateway configuration.&lt;/p&gt;

&lt;h2&gt;
  
  
  ChatGPT.app exposes a real routing signal: &lt;code&gt;reasoning.effort&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The most interesting part of the ChatGPT.app work is that the model picker sends structured routing hints on the wire.&lt;/p&gt;

&lt;p&gt;The latest code adds a dedicated mapping module in &lt;code&gt;src/routing/openai-model-slots.js&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That file documents the behavior Lynkr now relies on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Codex sends a &lt;strong&gt;real OpenAI model id&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;it also sends &lt;code&gt;reasoning.effort&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Lynkr maps that pair into a routing tier&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The current effort-to-tier mapping is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;minimal -&amp;gt; SIMPLE&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;low -&amp;gt; MEDIUM&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;medium -&amp;gt; COMPLEX&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;high -&amp;gt; REASONING&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was confirmed live from a captured request.&lt;/p&gt;

&lt;p&gt;One verified path from the implementation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI label: &lt;strong&gt;Light&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;wire value: &lt;code&gt;reasoning.effort = "low"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Lynkr routing tier: &lt;code&gt;MEDIUM&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;classifier path: bypassed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the app already tells the gateway how much reasoning the user wants, the gateway should respect it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pin is intentionally conservative
&lt;/h2&gt;

&lt;p&gt;If Lynkr sees an unrecognized model or effort value, it falls back to normal content-based routing instead of guessing.&lt;/p&gt;

&lt;p&gt;There is also an important scope note in the code: the model/effort pin only governs the &lt;strong&gt;first model call of a turn&lt;/strong&gt;. If the turn becomes multi-step — tool calls, follow-up steps, more agent iterations — later steps can still be rescored by content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why these integrations matter
&lt;/h2&gt;

&lt;p&gt;The reason these integrations matter is not just that Lynkr now supports two more apps.&lt;/p&gt;

&lt;p&gt;It is that both apps normally own the backend relationship:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Desktop assumes Anthropic&lt;/li&gt;
&lt;li&gt;ChatGPT.app assumes OpenAI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once both route through Lynkr, the control plane moves out of the app and into the gateway:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude Desktop / ChatGPT.app
-&amp;gt; Lynkr
-&amp;gt; local + cloud models
-&amp;gt; tier routing + token optimization + fallback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At that point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the app owns the UX&lt;/li&gt;
&lt;li&gt;Lynkr owns routing logic&lt;/li&gt;
&lt;li&gt;providers become interchangeable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the real story in these latest Lynkr changes.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>claude</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>Lynkr vs LiteLLM's New `complexity_router`</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Wed, 05 Aug 2026 22:17:24 +0000</pubDate>
      <link>https://dev.to/lynkr/lynkr-vs-litellms-new-complexityrouter-464p</link>
      <guid>https://dev.to/lynkr/lynkr-vs-litellms-new-complexityrouter-464p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclosure up front:&lt;/strong&gt; this benchmark was designed, written, and run by Lynkr's&lt;br&gt;
maintainer, using Lynkr's own regression harness. The scenario set was written to&lt;br&gt;
test routing behaviors Lynkr considers important — that is a real selection bias&lt;br&gt;
and it is not hand-waved away here (see Limitations). Mitigations:&lt;br&gt;
both proxies route over &lt;strong&gt;identical backends&lt;/strong&gt;, LiteLLM ran its &lt;strong&gt;out-of-the-box&lt;br&gt;
defaults&lt;/strong&gt; exactly as Lynkr did, every scenario ran twice, the full config and&lt;br&gt;
harness are in this repo, and the results include the scenarios where LiteLLM&lt;br&gt;
wins and where Lynkr shows drift. Reproduction steps are at the bottom.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Why this benchmark exists
&lt;/h2&gt;

&lt;p&gt;In early August 2026, LiteLLM shipped &lt;code&gt;complexity_router&lt;/code&gt; in core — a rule-based&lt;br&gt;
tier router that classifies each request as SIMPLE / MEDIUM / COMPLEX / REASONING&lt;br&gt;
(the same four-tier taxonomy Lynkr uses) via weighted keyword scoring across 7&lt;br&gt;
dimensions, with zero API calls and sub-millisecond decisions. It ships alongside&lt;br&gt;
&lt;code&gt;adaptive_router&lt;/code&gt; (Thompson-sampling bandits) and a savings baseline.&lt;/p&gt;

&lt;p&gt;This is the category leader validating tier-based cost routing as a core proxy&lt;br&gt;
feature. We benchmarked it the week it shipped, on the same backends Lynkr routes&lt;br&gt;
to in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Methodology
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Systems under test
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;version&lt;/th&gt;
&lt;th&gt;routing decision mechanism&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Lynkr&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;git working tree, 2026-08-05&lt;/td&gt;
&lt;td&gt;embedding-anchor intent score (local, no LLM call) + risk analyzer + agentic detector + session pins + calibrated thresholds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LiteLLM&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;1.95.0 (PyPI; latest release)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;complexity_router&lt;/code&gt;, heuristic classifier, default weights/boundaries, untouched&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note: LiteLLM git-main (1.97.0) could not be run — the git wheel is missing&lt;br&gt;
&lt;code&gt;proxy_server.py&lt;/code&gt; and current main is incompatible with fastapi ≥0.140&lt;br&gt;
(&lt;code&gt;get_flat_dependant&lt;/code&gt; removed). Both are being reported upstream. 1.95.0 is the&lt;br&gt;
latest installable release and includes &lt;code&gt;complexity_router&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Identical backends, only the decision differs
&lt;/h3&gt;

&lt;p&gt;Both proxies map their four tiers to the same deployments (mirroring Lynkr's live&lt;br&gt;
&lt;code&gt;.env&lt;/code&gt; at test time):&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;tier&lt;/th&gt;
&lt;th&gt;backend&lt;/th&gt;
&lt;th&gt;cost class&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SIMPLE&lt;/td&gt;
&lt;td&gt;ollama &lt;code&gt;minimax-m3:cloud&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MEDIUM&lt;/td&gt;
&lt;td&gt;ollama &lt;code&gt;minimax-m3:cloud&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;COMPLEX&lt;/td&gt;
&lt;td&gt;azure &lt;code&gt;gpt-5.6-sol&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;paid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;REASONING&lt;/td&gt;
&lt;td&gt;moonshot &lt;code&gt;kimi-k3&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;paid&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;LiteLLM config: &lt;code&gt;litellm-autorouter-v2.yaml&lt;/code&gt; (in-repo), using the shipped&lt;br&gt;
&lt;code&gt;auto_router/complexity_router&lt;/code&gt; schema with &lt;code&gt;tiers&lt;/code&gt; mapping and &lt;code&gt;default_model&lt;/code&gt;,&lt;br&gt;
nothing else configured. Each tier deployment carries &lt;code&gt;model_info.id&lt;/code&gt; so the&lt;br&gt;
&lt;code&gt;x-litellm-model-id&lt;/code&gt; response header reveals which tier served each request.&lt;/p&gt;

&lt;h3&gt;
  
  
  Harness
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;benchmark-tier-routing.js&lt;/code&gt; (in-repo), &lt;code&gt;MODE=routing RUNS=2&lt;/code&gt;. Each scenario&lt;br&gt;
declares an &lt;strong&gt;acceptable-tier set&lt;/strong&gt;; a proxy is routing-correct when the tier that&lt;br&gt;
served the request is in the set. &lt;code&gt;RUNS=2&lt;/code&gt; means a scenario passes only if &lt;strong&gt;both&lt;/strong&gt;&lt;br&gt;
runs pass — this catches non-deterministic classifiers. Stateful scenarios embed a&lt;br&gt;
per-run nonce so session pins and caches can't leak between runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scoreboard: 11 scenarios, acceptable-tier judging
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;ID&lt;/th&gt;
&lt;th&gt;scenario (gist)&lt;/th&gt;
&lt;th&gt;acceptable&lt;/th&gt;
&lt;th&gt;Lynkr&lt;/th&gt;
&lt;th&gt;LiteLLM&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;S1&lt;/td&gt;
&lt;td&gt;"What does git stash do?"&lt;/td&gt;
&lt;td&gt;SIMPLE|MEDIUM&lt;/td&gt;
&lt;td&gt;✓ MEDIUM&lt;/td&gt;
&lt;td&gt;✓ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;R1&lt;/td&gt;
&lt;td&gt;JWT security trade-offs for a banking app, step by step&lt;/td&gt;
&lt;td&gt;COMPLEX|REASONING&lt;/td&gt;
&lt;td&gt;✓ REASONING&lt;/td&gt;
&lt;td&gt;✗ MEDIUM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F1&lt;/td&gt;
&lt;td&gt;"Refactor the entire ingestion pipeline, give me the plan"&lt;/td&gt;
&lt;td&gt;COMPLEX|REASONING&lt;/td&gt;
&lt;td&gt;✓ COMPLEX&lt;/td&gt;
&lt;td&gt;✗ MEDIUM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;F2&lt;/td&gt;
&lt;td&gt;"Fix the null check in &lt;code&gt;src/auth/middleware.ts&lt;/code&gt; + tests"&lt;/td&gt;
&lt;td&gt;COMPLEX|REASONING&lt;/td&gt;
&lt;td&gt;✓ REASONING&lt;/td&gt;
&lt;td&gt;✗ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RS1&lt;/td&gt;
&lt;td&gt;"17+25" wrapped in injected &lt;code&gt;&amp;lt;system-reminder&amp;gt;&lt;/code&gt; security noise&lt;/td&gt;
&lt;td&gt;SIMPLE|MEDIUM&lt;/td&gt;
&lt;td&gt;✓ MEDIUM&lt;/td&gt;
&lt;td&gt;✓ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SR1&lt;/td&gt;
&lt;td&gt;Suggestion-mode side request over a prior security conversation&lt;/td&gt;
&lt;td&gt;SIMPLE|MEDIUM&lt;/td&gt;
&lt;td&gt;✓ SIMPLE&lt;/td&gt;
&lt;td&gt;✓ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A1&lt;/td&gt;
&lt;td&gt;"Work autonomously: run tests, fix, iterate until green"&lt;/td&gt;
&lt;td&gt;COMPLEX|REASONING&lt;/td&gt;
&lt;td&gt;✓ REASONING&lt;/td&gt;
&lt;td&gt;✗ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;P1&lt;/td&gt;
&lt;td&gt;"hi, you there?" (fresh session)&lt;/td&gt;
&lt;td&gt;SIMPLE|MEDIUM&lt;/td&gt;
&lt;td&gt;✓ MEDIUM&lt;/td&gt;
&lt;td&gt;✓ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;P2&lt;/td&gt;
&lt;td&gt;same session, then "architecture review of the routing module"&lt;/td&gt;
&lt;td&gt;COMPLEX|REASONING&lt;/td&gt;
&lt;td&gt;✓ COMPLEX&lt;/td&gt;
&lt;td&gt;✗ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IV1&lt;/td&gt;
&lt;td&gt;"Review this retry helper for bugs" (bare)&lt;/td&gt;
&lt;td&gt;MEDIUM|COMPLEX&lt;/td&gt;
&lt;td&gt;✓ MEDIUM&lt;/td&gt;
&lt;td&gt;✗ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IV2&lt;/td&gt;
&lt;td&gt;identical ask + ~600 tokens of harness/IDE envelope noise&lt;/td&gt;
&lt;td&gt;MEDIUM|COMPLEX&lt;/td&gt;
&lt;td&gt;✓ MEDIUM&lt;/td&gt;
&lt;td&gt;✗ SIMPLE&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Lynkr: 11/11 · LiteLLM: 4/11.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The sharper cut: the 11 scenarios split into 4 "stay cheap" tests and 7&lt;br&gt;
"escalate correctly" tests. &lt;strong&gt;LiteLLM went 4/4 on stay-cheap and 0/7 on&lt;br&gt;
escalation.&lt;/strong&gt; A router biased toward the cheap tier passes every stay-cheap test&lt;br&gt;
by construction — the escalation tests are where routing is actually hard.&lt;/p&gt;

&lt;h3&gt;
  
  
  Failure analysis: three clusters, not seven random misses
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Semantics beyond keywords (R1, F1, A1).&lt;/strong&gt; "Security trade-offs for a
banking application" and "work autonomously until the tests are green" carry
complexity in &lt;em&gt;meaning&lt;/em&gt;. The 7-dimension keyword sum doesn't reach the 0.35
COMPLEX boundary, so reasoning-grade work lands on the free tier. This is the
published, predicted weakness of ex-ante lexical scoring on real traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No risk model (F2).&lt;/strong&gt; "Fix the null check in &lt;code&gt;src/auth/middleware.ts&lt;/code&gt;" is
lexically trivial — and it is exactly the request you never send to an
uncontrolled free model. LiteLLM has no concept of protected paths; Lynkr's
risk analyzer forces auth/middleware edits to the governance tier regardless
of complexity score.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No session or envelope awareness (P2, IV1, IV2).&lt;/strong&gt; After a "hi" opener,
"now do an architecture review" stayed on SIMPLE — no pin-escape mechanism.
The invariance pair is subtler: LiteLLM was technically invariant (SIMPLE both
times) but invariantly &lt;em&gt;wrong&lt;/em&gt; — a code-review ask never accumulated enough
keyword weight in either form.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The cost table pathology (read before quoting)
&lt;/h3&gt;

&lt;p&gt;The harness's raw cost line shows LiteLLM at &lt;strong&gt;$0.00 — "100% cheaper."&lt;/strong&gt; That is&lt;br&gt;
the failure, not a win: it spent nothing because it routed nearly everything —&lt;br&gt;
including the 7 escalation-grade requests — to the free tier. A router that sends&lt;br&gt;
everything to the cheapest model is always the "cheapest" router and always the&lt;br&gt;
worst one. Cost numbers for a router are only meaningful &lt;strong&gt;conditional on routing&lt;br&gt;
correctness.&lt;/strong&gt; Any quotation of this benchmark that includes the cost table&lt;br&gt;
without this caveat is misleading, in either direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lynkr's own warts (strict-expectation view)
&lt;/h3&gt;

&lt;p&gt;The harness also checks stricter per-scenario expectations than the acceptable&lt;br&gt;
sets. Lynkr drifted on 3 of 11:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;R1, F2:&lt;/strong&gt; over-routed COMPLEX → REASONING — correct-but-expensive (kimi-k3
spent where gpt-5.6-sol would do). Likely threshold drift after recent tier
remapping; the nightly calibration should re-fit, being watched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;P1:&lt;/strong&gt; SIMPLE → MEDIUM pin drift on the trivial opener.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Over-routing burns money silently; it is the mirror image of LiteLLM's failure&lt;br&gt;
mode and it deserves the same scrutiny.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where LiteLLM is better
&lt;/h2&gt;

&lt;p&gt;Symmetry matters, so plainly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Decision latency.&lt;/strong&gt; Sub-millisecond, allocation-free keyword scoring vs
Lynkr's embedding lookup (~10–50 ms warm, more on classifier cold start). For
latency-critical single-model workloads that difference is real.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero infrastructure for the decision.&lt;/strong&gt; No embedding model, no classifier
model, no state. Lynkr's anchor scorer wants a local embedding model available.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Determinism and auditability.&lt;/strong&gt; A weighted keyword sum is trivially
explainable to a compliance reviewer; an embedding similarity is not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Simplicity of config.&lt;/strong&gt; One YAML block. Lynkr's routing intelligence has
meaningfully more surface to understand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tunability from a known base.&lt;/strong&gt; Weights, boundaries, and keyword lists are
all exposed; a team willing to tune per-workload could close some of the gap
(out-of-the-box was tested here, on both sides).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ecosystem and adoption.&lt;/strong&gt; LiteLLM is the default proxy of the ecosystem, and
the same release train ships &lt;code&gt;adaptive_router&lt;/code&gt; (bandit-based) — the direction
of travel is serious.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where Lynkr is better
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Escalation correctness: 7/7 vs 0/7&lt;/strong&gt; — the entire hard half of the problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Risk-aware routing&lt;/strong&gt; — protected-path and instruction-risk signals route
security-relevant work to governed tiers independent of complexity score.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Session pinning with escape&lt;/strong&gt; — sticky sessions that release when the work
outgrows the pin (P2), instead of trapping or ignoring session state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Payload invariance by construction&lt;/strong&gt; — the intent score is computed on
cleaned user text, so harness envelopes, system-reminders, and IDE noise don't
move the decision (IV1/IV2, RS1).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A verification cascade behind the decision&lt;/strong&gt; (not exercised in this routing-
only benchmark): cheap-tier answers are structurally verified and escalated on
failure, so a mis-route down is a recoverable event rather than a silent
quality loss. LiteLLM's architecture is predict-then-commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-party evaluation&lt;/strong&gt; — RouterArena (ICLR 2026): 67.65 arena / 68.41%
accuracy / $0.29 per 1K queries / 92.38 robustness, leaderboard #15.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;p&gt;Every one of these is a genuine limitation of this benchmark:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;N=11, author-selected.&lt;/strong&gt; The scenarios encode Lynkr's view of what routing
should do. A LiteLLM-authored scenario set would probably look different.
(Counterpoint: the escalation scenarios are not exotic — auth-file edits,
refactor plans, and agentic loops are everyday coding-agent traffic.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Defaults vs defaults.&lt;/strong&gt; LiteLLM's router is configurable; a tuned
configuration was not tested. Neither was a tuned Lynkr.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One day, one version pair.&lt;/strong&gt; LiteLLM 1.95.0; main moves fast and the
&lt;code&gt;adaptive_router&lt;/code&gt; (which may compensate for complexity_router misses over
time via bandit feedback) was not enabled or tested.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routing-only.&lt;/strong&gt; Response quality, verification, compression, and caching
were all out of scope; the cost figures are therefore not end-to-end claims.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;RUNS=2&lt;/code&gt;&lt;/strong&gt; is enough to catch gross nondeterminism, not enough for
statistics. Both systems were deterministic across runs on every scenario.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reproduction
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# LiteLLM (Python ≥3.10 venv)&lt;/span&gt;
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"litellm[proxy]==1.95.0"&lt;/span&gt; &lt;span class="s2"&gt;"fastapi&amp;lt;0.140"&lt;/span&gt;
&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s1"&gt;'^(MOONSHOT_API_KEY|AZURE_OPENAI_API_KEY)='&lt;/span&gt; .env | xargs&lt;span class="si"&gt;)&lt;/span&gt;
litellm &lt;span class="nt"&gt;--port&lt;/span&gt; 8082 &lt;span class="nt"&gt;--config&lt;/span&gt; litellm-autorouter-v2.yaml

&lt;span class="c"&gt;# Lynkr&lt;/span&gt;
node index.js   &lt;span class="c"&gt;# serves :8081 per .env&lt;/span&gt;

&lt;span class="c"&gt;# head-to-head, routing-only, 2 runs per scenario&lt;/span&gt;
&lt;span class="nv"&gt;MODE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;routing &lt;span class="nv"&gt;RUNS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2 &lt;span class="nv"&gt;LITELLM_MASTER_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;sk-1234 node benchmark-tier-routing.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Scenario definitions: &lt;code&gt;benchmark-tier-routing.js&lt;/code&gt;. LiteLLM config:&lt;br&gt;
&lt;code&gt;litellm-autorouter-v2.yaml&lt;/code&gt;. Raw logs from this run: &lt;code&gt;/tmp/litellm-bench.log&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;/tmp/lynkr-bench.log&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow-ups queued
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Paraphrase-pair robustness scenarios (same intent, different surface — the
lexical scorer's structural weakness deserves its own measured number).&lt;/li&gt;
&lt;li&gt;Re-run with LiteLLM &lt;code&gt;adaptive_router&lt;/code&gt; enabled on top of &lt;code&gt;complexity_router&lt;/code&gt;,
with enough traffic for its bandit to update — the fairest version of this
comparison over time.&lt;/li&gt;
&lt;li&gt;File the two upstream LiteLLM bugs found while setting up (git wheel missing
&lt;code&gt;proxy_server.py&lt;/code&gt;; fastapi ≥0.140 incompatibility).&lt;/li&gt;
&lt;li&gt;Investigate Lynkr's R1/F2 over-routing drift after tier remapping.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>litellm</category>
    </item>
    <item>
      <title>Loop Engineering Is Mostly Papering Over a Model That Won't Converge</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Thu, 30 Jul 2026 07:25:49 +0000</pubDate>
      <link>https://dev.to/lynkr/loop-engineering-is-mostly-papering-over-a-model-that-wont-converge-4kh2</link>
      <guid>https://dev.to/lynkr/loop-engineering-is-mostly-papering-over-a-model-that-wont-converge-4kh2</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FFast-Editor%2FLynkr%2Fmain%2F.hermes-temp%2Floop-engineering-infographic.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FFast-Editor%2FLynkr%2Fmain%2F.hermes-temp%2Floop-engineering-infographic.jpg" alt="Loop engineering infographic" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I maintain &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt;, an open-source LLM gateway with loop-guard middleware, so I have a stake in this argument. Read this as a thesis to challenge, not a neutral survey.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Agent discourse has shifted from prompts to loops: the read-act-observe cycle that keeps running until the model decides it's done. My contrarian take is that most so-called &lt;em&gt;loop engineering&lt;/em&gt; is optimizing the wrong variable. &lt;strong&gt;A longer, richer loop is usually a convergence failure wearing a costume.&lt;/strong&gt; The well-engineered loop is the short one that knows when to stop.&lt;/p&gt;

&lt;h2&gt;
  
  
  The consensus I'm arguing against
&lt;/h2&gt;

&lt;p&gt;When an agent fails, the default move is to give the loop &lt;em&gt;more&lt;/em&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More turns before it gives up.&lt;/li&gt;
&lt;li&gt;More context stuffed into the window.&lt;/li&gt;
&lt;li&gt;More scaffolding: planners, critics, reflection steps, sub-agents spawning sub-agents.&lt;/li&gt;
&lt;li&gt;More retries with more feedback.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The implicit theory is simple: intelligence accumulates across iterations, so more turns should mean more convergence. Sometimes that works. Mostly, on real traffic, it doesn't — and the cost structure is brutal even when it does.&lt;/p&gt;

&lt;p&gt;A concrete example from coding agents: give an underpowered model a repo-wide refactor and it usually doesn't "reason longer" into success. It misreads one dependency, anchors on the wrong file, and spends the next dozen turns elaborating the mistake. The loop isn't rescuing the model. It's financing the failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why longer loops compound the wrong things
&lt;/h2&gt;

&lt;p&gt;Two things compound across a loop, and neither is intelligence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Loop cost grows fast.&lt;/strong&gt; Every turn re-sends accumulated context. A 20-turn session isn't just 20 single calls back-to-back; each later turn drags earlier tokens back through the model. In many agentic workloads, the loop becomes the most expensive object in the serving budget, and "add more turns" becomes the most expensive knob you can turn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Reliability collapses across dependent steps.&lt;/strong&gt; Even with optimistic per-step reliability, multi-step chains degrade quickly. Long loops don't average out mistakes; they multiply the chance of staying on the correct trajectory. The agent that "just needs more turns" is often an agent walking deeper into the wrong branch with more conviction, because each turn conditions on its own earlier errors as if they were facts.&lt;/p&gt;

&lt;p&gt;We wrote earlier about how stuffing the context window can make agents worse, not smarter: attention dilutes, retrieval anchors on the wrong chunk, and signal gets buried. Loop length is the same failure on the time axis. More is not more.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a long loop is actually signaling
&lt;/h2&gt;

&lt;p&gt;When an agent needs 30 turns to do something, that's usually not the harness being clever. It's a signal of one of two failures:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The task was routed to a model that can't do it.&lt;/strong&gt; The loop is that model thrashing. Scaffolding rarely fixes an underpowered model decision; it usually just makes the failure more elaborate and more expensive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The task genuinely has many steps.&lt;/strong&gt; In that case, the engineering problem is not "how do I allow more turns" but "how do I verify each step cheaply so the wrong branch gets caught at turn 3 instead of compounding to turn 30?"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both point the same direction: either allocate the step to a better model, or verify the step before proceeding. Neither says: add turns and hope.&lt;/p&gt;

&lt;h2&gt;
  
  
  What loop engineering should actually be
&lt;/h2&gt;

&lt;p&gt;If loops are where cost and error compound, then good loop engineering should minimize compounding, not maximize capability-per-turn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Cap the loop hard.&lt;/strong&gt; Every loop needs a turn ceiling and a tool-call ceiling that it cannot exceed, full stop. Not as an emergency fallback — as a first-class design constraint. A loop that &lt;em&gt;can&lt;/em&gt; run forever will, on some input, cost you a fortune to produce garbage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Verify each step cheaply.&lt;/strong&gt; The highest-leverage addition to a loop is usually not another reasoning stage. It's a fast, deterministic check on the step output that catches the failure modes you actually see: truncation, malformed tool calls, empty answers, degeneration loops, repeated echoes. Detection beats prediction because you already have the output in hand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Escalate the failing step, not the whole session.&lt;/strong&gt; When a step fails verification, redo &lt;em&gt;that step&lt;/em&gt; on a better tier. Don't grant the entire loop more turns to flail. Escalation is targeted; more-turns is a blank check.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part where this bit us too
&lt;/h2&gt;

&lt;p&gt;We're not exempt. In Lynkr, we shipped a terse mode meant to save output tokens by pushing models toward shorter answers. Our verifier then misread some of those short answers as low-effort failures and escalated trivial requests up a tier into a longer, more expensive path.&lt;/p&gt;

&lt;p&gt;The fix was one predicate. The broader lesson wasn't. &lt;strong&gt;A check inside a loop is itself part of the loop's cost and failure surface.&lt;/strong&gt; "Add verification" is not free virtue; a bad verifier can extend loops as eagerly as a naive retry does. Verification has to be engineered with the same suspicion as any other turn.&lt;/p&gt;

&lt;h2&gt;
  
  
  The thesis, plainly
&lt;/h2&gt;

&lt;p&gt;A lot of popular loop engineering optimizes capability-per-turn while treating turn count as free. That's backwards. On real traffic, turn count is often the dominant cost and a major source of compounded error.&lt;/p&gt;

&lt;p&gt;If a task needs more intelligence, buy more intelligence for that step. If a task needs more reliability, verify the step. If a loop keeps growing, treat that as a failure signal, not sophistication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make the loop shorter. Make it stop. That's the engineering.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Lynkr is Apache-2.0 and self-hosted. The loop-guard middleware and step-level escalation ideas behind this post are in the repo: &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;github.com/Fast-Editor/Lynkr&lt;/a&gt;. If you've seen a loop run too long and know why, I'd love to hear the war story.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Your LLM Bill Is a Misallocation Problem, Not a Model Problem</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Thu, 30 Jul 2026 06:50:28 +0000</pubDate>
      <link>https://dev.to/lynkr/your-llm-bill-is-a-misallocation-problem-not-a-model-problem-18dg</link>
      <guid>https://dev.to/lynkr/your-llm-bill-is-a-misallocation-problem-not-a-model-problem-18dg</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I maintain &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt;, an open-source LLM router, so this post argues a thesis my own product embodies. The mitigation: every claim below is either published research, a July 2026 release you can verify, or a measurement you can reproduce — including the part where the obvious approach (and an earlier version of ours) doesn't work.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The dominant inefficiency in LLM serving is no longer kernel speed or quantization. It's &lt;strong&gt;per-request compute misallocation&lt;/strong&gt; — and the research says you can't fix it with prediction. You fix it with verification.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup: the gap closed, the dispersion didn't
&lt;/h2&gt;

&lt;p&gt;Three things became true more or less simultaneously in mid-2026:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open-weight models sit within single-digit percentage points of frontier models on everyday work.&lt;/strong&gt; GLM-5.2 (744B MoE, 40B active, MIT license) leads several long-horizon coding benchmarks outright. Kimi K3 shipped in July at 2.8T parameters with ~1.8% expert activation and a 1M-token context — open weights, hosted access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The cost of that near-frontier capability is 4–10× lower.&lt;/strong&gt; Hosted GLM-class models run at a fraction of frontier per-token prices; aggressive hosts (Meituan's LongCat 2.0 launched at $0.30/$1.20 per million) keep pushing the floor down.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Price-per-capability dispersion across providers has never been wider.&lt;/strong&gt; The same request can cost $0.10 or $15 per million output tokens depending on where you send it, for a quality difference that on most traffic is inside the noise.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Put those together and the largest line item in a serving budget is no longer "the model is slow" or "the quant is fat." It's &lt;strong&gt;every request routed to a frontier model that a cheaper tier would have cleared.&lt;/strong&gt; That's pure deadweight loss, and at current dispersion it usually dominates everything a kernel engineer can save you.&lt;/p&gt;

&lt;p&gt;I say that as someone who ships kernel PRs: a +13–15% decode win on a CPU inference engine (measured, merged, byte-identical output) saves you 13% &lt;em&gt;on one backend&lt;/em&gt;. Routing 60% of traffic down two price tiers saves ~90% &lt;em&gt;across the fleet&lt;/em&gt;. Same engineering effort. The leverage moved up the stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  The naive fix fails: you can't predict difficulty from the prompt
&lt;/h2&gt;

&lt;p&gt;The obvious architecture is ex-ante routing: classify the prompt, pick the model, done. Every "smart routing" product demo shows this.&lt;/p&gt;

&lt;p&gt;It doesn't survive contact with real traffic. &lt;strong&gt;Ex-ante difficulty prediction consistently fails to beat trivial baselines on agentic coding traffic.&lt;/strong&gt; When we ran the deep-research pass for Lynkr's cascade design (July 2025 literature, SWE-Bench-style workloads), the pattern was blunt: prompt surface features don't carry enough signal about downstream difficulty. A one-line ask ("fix the flaky test") can require repo-wide reasoning. A 3,000-token prompt can be boilerplate a 9B model handles. The information you need to route correctly mostly doesn't exist until &lt;em&gt;after&lt;/em&gt; a model has attempted the task.&lt;/p&gt;

&lt;p&gt;If your router's accuracy story is a difficulty classifier — however fancy the embeddings — you've built a system that's confidently wrong in both directions: burning frontier tokens on easy requests and serving garbage on hard ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  What works: try cheap, verify, escalate
&lt;/h2&gt;

&lt;p&gt;The architecture that actually gains is the &lt;strong&gt;cascade&lt;/strong&gt;: route to the cheapest plausible tier, run &lt;em&gt;deterministic verification&lt;/em&gt; on the answer, escalate only on failure. Published cascade results show up to &lt;strong&gt;+14% over static assignment&lt;/strong&gt; — and the gain lives in the verifier, because the cascade converts routing from a prediction problem (hard, information-starved) into a &lt;strong&gt;detection problem&lt;/strong&gt; (tractable, information-rich: you have the actual answer in hand).&lt;/p&gt;

&lt;p&gt;The verifier doesn't need to be an LLM judge. Ours is two layers of pure functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structural checks&lt;/strong&gt; targeting the cheap-model failure modes we actually observed live: language drift (CJK tokens appearing mid-English answer), degeneration loops, truncation, malformed tool calls, empty/echo responses. High precision — flag only what is definitely broken.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A coarse effort score&lt;/strong&gt;: substantive ask answered with a stub, structure requested but not delivered, code requested but not delivered. Conservative threshold; only clear failures escalate.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No LLM call in the loop. The verification cost is microseconds, which matters because a router that spends tokens deciding where to send tokens is eating the margin it exists to create.&lt;/p&gt;

&lt;h3&gt;
  
  
  A war story about verifiers
&lt;/h3&gt;

&lt;p&gt;One production bug worth sharing because it generalizes: we shipped a brevity mode that injects "answer tersely" into system prompts to cut output tokens. The verifier's effort-scorer then read the resulting short answers as &lt;em&gt;low-effort&lt;/em&gt; and started cascading trivial greetings up to the frontier tier — burning the exact money the brevity mode saved, and then some.&lt;/p&gt;

&lt;p&gt;The fix was one predicate (skip the effort check when the brevity instruction is present; keep the structural checks), but the lesson is bigger: &lt;strong&gt;a verifier must know what the model was asked to be.&lt;/strong&gt; Any answer-quality check that ignores the instructions that produced the answer will misfire exactly when your prompt engineering works.&lt;/p&gt;

&lt;h2&gt;
  
  
  The second-order effect: verification failures are free training data
&lt;/h2&gt;

&lt;p&gt;Here's where cascades stop being a cost trick and become a learning system.&lt;/p&gt;

&lt;p&gt;Every verification failure is a &lt;strong&gt;labeled hard negative&lt;/strong&gt;: "this request, routed to this tier, produced a detectably bad answer." Every escalation that then passes is a label: "requests like this outgrow the cheap tier." Feed those back into the routing decision — we treat it as a contextual bandit with verifier-generated rewards, logging propensities at decision time so the feedback isn't biased by the router's own choices — and the router learns the difficulty structure of &lt;em&gt;your&lt;/em&gt; traffic, from &lt;em&gt;your&lt;/em&gt; outcomes.&lt;/p&gt;

&lt;p&gt;No benchmark in the loop. That mattered more than usual this month: &lt;strong&gt;one of the field's most-cited coding benchmarks was retracted as broken.&lt;/strong&gt; Every router configured against it inherited the error silently, for months, with nothing in the loop that could detect it. Ground truth from your own traffic doesn't get retracted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Receipts
&lt;/h2&gt;

&lt;p&gt;This is the architecture behind Lynkr (Apache-2.0, self-hosted): deterministic embedding-anchor tier classification (zero LLM calls to route), structural verification on cheap-tier answers only (never second-guess the expensive tier — the loss is asymmetric), cascade escalation, reward pipeline with propensity logging.&lt;/p&gt;

&lt;p&gt;On &lt;a href="https://arxiv.org/abs/2510.00202" rel="noopener noreferrer"&gt;RouterArena&lt;/a&gt; (ICLR 2026, 8,400 queries, evaluation-only rules — no component tuned on their data), our submitted configuration measured &lt;strong&gt;67.65 arena score / 68.41% accuracy at $0.29 per 1K queries, robustness 92.38&lt;/strong&gt; — above GPT-5's built-in router and NotDiamond at a fraction of the per-decision cost. The &lt;a href="https://github.com/RouteWorks/RouterArena/pull/167" rel="noopener noreferrer"&gt;submission PR&lt;/a&gt; has the full config, prediction files, and the disclosures, including the metrics where we're mediocre (routing concentration is real; read the PR).&lt;/p&gt;

&lt;h2&gt;
  
  
  The thesis, restated
&lt;/h2&gt;

&lt;p&gt;For a decade the way to cut inference cost was to make the model cheaper: quantize, distill, fuse kernels. That work still matters — I still do it — but it's optimizing the &lt;em&gt;price of a decision that's already been made&lt;/em&gt;. In a world where capability is a commodity spectrum with 50× price dispersion and single-digit quality spread, the decision itself is where the money is.&lt;/p&gt;

&lt;p&gt;The gap between open and frontier closed. &lt;strong&gt;Allocation is the frontier now.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Lynkr is Apache-2.0 and self-hosted: &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;github.com/Fast-Editor/Lynkr&lt;/a&gt; · &lt;a href="https://www.npmjs.com/package/lynkr" rel="noopener noreferrer"&gt;npm&lt;/a&gt;. If you route production LLM traffic and have cascade/verification war stories, I want to hear them — the failure modes section of our verifier is built from exactly those.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>devtools</category>
    </item>
    <item>
      <title>We Put Our Router on an Academic Benchmark. Here Are the Numbers We'd Rather Hide.</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Mon, 27 Jul 2026 07:36:49 +0000</pubDate>
      <link>https://dev.to/lynkr/we-put-our-router-on-an-academic-benchmark-here-are-the-numbers-wed-rather-hide-1c83</link>
      <guid>https://dev.to/lynkr/we-put-our-router-on-an-academic-benchmark-here-are-the-numbers-wed-rather-hide-1c83</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I maintain &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt;, the router being benchmarked, so read everything here with that in mind. The mitigation: every number in this post comes from &lt;a href="https://arxiv.org/abs/2510.00202" rel="noopener noreferrer"&gt;RouterArena&lt;/a&gt;'s automated evaluation pipeline, run by their CI on their infrastructure, not by me — including the numbers that make us look mediocre.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Every LLM router's README — ours included — makes the same claim: it sends easy queries to cheap models and hard queries to good ones, and saves you money without hurting quality. Almost none of them attach evidence. The numbers that do exist are self-reported, measured on datasets the vendor picked, with baselines the vendor chose.&lt;/p&gt;

&lt;p&gt;So when RouterArena showed up — an open, standardized benchmark for LLM routers out of the RouteWorks group (&lt;a href="https://arxiv.org/abs/2510.00202" rel="noopener noreferrer"&gt;paper&lt;/a&gt;, &lt;a href="https://routeworks.github.io/" rel="noopener noreferrer"&gt;leaderboard&lt;/a&gt;) — we submitted Lynkr to it. This post is what we learned, including the metrics where we did badly, because a benchmark result you only quote selectively is just marketing with extra steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  What RouterArena actually measures
&lt;/h2&gt;

&lt;p&gt;RouterArena evaluates a router over &lt;strong&gt;8,400 queries spanning 9 domains and 44 categories&lt;/strong&gt; at three difficulty levels, and scores it on five axes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Arena Score&lt;/strong&gt; — the headline number, a combined accuracy-vs-cost tradeoff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Accuracy&lt;/strong&gt; — did the model your router picked answer correctly?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost&lt;/strong&gt; — average $ per 1K queries, at real provider prices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Optimality&lt;/strong&gt; — three sub-metrics against the oracle: how often you picked the &lt;em&gt;cheapest correct&lt;/em&gt; model (Opt.Sel), how close your spend was to optimal (Opt.Cost), and how close your accuracy was to the best achievable with your pool (Opt.Acc).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Robustness&lt;/strong&gt; — do trivial rephrasings of the same query flip your routing decision?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One rule matters more than the metrics: &lt;strong&gt;RouterArena is evaluation-only.&lt;/strong&gt; Any router component trained, fitted, or tuned on their data or labels gets rejected, and violations found later get withdrawn. Keep that rule in mind — it comes back at the end of this post.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we submitted
&lt;/h2&gt;

&lt;p&gt;We submitted Lynkr's &lt;strong&gt;untuned production default&lt;/strong&gt; — the same complexity scorer and the same tier boundaries that ship in the repo. The adapter is &lt;a href="https://github.com/RouteWorks/RouterArena/pull/167" rel="noopener noreferrer"&gt;~70 lines of Python&lt;/a&gt; that sends each query to a live Lynkr instance's &lt;code&gt;/routing/analyze&lt;/code&gt; endpoint and maps the returned tier to a model. No benchmark-special code path: the endpoint runs the exact intent scorer the live proxy uses (local embeddings, no LLM call in the routing decision itself).&lt;/p&gt;

&lt;p&gt;The model pool, all via OpenRouter:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Lynkr tier&lt;/th&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SIMPLE&lt;/td&gt;
&lt;td&gt;gpt-oss-120b&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MEDIUM&lt;/td&gt;
&lt;td&gt;Qwen3-235B-A22B&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;COMPLEX / REASONING&lt;/td&gt;
&lt;td&gt;GLM-4.7&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Running all 8,400 queries cost &lt;strong&gt;$2.46 total&lt;/strong&gt;. That's the entire eval bill, which says something on its own about where inference prices are in mid-2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  The results
&lt;/h2&gt;

&lt;p&gt;From RouterArena's automated evaluation on our submission PR:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Lynkr&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Arena Score&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;67.65&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accuracy&lt;/td&gt;
&lt;td&gt;68.41%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per 1K queries&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;$0.29&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Robustness&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;92.38&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opt.Acc (accuracy vs. optimal)&lt;/td&gt;
&lt;td&gt;84.48&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opt.Cost (cost efficiency vs. optimal)&lt;/td&gt;
&lt;td&gt;16.08&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Opt.Sel (optimal model selection)&lt;/td&gt;
&lt;td&gt;10.97&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On the official leaderboard (our submission &lt;a href="https://github.com/RouteWorks/RouterArena/pull/167" rel="noopener noreferrer"&gt;merged 2026-07-23&lt;/a&gt;), that lands mid-table — &lt;strong&gt;15th of 27 routers&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parts we'll be quoting
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;We beat GPT-5 used as a router — at 34× lower cost.&lt;/strong&gt; The leaderboard includes GPT-5 itself as a routing baseline: Arena score 64.32 at &lt;strong&gt;$10.02 per 1K queries&lt;/strong&gt;. Lynkr scores 67.65 at &lt;strong&gt;$0.29 per 1K&lt;/strong&gt;. A local intent scorer making the decision without any LLM call outperforms asking a frontier model to route — which is the entire thesis Lynkr is built on, so we're relieved the benchmark agrees. Several well-known systems (NotDiamond at 57.29, RouteLLM at 48.07, both RouterBench baselines) also land below us.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Robustness 92.38 is top-five territory.&lt;/strong&gt; Most leaderboard routers sit between 22 and 72 — meaning a rephrased query frequently flips their model choice. Lynkr's routing decision survives rephrasing 92% of the time. For an interactive tool where users iterate on prompts, decision stability is arguably worth more than a couple of accuracy points: a router that sends your reworded follow-up to a different model mid-conversation is a router you turn off.&lt;/p&gt;

&lt;h2&gt;
  
  
  The parts we'd rather hide (but won't)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Opt.Sel is 10.97.&lt;/strong&gt; When multiple models in our pool could answer a query correctly, we picked the &lt;em&gt;cheapest&lt;/em&gt; correct one about 11% of the time. Lynkr routes conservatively — when in doubt, it escalates a tier. That's a deliberate live-serving bias (a wrong cheap answer costs more user trust than an unnecessarily good one costs dollars), and $0.29/1K shows the absolute spend stays low. But the oracle comparison is unambiguous: there was money on the table we didn't pick up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The accuracy gap to the top is real.&lt;/strong&gt; Cross-Router leads at 78.14% accuracy; we're at 68.41%. Part of that is the pool (three self-hostable open-weight models — no frontier closed models to escalate to), but part is genuinely the router. Mid-table is where we are, not where we'd spin it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the benchmark taught us — and why we won't act on all of it
&lt;/h2&gt;

&lt;p&gt;Reading our failure cases was the most valuable part of the exercise. The clearest pattern: our SIMPLE→MEDIUM boundary is conservative — a chunk of queries scored just past the boundary and got a mid-tier model when the cheap tier would have answered correctly.&lt;/p&gt;

&lt;p&gt;So we prototyped a shifted boundary and ran it on a ~10% subsample locally: Arena score 69.93, accuracy 71.07%, Opt.Sel jumping from ~11 to ~66. A two-point arena gain from moving one threshold.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That config will never appear on the leaderboard.&lt;/strong&gt; It was diagnosed from RouterArena's own failure cases, which makes it exactly what their evaluation-only rule exists to prevent — a router fitted to the eval. The leaderboard entry is the untuned default, and stays that way. The honest generalization claim is much narrower: the benchmark showed us &lt;em&gt;which knob&lt;/em&gt; matters, and we'll validate new defaults on our own traffic, not on theirs.&lt;/p&gt;

&lt;p&gt;If you maintain a router: this is the trap. The moment a public benchmark exists, the incentive is to tune against it, and every point you gain that way is a point of overfitting you ship to your actual users.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats, so you can weigh this properly
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;RouterArena is single-turn Q&amp;amp;A-style evaluation. Lynkr's primary workload is multi-turn coding agents, which RouterArena doesn't measure — agentic routing (tool-call density, context accumulation) is a different problem than classifying one prompt.&lt;/li&gt;
&lt;li&gt;Our score depends on our chosen pool. A pool with a frontier model on top would score differently in both directions (higher ceiling, higher cost).&lt;/li&gt;
&lt;li&gt;Leaderboard positions move; check the &lt;a href="https://routeworks.github.io/" rel="noopener noreferrer"&gt;live leaderboard&lt;/a&gt; rather than trusting this snapshot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're evaluating routers — including ours — ask every vendor for their RouterArena number. It costs a few dollars and a PR to get one. "We haven't submitted" is also an answer.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt; &lt;a href="https://arxiv.org/abs/2510.00202" rel="noopener noreferrer"&gt;RouterArena paper (arXiv:2510.00202)&lt;/a&gt; · &lt;a href="https://routeworks.github.io/" rel="noopener noreferrer"&gt;leaderboard&lt;/a&gt; · &lt;a href="https://github.com/RouteWorks/RouterArena/pull/167" rel="noopener noreferrer"&gt;our submission PR&lt;/a&gt; · &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>benchmarking</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Stuffing the Context Window Is Making Your Agent Dumber: What the Research Says</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Fri, 17 Jul 2026 01:10:15 +0000</pubDate>
      <link>https://dev.to/lynkr/stuffing-the-context-window-is-making-your-agent-dumber-what-the-research-says-2063</link>
      <guid>https://dev.to/lynkr/stuffing-the-context-window-is-making-your-agent-dumber-what-the-research-says-2063</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I maintain &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt;, an open-source gateway that (among other things) compresses agent tool outputs — so I have a horse in this race. This piece, though, is about the research, and every number in it is cited to its primary source.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There's an intuition almost every LLM user shares: more context = better answers. Million-token context windows are marketed as a capability. We paste in whole files "just in case." Our coding agents accumulate every grep result, every file read, every test log, on the theory that the model might need it.&lt;/p&gt;

&lt;p&gt;The research says this intuition is not just wrong — it's &lt;em&gt;backwards&lt;/em&gt;, and the size of the effect is embarrassing.&lt;/p&gt;

&lt;h2&gt;
  
  
  The result that should change how you build
&lt;/h2&gt;

&lt;p&gt;The cleanest demonstration comes from the Hindsight memory system (&lt;a href="https://arxiv.org/abs/2512.12818" rel="noopener noreferrer"&gt;arXiv:2512.12818&lt;/a&gt;, demo at ACL 2026). On LongMemEval — a benchmark of questions over long conversational histories — the same open-source 20B model scores:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;39.0%&lt;/strong&gt; when handed the &lt;em&gt;full context&lt;/em&gt; — everything, the whole history&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;83.6%&lt;/strong&gt; when handed a &lt;em&gt;curated slice&lt;/em&gt; selected by a structured memory system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same model. Same available information. The difference is that one setup made the model read everything, and the other selected what mattered. &lt;strong&gt;+44.6 points from subtraction.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It gets more uncomfortable: that 20B model with curated context also &lt;strong&gt;beats full-context GPT-4o&lt;/strong&gt;, which scores 60.2% on the same benchmark. A model a fraction of the size, winning because someone cleaned its desk. As the authors put it, the memory architecture — not model scale — drives the performance.&lt;/p&gt;

&lt;p&gt;One benchmark, one paper? No — this is a pile-on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;"Lost in the middle"&lt;/strong&gt; (Liu et al., 2023) established the shape of the problem early: models attend well to the start and end of long contexts and poorly to the middle — exactly where your agent's fifteenth tool result lives.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context-rot studies&lt;/strong&gt; (notably Chroma's 2025 report) showed performance degrading as context grows &lt;em&gt;even when the added tokens are relevant&lt;/em&gt;, and degrading faster when they're distractors.&lt;/li&gt;
&lt;li&gt;A whole 2026 research wave now treats context as a resource to be &lt;strong&gt;managed, not maximized&lt;/strong&gt;: "Agentic Context Engineering" was accepted at ICLR 2026, active context compression systems prune their own working memory (&lt;a href="https://arxiv.org/abs/2601.07190" rel="noopener noreferrer"&gt;arXiv:2601.07190&lt;/a&gt;), and two consolidating surveys (&lt;a href="https://arxiv.org/abs/2512.13564" rel="noopener noreferrer"&gt;arXiv:2512.13564&lt;/a&gt;, &lt;a href="https://arxiv.org/abs/2603.07670" rel="noopener noreferrer"&gt;arXiv:2603.07670&lt;/a&gt;) formalize memory as a write–&lt;em&gt;manage&lt;/em&gt;–read loop — with "manage" doing the heavy lifting.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The marketing said "bigger window." The research says "better librarian."&lt;/p&gt;

&lt;h2&gt;
  
  
  Why more context makes things worse
&lt;/h2&gt;

&lt;p&gt;Three mechanisms, all well-documented:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Attention is a budget, not a spotlight.&lt;/strong&gt; Every token in context competes for attention mass. Pack in 50k tokens of tool output and the three lines that matter are now competing with 49,900 tokens of noise. Needle-in-a-haystack benchmarks — the ones vendors publish — test &lt;em&gt;retrieval&lt;/em&gt; of a planted string, which models are good at. Real tasks require &lt;em&gt;reasoning over&lt;/em&gt; the context, which degrades much faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Distractors don't just dilute — they actively mislead.&lt;/strong&gt; The context-rot findings show semantically-similar-but-irrelevant content is worse than random filler. Your agent's context is &lt;em&gt;full&lt;/em&gt; of this: old versions of the file it's editing, error messages from an already-fixed bug, grep hits from a deprecated module. Each is a plausible-looking wrong answer sitting one attention head away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Position effects compound over turns.&lt;/strong&gt; Agents append. Every turn pushes the important early material (the task! the constraints!) toward the middle of the context — the attention dead zone — while burying the recent signal under boilerplate tool output. A long agent session is a machine for constructing worst-case attention layouts.&lt;/p&gt;

&lt;p&gt;Coding agents are the pathological case of all three at once: they generate enormous, distractor-dense, structurally-repetitive context (JSON tool results, file dumps, test logs) at machine speed, across dozens of turns.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the research says works instead
&lt;/h2&gt;

&lt;p&gt;The successful systems in the literature share a shape — they spend compute &lt;em&gt;deciding what the model sees&lt;/em&gt; instead of showing it everything:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Selection over inclusion.&lt;/strong&gt; Hindsight's four memory networks (facts vs. experiences vs. summaries vs. beliefs) exist so retrieval pulls the &lt;em&gt;right kind&lt;/em&gt; of memory for each question. The general lesson: retrieval into a small context beats residence in a big one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compression as a first-class operation.&lt;/strong&gt; Active-context-compression agents treat "shrink my working set" as an action the agent itself takes, on par with tool calls. Summarize the resolved, drop the superseded, keep the live.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structure beats soup.&lt;/strong&gt; Tabular, labeled, deduplicated context consistently outperforms raw dumps of the same information — the model spends attention on content, not parsing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What you can do about it today
&lt;/h2&gt;

&lt;p&gt;You don't need a research memory system to benefit:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Treat context as a liability with interest, not an asset.&lt;/strong&gt; Every tool result you leave in the window is re-read (and re-billed) every subsequent turn, while making each turn slightly dumber.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compact aggressively and early.&lt;/strong&gt; Whatever your agent's compaction/clear mechanism is (&lt;code&gt;/compact&lt;/code&gt;, &lt;code&gt;/clear&lt;/code&gt;, fresh sessions per task), use it &lt;em&gt;before&lt;/em&gt; quality degrades — by the time you notice the agent going in circles, the context has been hurting you for many turns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scope sessions to tasks.&lt;/strong&gt; One task, one session. The 40-turn omnibus session is the exact scenario the position-effect research warns about.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolate research from execution.&lt;/strong&gt; Subagents (or separate sessions) that read a lot and report a little are context firewalls: the summary crosses over; the 30k tokens of grep output don't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compress tool outputs before they enter context.&lt;/strong&gt; Test logs, JSON blobs, and directory listings compress 40–90% with zero information the model actually needs lost. Whether you do it with a proxy layer (this is the part where I mention that's what &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt; does), a harness setting, or a wrapper script — do it somewhere.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The next time a model launch leads with context-window size, remember the 20B model with a good librarian beating GPT-4o with a hoard. Capacity isn't capability. Curation is.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Primary sources:&lt;/strong&gt; &lt;a href="https://arxiv.org/abs/2512.12818" rel="noopener noreferrer"&gt;Hindsight (arXiv:2512.12818)&lt;/a&gt; · &lt;a href="https://github.com/vectorize-io/hindsight-benchmarks" rel="noopener noreferrer"&gt;benchmark data&lt;/a&gt; · &lt;a href="https://arxiv.org/abs/2307.03172" rel="noopener noreferrer"&gt;Lost in the Middle (Liu et al.)&lt;/a&gt; · &lt;a href="https://arxiv.org/abs/2601.07190" rel="noopener noreferrer"&gt;Active Context Compression (arXiv:2601.07190)&lt;/a&gt; · &lt;a href="https://arxiv.org/abs/2512.13564" rel="noopener noreferrer"&gt;Memory in the Age of AI Agents — survey (arXiv:2512.13564)&lt;/a&gt; · &lt;a href="https://arxiv.org/abs/2603.07670" rel="noopener noreferrer"&gt;Memory for Autonomous LLM Agents — survey (arXiv:2603.07670)&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>devtools</category>
    </item>
    <item>
      <title>How We Built an Agentic-Task Detector for LLM Routing</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Tue, 14 Jul 2026 04:18:47 +0000</pubDate>
      <link>https://dev.to/lynkr/how-we-built-an-agentic-task-detector-for-llm-routing-4eb4</link>
      <guid>https://dev.to/lynkr/how-we-built-an-agentic-task-detector-for-llm-routing-4eb4</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I maintain &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt;, the open-source LLM router whose agentic detector this post dissects. Every snippet below is real, shipping code — &lt;a href="https://github.com/Fast-Editor/Lynkr/blob/main/src/routing/agentic-detector.js" rel="noopener noreferrer"&gt;read the whole file here&lt;/a&gt;, it's 350 lines.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;"Fix the auth bug in session.js."&lt;/p&gt;

&lt;p&gt;Eight words. Every token-count heuristic on earth routes this to the small, cheap model — it's &lt;em&gt;short&lt;/em&gt;. And every one of them is wrong, because those eight words are about to unleash a grep → read → edit → test loop with exact-string file edits, the precise workload where small models fumble tool calls and kill sessions.&lt;/p&gt;

&lt;p&gt;The inverse request — three paragraphs asking for a detailed comparison of locking strategies — &lt;em&gt;looks&lt;/em&gt; expensive and routes safely to a free local model, because it's pure text generation. Size and stakes are nearly uncorrelated in coding-agent traffic. So the router's real job is detecting &lt;strong&gt;agentic intent&lt;/strong&gt;, and this post is a tour of how Lynkr's detector does it: the signals, the weights, the classification ladder — and the embarrassing false positive that almost made the whole thing useless.&lt;/p&gt;

&lt;h2&gt;
  
  
  Not "agentic: yes/no" — a ladder
&lt;/h2&gt;

&lt;p&gt;The first design decision: agentic-ness isn't boolean. The detector classifies requests into four types, each with a minimum tier floor and a score boost fed into the &lt;a href="https://dev.to/lynkr/how-a-13-dimension-complexity-scorer-decides-which-model-gets-your-request-e95"&gt;complexity scorer&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AGENT_TYPES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;SINGLE_SHOT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;SIMPLE&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="na"&gt;scoreBoost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;   &lt;span class="c1"&gt;// request-response, no tools&lt;/span&gt;
  &lt;span class="na"&gt;TOOL_CHAIN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;MEDIUM&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="na"&gt;scoreBoost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;  &lt;span class="c1"&gt;// read -&amp;gt; edit -&amp;gt; test&lt;/span&gt;
  &lt;span class="na"&gt;ITERATIVE&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;COMPLEX&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="na"&gt;scoreBoost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;  &lt;span class="c1"&gt;// retry loops, debugging cycles&lt;/span&gt;
  &lt;span class="na"&gt;AUTONOMOUS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;minTier&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;REASONING&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;scoreBoost&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;35&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;  &lt;span class="c1"&gt;// "figure it out", full autonomy&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;minTier&lt;/code&gt; is a floor, not a suggestion: even if every other dimension scores low, an ITERATIVE request cannot route below the COMPLEX tier. Mid-debugging-loop is the worst possible moment to hand the session to a 7B model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The six signals
&lt;/h2&gt;

&lt;p&gt;Each request accumulates a score from six independent signals. The interesting part is &lt;em&gt;why&lt;/em&gt; each one exists:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Tool count&lt;/strong&gt; (up to +25). Many tools attached usually means the client is prepared for multi-step work. &lt;em&gt;Usually.&lt;/em&gt; This signal is also the source of the great false positive — hold that thought.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Agentic tools specifically&lt;/strong&gt; (up to +25). Not all tools are equal evidence. &lt;code&gt;Bash&lt;/code&gt;, &lt;code&gt;Write&lt;/code&gt;, &lt;code&gt;Edit&lt;/code&gt;, &lt;code&gt;Task&lt;/code&gt;, git and test runners form an explicit set — these mutate state, and their presence signals mutation work. A request that can only &lt;code&gt;Read&lt;/code&gt;/&lt;code&gt;Grep&lt;/code&gt;/&lt;code&gt;WebSearch&lt;/code&gt; sits in a separate read-only set and earns nothing here. Two requests with five tools each can be night and day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Prior tool results&lt;/strong&gt; (up to +30 — the heaviest signal). If the conversation already contains &lt;code&gt;tool_result&lt;/code&gt; blocks, you're not predicting an agentic loop — you're &lt;em&gt;inside&lt;/em&gt; one. More than five results means a deep loop with accumulated exact state (file contents, error strings); downgrading the model now throws away the context discipline keeping that loop convergent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Language patterns&lt;/strong&gt; (up to +25 each). Regexes over the last user message:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;tool-chain&lt;/em&gt;: "then use", "after that", "step 2"&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;iterative&lt;/em&gt;: "keep trying", "until", "retry", "debug"&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;autonomous&lt;/em&gt;: "figure out", "make it work", "on your own", "whatever it takes"&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;multi-file&lt;/em&gt;: "across the codebase", "refactor entire", "everywhere"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plus a combination rule: "implement" alone is +10-ish planning noise, but "implement" &lt;em&gt;and&lt;/em&gt; "test/verify/make sure" in the same request is +15 — build-and-verify phrasing is a reliable tell of real work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Conversation depth&lt;/strong&gt; (up to +20). Fifteen-plus messages means established context and momentum.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Prompt length&lt;/strong&gt; (+10). The weakest signal, deliberately — see the opening paragraph.&lt;/p&gt;

&lt;p&gt;Score ≥ 25 → the request is agentic. The classification ladder then applies both thresholds &lt;em&gt;and&lt;/em&gt; signal combinations — AUTONOMOUS needs score ≥ 60, or an explicit autonomous phrase with score ≥ 40. A phrase alone doesn't do it; a high score without autonomous language doesn't either, unless it's overwhelming.&lt;/p&gt;

&lt;h2&gt;
  
  
  The false positive that almost sank it
&lt;/h2&gt;

&lt;p&gt;Early versions had a humiliating problem: &lt;strong&gt;every single Claude Code request scored agentic.&lt;/strong&gt; Including "hello."&lt;/p&gt;

&lt;p&gt;Why? Claude Code attaches its full tool loadout — Read, Write, Edit, Bash, Grep, Glob, Task, and friends — to &lt;em&gt;every&lt;/em&gt; request, even a greeting. Signals 1 and 2 saw 11+ tools, four of them mutating, on everything. Every request cleared the threshold, every request routed to expensive tiers, and the router's entire value proposition — savings — evaporated. The detector was technically working and practically useless.&lt;/p&gt;

&lt;p&gt;The fix ships as &lt;strong&gt;client profiles&lt;/strong&gt;: known harnesses (Claude Code, Cursor, Codex CLI) have documented baseline loadouts, and the tool-count signals score only the tools &lt;em&gt;beyond&lt;/em&gt; that baseline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Signals 1 &amp;amp; 2 score only tools BEYOND the harness's baseline loadout —&lt;/span&gt;
&lt;span class="c1"&gt;// Claude Code's 11 always-attached tools shouldn't count as "agentic&lt;/span&gt;
&lt;span class="c1"&gt;// intent" on their own.&lt;/span&gt;
&lt;span class="nx"&gt;toolsForScoring&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;clientProfiles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;effectiveTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Crucially, signals 3–6 still use the full payload — prior tool results and conversational language are &lt;em&gt;genuine&lt;/em&gt; evidence regardless of which harness sent them. Only the tool-presence signals get the subtraction, because only they are polluted by the harness's constant.&lt;/p&gt;

&lt;p&gt;And for traffic from harnesses we've never seen? A guard: if &lt;em&gt;every&lt;/em&gt; attached tool looks like a standard baseline and there are 10+ of them, the tool-count signals zero out rather than fire:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;clientProfiles&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;allToolsAreBaseline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;rawTools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Unknown harness that looks like Claude Code / Cursor / Codex —&lt;/span&gt;
  &lt;span class="c1"&gt;// zero out the tool-count signals to avoid the same trap.&lt;/span&gt;
  &lt;span class="nx"&gt;toolsForScoring&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
  &lt;span class="nx"&gt;scoringNote&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;unknown_harness_guard&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better to under-detect and lean on the five uncorrupted signals than to re-create the everything-is-agentic bug for unknown clients.&lt;/p&gt;

&lt;p&gt;One subtle consequence, preserved as a comment in the source: with the baseline subtracted, tool counts rarely reach the AUTONOMOUS threshold on their own — so the &lt;em&gt;autonomous phrase pattern&lt;/em&gt; becomes the primary path to the top classification. The signal design acknowledges its own post-fix physics.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it still gets wrong
&lt;/h2&gt;

&lt;p&gt;Honesty section. Known limitations, from the code itself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It reads only the last user message.&lt;/strong&gt; "Do what I described above" carries the intent of an earlier message the regexes never see. Conversation-depth and tool-result signals partially compensate — but pattern detection is myopic by design (scanning full history was too noisy).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regexes can't tell mention from intent.&lt;/strong&gt; "Why did the retry loop break?" trips the iterative pattern despite being a read-only question. In practice this fails &lt;em&gt;safe&lt;/em&gt; — over-routing a question up-tier costs cents, under-routing an edit session down-tier costs the session — but it's still a false positive.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;English only.&lt;/strong&gt; The patterns are English regexes; agentic intent in other languages leans entirely on the structural signals.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every detection returns its full evidence — score, signal list with weights, classification, and a &lt;code&gt;scoringNote&lt;/code&gt; explaining any baseline subtraction — so when the router misjudges, the telemetry shows exactly which signal lied. Debuggability was a design requirement: a routing layer you can't interrogate is a routing layer you'll eventually rip out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaways if you're building anything similar
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Subtract the constant before reading the signal.&lt;/strong&gt; Whatever your equivalent of "the harness always attaches 11 tools" is — find it and remove it, or every request looks the same.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate "prepared for tools" from "already using tools."&lt;/strong&gt; Attached tools are weak evidence; &lt;code&gt;tool_result&lt;/code&gt; blocks in the conversation are near-proof.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail toward the expensive model.&lt;/strong&gt; Asymmetric costs mean your threshold should be calibrated so mistakes over-spend pennies rather than break sessions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the detector explain itself.&lt;/strong&gt; A score without a signal list is a black box you'll never be able to tune.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The whole detector is 350 lines of dependency-free JavaScript: &lt;a href="https://github.com/Fast-Editor/Lynkr/blob/main/src/routing/agentic-detector.js" rel="noopener noreferrer"&gt;src/routing/agentic-detector.js&lt;/a&gt;. Steal it, or tell me which of your prompts it would misjudge — the failure cases are the roadmap.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>opensource</category>
      <category>node</category>
    </item>
    <item>
      <title>Choosing a Local Tier for Your Coding Agent (July 2026 Edition)</title>
      <dc:creator>Lynkr</dc:creator>
      <pubDate>Wed, 08 Jul 2026 00:14:16 +0000</pubDate>
      <link>https://dev.to/lynkr/choosing-a-local-tier-for-your-coding-agent-july-2026-edition-2196</link>
      <guid>https://dev.to/lynkr/choosing-a-local-tier-for-your-coding-agent-july-2026-edition-2196</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I maintain &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;Lynkr&lt;/a&gt;, the open-source router used in the config examples. The benchmark figures below are third-party or vendor-reported (flagged where vendor-only) — I haven't independently benchmarked these models yet; the point of this post is to help you match models to request classes and test on your own workload.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;June 2026 was the busiest month for open-weight coding models in recent memory: GLM-5.2, MiniMax M3, Kimi K2.7 Code, Gemma 4, and NVIDIA's Nemotron 3 Ultra all landed within weeks. If you route your coding agent's simple requests to a local model — the "cloud architect, local coder" pattern — your options just changed meaningfully.&lt;/p&gt;

&lt;p&gt;Here's how I'd map the current field onto routing tiers, by hardware budget and by what each model can &lt;em&gt;safely&lt;/em&gt; own.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, the trap: "best open model" ≠ "your local tier"
&lt;/h2&gt;

&lt;p&gt;The headline model of the month, &lt;a href="https://techsy.io/en/blog/best-open-source-llms-2026" rel="noopener noreferrer"&gt;GLM-5.2&lt;/a&gt;, scores 62.1% on SWE-bench Pro — above GPT-5.5. It is also a 744B-parameter MoE whose 2-bit quant alone wants ~245 GB of memory. That's an open-&lt;em&gt;weight&lt;/em&gt; model, not a local model; for self-hosters it's a $40k-rig proposition (&lt;a href="https://aiweekly.co/node/5306" rel="noopener noreferrer"&gt;one published build&lt;/a&gt; runs it on four RTX PRO 6000s). The same goes for DeepSeek-V4 Pro and MiniMax M3: superb models you'll realistically consume via API, where they belong in your COMPLEX/REASONING tiers, not your local one.&lt;/p&gt;

&lt;p&gt;Your local tier is decided by a harsher question: &lt;strong&gt;what fits in your VRAM and still makes reliable tool calls?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The local field, by hardware budget
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;~16 GB RAM (ordinary laptop): Gemma 4 12B.&lt;/strong&gt; Released June 3 as a dense 12B that genuinely fits consumer RAM (&lt;a href="https://www.sitepoint.com/local-llms-are-getting-easier-the-complete-guide-2026/" rel="noopener noreferrer"&gt;SitePoint's guide&lt;/a&gt;). Apache-2.0-class licensing with no usage clauses. This is a SIMPLE-tier model: explanations, one-liners, commit messages, "what does this error mean." I would not hand it an Edit tool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;24 GB GPU (RTX 3090/4090 class): Qwen3.6-27B — still the default answer.&lt;/strong&gt; The community's consensus "local Claude" since April: within a few points of frontier models on SWE-bench Verified (77.2 reported vs Claude's 80.9 — &lt;a href="https://codersera.com/blog/qwen-3-6-as-local-claude-code-replacement-2026/" rel="noopener noreferrer"&gt;analysis&lt;/a&gt;), Apache-2.0, runs quantized on a single 24 GB card or a ~$2k build. Its known weakness is exactly the one that matters for agents: tool-call reliability drifts in long contexts — fine as a &lt;em&gt;supervised&lt;/em&gt; MEDIUM tier, risky as an unsupervised COMPLEX one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agentic multi-file edits on similar hardware: Devstral Small 2.&lt;/strong&gt; Purpose-built for multi-file, tool-driven coding rather than chat (&lt;a href="https://www.kdnuggets.com/top-7-coding-models-you-can-run-locally-in-2026" rel="noopener noreferrer"&gt;KDnuggets roundup&lt;/a&gt;). If your traffic is edit-heavy, it can arguably take MEDIUM-tier mutation requests that I'd keep away from general chat models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Autocomplete-shaped work: Codestral 22B&lt;/strong&gt; is fast and good at it — but mind the non-commercial license before using it for work.&lt;/p&gt;

&lt;p&gt;One rule that keeps proving out (&lt;a href="https://pinggy.io/blog/best_open_source_self_hosted_llms_for_coding/" rel="noopener noreferrer"&gt;Pinggy's guide&lt;/a&gt;): &lt;strong&gt;within the same memory budget, a bigger model at Q4 usually beats a smaller one at Q8.&lt;/strong&gt; Quantization choice matters nearly as much as model family.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mapping to tiers
&lt;/h2&gt;

&lt;p&gt;Putting that together into a routing config (Lynkr shown; the mapping logic applies to any router):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 24 GB GPU + API keys for the hard stuff&lt;/span&gt;
&lt;span class="nv"&gt;TIER_SIMPLE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ollama:gemma4:12b            &lt;span class="c"&gt;# trivia, explanations, greetings&lt;/span&gt;
&lt;span class="nv"&gt;TIER_MEDIUM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ollama:qwen3.6:27b           &lt;span class="c"&gt;# code questions, supervised edits&lt;/span&gt;
&lt;span class="nv"&gt;TIER_COMPLEX&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;deepseek:deepseek-v4-flash  &lt;span class="c"&gt;# tool-heavy mutations, via API&lt;/span&gt;
&lt;span class="nv"&gt;TIER_REASONING&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;deepseek:deepseek-v4      &lt;span class="c"&gt;# architecture, multi-step planning&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why V4 Flash for COMPLEX: it's the first open-weight model teams report dropping into real agentic pipelines as a frontier substitute &lt;em&gt;on price&lt;/em&gt; (&lt;a href="https://openrouter.ai/blog/insights/the-open-weight-models-that-matter-june-2026/" rel="noopener noreferrer"&gt;OpenRouter's June analysis&lt;/a&gt;) — the cheapest "won't break the session" option right now. Kimi K2.7 Code (vendor-reported 58.6% SWE-bench Pro at ~30% fewer reasoning tokens) and GLM-5.2 are strong API-tier alternatives; all the June day-one numbers are vendor-reported, so treat them as directional until LiveBench catches up.&lt;/p&gt;

&lt;p&gt;The key discipline: &lt;strong&gt;the boundary between MEDIUM and COMPLEX should not be "how big is the request" but "will tools mutate state."&lt;/strong&gt; Local models in this class handle read-and-explain reliably; exact-match edits and bash execution are where they still break sessions — I wrote up those failure modes &lt;a href="https://dev.to/lynkr/routing-down-is-easy-knowing-when-not-to-is-hard-why-cheap-models-break-your-coding-agent-4g33"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed vs three months ago
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The floor rose.&lt;/strong&gt; A 16 GB laptop now runs a genuinely useful SIMPLE tier (Gemma 4). Six months ago that tier meant 3B models that couldn't be trusted with a paragraph.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The open-weight ceiling now beats proprietary on some coding benchmarks&lt;/strong&gt; (GLM-5.2 &amp;gt; GPT-5.5 on SWE-bench Pro) — but at server scale, which &lt;em&gt;strengthens&lt;/em&gt; the hybrid pattern: open models via cheap APIs up top, small open models on your metal below.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MoE won.&lt;/strong&gt; Every serious June release is Mixture-of-Experts. For self-hosters this cuts both ways: better quality-per-active-param, but total memory footprints that keep the top tier out of reach.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Licensing is consolidating&lt;/strong&gt; around MIT (DeepSeek) and Apache-2.0 (Qwen, Gemma) for the models you'd actually build on.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Test on your traffic, not on benchmarks
&lt;/h2&gt;

&lt;p&gt;Every number above is someone else's workload. The honest way to pick your local tier: route a week of your real traffic through whatever candidates fit your hardware, and count &lt;em&gt;session survival&lt;/em&gt; — how often the local model's tool calls held up — not just benchmark deltas. That's a one-line config change per candidate, and your own telemetry will contradict at least one thing this post told you.&lt;/p&gt;

&lt;p&gt;Lynkr is Apache-2.0, self-hosted, and treats every model above as a first-class routing tier: &lt;a href="https://github.com/Fast-Editor/Lynkr" rel="noopener noreferrer"&gt;github.com/Fast-Editor/Lynkr&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>opensource</category>
      <category>ollama</category>
    </item>
  </channel>
</rss>
