<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://ioitltd.uk/feed.xml" rel="self" type="application/atom+xml" /><link href="https://ioitltd.uk/" rel="alternate" type="text/html" /><updated>2026-11-11T22:42:06+00:00</updated><id>https://ioitltd.uk/feed.xml</id><title type="html">io_it</title><subtitle>Cloud and AI infrastructure for small companies: cost-effective AI inference, cloud health checks and platform engineering, at a fixed price agreed before work starts.</subtitle><entry><title type="html">API gateways: what they do, where they go, and what they cost to run</title><link href="https://ioitltd.uk/2026/11/09/api-gateways-what-where-why.html" rel="alternate" type="text/html" title="API gateways: what they do, where they go, and what they cost to run" /><published>2026-11-09T00:00:00+00:00</published><updated>2026-11-09T00:00:00+00:00</updated><id>https://ioitltd.uk/2026/11/09/api-gateways-what-where-why</id><content type="html" xml:base="https://ioitltd.uk/2026/11/09/api-gateways-what-where-why.html"><![CDATA[<p>“Do we need an API gateway?” It depends less on the product than on which problems you actually have, and the cost of getting it wrong ranges from a few pounds a month to a few thousand.</p>

<h2 id="what-a-gateway-does">What a gateway does</h2>

<p>An API gateway is the single front door to your services. Requests arrive at the gateway; it decides what to do with them before anything reaches your code.</p>

<p>The common jobs:</p>
<ul>
  <li><strong>Routing.</strong> <code class="language-plaintext highlighter-rouge">/orders</code> goes to one service, <code class="language-plaintext highlighter-rouge">/users</code> to another.</li>
  <li><strong>TLS termination.</strong> Certificates are handled in one place.</li>
  <li><strong>Authentication.</strong> API keys, JWT validation or OAuth, checked once at the edge rather than in every service.</li>
  <li><strong>Rate limiting and quotas.</strong> Protect your backend and enforce plan limits.</li>
  <li><strong>Request and response transformation.</strong> Headers, versioning, protocol translation.</li>
  <li><strong>Observability.</strong> One place to log, measure and trace every call.</li>
  <li><strong>Developer portal and monetisation.</strong> Documentation, key issuance and billing for external API consumers. Where “gateway” turns into “API management”.</li>
</ul>

<p>Most small teams need the first four. Very few need the last.</p>

<h2 id="where-it-sits">Where it sits</h2>

<p>There are four broad places to put this function, in rising order of complexity:</p>

<ol>
  <li><strong>A reverse proxy you already run.</strong> Caddy, Nginx or Traefik in front of your services. Routing, TLS and basic rate limiting come free; authentication needs a plugin or a few lines of config.</li>
  <li><strong>A self-hosted gateway.</strong> Kong Gateway (open source) or KrakenD Community Edition (Apache 2.0) on your own instances. More features, a plugin ecosystem, still yours to run.</li>
  <li><strong>A managed cloud gateway.</strong> AWS API Gateway, Google Cloud API Gateway, or an edge platform such as Cloudflare Workers. No servers, priced per request, tied to that provider.</li>
  <li><strong>A full API management platform.</strong> Apigee or Kong Konnect: policies, analytics, developer portals, monetisation, with pricing to match.</li>
</ol>

<h2 id="complexity">Complexity</h2>

<table>
  <thead>
    <tr>
      <th>Option</th>
      <th>Setup effort</th>
      <th>Ongoing effort</th>
      <th>Lock-in</th>
      <th>Best fit</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Reverse proxy (Caddy, Nginx, Traefik)</td>
      <td>Hours</td>
      <td>Low: patching, config in Git</td>
      <td>None</td>
      <td>One app, a few services, internal or first-party clients</td>
    </tr>
    <tr>
      <td>Self-hosted gateway (Kong OSS, KrakenD)</td>
      <td>Days</td>
      <td>Medium: upgrades, HA, plugin config</td>
      <td>Low</td>
      <td>Several services, real auth and rate-limit needs, cost-sensitive</td>
    </tr>
    <tr>
      <td>Managed cloud gateway (AWS, GCP, Cloudflare)</td>
      <td>Hours to days</td>
      <td>Low</td>
      <td>Medium to high</td>
      <td>Serverless backends already on that provider, spiky traffic</td>
    </tr>
    <tr>
      <td>API management platform (Apigee, Konnect)</td>
      <td>Weeks</td>
      <td>Medium, plus a vendor relationship</td>
      <td>High</td>
      <td>Public APIs sold to third parties, portals, monetisation</td>
    </tr>
  </tbody>
