<?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: Kris Holy</title>
    <description>The latest articles on DEV Community by Kris Holy (@kris_holy).</description>
    <link>https://dev.to/kris_holy</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%2F4180595%2F34a13a41-34d7-478c-8d45-906beba1e506.JPG</url>
      <title>DEV Community: Kris Holy</title>
      <link>https://dev.to/kris_holy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kris_holy"/>
    <language>en</language>
    <item>
      <title>Why AI agents need sandboxes, and how they work</title>
      <dc:creator>Kris Holy</dc:creator>
      <pubDate>Wed, 18 Nov 2026 02:36:04 +0000</pubDate>
      <link>https://dev.to/kris_holy/why-ai-agents-need-sandboxes-and-how-they-work-3ee</link>
      <guid>https://dev.to/kris_holy/why-ai-agents-need-sandboxes-and-how-they-work-3ee</guid>
      <description>&lt;p&gt;Coding agents don't only write code now. They run it: they install packages, execute tests, start servers, and read the output to decide what to do next. That loop is what makes them useful, and it raises a practical question: where should that code run?&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with running agent code on your machine
&lt;/h2&gt;

&lt;p&gt;The default answer is your own laptop. The agent gets a terminal, and every command it picks runs as your user, with access to your files, SSH keys, cloud credentials, and network.&lt;/p&gt;

&lt;p&gt;Most commands are harmless. But the agent acts on text it didn't write: a README, an issue, a dependency's install script, a page it fetched. Any of these can carry instructions or code you wouldn't run yourself. And a mistaken &lt;code&gt;rm -rf&lt;/code&gt; or a migration against the wrong database does the same damage when an agent typed it.&lt;/p&gt;

&lt;p&gt;There are practical limits too. A laptop holds one environment at a time, goes to sleep in the middle of long tasks, and slowly fills up with leftover dependencies from every project an agent has tried.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an AI agent sandbox is
&lt;/h2&gt;

&lt;p&gt;A sandbox is a separate Linux machine the agent works in instead of yours. It starts clean, the agent does its work there, and when the task is done the machine is deleted with everything in it.&lt;/p&gt;

&lt;p&gt;The boundary matters. Containers share the host's kernel, so they keep processes apart but not fully. A microVM runs its own kernel, which keeps code inside it separate from the host and from other sandboxes. For code you didn't write and haven't read, that is the boundary you want.&lt;/p&gt;

&lt;p&gt;A sandbox also has to be a usable computer: a shell, common languages and tools, a filesystem, and a way to open a server the agent starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  How an agent uses a sandbox
&lt;/h2&gt;

&lt;p&gt;A typical task looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a sandbox. It's ready in a few seconds.&lt;/li&gt;
&lt;li&gt;Clone a repository and install its dependencies.&lt;/li&gt;
&lt;li&gt;Run the tests or start the app, with output streamed back to the agent.&lt;/li&gt;
&lt;li&gt;Read files, change them, and run again.&lt;/li&gt;
&lt;li&gt;Delete the sandbox, or pause it to continue later.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Two controls make this safer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A network policy limits which hosts the sandbox can reach, so a script can't send data wherever it likes.&lt;/li&gt;
&lt;li&gt;A timeout stops the sandbox on its own if the agent leaves it running.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Connecting coding assistants through MCP
&lt;/h2&gt;

&lt;p&gt;Most developers won't call a sandbox API themselves. Their coding assistant will. MCP (Model Context Protocol) is the standard way to give assistants like Claude Code, Cursor, and Codex new tools.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/09282bea2be045c6167d911a3d83984159a1b460ef7d9e4c291a2b3a3b41ce45/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f70376a307534336377713130626237636b366e772e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/09282bea2be045c6167d911a3d83984159a1b460ef7d9e4c291a2b3a3b41ce45/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f70376a307534336377713130626237636b366e772e706e67" alt="Claude Code, Cursor and Codex connected to Keln through the MCP server" width="1440" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A sandbox MCP server gives the assistant tools such as "create sandbox", "run command", and "read file". You can then ask it to clone a repository and run the test suite in a sandbox, and it creates the machine, runs the commands, and reads the results. Your laptop only shows the conversation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running sandboxes on Keln
&lt;/h2&gt;