</table>

<h2 id="run-cost">Run cost</h2>

<p>Request-related cost per month at list prices (checked 1 October 2026). Prices are shown in the provider’s own currency. This table excludes egress, logging, tax and free-tier credits; egress follows below.</p>

<table>
  <thead>
    <tr>
      <th>Option</th>
      <th>5M requests/month</th>
      <th>50M requests/month</th>
      <th>300M requests/month</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>AWS API Gateway, HTTP API</td>
      <td>$5</td>
      <td>$50</td>
      <td>$300</td>
    </tr>
    <tr>
      <td>AWS API Gateway, REST API</td>
      <td>$18</td>
      <td>$175</td>
      <td>$1,050</td>
    </tr>
    <tr>
      <td>Google Cloud API Gateway</td>
      <td>$9</td>
      <td>$144</td>
      <td>$894</td>
    </tr>
    <tr>
      <td>Apigee pay-as-you-go, Base environment</td>
      <td>$465</td>
      <td>$1,365</td>
      <td>not available</td>
    </tr>
    <tr>
      <td>Kong Konnect Plus (serverless)</td>
      <td>$825</td>
      <td>not available</td>
      <td>not available</td>
    </tr>
    <tr>
      <td>Cloudflare Workers Paid</td>
      <td>$5</td>
      <td>$17</td>
      <td>$92</td>
    </tr>
    <tr>
      <td>Self-hosted on Scaleway (2 × PLAY2-PICO + LB-S load balancer)</td>
      <td>€38</td>
      <td>€38</td>
      <td>€38</td>
    </tr>
  </tbody>
</table>

<p>Check them yourself: <a href="https://aws.amazon.com/api-gateway/pricing/">AWS API Gateway</a>, <a href="https://cloud.google.com/api-gateway/pricing">Google Cloud API Gateway</a>, <a href="https://cloud.google.com/apigee/pricing">Apigee</a>, <a href="https://konghq.com/pricing">Kong Konnect</a>, <a href="https://developers.cloudflare.com/workers/platform/pricing/">Cloudflare Workers</a>, <a href="https://www.scaleway.com/en/pricing/virtual-instances/">Scaleway Instances</a> and <a href="https://www.scaleway.com/en/pricing/network/">Scaleway Load Balancer</a>.</p>

<p>How to read it:</p>

<ul>
  <li><strong>Per-request pricing is cheap until it isn’t.</strong> AWS’s HTTP API is the bargain of the managed options; its REST API, which many tutorials still default to, costs 3.5 times as much per request.</li>
  <li><strong>API management platforms have a floor.</strong> Apigee’s Base environment starts at $365 a month before a single call, and caps at 50 requests a second, about 130M a month. Kong Konnect Plus costs $25 a month for a serverless gateway, which includes 1M requests, then charges $200 for each additional million and stops at 10M a month.</li>
  <li><strong>Self-hosting is flat.</strong> Two PLAY2-PICO instances at about €10.42 a month each and an LB-S load balancer at about €16.79 cost the same at 5M requests as at 300M. The instances sit on a free private network behind the load balancer, so they don’t need public IPv4 addresses; if you give them one, add about €2.92 a month each. That 300M is an average of about 115 requests a second, comfortably within what a lightweight proxy handles on modest hardware, though you should load-test your own traffic before relying on it.</li>
  <li><strong>Edge workers are surprisingly cheap.</strong> Cloudflare’s Workers Paid plan includes 10M requests for $5 and charges $0.30 per million after that, and doesn’t charge for egress. CPU time is billed separately, so a gateway doing heavy work per request will cost more than this. You write the gateway logic yourself, so treat it as a programmable proxy rather than an off-the-shelf gateway.</li>