&lt;p&gt;Keln, an inference platform for open models, now runs sandboxes next to its models.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/1f6f90730d65a80c2d3b166fd3fd4d7cc18aba6dfaeff5fa17846e13ed2d5ba1/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f7932317a733234656f656837786b74787232316d2e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/1f6f90730d65a80c2d3b166fd3fd4d7cc18aba6dfaeff5fa17846e13ed2d5ba1/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f7932317a733234656f656837786b74787232316d2e706e67" alt="The Sandboxes page in the Keln portal, with curl commands to create a sandbox and run a command in it" width="1288" height="939"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each sandbox runs in its own microVM, with Python 3, Node.js, git, curl, and a C toolchain preinstalled.&lt;/li&gt;
&lt;li&gt;The default size is 2 vCPUs, 2 GiB of memory, and 10 GiB of disk, configurable from 1 to 4 vCPUs.&lt;/li&gt;
&lt;li&gt;Commands stream their output, files can be read and written, and a running app gets a &lt;a href="https://docs.keln.ai/sandboxes/ports/" rel="noopener noreferrer"&gt;preview URL&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.keln.ai/sandboxes/pause-resume/" rel="noopener noreferrer"&gt;Pausing&lt;/a&gt; keeps files, memory, and processes. A sandbox stops after 5 minutes by default and can run up to 24 hours.&lt;/li&gt;
&lt;li&gt;A &lt;a href="https://docs.keln.ai/sandboxes/network/" rel="noopener noreferrer"&gt;network policy&lt;/a&gt; sets which hosts it can reach.&lt;/li&gt;
&lt;li&gt;The hosted MCP server at &lt;code&gt;https://mcp.keln.ai/mcp&lt;/code&gt; connects Claude Code, Cursor, and Codex with a Keln API key. It also includes &lt;a href="https://docs.keln.ai/capabilities/web-search/" rel="noopener noreferrer"&gt;web search&lt;/a&gt; and page reading.&lt;/li&gt;
&lt;li&gt;Billing is per second for the vCPU and memory you allocate, from the same balance as model requests. Starting and paused sandboxes are free. See the &lt;a href="https://docs.keln.ai/sandboxes/#pricing" rel="noopener noreferrer"&gt;pricing table&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To try it, the &lt;a href="https://docs.keln.ai/sandboxes/quickstart/" rel="noopener noreferrer"&gt;sandbox quickstart&lt;/a&gt; creates a sandbox and runs commands with Python or curl, and the &lt;a href="https://docs.keln.ai/sandboxes/mcp/" rel="noopener noreferrer"&gt;MCP setup guide&lt;/a&gt; connects it to your coding assistant.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>mcp</category>
      <category>sandbox</category>
    </item>
    <item>
      <title>DeepSeek V4.1 Flash Benchmark: Keln vs OpenRouter, Vercel &amp; Ramp</title>
      <dc:creator>Kris Holy</dc:creator>
      <pubDate>Mon, 09 Nov 2026 19:29:32 +0000</pubDate>
      <link>https://dev.to/kris_holy/ai-gateway-benchmark-openrouter-vercel-ramp-keln-comparing-cache-hit-rate-speed-reasoning-3afi</link>
      <guid>https://dev.to/kris_holy/ai-gateway-benchmark-openrouter-vercel-ramp-keln-comparing-cache-hit-rate-speed-reasoning-3afi</guid>
      <description>&lt;p&gt;We ran 24 hours of real agent sessions on Keln, OpenRouter :nitro, Vercel, and Ramp using DeepSeek V4.1 Flash. All four platforms had zero data retention, max reasoning, and tool calling enabled. Each platform received the same request at the same time, with 1 in 20 turns paused for 1 to 20 minutes to simulate real user behavior. Read the full method.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/32ec1e080a2561a7a47a502e39f609003a0f33151b645a13b099ac9a1d822acf/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f717838666b6d753279673633326e7466626a35712e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/32ec1e080a2561a7a47a502e39f609003a0f33151b645a13b099ac9a1d822acf/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f717838666b6d753279673633326e7466626a35712e706e67" alt="Headline results. Cache hit rate: Keln 93.9%, OpenRouter 88.5%, Vercel 86.7%, Ramp 62.6%. Provider moves: Keln 14, OpenRouter 148, Vercel 60, Ramp 500. Reasoning tokens per turn: Keln 856, OpenRouter 1,033, Vercel 403, Ramp 420." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The run went from 00:25 UTC on 20 October to 00:44 UTC on 21 October 2026.&lt;br&gt;
13,440 turns, 3,360 per gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache hit rate: 63% to 94%, depending on the gateway
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/9bad6dd7c13589c7384f2bf8b67b0c7f547b383f89cb8c7e23482bf9882110d7/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f30756e7039356d6775656b64333471343570667a2e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/9bad6dd7c13589c7384f2bf8b67b0c7f547b383f89cb8c7e23482bf9882110d7/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f30756e7039356d6775656b64333471343570667a2e706e67" alt="Line chart of cache hit rate in 30-minute windows over the run for Keln, OpenRouter :nitro, Vercel and Ramp." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cache hit rate over the run: &lt;strong&gt;Keln 94%, OpenRouter 88%, Vercel 87%, Ramp 63%&lt;/strong&gt;. The gap is in turns that went fully cold after the first one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/7da44a9b3530ed80e190652d38c4ad0d5a1372cb95ad4f7f32c1f65486f18e65/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f396c786835706d6f36666937766271796c6d76782e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/7da44a9b3530ed80e190652d38c4ad0d5a1372cb95ad4f7f32c1f65486f18e65/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f396c786835706d6f36666937766271796c6d76782e706e67" alt="Turns that went fully cold after the first one, out of 3,360 per gateway: Keln 47, OpenRouter 223, Vercel 280, Ramp 946." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That depends on how each gateway picks a provider on the second turn. Keln keeps a conversation on the provider that holds its prefix. Vercel pins a conversation to its first provider for 5 minutes. OpenRouter and Ramp pick again on every request.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/e5fbd24bd139989ac24958985674fe68873884db5a9ca846731d8861740a2a83/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f7478687a6a727937366e3133346b75326f6c716b2e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/e5fbd24bd139989ac24958985674fe68873884db5a9ca846731d8861740a2a83/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f7478687a6a727937366e3133346b75326f6c716b2e706e67" alt="Table of cache hit rate per provider through each gateway. Provider B: Keln 92.6%, OpenRouter 87.5%, Vercel 84.1%, Ramp 63.0%." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cache hit rate per provider: cached tokens as a share of prompt tokens on the turns that provider served, through each gateway. Rows with fewer than 100 turns are left blank.&lt;/p&gt;

&lt;p&gt;Read across a row: the same provider cached differently depending on the gateway in front of it. Provider B kept 92.6% through Keln, 87.5% through OpenRouter, 84.1% through Vercel and 63.0% through Ramp.&lt;/p&gt;

&lt;h2&gt;
  
  
  Provider moves ranged from 14 to 500 in 3,360 turns
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/2f3a5b6162320d5c4f3a0784e2b92a8ba9106833ed30d87744ada65cfd5adadf/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f76773673613336313070786b397775326731396a2e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/2f3a5b6162320d5c4f3a0784e2b92a8ba9106833ed30d87744ada65cfd5adadf/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f76773673613336313070786b397775326731396a2e706e67" alt="Line chart of cumulative provider moves over the run: Ramp 500, OpenRouter :nitro 148, Vercel 60, Keln 14." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ramp moved a conversation to a different provider 500 times in 3,360 turns, OpenRouter 148, Vercel 60, Keln 14.&lt;/strong&gt; Each move is a cold prompt: tens of thousands of tokens re-read at the uncached price, and a first token seconds later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache after a 10-minute break: 23% to 75%
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/bbf15a7ed95a91db5d261d83fa401c6e09760e8e7ce7cd66ef86fb11fd6b8b82/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f357075656c7a6f346e6e793668313067376b33392e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/bbf15a7ed95a91db5d261d83fa401c6e09760e8e7ce7cd66ef86fb11fd6b8b82/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f357075656c7a6f346e6e793668313067376b33392e706e67" alt="Bar chart of how much of the next prompt came from cache after pauses from under 10 s to over 10 min, per gateway. Over 10 min: Keln 75, OpenRouter 52, Vercel 25, Ramp 23." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The longer the pause, the more of the prompt a gateway had to re-read.&lt;/strong&gt; After a break, the next turn comes from cache only if it goes to the same provider and that provider still has the earlier turns cached. Pauses under a minute made no difference. After 10 minutes Keln still served 75% of the next prompt from cache, OpenRouter 52%, Vercel 25% and Ramp 23%.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/8b028014145822eb181ea8a8a945d1f2abed9d2a93acc7dcf53e8531aa9c9104/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f7432696d727a7968747273726f6364733962336c2e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/8b028014145822eb181ea8a8a945d1f2abed9d2a93acc7dcf53e8531aa9c9104/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f7432696d727a7968747273726f6364733962336c2e706e67" alt="Bar chart of cache kept after pauses over 10 minutes. Provider A: Keln 70, OpenRouter 69, Vercel 61. Provider B: OpenRouter 32, Vercel 13, Ramp 17." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;After a pause over 10 minutes, how much of the prompt was still in cache depended on the provider that answered.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reasoning: 403 to 1,033 tokens per turn for the same request
&lt;/h2&gt;