</ul>

<h2 id="then-add-egress">Then add egress…</h2>

<p>Egress is the charge for data leaving the provider, and it has always been the elephant in the room with AWS and the other hyperscalers. It rarely shows up on a pricing page headline, and it’s designed to scale with your success.</p>

<p>Here’s the same comparison with an assumption of 10 KB per average response, which is modest for a JSON API. That’s 50 GB a month at 5M requests and 3,000 GB at 300M.</p>

<table>
  <thead>
    <tr>
      <th>Option</th>
      <th>5M: egress / total</th>
      <th>50M: egress / total</th>
      <th>300M: egress / total</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>AWS API Gateway, HTTP API</td>
      <td>$4 / $10</td>
      <td>$45 / $95</td>
      <td>$270 / $570</td>
    </tr>
    <tr>
      <td>AWS API Gateway, REST API</td>
      <td>$4 / $22</td>
      <td>$45 / $220</td>
      <td>$270 / $1,320</td>
    </tr>
    <tr>
      <td>Google Cloud API Gateway</td>
      <td>$5 / $14</td>
      <td>$52 / $196</td>
      <td>$315 / $1,209</td>
    </tr>
    <tr>
      <td>Cloudflare Workers Paid</td>
      <td>$0 / $5</td>
      <td>$0 / $17</td>
      <td>$0 / $92</td>
    </tr>
    <tr>
      <td>Self-hosted on Scaleway</td>
      <td>€0 / €38</td>
      <td>€0 / €38</td>
      <td>€0 / €38</td>
    </tr>
  </tbody>
</table>

<p>AWS charges <a href="https://aws.amazon.com/ec2/pricing/on-demand/">$0.09 per GB</a> and Google Cloud <a href="https://cloud.google.com/vpc/network-pricing">$0.105 per GB</a> within Europe on its premium tier. Cloudflare doesn’t charge for egress on Workers, and Scaleway’s list prices include it. The AWS figures ignore its free allowance of 100 GB a month, which covers the whole 5M column but barely dents the 300M one. On AWS’s HTTP API, egress almost doubles the bill at every volume. Larger responses, file downloads or a chatty mobile app make it worse.</p>

<p>The Scaleway setup has bandwidth limits rather than a meter: 100 Mbps per PLAY2-PICO instance and 200 Mbps on the LB-S load balancer. 300M requests at 10 KB averages about 9 Mbps, so there’s headroom, but plan for your peaks rather than your average.</p>

<h2 id="and-then-the-shopping-basket">And then the shopping basket…</h2>

<p>The gateway is rarely the only line item. Turn on access logging and every request becomes a log entry, billed for ingestion and again for storage. Add metrics, tracing, a WAF, a cache, a custom domain, a private endpoint. Each one is a small item and each looks reasonable on its own, like dropping things into a shopping basket. The total at the till is what surprises people, and it grows with your traffic.</p>

<p>Before choosing, list every add-on you’ll actually switch on and price the basket, not just the headline item. Sample your logs, or keep only errors and slow requests.</p>

<p><strong>Avoiding lock-in.</strong> A managed gateway’s configuration doesn’t move. If you want to be able to change provider in the future, keep routing and auth rules in code you can port, and don’t build business logic into gateway policies.</p>

<p><strong>Running it yourself</strong> takes some ongoing attention: patching, certificates, upgrades, a second instance for availability. How much that’s worth depends on your team, so I haven’t put a number on it. With infrastructure in code and a managed load balancer in front, it’s less than people expect.</p>

<h2 id="what-id-pick">What I’d pick</h2>

<ul>
  <li><strong>One product, a handful of services, your own frontend as the main client:</strong> a reverse proxy. You may never need more.</li>
  <li><strong>Several services, external API consumers, real rate-limit and key management:</strong> a self-hosted gateway on cheap European instances, or AWS’s HTTP API if you’re already serverless on AWS.</li>
  <li><strong>Very spiky or global traffic, small team:</strong> an edge platform.</li>
  <li><strong>You sell API access to third parties and need portals and billing:</strong> now an API management platform earns its price tag, and not before.</li>