&lt;p&gt;Every turn asked for reasoning at &lt;code&gt;max&lt;/code&gt;, the deepest setting DeepSeek V4.1 Flash has. The model is the same and the providers overlap, so the reasoning tokens should match within the noise of temperature 1.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/fafc93895729e5e9ccccf022eef2985d95241d95b6cb5f5725dd371e47bb9164/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f726f706e6b796675333279327161333930656c642e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/fafc93895729e5e9ccccf022eef2985d95241d95b6cb5f5725dd371e47bb9164/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f726f706e6b796675333279327161333930656c642e706e67" alt="Line chart of reasoning tokens per turn, hourly mean, for Keln, OpenRouter :nitro, Ramp and Vercel." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Keln's turns averaged 856 reasoning tokens, OpenRouter's 1,033, Vercel's 403 and Ramp's 420. Vercel and Ramp delivered less than half the reasoning for the same max request.&lt;/strong&gt; The typical turn is the same everywhere (median 40 tokens on Keln, 42 on OpenRouter, 54 on Vercel, 36 on Ramp). The gap comes from the few turns with thousands of reasoning tokens.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/d8ffea773934a5aec1d7b8a6517d8b20aee8b5860b97f2a48599b480066436bb/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f627a7a363335617a79756d6e33696e716b3238792e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/d8ffea773934a5aec1d7b8a6517d8b20aee8b5860b97f2a48599b480066436bb/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f627a7a363335617a79756d6e33696e716b3238792e706e67" alt="Turns per gateway that reasoned with 5,000+ tokens over the whole benchmark: Keln 152, OpenRouter 212, Vercel 36, Ramp 43." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turns that reasoned past 5,000 tokens: Keln 152, OpenRouter 212, Vercel 36, Ramp 43.&lt;/strong&gt; On Provider B, the one provider all 4 gateways used, 1 turn in 12 reasoned past 5,000 tokens through OpenRouter and 1 in 15 through Keln; through Vercel or Ramp, 1 in 70. Vercel accepted &lt;code&gt;max&lt;/code&gt; on every turn with no warning or error.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Why this is the worst kind of bug&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You cannot know the model did a third of the thinking. The response comes back successful, and the cost is lower in the end. The wrong answer comes later, on a hard turn. The logs for that turn show a normal request, so the gateway is never suspected. When the same provider behaves differently behind different gateways, the issue is on the gateway side.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;This is also why Vercel's bill is the lowest:&lt;/strong&gt; $9.14, against $10.98 at OpenRouter and $11.26 at Keln. At Keln's reasoning volume, Vercel's own rates come to $10.97. Vercel charged less because it ran less reasoning.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/54759b1ef5949b3193d019858d8329613e248218e2fc6108cbcd4c158ef10dc3/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6f353538666a7a65647a696b696273376630706c2e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/54759b1ef5949b3193d019858d8329613e248218e2fc6108cbcd4c158ef10dc3/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6f353538666a7a65647a696b696273376630706c2e706e67" alt="Table of turns and median and average reasoning tokens per route, for each gateway and provider with at least 200 turns." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reasoning tokens as each gateway reported them in &lt;code&gt;usage&lt;/code&gt;, per route with at least 200 turns. Ramp reports reasoning in the Responses usage shape; its figures come from the captured response bodies.&lt;/p&gt;

&lt;h2&gt;
  
  
  All 4 gateways decoded at about 400 tokens a second at the median
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/156b63c50de4ff66517828eefc998604af269baa333a10b0d506332b78e19095/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f797869706f6a3265396e707866747975706275622e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/156b63c50de4ff66517828eefc998604af269baa333a10b0d506332b78e19095/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f797869706f6a3265396e707866747975706275622e706e67" alt="Line chart of output speed, hourly median tokens per second, reasoning tokens included, for Vercel, Ramp, Keln and OpenRouter :nitro." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At the median all 4 decoded at 390 to 430 tokens a second.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/52cf0d5acd009e9b3b1a6322a2ef3c6bef85cb7f3e89ae442123fa5be653f6bc/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6e687a796430763462646c343062797a687330752e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/52cf0d5acd009e9b3b1a6322a2ef3c6bef85cb7f3e89ae442123fa5be653f6bc/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f6e687a796430763462646c343062797a687330752e706e67" alt="Summary table for Keln, OpenRouter :nitro, Vercel (tps) and Ramp: turns answered, cache hit rate, conversations moved, first token, decode speed, reasoning tokens per turn and total bill." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The same 3,360 turns cost $9 to $20 depending on the gateway
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/5817cffffbc2976edc43ce6c7455624d724d8d6586114f0eb415aa245476ba09/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f717a7078383973796e38753568653730613238312e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/5817cffffbc2976edc43ce6c7455624d724d8d6586114f0eb415aa245476ba09/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f717a7078383973796e38753568653730613238312e706e67" alt="Line chart of cumulative bill in USD at each gateway's own prices for the model: Ramp $20.20, Keln $11.26, OpenRouter :nitro $10.98, Vercel $9.14." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The same 3,360 turns cost $9.14 through Vercel, $10.98 through OpenRouter, $11.26 through Keln and $20.20 through Ramp. Ramp's bill is high because of cache misses: it paid for 47.5 million uncached prompt tokens, against 8 million on Keln.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://camo.githubusercontent.com/90c76d4bc0ded115817fc6eeed2a15a46af05b358abd33d2ac2e25b49d03c3ed/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f706f366e39616d6367677566356e7363693476342e706e67" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/90c76d4bc0ded115817fc6eeed2a15a46af05b358abd33d2ac2e25b49d03c3ed/68747470733a2f2f6465762d746f2d75706c6f6164732e73332e75732d656173742d322e616d617a6f6e6177732e636f6d2f75706c6f6164732f61727469636c65732f706f366e39616d6367677566356e7363693476342e706e67" alt="Total bill: Keln $11.26, OpenRouter :nitro $10.98, Vercel (tps) $9.14 ($10.97 adjusted), Ramp $20.20 ($21.89 adjusted)." width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;At the reasoning the request asked for&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vercel and Ramp delivered less than half the reasoning Keln's turns carried, and billed less for it. With their reasoning set to Keln's volume, at their own rates, Vercel's run costs $10.97 instead of $9.14 and Ramp's $21.89 instead of $20.20.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;* With reasoning set to Keln's volume, at their own rates.&lt;/p&gt;