</ul>

<p>Most people I’ve talked to are in the first two groups and are being sold the fourth.</p>

<p>If you’re not sure which group you’re in, it’s one of the questions a <a href="/about/">Cloud Health Check</a> answers.</p>]]></content><author><name></name></author><category term="platform" /><category term="cost" /><category term="architecture" /><summary type="html"><![CDATA[From a reverse proxy to a full API management platform, the price difference at the same traffic is more than 100 times. Here's how to pick the smallest one that does the job.]]></summary></entry><entry><title type="html">Learning a Codebase with LLMs - What Each Model Tier Buys You (October ‘26)</title><link href="https://ioitltd.uk/2026/10/21/learning-a-codebase-what-each-model-tier-buys-you.html" rel="alternate" type="text/html" title="Learning a Codebase with LLMs - What Each Model Tier Buys You (October ‘26)" /><published>2026-10-21T00:00:00+00:00</published><updated>2026-10-21T00:00:00+00:00</updated><id>https://ioitltd.uk/2026/10/21/learning-a-codebase-what-each-model-tier-buys-you</id><content type="html" xml:base="https://ioitltd.uk/2026/10/21/learning-a-codebase-what-each-model-tier-buys-you.html"><![CDATA[<p><strong>I have a toolset designed to help me understand codebases and application design.  I wanted to understand which model was best suited to the job, and which gave the best value for money.  I tested two dozen language models. The cheapest decent model got me 80% of the way for half a cent. The last stretch didn’t come from a bigger model. It came from the harness around it.</strong></p>

<h3 id="what-i-built">What I Built</h3>

<p><strong>Learn Codebase</strong> is a small tool I built to get up to speed on someone else’s code. You point it at a GitHub or GitLab repository, or a folder on your machine, and a language model reads the code. It then writes a set of flashcards and a multiple-choice test about how the project works. It runs as a simple Jekyll site, and talks to any OpenAI-compatible endpoint: LM Studio locally, or OpenRouter for hosted models. There is also a Claude Code version (a <code class="language-plaintext highlighter-rouge">/learn-codebase</code> skill) that runs on my Claude subscription.</p>

<p>Which raised the question: which model should I pick to do the work?</p>

<h3 id="why-test">Why Test?</h3>

<p>I had four questions:</p>

<ul>
  <li><strong>Local or cloud?</strong> I’ve written on my personal blog about <a href="https://jimm.uk/post/llm/ai/tech/mac/2026/01/29/Developing-with-local-llms-jan-26.html">developing with local LLMs</a> and about <a href="https://jimm.uk/post/llm/ai/tech/2026/03/27/Inference-Endpoints.html">cloud inference endpoints</a>. This was a chance to put numbers on that trade-off for a real task.</li>
  <li><strong>Is my go-to model good enough?</strong> GLM-5.3-Flash has been my everyday model, because it is fast, reasonably capable and very cheap. But it has lost coherence on me a couple of times, once deleting its own skill files, which had to be recovered from backup. Does it have challengers at its price?</li>
  <li><strong>How big is the gap to the frontier,</strong> and what does closing it cost?</li>
  <li><strong>What does an agent harness add?</strong> Claude Code runs Claude Opus 5.5. How much of its result comes from the model, and how much from Claude Code itself?</li>
</ul>

<h3 id="how-i-tested">How I Tested</h3>

<ul>
  <li><strong>Three codebases:</strong> Learn Codebase itself (JavaScript), Pallets’ <a href="https://github.com/pallets/itsdangerous">itsdangerous</a> (Python) and <a href="https://github.com/go-chi/chi">chi</a> (Go), from 44 to 110 files.</li>
  <li><strong>The same job every time:</strong> 20 flashcards and 10 multiple-choice questions with four options each.</li>
  <li><strong>Blind judging against the code:</strong> headless Claude Code read each codebase and scored every item for correctness and insight. For questions, it also checked whether the answer key was right and whether the wrong options were plausible. It never knew which model wrote what, and every verdict had to cite a file and line.</li>
  <li><strong>Coverage:</strong> before judging, Claude Code listed the 20 key concepts a newcomer needs for each codebase. Each set was scored on how many of them it taught correctly.</li>
  <li><strong>One number:</strong> each result is a percentage of the score the Claude Code skill achieved on the same codebase.</li>
  <li><strong>Repeats:</strong> the important comparisons were run up to nine times, because the judge alone can move a score by about 10 points.</li>
</ul>

<p>Local models ran in LM Studio on my Apple M2 Max with 64GB RAM. Everything hosted went through OpenRouter, with my zero-data-retention guardrail switched on. The whole exercise cost about $25 on OpenRouter, plus a bit of my Claude Pro subscription time for the judging.</p>

<p>A caveat up front: the judge is Claude inside the Claude Code harness. The sets were anonymised and every verdict needed evidence, but if anything the method favours Claude. Treat differences under 10 points as noise.</p>

<h3 id="the-results">The Results</h3>

<p><img src="/assets/learn-codebase-tiers.svg" alt="Every tier against Claude Code" /></p>

<table>
  <thead>
    <tr>
      <th>Tier</th>
      <th>Model</th>
      <th>vs Claude Code</th>
      <th>Cost per set</th>
      <th>Time per set</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Agent</td>
      <td>Claude Code skill (Opus 5.5)</td>
      <td>100%</td>
      <td>subscription (about $0.80 API-equivalent)</td>
      <td>2 min</td>
    </tr>
    <tr>
      <td>Frontier</td>
      <td>Claude Opus 5.5 via the API</td>
      <td>89%</td>
      <td>$0.55</td>
      <td>2 min</td>
    </tr>
    <tr>
      <td>Frontier</td>
      <td>Gemini 4 Argon</td>
      <td>88%</td>
      <td>$0.41</td>
      <td>6.5 min</td>
    </tr>
    <tr>
      <td>Frontier</td>
      <td>GPT-6 Astra</td>
      <td>85%</td>
      <td>$1.04</td>
      <td>3.7 min</td>
    </tr>
    <tr>
      <td>Mid-price</td>
      <td>GLM-5.3</td>
      <td>85%</td>
      <td>$0.04</td>
      <td>2 min</td>
    </tr>
    <tr>
      <td>Budget</td>
      <td>GLM-5.3-Flash</td>
      <td>80%</td>
      <td>$0.006</td>
      <td>1.6 min</td>
    </tr>
    <tr>
      <td>Budget</td>
      <td>MiMo-V2.6-Pro / Claude Haiku 5.5</td>
      <td>77-79%</td>
      <td>$0.02</td>
      <td>2-4 min</td>
    </tr>
    <tr>
      <td>Frontier</td>
      <td>Grok 4.7</td>
      <td>77%</td>
      <td>$0.38</td>
      <td>7 min</td>
    </tr>
    <tr>
      <td>Local</td>
      <td>gemma-4-31b-qat</td>
      <td>about 70%</td>
      <td>free</td>
      <td>25 min</td>
    </tr>
    <tr>
      <td>Local</td>
      <td>qwen3.6-35b-a3b</td>
      <td>about 55%</td>
      <td>free</td>
      <td>3-4 min</td>
    </tr>
  </tbody>
</table>

<p><img src="/assets/learn-codebase-cost.svg" alt="What each point of quality costs" /></p>

<h3 id="what-i-learned">What I Learned</h3>

<p><strong>1. The harness matters more than the model.</strong></p>

<p>This was the most interesting result. Called through the API at the same effort, Claude Opus 5.5 scored <strong>89%</strong> of what it achieves inside Claude Code. It was every bit as accurate and insightful; the whole gap was coverage. Claude Code’s sets taught 87% of the key concepts, the API’s about 70%.</p>

<p>My first thought was that the API version simply saw less of the code, so I sent it two to four times as much. It barely moved: 90%, at twice the cost. On the Go codebase it read all 108 files and scored <em>lower</em>. The API runs had the code in front of them. What they lacked was a way to tell which parts mattered. Claude Code explores like an engineer: it looks at the structure, picks what matters, follows references across files and checks its own draft. That is worth more than a bigger model or a bigger context window.</p>

<p><em>I may investigate harnesses further with smaller models to see just what you can get out of them, especially when combining with targetted post training.</em></p>

<p><strong>2. Price buys reliability, not much more quality.</strong></p>

<p>The curve is steep. Half a cent buys 80% (GLM-5.3-Flash), four cents buys 85% (GLM-5.3), and 55 cents buys 89% (Opus 5.5). What the frontier tier really bought was reliability: every frontier model got every answer key right, and missed fewer important ideas. The budget models were 93-97% accurate, but occasionally keyed the wrong answer, or left two defensible answers to a question.</p>

<p><strong>3. Max effort is mostly overthinking.</strong></p>

<p>I started the frontier models at the settings they’re rated at on the <a href="https://artificialanalysis.ai/">Artificial Analysis leaderboard</a>: “max” or “xhigh” effort. That was a mistake. GPT-6 Astra at max cost $3.50 a set and took 20 minutes. At high effort it scored the same for $1.04 in under four minutes. Around 90% of its max-effort output was reasoning that never reached the answer. For a well-defined task with limited context, effort is a cost lever in its own right, and probably the next thing worth testing in the other direction: a frontier model at <em>low</em> effort.</p>

<p><strong>4. Reading strategy is the biggest lever for smaller models.</strong></p>

<p>The app has three reading modes. Quick sends what fits in one request. Thorough summarises the codebase in parts first. Progressive reads in rounds, writing as it goes. Moving from Quick to Thorough lifted almost every model, typically by 10 to 25 points, mostly through coverage. For hosted models, Thorough was the best mode; it is now the default.</p>

<p><strong>5. Some models can’t stop thinking.</strong></p>

<p>The app originally asked every model not to reason, which keeps local models fast. GLM-5.3-Flash ignored that, thought anyway, ran out of budget and returned nothing: 8 out of 9 sets failed. With reasoning on, it was faultless. I can’t prove it, but a model that keeps reasoning past its budget and then returns nothing could well explain the odd incoherent moment in longer agentic sessions.</p>

<p><strong>6. A data policy is part of the model choice.</strong></p>

<p>Muse Wonder never ran. Its only provider on OpenRouter is Meta, with no zero-data-retention endpoint, so my guardrail refused every request before anything was sent. IMHO that speaks for itself. Check where your code goes, not just what it costs.</p>

<p><strong>7. Local models are accurate, but narrow and slow.</strong></p>

<p>The best local result, gemma-4-31b-qat, reached about 70% but took 25 minutes a set. qwen3.6-35b-a3b managed about 55% in three or four minutes. A humbling footnote to my January post on local LLMs: qwen3-coder-30b, which I recommended there for autocomplete, scored only 33% here. And devstral-small-2 wouldn’t load at all with KV cache quantisation enabled in LM Studio, the very setting that post suggested switching on. The right model depends on the task, not the leaderboard.</p>

<p><strong>8. Benchmarking your own tool finds bugs.</strong></p>

<p>The test found four genuine defects in the app. Weaker models repeated their first batch word for word. Some replied in a JSON form the parser couldn’t read. There was no way to turn reasoning on. And there was no fallback for models that can’t turn it off. All are now fixed, and several models went from half a set to a full one.</p>

<h3 id="my-take-what-each-tier-buys-you">My Take: What Each Tier Buys You</h3>

<p>My <a href="https://jimm.uk/post/architecture/2025/12/12/iron-triangle.html">Iron Triangle</a> post on jimm.uk says you can pick two of fast, cheap and good. Language models bend that a little, but it still holds. Here is how I’d now choose for this kind of task.</p>

<p><strong>Local (free, private, slow).</strong>
You gain privacy and zero marginal cost; you pay in time and completeness.</p>

<ul>
  <li>Use the biggest model your memory allows (gemma-4-31b-qat on 64GB), not a small or code-specialised one.</li>
  <li>Use Progressive reading, and give it at least 16k tokens of context.</li>
  <li>Let it run unattended. It’s the right choice when the code genuinely can’t leave the machine.</li>
</ul>

<p><strong>Budget hosted (GLM-5.3-Flash, Claude Haiku 5.5, MiMo-V2.6-Pro).</strong>
You gain 80% of the quality for pocket change, in a couple of minutes. For personal learning, this is good enough most of the time.</p>

<ul>
  <li>Keep reasoning on, and use Thorough reading.</li>
  <li>Glance at the answer keys before trusting them.</li>
  <li>If mistakes matter more than pennies, Haiku 5.5 and MiMo-V2.6-Pro made the fewest at this price. GLM-5.3-Flash stays my default, and nothing at its price beat it.</li>
</ul>

<p><strong>Mid-price (GLM-5.3).</strong>
This is the sweet spot. Frontier-level results (it matched GPT-6 Astra) for 4 cents a set.</p>

<ul>
  <li>If I’m handing a study set to someone else, this is where I’d start.</li>
</ul>

<p><strong>Frontier via the API (Claude Opus 5.5, Gemini 4 Argon).</strong>
You gain reliability: every answer right, and the fewest gaps.</p>

<ul>
  <li>Opus 5.5 was also the most consistent and the fastest.</li>
  <li>Use high effort, not max. Max is overthinking you pay for by the token.</li>
  <li>It’s worth it when the output will be relied on, say onboarding a team or assessing understanding. Otherwise it’s a lot of money for the last few points.</li>
</ul>

<p><strong>Agent (Claude Code).</strong>
You gain completeness, because it reads a codebase the way an engineer would. Nothing else came close on coverage, and it is included in a Claude subscription.</p>

<ul>
  <li>For a large or unfamiliar codebase, this is the one to use.</li>
  <li>Point it at the repository, let it run, and review the result.</li>
</ul>

<p>In short: <strong>with models, you can now have fast, cheap and good enough for most jobs.</strong> What you pay more for is reliability and completeness, and the cheapest way to get completeness is a better harness, not a bigger model.</p>

<h3 id="whats-next">What’s Next</h3>

<ul>
  <li><strong>Frontier models at low or medium effort.</strong> If Opus 5.5 at low effort keeps its accuracy, it could give near-frontier quality at close to budget prices.</li>
  <li><strong>Agent-like reading in the app.</strong> Let the model ask for specific files, or search for symbols, before it writes. That’s the gap the harness comparison exposed.</li>
  <li><strong>A long-running agentic test</strong> of GLM-5.3-Flash against its challengers, to see whether the coherence problems show up under controlled conditions.</li>
</ul>

<h3 id="references">References</h3>

<ul>
  <li><a href="https://artificialanalysis.ai/">Artificial Analysis</a> - model intelligence and cost leaderboard</li>
  <li><a href="https://openrouter.ai/models">OpenRouter</a> - hosted models, pricing and data policies</li>
  <li><a href="https://lmstudio.ai/">LM Studio</a> - local inference</li>
  <li><a href="https://code.claude.com/">Claude Code</a> - the agent harness</li>
  <li><a href="https://github.com/pallets/itsdangerous">itsdangerous</a> and <a href="https://github.com/go-chi/chi">chi</a> - two of the test codebases</li>
</ul>

<h3 id="summary">Summary</h3>

<p>I tested local, budget, mid-price and frontier models, plus Claude Code, on writing study material about three codebases, with every item judged blind against the code. Budget models got 80% of the way for half a cent, and the mid-price GLM-5.3 matched the frontier models for 4 cents. Max reasoning effort mostly wasted money. Most of all, the same frontier model scored noticeably better inside an agent harness than through a raw API, and feeding it more code didn’t close the gap. How a model explores the code mattered more than which model it was.</p>

<p>This is a fast-moving field. The models, prices and providers here are as tested in October 2026, and some will have changed by the time you read this.</p>]]></content><author><name></name></author><category term="ai-inference" /><category term="cost" /><category term="benchmark" /><summary type="html"><![CDATA[I tested two dozen language models, from free local ones to the frontier, on teaching me an unfamiliar codebase. Half a cent got 80% of the way; the last stretch came from the harness, not the model.]]></summary></entry><entry><title type="html">What an inference gateway is, and why a small team needs one</title><link href="https://ioitltd.uk/2026/10/20/what-an-inference-gateway-does.html" rel="alternate" type="text/html" title="What an inference gateway is, and why a small team needs one" /><published>2026-10-20T00:00:00+00:00</published><updated>2026-10-20T00:00:00+00:00</updated><id>https://ioitltd.uk/2026/10/20/what-an-inference-gateway-does</id><content type="html" xml:base="https://ioitltd.uk/2026/10/20/what-an-inference-gateway-does.html"><![CDATA[<p>If your application calls a model provider’s API directly, the provider is baked into your code. Every model change is a code change. Every price rise lands straight on your bill. You find out about an outage when your users do.</p>