&lt;p&gt;Keln re-read 7 million fewer uncached tokens than OpenRouter, 9.5 million fewer than Vercel and 39.5 million fewer than Ramp.&lt;/p&gt;

&lt;h2&gt;
  
  
  Availability: all 100%
&lt;/h2&gt;

&lt;p&gt;Every gateway answered every turn it was sent. Ramp's prepaid wallet ran dry at 23:44 UTC and refused its last 97 turns for funds, a wallet limit, not a gateway fault; its other numbers stand on the 23 hours it completed.&lt;/p&gt;

&lt;h2&gt;
  
  
  In short
&lt;/h2&gt;

&lt;p&gt;Behind the same model, the 4 gateways behaved very differently. Keln kept 94% of each prompt in cache and moved a conversation between providers 14 times in 3,360 turns. OpenRouter kept 88% and moved 148 times, Vercel 87% and 60 times, Ramp 63% and 500 times, and each move meant re-reading the whole prompt at full price. Vercel and Ramp returned less than half the reasoning the request asked for, gave no warning, and charged less as a result. Decode speed was about the same everywhere. Ramp paid nearly double because of its cache misses.&lt;/p&gt;

&lt;p&gt;We post AI gateway comparison benchmarks, with the method included. The previous one compared OpenRouter, DeepSeek's own API and Keln on DeepSeek V4 Flash for 12 hours: &lt;a href="https://keln.ai/blog/deepseek-v4-flash-benchmark" rel="noopener noreferrer"&gt;read it here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method notes
&lt;/h2&gt;

&lt;p&gt;The 8 sessions come from the public armand0e Claude Code corpus on Hugging Face, replayed with native tool calls: each recorded assistant turn is sent as the next request and the recorded tool results appended, so the conversation grows as it did for the original user. 30 rounds per session, 2 at a time, a fresh salt and fresh conversation ids per pass, 14 passes, 13,440 turns in 24.3 hours; the median turn was 40,700 tokens. &lt;code&gt;reasoning_effort: max&lt;/code&gt; in the form each API expects, &lt;code&gt;max_tokens 30000&lt;/code&gt;, &lt;code&gt;temperature 1&lt;/code&gt;, streaming. 5% of turns waited 1 to 20 minutes, from a seed shared across gateways. Chart time axes leave out the 64 minutes in which no gateway received a turn.&lt;/p&gt;

&lt;p&gt;Routes: Keln's public API as sold; OpenRouter with &lt;code&gt;:nitro&lt;/code&gt; and &lt;code&gt;provider.zdr: true&lt;/code&gt;; Vercel AI Gateway with &lt;code&gt;sort: tps&lt;/code&gt; inside an explicit list of its zero-data-retention providers; Ramp Router in the Responses dialect. Cache hit rate is cached prompt tokens over all prompt tokens, as reported in &lt;code&gt;usage&lt;/code&gt;. A move is a turn whose provider differs from the previous turn of the same conversation, read from each gateway's provider header or body field. Time to first token counts the first reasoning token. Costs are each gateway's prices for this model, summed from &lt;code&gt;usage&lt;/code&gt;. The figures marked * reprice Vercel and Ramp at their own rates with reasoning set to Keln's 856 tokens per turn.&lt;/p&gt;

&lt;p&gt;Interested in trying &lt;a href="https://keln.ai" rel="noopener noreferrer"&gt;Keln&lt;/a&gt;? It's a 2-min setup and you can message &lt;a href="mailto:contact@keln.ai"&gt;contact@keln.ai&lt;/a&gt; with any questions. &lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>deepseek</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>AI Inference Benchmark: Keln vs Fireworks, Together AI, Baseten, Modal, DeepInfra &amp; Z.ai</title>
      <dc:creator>Kris Holy</dc:creator>
      <pubDate>Fri, 06 Nov 2026 20:27:29 +0000</pubDate>
      <link>https://dev.to/kris_holy/ai-inference-benchmark-keln-vs-fireworks-together-ai-baseten-modal-deepinfra-zai-4n5b</link>
      <guid>https://dev.to/kris_holy/ai-inference-benchmark-keln-vs-fireworks-together-ai-baseten-modal-deepinfra-zai-4n5b</guid>
      <description>&lt;p&gt;We ran the same agent sessions across seven inference platforms to see how they compare on speed, reliability, prompt caching, and cost.&lt;/p&gt;

&lt;p&gt;The test covered DeepSeek V4.1 Flash 1017 and GLM-5.3 Flash, using real agent conversations with tool calling and maximum reasoning enabled.&lt;/p&gt;

&lt;p&gt;Each platform received the same conversations, in the same order, with identical pauses between turns.&lt;/p&gt;

&lt;p&gt;We included our own platform, Keln, alongside Fireworks, Together AI, Baseten, Modal, DeepInfra, and Z.ai.&lt;/p&gt;

&lt;p&gt;Here's what we found.&lt;/p&gt;

&lt;h2&gt;
  
  
  DeepSeek V4.1 Flash 1017
&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%2F8411jjveg6gtz00z6v1f.png" 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%2F8411jjveg6gtz00z6v1f.png" alt="DeepSeek V4.1 Flash 1017 turns answered by provider" width="800" height="662"&gt;&lt;/a&gt;&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%2F3bxp49jfzgct7lsyc25o.png" 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%2F3bxp49jfzgct7lsyc25o.png" alt="DeepSeek V4.1 Flash 1017 cache hit rate by provider" width="800" height="662"&gt;&lt;/a&gt;&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%2F56gh78e89kwb7jtc77dw.png" 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%2F56gh78e89kwb7jtc77dw.png" alt="DeepSeek V4.1 Flash 1017 decode speed by provider" width="800" height="664"&gt;&lt;/a&gt;&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%2Fha4grx1h3561ocno0sxk.png" 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%2Fha4grx1h3561ocno0sxk.png" alt="DeepSeek V4.1 Flash 1017 cost per 1,000 turns by provider" width="800" height="664"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  GLM-5.3 Flash
&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%2Frz1spzws3d0v7gls402u.png" 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%2Frz1spzws3d0v7gls402u.png" alt="GLM-5.3 Flash turns answered by provider" width="800" height="664"&gt;&lt;/a&gt;&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%2F1oe9616b02515lchkfet.png" 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%2F1oe9616b02515lchkfet.png" alt="GLM-5.3 Flash cache hit rate by provider" width="800" height="664"&gt;&lt;/a&gt;&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%2Fbfan1tntbf2sgxxsdrok.png" 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%2Fbfan1tntbf2sgxxsdrok.png" alt="GLM-5.3 Flash decode speed by provider" width="800" height="662"&gt;&lt;/a&gt;&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%2Fid3ikel5xl6x7btbppty.png" 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%2Fid3ikel5xl6x7btbppty.png" alt="GLM-5.3 Flash cost per 1,000 turns by provider" width="800" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Turns answered
&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%2Filblmasjrmsq5gvu8cbi.png" 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%2Filblmasjrmsq5gvu8cbi.png" alt="Table of turns answered by provider and model" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most sides answered everything we sent on both models. Baseten refused about half the DeepSeek turns with rate-limit errors: these prompts are tens of thousands of tokens each, and just 2 sessions at once put us over our account's limit. On GLM-5.3 Flash the breaks kept the load lower, so Baseten refused fewer turns there.&lt;/p&gt;

&lt;p&gt;Modal cut 1 stream on DeepSeek, while on all the other providers answers ended normally. An app calling Modal directly gets the cut stream and has to resend the turn itself, because there is no second provider to send it to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache hit rate
&lt;/h2&gt;

&lt;p&gt;Running inference across multiple providers can hurt prompt caching when conversations move between them. On DeepSeek, Keln switched providers on just 1 of 1,440 turns, keeping its cache hit rate at 94.3%, close to the best direct provider at 95%. On GLM-5.3 Flash, Keln reached 90.5%, the highest of the 6 sides.&lt;/p&gt;

&lt;p&gt;Fireworks had the most cold turns on DeepSeek: 165, compared with 11 on Keln. Each cold turn meant reading most of the prompt again instead of using cached tokens.&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%2Fyj73nvmxhoccnjw6up2x.png" 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%2Fyj73nvmxhoccnjw6up2x.png" alt="Table of cache hit rate and cold turns by provider and model" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Based on each side's &lt;code&gt;usage&lt;/code&gt;. A cold turn is any turn after the first with under 10% cached.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache after a break
&lt;/h2&gt;

&lt;p&gt;We also tested how well providers retain cached prompts when a conversation goes idle. On GLM-5.3 Flash, we added breaks of 1–20 minutes to 15% of turns, using the same timing across all providers.&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%2Fmksfjzf4y2jq5a6fdj8v.png" 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%2Fmksfjzf4y2jq5a6fdj8v.png" alt="GLM-5.3 Flash prompt still in cache after a 15 to 20 minute break" width="800" height="467"&gt;&lt;/a&gt;&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%2F83qv5m6l1782u7zmyc31.png" 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%2F83qv5m6l1782u7zmyc31.png" alt="Table of GLM-5.3 Flash cache hit rate by break length" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a 15–20 minute break, Keln still had 63.0% of the prompt cached, compared with 38.4% on DeepInfra and 16.5% on Z.ai. Baseten, Modal and Fireworks had 0%.&lt;/p&gt;

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

&lt;p&gt;Keln had the highest median decode speed on GLM-5.3 Flash at 432 tokens/s, 75% faster than the next fastest provider, Baseten, at 247 tokens/s.&lt;/p&gt;

&lt;p&gt;On DeepSeek, Keln and Together were nearly tied at 432 and 437 tokens/s, both well ahead of the other providers.&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%2Fakkyy1ew3pr5jd435ju7.png" 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%2Fakkyy1ew3pr5jd435ju7.png" alt="GLM-5.3 Flash median decode speed by provider" width="800" height="467"&gt;&lt;/a&gt;&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%2Fu75ehffjipodvkvr37rp.png" 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%2Fu75ehffjipodvkvr37rp.png" alt="Table of decode speed and first token time by provider and model" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First token is p50 / p95 and counts the first reasoning token.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reasoning at max
&lt;/h2&gt;

&lt;p&gt;We set reasoning effort to maximum for every request. All providers returned broadly similar amounts of reasoning tokens, including Keln.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://keln.ai/blog/ai-gateway-benchmark-deepseek-v4-1-flash#reasoning" rel="noopener noreferrer"&gt;our previous benchmark&lt;/a&gt;, 2 gateways returned less than half as many reasoning tokens for the same requests. We didn't see that issue here.&lt;/p&gt;

&lt;p&gt;Modal doesn't report reasoning tokens for GLM-5.3 Flash, so those results aren't included.&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%2Fave68ce8u43d78g804gd.png" 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%2Fave68ce8u43d78g804gd.png" alt="Table of reasoning tokens per turn by provider and model" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Cost
&lt;/h2&gt;

&lt;p&gt;Fireworks was the most expensive on DeepSeek, largely due to its 165 cold turns. It processed 2.5 times as many uncached prompt tokens as Keln.&lt;/p&gt;

&lt;p&gt;On GLM-5.3 Flash, Keln was among the more expensive options. Its pricing covers more than model inference: Keln manages capacity across providers, monitors performance and output quality, and handles failover and retries. You get all of that through one API, without managing provider accounts, rate limits or caching yourself.&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%2F9jca2r4aie9pgo34b5v9.png" 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%2F9jca2r4aie9pgo34b5v9.png" alt="Table of cost per 1,000 turns by provider and model" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Baseten's cost per 1,000 turns counts only the turns it answered.&lt;/p&gt;

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