<p>An inference gateway is a small service that sits between your application and every model you use. Your code talks to one endpoint. The gateway decides where each request goes.</p>

<p>It’s not exotic. It’s the same idea as a load balancer or an API gateway, applied to models. For a small team it’s usually the first piece of AI infrastructure worth building, because it makes every later decision cheaper.</p>

<h2 id="what-it-does">What it does</h2>

<p><strong>One API for every model.</strong> Your application speaks one format, usually the OpenAI-compatible chat API that most providers and open-source servers now accept. Behind the gateway that might be a frontier API, an open-weight model through OpenRouter, or a model you host yourself on vLLM. Swapping between them is a configuration change.</p>

<p><strong>Routing.</strong> Rules decide which model handles which request. Classification and extraction go to a small, cheap model. Long reasoning goes to a large one. Internal tools can use a cheaper tier than customer-facing features.</p>

<p><strong>Fallbacks.</strong> When a provider times out or rate-limits you, the gateway retries against a second provider. Your users see a slightly slower response instead of an error.</p>

<p><strong>Cost tracking.</strong> Every request is logged with its model, token counts and cost, tagged by feature or customer. For the first time you can answer “what does this feature cost us per user?” with a number rather than a guess.</p>

<p><strong>Limits and keys.</strong> Budgets per team or per feature, and one place to rotate provider keys, rather than secrets scattered across services.</p>