&lt;p&gt;Going directly to an inference provider can be cheaper, and performance can be excellent when capacity is available. But you're limited to that provider's infrastructure and your account's rate limits.&lt;/p&gt;

&lt;p&gt;We saw those limits in this benchmark. Baseten rejected requests due to rate limits, Modal cut off a response mid-stream, and Fireworks had to process previously cached prompts again.&lt;/p&gt;

&lt;p&gt;Keln takes a different approach. It runs inference across multiple providers, managing capacity, performance, and reliability behind one API. In this benchmark, Keln completed every turn, matched or exceeded the fastest direct providers on decode speed, and retained more cached tokens after longer breaks.&lt;/p&gt;

&lt;p&gt;Keln wasn't the cheapest option, but the price includes the infrastructure management, failover, and retries you'd otherwise have to handle yourself.&lt;/p&gt;

&lt;p&gt;We post benchmarks with the method included. The previous one compared OpenRouter, Vercel, Ramp and Keln on DeepSeek V4.1 Flash for 24 hours: &lt;a href="https://keln.ai/blog/ai-gateway-benchmark-deepseek-v4-1-flash" rel="noopener noreferrer"&gt;read it here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benchmark method
&lt;/h2&gt;

&lt;p&gt;We used 8 sessions from the public armand0e Claude Code corpus on Hugging Face, replayed with native tool calls. Each recorded assistant turn was sent as a new request, with the original tool results appended, so conversations grew as they did in the original sessions.&lt;/p&gt;

&lt;p&gt;Each run used up to 30 rounds per session, with 2 concurrent sessions per side and fresh salts and conversation IDs for each pass. The median turn contained 40,665 tokens on DeepSeek and 38,578 on GLM-5.3 Flash.&lt;/p&gt;

&lt;p&gt;All requests used &lt;code&gt;reasoning_effort: max&lt;/code&gt; in the format supported by each API, temperature 1, streaming enabled, and no &lt;code&gt;max_tokens&lt;/code&gt; limit.&lt;/p&gt;

&lt;p&gt;Pauses between turns followed the original sessions, capped at 60 seconds, with additional breaks to test caching. On DeepSeek, 5% of turns had breaks of 30 seconds to 2 minutes. On GLM-5.3 Flash, 15% had breaks of 1–20 minutes. We used the same random seed across all sides, so each received the same pauses on the same turns.&lt;/p&gt;

&lt;p&gt;The DeepSeek benchmark ran on November 3, 2026, from 02:30 to 08:53 UTC, with 8,640 turns total (1,440 per side). The GLM-5.3 Flash run made 3 passes in 14 hours on November 4; a pass replays the 8 sessions once. This post reports the third pass, from 03:45 to 08:32 UTC, with 1,440 turns total (roughly 240 per side).&lt;/p&gt;

&lt;p&gt;We tested Keln through its public API. For direct providers, we used Keln's own accounts and each provider's model identifiers, reasoning settings, and per-conversation cache hints. These included the documented &lt;code&gt;user&lt;/code&gt; field or, for Baseten, the &lt;code&gt;x-session-affinity&lt;/code&gt; header. Fireworks served DeepSeek through its standard endpoint.&lt;/p&gt;

&lt;p&gt;Cache hit rate is the percentage of prompt tokens reported as cached in each provider's usage data. A provider switch is counted when consecutive turns in the same conversation run on different providers. Decode speed is calculated as output tokens divided by generation time for each turn.&lt;/p&gt;

&lt;p&gt;We calculated costs using each provider's published model prices as of November 4, 2026, applied to its reported usage. Fireworks offers 2 DeepSeek pricing tiers; we used the standard tier corresponding to the endpoint tested. Modal shows its rates in its console, so we used the prices shown on our account.&lt;/p&gt;

&lt;p&gt;For Keln, we used the November 4 price list: DeepSeek at $0.30 per million input tokens, $0.01 per million cached input tokens, and $1.20 per million output tokens; GLM-5.3 Flash at $0.15, $0.05, and $0.50 respectively. The DeepSeek run was billed at the previous cached-input rate of $0.0108 per million tokens, resulting in $2.09 per 1,000 turns.&lt;/p&gt;

&lt;p&gt;Results reflect this workload, our account limits, and the conditions during the test. Performance may vary with other workloads or concurrency levels.&lt;/p&gt;

&lt;p&gt;The raw benchmark rows and response bodies are not publicly available.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>deepseek</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Switching from OpenAI or Anthropic to open models. Prices, benchmarks, a 2-minute setup</title>
      <dc:creator>Kris Holy</dc:creator>
      <pubDate>Tue, 13 Oct 2026 18:44:22 +0000</pubDate>
      <link>https://dev.to/kris_holy/switching-from-openai-or-anthropic-to-open-models-prices-benchmarks-a-2-minute-setup-ag7</link>
      <guid>https://dev.to/kris_holy/switching-from-openai-or-anthropic-to-open-models-prices-benchmarks-a-2-minute-setup-ag7</guid>
      <description>&lt;h2&gt;
  
  
  Open models now score close to frontier models on benchmarks
&lt;/h2&gt;

&lt;p&gt;An open model is a model whose weights you can download. &lt;a href="https://huggingface.co/deepseek-ai" rel="noopener noreferrer"&gt;DeepSeek&lt;/a&gt;, Alibaba's &lt;a href="https://huggingface.co/Qwen" rel="noopener noreferrer"&gt;Qwen&lt;/a&gt;, Moonshot's &lt;a href="https://huggingface.co/moonshotai" rel="noopener noreferrer"&gt;Kimi&lt;/a&gt;, Z.ai's &lt;a href="https://huggingface.co/zai-org" rel="noopener noreferrer"&gt;GLM&lt;/a&gt; and Google's &lt;a href="https://huggingface.co/google" rel="noopener noreferrer"&gt;Gemma&lt;/a&gt; publish their weights. OpenAI published &lt;a href="https://openai.com/index/introducing-gpt-oss/" rel="noopener noreferrer"&gt;gpt-oss&lt;/a&gt; in 2025. You can run these models on your own servers or rent them from a hosting company.&lt;/p&gt;

&lt;p&gt;For years, the difference between open and closed models was simple: closed frontier models scored higher on benchmarks, and open models were cheaper. But now the benchmark score difference is very small. &lt;a href="https://artificialanalysis.ai/" rel="noopener noreferrer"&gt;Artificial Analysis&lt;/a&gt; runs every major model through the same tests. When Kimi K3 came out, it &lt;a href="https://x.com/ArtificialAnlys/status/2081926991788626011" rel="noopener noreferrer"&gt;measured&lt;/a&gt; the difference between the best closed model and the best open model at 4 points on its index. Mozilla's &lt;a href="https://blog.mozilla.org/en/mozilla/mozilla-state-of-open-source-ai-report/" rel="noopener noreferrer"&gt;State of Open Source AI report&lt;/a&gt;, published in July 2026, puts the difference at about 3%.&lt;/p&gt;

&lt;p&gt;Companies now use open models in production. In Mozilla's survey, 79% of developers use open models, and 51% have put them in production. In October 2025, Airbnb's chief executive &lt;a href="https://fortune.com/2025/10/21/brian-chesky-openai-tools-not-ready" rel="noopener noreferrer"&gt;said&lt;/a&gt; the company's customer service agent relies a lot on Qwen: "It's very good. It's also fast and cheap."&lt;/p&gt;

&lt;h2&gt;
  
  
  Example: an AI assistant for an accounting software company
&lt;/h2&gt;

&lt;p&gt;Say you sell software to small accounting firms and want to add an assistant. It has five jobs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sort incoming email into four groups: questions, bugs, billing, spam.&lt;/li&gt;
&lt;li&gt;Read an uploaded invoice and return the vendor, date, total, and tax.&lt;/li&gt;
&lt;li&gt;Summarize a long email thread.&lt;/li&gt;
&lt;li&gt;Draft a reply. A person reviews it before it goes out.&lt;/li&gt;
&lt;li&gt;Answer customer questions in a chat window, using your help articles.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Jobs 1 and 2 run thousands of times a day. Their answers are short and easy to check. Jobs 3 to 5 need a model that writes well and follows instructions. None of the five needs the most expensive model on the market. The table gives one model for each job, on a closed (frontier) API and on open models.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Job&lt;/th&gt;
&lt;th&gt;Closed model&lt;/th&gt;
&lt;th&gt;Open model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sort incoming email&lt;/td&gt;
&lt;td&gt;Claude Haiku 5.5 or GPT-6 Luna&lt;/td&gt;
&lt;td&gt;gpt-oss-120b or GLM 5.3 Flash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read an invoice image&lt;/td&gt;
&lt;td&gt;Claude Haiku 5.5 or GPT-6 Luna&lt;/td&gt;
&lt;td&gt;GLM 5.3 Flash (reads images)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Summarize a thread&lt;/td&gt;
&lt;td&gt;Claude Sonnet 5.5 or GPT-6.1 Sol&lt;/td&gt;
&lt;td&gt;DeepSeek V4.1 Flash&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Draft a reply&lt;/td&gt;
&lt;td&gt;Claude Sonnet 5.5 or GPT-6.1 Sol&lt;/td&gt;
&lt;td&gt;GLM 5.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Support chat over help articles&lt;/td&gt;
&lt;td&gt;Claude Sonnet 5.5 or GPT-6.1 Sol&lt;/td&gt;
&lt;td&gt;GLM 5.3 or DeepSeek V4.1 Flash&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Price per million tokens
&lt;/h2&gt;

&lt;p&gt;The table shows list prices per million tokens on 11 October 2026. &lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Astra or Claude Fable 5.1&lt;/td&gt;
&lt;td&gt;Hardest tasks, long agent runs&lt;/td&gt;
&lt;td&gt;10.00&lt;/td&gt;
&lt;td&gt;50.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;Agent runs, coding&lt;/td&gt;
&lt;td&gt;4.00&lt;/td&gt;
&lt;td&gt;20.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6.1 Sol or Claude Sonnet 5.5&lt;/td&gt;
&lt;td&gt;Everyday work: chat, drafts, summaries&lt;/td&gt;
&lt;td&gt;2.00&lt;/td&gt;
&lt;td&gt;10.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Luna or Claude Haiku 5.5&lt;/td&gt;
&lt;td&gt;Simple jobs at high volume&lt;/td&gt;
&lt;td&gt;0.10&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kimi K3 (open)&lt;/td&gt;
&lt;td&gt;Hardest tasks, agents, images&lt;/td&gt;
&lt;td&gt;3.00&lt;/td&gt;
&lt;td&gt;15.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM 5.3 (open)&lt;/td&gt;
&lt;td&gt;Everyday work, coding&lt;/td&gt;
&lt;td&gt;1.40&lt;/td&gt;
&lt;td&gt;4.40&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4.1 Flash (open)&lt;/td&gt;
&lt;td&gt;Fast everyday work, images&lt;/td&gt;
&lt;td&gt;0.30&lt;/td&gt;
&lt;td&gt;1.20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM 5.3 Flash (open)&lt;/td&gt;
&lt;td&gt;Simple jobs at high volume, images&lt;/td&gt;
&lt;td&gt;0.15&lt;/td&gt;
&lt;td&gt;0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;gpt-oss-120b (open)&lt;/td&gt;
&lt;td&gt;Simple jobs at high volume&lt;/td&gt;
&lt;td&gt;0.10&lt;/td&gt;
&lt;td&gt;0.60&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sources: &lt;a href="https://developers.openai.com/api/docs/pricing" rel="noopener noreferrer"&gt;OpenAI pricing&lt;/a&gt;, &lt;a href="https://platform.claude.com/docs/en/about-claude/pricing" rel="noopener noreferrer"&gt;Anthropic pricing&lt;/a&gt;, &lt;a href="https://keln.ai/models" rel="noopener noreferrer"&gt;Keln model list&lt;/a&gt;. Those are standard rates for prompts of normal length (they go higher with longer prompts) on 11 October 2026. &lt;/p&gt;

&lt;p&gt;The table has three price levels.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cheapest models.&lt;/strong&gt; Luna, Haiku, gpt-oss-120b and GLM 5.3 Flash cost $0.10 to $0.15 per million input tokens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mid-price models.&lt;/strong&gt; Most products use this level. GLM 5.3 costs 30% less than Sonnet or Sol on input and 56% less on output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Most expensive models.&lt;/strong&gt; GPT-6 Astra or Claude Fable 5.1 cost 7 times more than GLM 5.3 on input and 11 times more on output.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Let's calculate the price of a specific task
&lt;/h2&gt;