<p><strong>Caching.</strong> Identical or near-identical requests can be answered from cache. How much this saves depends entirely on your traffic, so measure before you count on it.</p>

<h2 id="what-it-doesnt-do">What it doesn’t do</h2>

<p>It won’t make a bad prompt good or a small model clever. It adds a hop, so it has to be close to your application and properly monitored. It’s one more service to run, which is why it should be boring: a single container, stateless apart from its log store, deployed the same way as everything else.</p>

<h2 id="build-or-adopt">Build or adopt</h2>

<p>You don’t need to write one from scratch. LiteLLM is the common open-source starting point: it speaks the OpenAI-compatible API, supports most providers and open-weight servers, and handles routing, fallbacks and spend tracking. Managed routers such as OpenRouter cover part of the same ground as a hosted service.</p>

<p>The work isn’t installing it. It’s deciding the routing rules, wiring cost data into something people actually look at, and making sure the gateway itself never becomes the outage.</p>

<h2 id="when-its-worth-it">When it’s worth it</h2>

<p>As soon as you use more than one model, or spend enough on inference that someone has asked why. In practice, that’s most teams within a few months of shipping their first AI feature.</p>

<p>It’s also the right first step before any self-hosting decision. Once traffic goes through a gateway, trying an open-weight model on 5% of requests is a configuration change, and you get real cost and quality numbers instead of a guess.</p>

<p>Setting one up is usually the first week of my <a href="/about/">AI Inference Setup</a> engagement.</p>]]></content><author><name></name></author><category term="ai-inference" /><category term="architecture" /><summary type="html"><![CDATA[One endpoint in front of every model you use. It's the cheapest piece of AI infrastructure you'll build, and the one that makes every later cost decision easy.]]></summary></entry></feed>