&lt;p&gt;The task: summarize a customer email thread of about 2,000 tokens into a 200-token summary.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;One summary&lt;/th&gt;
&lt;th&gt;10,000 summaries&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Astra or Claude Fable 5.1&lt;/td&gt;
&lt;td&gt;$0.030&lt;/td&gt;
&lt;td&gt;$300&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;$0.012&lt;/td&gt;
&lt;td&gt;$120&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Sonnet 5.5 or GPT-6.1 Sol&lt;/td&gt;
&lt;td&gt;$0.006&lt;/td&gt;
&lt;td&gt;$60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM 5.3 (open)&lt;/td&gt;
&lt;td&gt;$0.0037&lt;/td&gt;
&lt;td&gt;$36.80&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4.1 Flash (open)&lt;/td&gt;
&lt;td&gt;$0.0008&lt;/td&gt;
&lt;td&gt;$8.40&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each model got the same email thread, word for word, and the same email summary request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monthly bill for a support chat
&lt;/h2&gt;

&lt;p&gt;Take job 5, the support chat. It handles 5,000 requests a day. Each request sends about 2,000 tokens: the customer's message, the last few turns and one help article. The model returns about 300 tokens. In a month, that is 300 million input tokens and 45 million output tokens.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Monthly bill&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Astra or Claude Fable 5.1&lt;/td&gt;
&lt;td&gt;$5,250&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;$2,100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6.1 Sol or Claude Sonnet 5.5&lt;/td&gt;
&lt;td&gt;$1,050&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GLM 5.3 (open)&lt;/td&gt;
&lt;td&gt;$618&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4.1 Flash (open)&lt;/td&gt;
&lt;td&gt;$144&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;At this volume, only for this task, the switch saves a few hundred to a few thousand dollars a month. The savings grow with traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four ways to start running open models
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Self-host
&lt;/h3&gt;

&lt;p&gt;You run open models on GPUs you own or rent.&lt;/p&gt;

&lt;p&gt;Pros: your data stays on machines you fully control.&lt;/p&gt;

&lt;p&gt;Cons: you pay for the GPUs whether you use them or not, and you handle updates and uptime. Worth it at high volume or under strict data rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Dedicated endpoint
&lt;/h3&gt;

&lt;p&gt;A hosting company runs the model on GPUs reserved for you and gives you a URL. You pay per GPU hour.&lt;/p&gt;

&lt;p&gt;Pros: only your traffic runs on your GPUs, so speed is steady, and the host company does the serving work.&lt;/p&gt;

&lt;p&gt;Cons: you still pay for idle time, so it needs enough traffic to keep the GPUs busy.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Shared provider
&lt;/h3&gt;

&lt;p&gt;A hosting company runs the model for many customers and charges per token. You sign up, get a key, change two lines of code.&lt;/p&gt;

&lt;p&gt;Pros: cheapest way to start, no contract, nothing to pay when traffic is quiet.&lt;/p&gt;

&lt;p&gt;Cons: you depend on one company, and demand for open models is high, so hosts often go down or slow at peak. Some serve a compressed copy of the model to cope, and do not tell you. You should also read the privacy page before starting: not every provider promises not to store or train on your data.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Gateway
&lt;/h3&gt;

&lt;p&gt;One endpoint in front of several shared providers. It picks the provider for each request: the cheapest or fastest.&lt;/p&gt;

&lt;p&gt;Pros: it keeps working when one provider goes down or slows, and you can compare lots of models.&lt;/p&gt;

&lt;p&gt;Cons: a gateway with 100+ models can't check each one at each provider closely, so quality and reliability can vary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can I use open models but at the quality and reliability of frontier labs?
&lt;/h2&gt;

&lt;p&gt;There is a newer kind of company: a reliability layer for open models. Their goal is to serve open models with the reliability of a frontier lab's API.&lt;/p&gt;

&lt;p&gt;Compared with a gateway, these offer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A short list of the most-used open models, each one consistently checked for quality at every provider.&lt;/li&gt;
&lt;li&gt;One fixed price per model, whichever provider serves the request.&lt;/li&gt;
&lt;li&gt;Mid-stream failover. If a provider fails while a response streams, another provider continues the same response.&lt;/li&gt;
&lt;li&gt;Each request goes to the fastest checked provider, not the cheapest.&lt;/li&gt;
&lt;li&gt;One format for tool calls across all providers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://keln.ai/" rel="noopener noreferrer"&gt;Keln&lt;/a&gt; also has zero data retention at every provider and doesn't bill for a failed request. It accepts both the OpenAI and the Anthropic request format, so you switch by changing two lines. You can also run open models in Claude Desktop (&lt;a href="https://keln.ai/blog/run-open-models-in-claude-desktop" rel="noopener noreferrer"&gt;setup guide&lt;/a&gt;) and Codex (&lt;a href="https://keln.ai/blog/run-open-models-in-codex" rel="noopener noreferrer"&gt;setup guide&lt;/a&gt;) through Keln.&lt;/p&gt;

&lt;p&gt;The result is open models at up to an eighth of the frontier price, a few points behind on benchmarks, and reliability built to match OpenAI's or Anthropic's.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to start using open models in less than 2 minutes
&lt;/h2&gt;

&lt;p&gt;Most open-model providers accept OpenAI's request format. To start using open models you change three settings: the provider's address, the access key and the model name. The example below uses Keln; other providers work the same way with their own address.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign up with a provider and create a key in its dashboard.&lt;/li&gt;
&lt;li&gt;Pick a model for each job. Use the "Best for" column in the pricing table above. Copy the model's exact name from the provider's model list.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Swap the provider's address and access key:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OpenAI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;base_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.keln.ai/v1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;KELN_API_KEY&lt;/span&gt;&lt;span class="sh"&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;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a model name:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;zai-org/glm-5.3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;user&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Sort this email: question, bug, billing or spam?&lt;/span&gt;&lt;span class="sh"&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;/li&gt;
&lt;li&gt;&lt;p&gt;Run the product's usual requests on the open model and compare the answers with what you get today.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Move a small share of real traffic first, then the rest.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;👋 Hey, I'm Kris Holysheva. I'm a co-founder at Keln, a reliability layer for open models, and I write about how teams can cut their AI bill without losing frontier-lab quality and support. Reach out with any questions.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>openai</category>
      <category>deepseek</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
