<?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: Kamya Shah</title>
    <description>The latest articles on DEV Community by Kamya Shah (@kamya_shah_e69d5dd78f831c).</description>
    <link>https://dev.to/kamya_shah_e69d5dd78f831c</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%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg</url>
      <title>DEV Community: Kamya Shah</title>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kamya_shah_e69d5dd78f831c"/>
    <language>en</language>
    <item>
      <title>Claude Code token usage is the input, output, and cache tokens each session sends to Claude, and it drives the bill. This guide compares native tracking with gateway monitoring and shows how Bifrost attributes tokens and cost per developer, exports metrics</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 09:36:06 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-is-the-input-output-and-cache-tokens-each-session-sends-to-claude-and-it-1nl0</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-is-the-input-output-and-cache-tokens-each-session-sends-to-claude-and-it-1nl0</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-monitor-it-with-an-ai-gateway-kih" class="crayons-story__hidden-navigation-link"&gt;Claude Code Token Usage: Monitor It with an AI Gateway&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" alt="kamya_shah_e69d5dd78f831c profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kamya Shah
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kamya Shah
                
                
              
              &lt;div id="story-author-preview-content-4805833" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kamya_shah_e69d5dd78f831c" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kamya Shah&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-monitor-it-with-an-ai-gateway-kih" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-monitor-it-with-an-ai-gateway-kih" id="article-link-4805833"&gt;
          Claude Code Token Usage: Monitor It with an AI Gateway
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/claude"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;claude&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/apigateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;apigateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/llm"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;llm&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-monitor-it-with-an-ai-gateway-kih" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-monitor-it-with-an-ai-gateway-kih#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              2&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            13 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Claude Code Token Usage: Monitor It with an AI Gateway</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 09:35:48 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-monitor-it-with-an-ai-gateway-kih</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-token-usage-monitor-it-with-an-ai-gateway-kih</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code's &lt;code&gt;/usage&lt;/code&gt; command (aliased as &lt;code&gt;/cost&lt;/code&gt; and &lt;code&gt;/stats&lt;/code&gt;) reports token usage and an estimated cost for one session on one machine; it cannot attribute spend across a team or stop a request.&lt;/li&gt;
&lt;li&gt;Claude Code's OpenTelemetry export streams &lt;code&gt;claude_code.token.usage&lt;/code&gt; and &lt;code&gt;claude_code.cost.usage&lt;/code&gt; per user, but only from machines that carry the telemetry settings, and it enforces nothing.&lt;/li&gt;
&lt;li&gt;An AI gateway on the request path records tokens and cost for every Claude Code request, tags it to a developer and team, and works the same whether Claude is served by Anthropic, Amazon Bedrock, or Vertex AI.&lt;/li&gt;
&lt;li&gt;Bifrost meters Claude Code through per-developer virtual keys, exports Prometheus metrics and OpenTelemetry spans, and blocks requests with a 402 once a developer, team, or customer budget is spent.&lt;/li&gt;
&lt;li&gt;Connecting Claude Code takes two settings: &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; pointed at Bifrost and &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; set to a Bifrost virtual key.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Claude Code token usage grows with every turn of a session because Claude Code resends the full conversation on each request, and across enterprise deployments it averages around $13 per developer per active day and $150 to $250 per developer per month, &lt;a href="https://code.claude.com/docs/en/costs" rel="noopener noreferrer"&gt;according to Anthropic's Claude Code cost guide&lt;/a&gt;. &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost&lt;/a&gt;, the &lt;a href="https://github.com/maximhq/bifrost" rel="noopener noreferrer"&gt;open-source AI gateway built in Go&lt;/a&gt; by Maxim AI, sits between Claude Code and the model provider and records tokens, cost, model, and developer for every request. This guide covers what Claude Code reports natively, where those tools stop at team scale, and how to monitor, report on, and cap Claude Code token usage with Bifrost.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Check Claude Code Token Usage Today
&lt;/h2&gt;

&lt;p&gt;Claude Code token usage can be checked in four native places: the &lt;code&gt;/usage&lt;/code&gt; command, the status line, OpenTelemetry export, and the Claude Console or Claude admin analytics. Each answers a different question, and none of them attributes spend across every provider while also enforcing a per-developer budget at request time.&lt;/p&gt;

&lt;p&gt;The table summarizes each option, with an &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;AI gateway such as Bifrost&lt;/a&gt; listed last for comparison.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Where to check&lt;/th&gt;
&lt;th&gt;What it shows&lt;/th&gt;
&lt;th&gt;Scope&lt;/th&gt;
&lt;th&gt;Enforces a budget&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/usage&lt;/code&gt; (also &lt;code&gt;/cost&lt;/code&gt;, &lt;code&gt;/stats&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Session tokens per model, cache reads and writes, estimated cost at list price&lt;/td&gt;
&lt;td&gt;One session, one machine&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Status line cost field&lt;/td&gt;
&lt;td&gt;Running session cost&lt;/td&gt;
&lt;td&gt;One session&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code OpenTelemetry&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;claude_code.token.usage&lt;/code&gt; by type (input, output, cacheRead, cacheCreation), &lt;code&gt;claude_code.cost.usage&lt;/code&gt; in USD&lt;/td&gt;
&lt;td&gt;Each machine that has telemetry enabled&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Console or Claude admin analytics&lt;/td&gt;
&lt;td&gt;Spend per member, workspace or seat usage&lt;/td&gt;
&lt;td&gt;Anthropic-billed usage only&lt;/td&gt;
&lt;td&gt;Workspace or organization spend limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bifrost AI gateway&lt;/td&gt;
&lt;td&gt;Tokens, cost, latency, model, provider per request, per virtual key&lt;/td&gt;
&lt;td&gt;Every request routed through it, any provider&lt;/td&gt;
&lt;td&gt;Yes, per virtual key, team, and customer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;/usage&lt;/code&gt; Session block is the fastest way to see Claude token usage on a single machine. Claude Code computes its dollar figure locally from token counts at list price, so Anthropic describes it as an estimate and points to the Console for authoritative billing. On Pro, Max, Team, and Enterprise plans, the plan usage breakdown in the same screen is computed from local session history, so usage from other devices is not included.&lt;/p&gt;

&lt;p&gt;Claude Code telemetry goes further. Setting &lt;code&gt;CLAUDE_CODE_ENABLE_TELEMETRY=1&lt;/code&gt; and an OTLP or Prometheus exporter makes each machine emit token and cost metrics tagged with &lt;code&gt;user.account_uuid&lt;/code&gt;, &lt;code&gt;session.id&lt;/code&gt;, and &lt;code&gt;model&lt;/code&gt;, as described in &lt;a href="https://code.claude.com/docs/en/monitoring-usage" rel="noopener noreferrer"&gt;Claude Code's monitoring guide&lt;/a&gt;. Coverage depends on every laptop and CI runner receiving those settings, and the cost metric is an estimate computed on the client. For background on why a request-path layer behaves differently, the pillar guide on &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;AI gateway architecture and why it matters&lt;/a&gt; covers the model in depth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Claude Code Usage Is Hard to Track Across a Team
&lt;/h2&gt;

&lt;p&gt;Claude Code usage is hard to track at team scale because cost per task varies by orders of magnitude, native reports are per machine or per billing surface, and the same developer may reach Claude through Anthropic, Bedrock, or Vertex AI. A platform team needs one ledger that covers all of it.&lt;/p&gt;

&lt;p&gt;Three mechanics drive the variance, all documented by Anthropic:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context is resent on every request.&lt;/strong&gt; A one-line question late in a long session still carries the whole conversation, read at the cached-token rate when the cache is warm and at the full input rate after a cache miss.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parallel work multiplies tokens.&lt;/strong&gt; Subagents send their own requests, and agent teams use approximately 7x more tokens than standard sessions when teammates run in plan mode.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Billing surfaces split.&lt;/strong&gt; Anthropic's analytics dashboards and the Claude Code Analytics API do not cover Claude Code usage billed through Amazon Bedrock, Google Cloud, or Microsoft Foundry.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Native tools alone cannot tell an engineering manager which developers drive the bill, what share goes to Opus, or which team will overrun its allocation. Anthropic's own &lt;a href="https://code.claude.com/docs/en/llm-gateway" rel="noopener noreferrer"&gt;LLM gateway guidance&lt;/a&gt; lists usage tracking by developer or team, regardless of which provider serves the request, as a core reason to put a gateway in front of Claude Code. The related guide on &lt;a href="https://www.getmaxim.ai/articles/claude-code-usage-limits-how-teams-manage-them/" rel="noopener noreferrer"&gt;how teams manage Claude Code usage limits&lt;/a&gt; covers how plan limits interact with gateway limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Claude Code Usage Monitor Needs to Capture
&lt;/h2&gt;

&lt;p&gt;A Claude Code usage monitor for a team needs per-request token counts and cost, attribution to a developer and team, a model and provider breakdown, export into existing monitoring tools, and enforcement on the same path. Without the last two, a monitor produces a report that arrives after the money is spent.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Requirement&lt;/th&gt;
&lt;th&gt;Why it matters for Claude Code&lt;/th&gt;
&lt;th&gt;Native tools&lt;/th&gt;
&lt;th&gt;Bifrost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Tokens and cost per request&lt;/td&gt;
&lt;td&gt;Long sessions and subagents hide inside daily totals&lt;/td&gt;
&lt;td&gt;Per session or per day&lt;/td&gt;
&lt;td&gt;Every request in &lt;a href="https://docs.getbifrost.ai/features/observability/default" rel="noopener noreferrer"&gt;request logs&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Developer and team attribution&lt;/td&gt;
&lt;td&gt;Spend reviews happen per team&lt;/td&gt;
&lt;td&gt;Per user where telemetry or Console billing applies&lt;/td&gt;
&lt;td&gt;Per &lt;a href="https://docs.getbifrost.ai/features/governance/virtual-keys" rel="noopener noreferrer"&gt;virtual key&lt;/a&gt;, team, and customer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider coverage&lt;/td&gt;
&lt;td&gt;Claude may be served by Anthropic, Bedrock, or Vertex AI&lt;/td&gt;
&lt;td&gt;Split by billing surface&lt;/td&gt;
&lt;td&gt;One view across providers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Standard export&lt;/td&gt;
&lt;td&gt;Data belongs in Grafana or Datadog&lt;/td&gt;
&lt;td&gt;OpenTelemetry from each machine&lt;/td&gt;
&lt;td&gt;Prometheus and OTLP from the gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enforcement&lt;/td&gt;
&lt;td&gt;A cap must stop the next request&lt;/td&gt;
&lt;td&gt;Workspace or org spend limits&lt;/td&gt;
&lt;td&gt;Hierarchical budgets and rate limits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A Claude Code token usage monitor needs a credential per developer for attribution and a control point on the request path for enforcement. This is the core job of &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;an AI gateway placed in front of model traffic&lt;/a&gt;, and Bifrost is built on exactly that pairing: virtual keys for attribution, budgets for enforcement.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Bifrost Monitors Claude Code Token Usage
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;The Bifrost AI gateway&lt;/a&gt; monitors Claude Code token usage by receiving every request on its Anthropic-compatible endpoint, resolving the developer's virtual key, forwarding the request to the configured provider, and recording tokens, cost, and latency against that key. Because measurement happens on the request path, no developer machine needs its own telemetry pipeline.&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%2Fhne1cwecs9rrvlxsjqcm.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%2Fhne1cwecs9rrvlxsjqcm.png" alt="Three Claude Code clients with their own virtual keys route through Bifrost to Anthropic, Bedrock, or Vertex AI, while token and cost data flows to logs, Prometheus, and OpenTelemetry" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Token and cost data is captured on the request path, so attribution does not depend on telemetry settings on each laptop.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As Figure 1 shows, three outputs come from the same request stream:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Built-in request logs and dashboard.&lt;/strong&gt; Every request is logged with provider, model, input and output tokens, cost, latency, and status. The dashboard at &lt;code&gt;http://localhost:8080&lt;/code&gt; adds token and cost analytics, and the logs API filters by virtual key, model, token range, cost range, and time window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prometheus metrics.&lt;/strong&gt; The &lt;code&gt;/metrics&lt;/code&gt; endpoint exposes &lt;code&gt;bifrost_input_tokens_total&lt;/code&gt;, &lt;code&gt;bifrost_output_tokens_total&lt;/code&gt;, and &lt;code&gt;bifrost_cost_total&lt;/code&gt;, labeled with &lt;code&gt;virtual_key_name&lt;/code&gt;, &lt;code&gt;team_name&lt;/code&gt;, &lt;code&gt;customer_name&lt;/code&gt;, &lt;code&gt;model&lt;/code&gt;, and &lt;code&gt;provider&lt;/code&gt;. Multi-node deployments push to a Prometheus Push Gateway instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenTelemetry spans.&lt;/strong&gt; The OTel plugin emits GenAI semantic-convention spans carrying &lt;code&gt;gen_ai.usage.prompt_tokens&lt;/code&gt;, &lt;code&gt;gen_ai.usage.completion_tokens&lt;/code&gt;, and &lt;code&gt;gen_ai.usage.cost&lt;/code&gt; to Grafana Cloud, New Relic, Honeycomb, or any OTLP collector.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bifrost covers Claude wherever it is served. The same virtual key can route Claude Code to Anthropic directly or to Claude models on &lt;a href="https://docs.getbifrost.ai/runbooks/claude-code-bedrock" rel="noopener noreferrer"&gt;AWS Bedrock through Bifrost&lt;/a&gt; and Vertex AI, and every one of those requests lands in the same ledger. The sub-hub guide on &lt;a href="https://www.getmaxim.ai/articles/choosing-an-ai-gateway-for-claude-code-complete-guide/" rel="noopener noreferrer"&gt;choosing an AI gateway for Claude Code&lt;/a&gt; covers routing, model aliasing, and the MCP gateway beyond monitoring. Teams also running OpenAI's agent can apply the same approach to &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-manage-codex-cli-token-spend/" rel="noopener noreferrer"&gt;Codex CLI token spend&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Bifrost Records for Each Claude Code Request
&lt;/h2&gt;

&lt;p&gt;For each Claude Code request, Bifrost resolves the virtual key, checks every applicable budget and rate limit, calls the provider, and then computes cost from token counts against its pricing catalog. Logging runs asynchronously, so recording adds no wait to the developer's session.&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%2Fvkfpaz254qwidcs2qenz.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%2Fvkfpaz254qwidcs2qenz.png" alt="A Claude Code request passes virtual key resolution and budget checks, reaches the provider, then has tokens and cost recorded to logs, metrics, and traces" width="799" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: Enforcement happens before the provider call and recording happens after it, so blocked requests cost nothing and allowed ones are always attributed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Cost accuracy depends on pricing. The &lt;a href="https://docs.getbifrost.ai/architecture/framework/model-catalog" rel="noopener noreferrer"&gt;model catalog&lt;/a&gt; syncs a pricing sheet every 24 hours by default, and &lt;a href="https://docs.getbifrost.ai/providers/custom-pricing" rel="noopener noreferrer"&gt;custom pricing&lt;/a&gt; overrides catalog rates at global or virtual key scope, so negotiated Anthropic or Bedrock rates show up in reports. Native Claude Code figures use list price unless an administrator distributes a &lt;code&gt;modelPricing&lt;/code&gt; managed setting.&lt;/p&gt;

&lt;p&gt;Claude Code sends an &lt;code&gt;x-claude-code-session-id&lt;/code&gt; header on every request, and &lt;a href="https://docs.getbifrost.ai/providers/session-affinity" rel="noopener noreferrer"&gt;session affinity&lt;/a&gt; keeps that session on the provider key that served it, so prompt cache hits continue. Any request header prefixed &lt;code&gt;x-bf-lh-&lt;/code&gt; is copied into log metadata, which adds dimensions such as repository or cost center.&lt;/p&gt;

&lt;p&gt;The request path stays fast. Bifrost adds 11 microseconds of overhead per request at 5,000 requests per second in sustained &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;benchmarks&lt;/a&gt;, and the logging plugin adds under 0.1 ms, which is negligible next to model response time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building a Claude Code Usage Dashboard and Token Usage Report
&lt;/h2&gt;

&lt;p&gt;A Claude Code usage dashboard is built by scraping Bifrost's Prometheus metrics into Grafana, or by querying the logs API for a periodic Claude Code token usage report. Both paths use labels Bifrost already attaches, so no instrumentation is added to Claude Code.&lt;/p&gt;

&lt;p&gt;Three PromQL queries cover most weekly reviews:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Claude Code spend by team over the last 30 days
sum by (team_name) (increase(bifrost_cost_total[30d]))

# Input tokens by developer key and model over 7 days
sum by (virtual_key_name, model) (increase(bifrost_input_tokens_total[7d]))

# Requests refused because a budget was spent
sum by (virtual_key_name) (increase(bifrost_error_requests_total{error_type="policy_budget_exceeded"}[1d]))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a written report, the logs API returns a &lt;code&gt;stats&lt;/code&gt; object with &lt;code&gt;total_requests&lt;/code&gt;, &lt;code&gt;total_tokens&lt;/code&gt;, and &lt;code&gt;total_cost&lt;/code&gt; for any filter, which makes a monthly per-developer export a single scheduled call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s1"&gt;'http://localhost:8080/api/logs?virtual_key_ids=&amp;lt;vk-id&amp;gt;&amp;amp;start_time=2026-09-01T00:00:00Z&amp;amp;end_time=2026-09-30T23:59:59Z&amp;amp;limit=100'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Prometheus &lt;a href="https://docs.getbifrost.ai/features/observability/prometheus" rel="noopener noreferrer"&gt;metrics and labels&lt;/a&gt; suit dashboards and spend-rate alerts. The &lt;a href="https://docs.getbifrost.ai/features/observability/otel" rel="noopener noreferrer"&gt;OpenTelemetry plugin&lt;/a&gt; suits teams that want Claude Code traffic beside application traces, and Bifrost Enterprise adds a native &lt;a href="https://docs.getbifrost.ai/features/observability/datadog" rel="noopener noreferrer"&gt;Datadog connector&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Deeper patterns are covered in the guides to &lt;a href="https://www.getmaxim.ai/articles/llm-observability-with-prometheus-metrics-and-dashboards/" rel="noopener noreferrer"&gt;Prometheus dashboards for LLM traffic&lt;/a&gt; and &lt;a href="https://www.getmaxim.ai/articles/opentelemetry-for-llm-observability-traces-and-metrics/" rel="noopener noreferrer"&gt;OpenTelemetry traces and metrics for LLMs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Controlling Claude Code Cost with Budgets and Alerts
&lt;/h2&gt;

&lt;p&gt;Claude Code cost is controlled in Bifrost with &lt;a href="https://docs.getbifrost.ai/features/governance/budget-and-limits" rel="noopener noreferrer"&gt;hierarchical budgets&lt;/a&gt; on virtual keys, teams, and customers, plus token and request rate limits on virtual keys. Every applicable budget must pass before a request runs, and a spent budget returns HTTP 402 to Claude Code.&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%2Fwsey6pdd7ssfmcw2rsfd.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%2Fwsey6pdd7ssfmcw2rsfd.png" alt="A Claude Code request is checked against the developer virtual key, team, and customer budgets in turn, and any exhausted level blocks it before the provider call" width="800" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: A runaway session exhausts the developer budget first, long before it can drain the team or organization allocation.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The budget model has three properties that matter for Claude Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Independent checks.&lt;/strong&gt; Provider config, virtual key, team, and customer budgets are each checked, and the request cost is deducted from all of them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reset windows.&lt;/strong&gt; Budgets reset on &lt;code&gt;1d&lt;/code&gt;, &lt;code&gt;1w&lt;/code&gt;, &lt;code&gt;1M&lt;/code&gt;, &lt;code&gt;1Q&lt;/code&gt;, or &lt;code&gt;1Y&lt;/code&gt;; setting &lt;code&gt;calendar_aligned&lt;/code&gt; snaps them to calendar boundaries in UTC so they match finance periods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limits where bursts happen.&lt;/strong&gt; Token and request limits apply at the virtual key and provider config levels, which is where a subagent fan-out shows up first. Teams and customers carry budgets only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bifrost Enterprise adds &lt;a href="https://docs.getbifrost.ai/enterprise/alerting/overview" rel="noopener noreferrer"&gt;alerting&lt;/a&gt; on top: CEL rules such as &lt;code&gt;budget_usage_percent &amp;gt; 80&lt;/code&gt; are evaluated every 60 seconds against virtual key, team, or customer scopes, and notifications go to Slack, Microsoft Teams, PagerDuty, or a webhook. The &lt;a href="https://www.getmaxim.ai/bifrost/resources/governance" rel="noopener noreferrer"&gt;governance resource page&lt;/a&gt; covers how budgets, RBAC, and SSO fit together, and the guide to &lt;a href="https://www.getmaxim.ai/articles/best-claude-code-gateway-to-govern-token-usage-per-team/" rel="noopener noreferrer"&gt;governing Claude Code token usage per team&lt;/a&gt; walks through team structures in detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rolling Out Claude Code Usage Monitoring
&lt;/h2&gt;

&lt;p&gt;Rolling out Claude Code usage monitoring takes five steps: run Bifrost with provider keys, create teams and one virtual key per developer, distribute Claude Code settings, connect an exporter, then add budgets and alerts. Attribution begins with the first request carrying a virtual key.&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%2Ffqg1849ae5y42bd8klmr.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%2Ffqg1849ae5y42bd8klmr.png" alt="Five-step rollout: run Bifrost with an Anthropic key, create teams and per-developer virtual keys, distribute settings.json, connect Prometheus or OpenTelemetry, then add budgets and alerts" width="798" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: Attribution starts at step three, the moment a developer's Claude Code sends its first request with a virtual key.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Start &lt;a href="https://docs.getbifrost.ai/quickstart/gateway/setting-up" rel="noopener noreferrer"&gt;the Bifrost gateway&lt;/a&gt; with &lt;code&gt;npx -y @maximhq/bifrost&lt;/code&gt; or the &lt;code&gt;maximhq/bifrost&lt;/code&gt; Docker image and add an Anthropic, Bedrock, or Vertex key. Then create a virtual key per developer, attached to a team:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:8080/api/governance/virtual-keys &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "name": "claude-code-alice",
    "team_id": "team-platform",
    "calendar_aligned": true,
    "provider_configs": [
      {"provider": "anthropic", "weight": 1.0, "allowed_models": ["claude-sonnet-4-6", "claude-haiku-4-5", "claude-opus-4-8"], "key_ids": ["*"]}
    ],
    "budgets": [{"max_limit": 150.00, "reset_duration": "1M"}],
    "rate_limit": {"token_max_limit": 2000000, "token_reset_duration": "1h", "request_max_limit": 300, "request_reset_duration": "1m"}
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each developer's Claude Code then needs two values in the &lt;code&gt;env&lt;/code&gt; block of &lt;code&gt;settings.json&lt;/code&gt;, as shown in the &lt;a href="https://docs.getbifrost.ai/cli-agents/claude-code" rel="noopener noreferrer"&gt;Claude Code integration guide&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_BASE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://localhost:8080/anthropic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_AUTH_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;bifrost-virtual-key&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt;, no Anthropic account login is needed, and billing follows the virtual key. Since Claude Code 2.1.212, add the required Anthropic headers (including &lt;code&gt;anthropic-version&lt;/code&gt;) to Bifrost's allowed headers under Client Settings. At fleet scale, distribute the base URL through Claude Code managed settings; setting &lt;code&gt;allowedProviders&lt;/code&gt; to &lt;code&gt;["customEndpoint"]&lt;/code&gt; there makes Claude Code refuse sessions pointed anywhere other than the gateway. Developers who prefer a guided setup can run the &lt;a href="https://docs.getbifrost.ai/quickstart/cli/getting-started" rel="noopener noreferrer"&gt;Bifrost CLI&lt;/a&gt; with &lt;code&gt;npx -y @maximhq/bifrost-cli&lt;/code&gt;, which configures Claude Code and stores the virtual key in the OS keyring.&lt;/p&gt;

&lt;p&gt;Bifrost supports &lt;a href="https://docs.getbifrost.ai/providers/supported-providers/overview" rel="noopener noreferrer"&gt;25+ providers and 10,000+ models&lt;/a&gt;, and &lt;a href="https://www.getmaxim.ai/bifrost/enterprise" rel="noopener noreferrer"&gt;Bifrost Enterprise&lt;/a&gt; adds in-VPC deployment, clustering, RBAC, and SSO for regulated teams.&lt;/p&gt;

&lt;p&gt;Teams pairing monitoring with reduction can follow the guide to &lt;a href="https://www.getmaxim.ai/articles/how-to-reduce-claude-code-token-costs/" rel="noopener noreferrer"&gt;reducing Claude Code token costs&lt;/a&gt;, and teams evaluating cheaper model tiers can review &lt;a href="https://www.getmaxim.ai/articles/5-ai-gateways-developers-use-to-run-claude-code-with-non-anthropic-models/" rel="noopener noreferrer"&gt;gateways that run Claude Code with non-Anthropic models&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is there a way to track Claude Code usage?
&lt;/h3&gt;

&lt;p&gt;Yes. For one session, run &lt;code&gt;/usage&lt;/code&gt; inside Claude Code to see tokens per model and an estimated cost. For a team, enable Claude Code's OpenTelemetry export on every machine, use the Console or admin analytics for Anthropic-billed usage, or route Claude Code through an AI gateway such as &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;the Bifrost gateway&lt;/a&gt;, which records tokens and cost for every request by virtual key across Anthropic, Bedrock, and Vertex AI.&lt;/p&gt;

&lt;h3&gt;
  
  
  How is Claude Code usage measured?
&lt;/h3&gt;

&lt;p&gt;Claude Code usage is measured in API tokens, split into input, output, cache read, and cache creation tokens, and converted to cost using per-model rates. Subscription plans also measure usage against a rolling five-hour window and a weekly window. Bifrost measures input and output tokens and cost per request at the gateway, so the figure reflects what actually passed through to the provider.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I check Claude Code token usage?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;/usage&lt;/code&gt; (or its aliases &lt;code&gt;/cost&lt;/code&gt; and &lt;code&gt;/stats&lt;/code&gt;) to see the current session's input, output, and cache tokens by model with an estimated cost at list price. Running &lt;code&gt;/clear&lt;/code&gt; resets those totals. For history across sessions and developers, query Bifrost's logs API or dashboard, which filter Claude Code requests by virtual key, model, cost, and time range.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does token usage mean?
&lt;/h3&gt;

&lt;p&gt;Token usage is the number of tokens a model reads and writes for a request. Input tokens cover the prompt, conversation history, files, and tool results Claude Code sends; output tokens cover the response, including thinking tokens. Because Claude Code resends the conversation each turn, Claude Code token usage grows with session length even when each new prompt is short.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does Claude Code cost?
&lt;/h3&gt;

&lt;p&gt;Anthropic reports an average of around $13 per developer per active day and $150 to $250 per developer per month across enterprise deployments, with 90% of users below $30 per active day. Actual Claude Code cost depends on model choice, session length, codebase size, and use of subagents or agent teams, which is why per-developer budgets are usually set from a measured pilot baseline.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does routing Claude Code through Bifrost change how developers work?
&lt;/h3&gt;

&lt;p&gt;No. Developers keep the same commands, models, and workflow; only &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; and &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; change in &lt;code&gt;settings.json&lt;/code&gt;. Session affinity keeps prompt caching intact, and Bifrost adds 11 microseconds of overhead per request. The visible difference is that a spent budget returns an error instead of continuing to bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Monitoring Claude Code Token Usage with Bifrost
&lt;/h2&gt;

&lt;p&gt;Monitoring Claude Code token usage at team scale requires a layer that sees every request, attributes it to a developer and team, exports it to existing dashboards, and stops spend at a defined limit. Bifrost does all four with two settings per developer and no change to how Claude Code is used. The &lt;a href="https://www.getmaxim.ai/bifrost/resources/claude-code" rel="noopener noreferrer"&gt;Bifrost Claude Code resource page&lt;/a&gt; and the &lt;a href="https://www.getmaxim.ai/articles/choosing-an-ai-gateway-for-claude-code-complete-guide/" rel="noopener noreferrer"&gt;complete Claude Code gateway guide&lt;/a&gt; cover routing and governance beyond usage monitoring.&lt;/p&gt;

&lt;p&gt;To see how Bifrost can centralize Claude Code usage monitoring and cost control for your engineering organization, &lt;a href="https://getmaxim.ai/bifrost/book-a-demo" rel="noopener noreferrer"&gt;book a demo&lt;/a&gt; with the Bifrost team.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>apigateway</category>
      <category>llm</category>
    </item>
    <item>
      <title>Codex token usage is the input, cached input, output, and reasoning tokens that Codex CLI consumes as it reads code, calls tools, and edits files. This guide shows how to check it, what drives Codex cost, and how Bifrost adds per-developer budgets, routing</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:32:15 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-is-the-input-cached-input-output-and-reasoning-tokens-that-codex-cli-consumes-5hhb</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-is-the-input-cached-input-output-and-reasoning-tokens-that-codex-cli-consumes-5hhb</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-track-and-cap-spend-with-an-ai-gateway-2cc4" class="crayons-story__hidden-navigation-link"&gt;Codex Token Usage: Track and Cap Spend with an AI Gateway&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" alt="kamya_shah_e69d5dd78f831c profile" class="crayons-avatar__image" width="800" height="1067"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kamya Shah
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kamya Shah
                
                
              
              &lt;div id="story-author-preview-content-4805494" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kamya_shah_e69d5dd78f831c" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" class="crayons-avatar__image" alt="" width="800" height="1067"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kamya Shah&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-track-and-cap-spend-with-an-ai-gateway-2cc4" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-track-and-cap-spend-with-an-ai-gateway-2cc4" id="article-link-4805494"&gt;
          Codex Token Usage: Track and Cap Spend with an AI Gateway
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/codex"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;codex&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/gateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;gateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/llmcost"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;llmcost&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-track-and-cap-spend-with-an-ai-gateway-2cc4" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-track-and-cap-spend-with-an-ai-gateway-2cc4#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            13 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Codex Token Usage: Track and Cap Spend with an AI Gateway</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:32:01 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-track-and-cap-spend-with-an-ai-gateway-2cc4</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/codex-token-usage-track-and-cap-spend-with-an-ai-gateway-2cc4</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Codex token usage grows with context size, agent turns, reasoning effort, and model choice, so similar tasks can consume very different amounts of tokens.&lt;/li&gt;
&lt;li&gt;Codex CLI's &lt;code&gt;/status&lt;/code&gt; and &lt;code&gt;/usage&lt;/code&gt; commands show token activity for one developer; neither attributes spend across a team or blocks a request when a budget runs out.&lt;/li&gt;
&lt;li&gt;Bifrost enforces budgets at the provider config, virtual key, team, and customer levels, and rejects a Codex CLI request when any applicable budget is exhausted.&lt;/li&gt;
&lt;li&gt;Bifrost adds 11 microseconds of overhead per request at 5,000 requests per second, so budget checks do not slow interactive Codex CLI sessions.&lt;/li&gt;
&lt;li&gt;Connecting Codex CLI takes a &lt;code&gt;/logout&lt;/code&gt;, an exported virtual key, and a named &lt;code&gt;model_providers&lt;/code&gt; entry in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Codex token usage is the count of input, cached input, output, and reasoning tokens that OpenAI's Codex CLI consumes while it reads a repository, calls tools, and edits files, and it compounds quickly once a whole engineering team runs the agent daily. &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost&lt;/a&gt;, the &lt;a href="https://github.com/maximhq/bifrost" rel="noopener noreferrer"&gt;open-source AI gateway built in Go&lt;/a&gt; by Maxim AI, sits between Codex CLI and the model provider to attribute every token to a developer, enforce budgets before spend happens, and log cost per request. This guide covers how to check Codex token usage, how Codex cost and usage limits work, and how to configure Bifrost so Codex CLI spend stays predictable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Drives Codex Token Usage
&lt;/h2&gt;

&lt;p&gt;Four factors drive Codex token spend: the context the agent reads, the number of agent turns, reasoning effort, and the model's per-token rate. OpenAI's &lt;a href="https://learn.chatgpt.com/docs/pricing" rel="noopener noreferrer"&gt;Codex pricing page&lt;/a&gt; states that model choice, context, reasoning, tool use, retrieval, and caching all affect usage, so prompt length alone is not a reliable estimate.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository context&lt;/strong&gt;: files, chat history, and tool results are sent as input tokens, far more than the prompt the developer typed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agentic turns&lt;/strong&gt;: plan, edit, test, and fix steps are separate requests that each replay the growing conversation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning effort&lt;/strong&gt;: higher effort produces more reasoning tokens, billed as output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model rate&lt;/strong&gt;: on OpenAI's current Codex credit rate card, GPT-6 Astra costs 250 credits per million input tokens and 1,250 per million output tokens, while GPT-6 Luna costs 2.5 and 12.5. That is a 100x spread for the same token count.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Model choice is the factor a team controls most directly, which is why a shared control point matters. The pillar guide to &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;AI gateway architecture&lt;/a&gt; explains that pattern for any set of clients and models.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Check Codex Usage
&lt;/h2&gt;

&lt;p&gt;Codex CLI exposes token usage through two slash commands. &lt;code&gt;/status&lt;/code&gt; displays session configuration and token usage, including the active model and remaining context capacity. &lt;code&gt;/usage&lt;/code&gt; shows daily, weekly, or cumulative ChatGPT token activity. Both commands report on one developer's session or account and cannot stop a request.&lt;/p&gt;

&lt;p&gt;OpenAI documents both on the &lt;a href="https://developers.openai.com/codex/cli/slash-commands" rel="noopener noreferrer"&gt;Codex CLI slash commands page&lt;/a&gt;, and ChatGPT-plan users also get a usage dashboard with reset times. Codex CLI can &lt;a href="https://learn.chatgpt.com/docs/config-file/config-advanced" rel="noopener noreferrer"&gt;export OpenTelemetry metrics&lt;/a&gt;, including a &lt;code&gt;turn.token_usage&lt;/code&gt; metric split by input, cached input, output, and reasoning tokens; the export is off by default and enabled with an &lt;code&gt;[otel]&lt;/code&gt; block.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;What it shows&lt;/th&gt;
&lt;th&gt;Attributes spend across a team&lt;/th&gt;
&lt;th&gt;Blocks requests at a limit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/status&lt;/code&gt; in Codex CLI&lt;/td&gt;
&lt;td&gt;Session model, config, and token usage&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;/usage&lt;/code&gt; in Codex CLI&lt;/td&gt;
&lt;td&gt;Daily, weekly, or cumulative ChatGPT token activity&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ChatGPT usage dashboard&lt;/td&gt;
&lt;td&gt;Plan limits and reset times for one account&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No (plan limits apply)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex OpenTelemetry export&lt;/td&gt;
&lt;td&gt;Per-turn token counts by type&lt;/td&gt;
&lt;td&gt;Per machine, if every machine is configured&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bifrost request logs&lt;/td&gt;
&lt;td&gt;Tokens, cost, latency, model, and virtual key per request&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes, through budgets and rate limits&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The difference in the last row is position. Bifrost sits on the request path, so its &lt;a href="https://docs.getbifrost.ai/features/observability/default" rel="noopener noreferrer"&gt;request logs&lt;/a&gt; count Codex token usage for every developer in one place, and its budgets reject the next request when a limit is reached. Client-side methods only report after the fact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codex Cost and Usage Limits
&lt;/h2&gt;

&lt;p&gt;Codex cost depends on how a developer signs in. With a ChatGPT plan, Codex usage draws on the plan's included allowance and then on credits. With an API key, Codex usage is billed at standard API pricing for the model the key can access, with no plan allowance and no five-hour window.&lt;/p&gt;

&lt;p&gt;OpenAI's &lt;a href="https://learn.chatgpt.com/docs/pricing" rel="noopener noreferrer"&gt;Codex plans and rate card&lt;/a&gt; list the current options:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Access option&lt;/th&gt;
&lt;th&gt;Price (US)&lt;/th&gt;
&lt;th&gt;How Codex usage is limited&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;$0/month&lt;/td&gt;
&lt;td&gt;Basic access on GPT-6 Luna&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Go&lt;/td&gt;
&lt;td&gt;$8/month&lt;/td&gt;
&lt;td&gt;Lightweight coding tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Plus&lt;/td&gt;
&lt;td&gt;$20/month&lt;/td&gt;
&lt;td&gt;Local messages per five-hour period, weekly limits may also apply, then credits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pro&lt;/td&gt;
&lt;td&gt;From $100/month ($100, $200, or $500 tiers)&lt;/td&gt;
&lt;td&gt;No five-hour limit currently; higher allowance, then credits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Business&lt;/td&gt;
&lt;td&gt;$20/user/month billed annually, $25 billed monthly&lt;/td&gt;
&lt;td&gt;Five-hour allowance on Standard Business, workspace credits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enterprise / Edu&lt;/td&gt;
&lt;td&gt;Contact sales&lt;/td&gt;
&lt;td&gt;Flexible pricing plans have no fixed rate limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API key&lt;/td&gt;
&lt;td&gt;Standard API pricing&lt;/td&gt;
&lt;td&gt;Billed per token; models follow what the key can access; no cloud features such as GitHub code review or Slack&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two details matter for Codex usage limits planning. Codex credit billing has no separate cache-write charge, and GPT-5.5 retires from Codex on all ChatGPT plans on October 14, 2026, so budgets built on GPT-5.5 rates need updating.&lt;/p&gt;

&lt;p&gt;For Codex CLI pricing in API-key mode, which is how teams route Codex through a gateway, the bill is every request's tokens at the provider's rate. The &lt;a href="https://www.getmaxim.ai/bifrost/llm-cost-calculator/provider/openai" rel="noopener noreferrer"&gt;OpenAI model cost calculator&lt;/a&gt; gives a per-million-token baseline before rollout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Codex Token Usage Needs Team-Level Controls
&lt;/h2&gt;

&lt;p&gt;Codex token usage needs team-level controls because every built-in view is scoped to one developer, while the bill is scoped to the organization. Without a shared control point, a platform team cannot see which developer or model drives Codex cost, or stop a runaway agent loop before the invoice arrives. Teams typically try one of four approaches:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Visibility&lt;/th&gt;
&lt;th&gt;Enforcement&lt;/th&gt;
&lt;th&gt;Limitation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ChatGPT seats per developer&lt;/td&gt;
&lt;td&gt;Per-account dashboard&lt;/td&gt;
&lt;td&gt;Plan limits only&lt;/td&gt;
&lt;td&gt;No budget per project; limits are set by OpenAI, not the team&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One shared OpenAI API key&lt;/td&gt;
&lt;td&gt;Organization-level billing&lt;/td&gt;
&lt;td&gt;Provider rate limits only&lt;/td&gt;
&lt;td&gt;No per-developer attribution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Separate API keys per developer&lt;/td&gt;
&lt;td&gt;Per-key billing&lt;/td&gt;
&lt;td&gt;Manual key revocation&lt;/td&gt;
&lt;td&gt;Key sprawl; no model or provider policy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI gateway with virtual keys&lt;/td&gt;
&lt;td&gt;Per request, per developer, per model&lt;/td&gt;
&lt;td&gt;Budgets, rate limits, routing rules&lt;/td&gt;
&lt;td&gt;Requires running a gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&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%2Ffu10sum90oa3oa7j98ac.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%2Ffu10sum90oa3oa7j98ac.png" alt="Three developers run Codex CLI with their own virtual keys; Bifrost applies budgets, rate limits, and routing, logs token usage, then calls OpenAI, Anthropic, or Gemini" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Codex token usage becomes attributable and enforceable once every developer's traffic shares one gateway.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As Figure 1 shows, the &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost AI gateway&lt;/a&gt; gives each developer or CI job its own &lt;a href="https://docs.getbifrost.ai/features/governance/virtual-keys" rel="noopener noreferrer"&gt;virtual key&lt;/a&gt;, so every Codex CLI request carries an identity the gateway can bill and limit. The same pattern applies to other coding agents; the guide to &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateways-for-governing-claude-code-and-codex-cli/" rel="noopener noreferrer"&gt;governing Claude Code and Codex CLI with one gateway&lt;/a&gt; covers running both under shared policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Budgets and Rate Limits on Codex CLI with Bifrost
&lt;/h2&gt;

&lt;p&gt;Bifrost enforces Codex CLI spend through a budget hierarchy: customer, team, virtual key, and provider config. When a request arrives, Bifrost checks every applicable budget independently, and any single exhausted budget blocks the request. The request's cost is then deducted from every level that applies.&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%2Fx4koyoxfymeowv12zzaj.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%2Fx4koyoxfymeowv12zzaj.png" alt="A Codex CLI request passes provider config, virtual key, team, and customer budget checks in order; any exhausted budget rejects it before the provider call" width="799" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: One exhausted budget at any level stops the request, and its cost is deducted from every level that applies.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.getbifrost.ai/features/governance/budget-and-limits" rel="noopener noreferrer"&gt;budget and limits system&lt;/a&gt; maps onto a Codex rollout like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Typical Codex CLI use&lt;/th&gt;
&lt;th&gt;Budget&lt;/th&gt;
&lt;th&gt;Rate limits&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Customer&lt;/td&gt;
&lt;td&gt;A business unit or external client&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team&lt;/td&gt;
&lt;td&gt;Platform or frontend team monthly allocation&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Virtual key&lt;/td&gt;
&lt;td&gt;One developer, service account, or CI job&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Requests and tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider config&lt;/td&gt;
&lt;td&gt;Separate OpenAI and Anthropic spend on one key&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Requests and tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Budgets reset on &lt;code&gt;1d&lt;/code&gt;, &lt;code&gt;1w&lt;/code&gt;, &lt;code&gt;1M&lt;/code&gt;, &lt;code&gt;1Q&lt;/code&gt;, or &lt;code&gt;1Y&lt;/code&gt; windows; with &lt;code&gt;calendar_aligned: true&lt;/code&gt;, a monthly Codex budget resets on the first of the month in UTC. Rate limits use &lt;code&gt;token_max_limit&lt;/code&gt; and &lt;code&gt;request_max_limit&lt;/code&gt; with their own windows, such as one million tokens per hour on a provider config, which caps burst spend from an agent stuck in a retry loop.&lt;/p&gt;

&lt;p&gt;A temporary budget override adds capacity for a set number of reset cycles without changing the base limit, which covers a release week. Bifrost Enterprise adds &lt;a href="https://docs.getbifrost.ai/enterprise/alerting/overview" rel="noopener noreferrer"&gt;budget alerts&lt;/a&gt; to Slack, Microsoft Teams, PagerDuty, or a webhook when a budget crosses a threshold.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.getmaxim.ai/bifrost/resources/governance" rel="noopener noreferrer"&gt;Bifrost governance overview&lt;/a&gt; shows how these levels fit together, and the write-up on &lt;a href="https://www.getmaxim.ai/articles/llm-budget-management-virtual-keys-and-hierarchical-spend-controls/" rel="noopener noreferrer"&gt;hierarchical spend controls with virtual keys&lt;/a&gt; covers budget design for larger organizations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cutting Codex Cost with Caching and Routing
&lt;/h2&gt;

&lt;p&gt;Budgets cap Codex cost; caching and routing lower it. Bifrost reduces spend in three ways: it keeps provider prompt caches warm with session affinity, it can inject prompt-cache markers that Codex does not send, and it routes requests to lower-cost models when a provider budget nears its limit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Session affinity and prompt caching
&lt;/h3&gt;

&lt;p&gt;Codex CLI sends a &lt;code&gt;session-id&lt;/code&gt; header on every request. Bifrost adopts that header for &lt;a href="https://docs.getbifrost.ai/providers/session-affinity" rel="noopener noreferrer"&gt;session affinity&lt;/a&gt;, so a session stays on the provider and API key that served it and keeps reading the same provider prompt cache, with nothing to configure. On the Codex credit rate card, cached input for GPT-6 Astra costs 25 credits per million tokens against 250 for fresh input.&lt;/p&gt;

&lt;p&gt;Codex also sends no prompt-cache markers, so on Anthropic models nothing is cached and every turn pays full input price. Bifrost's &lt;a href="https://docs.getbifrost.ai/features/prompt-caching" rel="noopener noreferrer"&gt;auto prompt caching&lt;/a&gt; adds the marker on the first cacheable block for requests that arrive without one, so turn one writes the cache and later turns read it. Auto injection is off by default and is enabled per provider.&lt;/p&gt;

&lt;h3&gt;
  
  
  Semantic caching, with its limits
&lt;/h3&gt;

&lt;p&gt;Bifrost &lt;a href="https://docs.getbifrost.ai/features/semantic-caching" rel="noopener noreferrer"&gt;semantic caching&lt;/a&gt; replays a stored response for an identical or similar request, so the provider is never called, and it covers the Responses API that Codex CLI uses. Caching engages only when a request carries an &lt;code&gt;x-bf-cache-key&lt;/code&gt; header or a &lt;code&gt;default_cache_key&lt;/code&gt; is set, and &lt;code&gt;conversation_history_threshold&lt;/code&gt; (default 3) skips conversations with more messages than that. Long Codex sessions usually exceed it, so semantic caching suits short, repeated requests such as scripted CI prompts. The guide to &lt;a href="https://www.getmaxim.ai/articles/semantic-caching-for-llms-how-to-cut-token-spend-with-ai-gateways/" rel="noopener noreferrer"&gt;semantic caching for cutting token spend&lt;/a&gt; covers tuning.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cost-aware routing rules
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.getbifrost.ai/providers/routing-rules" rel="noopener noreferrer"&gt;Routing rules&lt;/a&gt; evaluate a CEL expression on each request. The &lt;code&gt;budget_used&lt;/code&gt; variable reports the percentage consumed of the budget configured for the request's provider and model, including a provider config on the virtual key. A rule such as &lt;code&gt;budget_used &amp;gt; 85&lt;/code&gt;, scoped to a team or virtual key, redirects Codex traffic to a lower-cost model before the hard cap is reached.&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%2Fom52fpredt7kv1y1vubn.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%2Fom52fpredt7kv1y1vubn.png" alt="A Codex CLI request passes virtual key checks, then a routing rule tests budget_used above 85 percent and sends it to the requested model or a lower-cost model" width="800" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: Shifting to a lower-cost model near the threshold keeps developers working instead of hitting a hard stop.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Routing to a different model family works because Bifrost translates Codex CLI's Responses API calls to 25+ providers and 10,000+ models in the &lt;a href="https://docs.getbifrost.ai/providers/supported-providers/overview" rel="noopener noreferrer"&gt;supported providers matrix&lt;/a&gt;. The guide on how to &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-route-codex-cli-to-any-model/" rel="noopener noreferrer"&gt;route Codex CLI to any model&lt;/a&gt; covers provider choice and tool-calling requirements in detail.&lt;/p&gt;

&lt;p&gt;Codex sessions that call MCP tools also pay for tool definitions on every request. The analysis of how the &lt;a href="https://www.getmaxim.ai/articles/how-bifrost-mcp-gateway-cuts-token-costs-in-claude-code-and-codex-cli/" rel="noopener noreferrer"&gt;MCP gateway cuts token costs in Claude Code and Codex CLI&lt;/a&gt; quantifies that overhead and the effect of &lt;a href="https://docs.getbifrost.ai/mcp/filtering" rel="noopener noreferrer"&gt;tool filtering per virtual key&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Codex CLI Config for Bifrost
&lt;/h2&gt;

&lt;p&gt;Connecting Codex CLI to Bifrost takes five steps: start the gateway, run &lt;code&gt;/logout&lt;/code&gt; in Codex CLI, export a Bifrost virtual key as &lt;code&gt;OPENAI_API_KEY&lt;/code&gt;, add a named Bifrost provider to &lt;code&gt;config.toml&lt;/code&gt;, and launch &lt;code&gt;codex&lt;/code&gt;. The logout comes first because Codex CLI always prefers an existing OAuth session over a custom API key.&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%2Fnex9n89t1e6fhz40uw7g.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%2Fnex9n89t1e6fhz40uw7g.png" alt="Setup runs left to right: start Bifrost, run /logout in Codex CLI, export the virtual key, add a named Bifrost provider to config.toml, then launch codex" width="798" height="138"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: The logout step comes first because Codex CLI prefers an existing OAuth session over the gateway key.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Start the &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;open-source Bifrost gateway&lt;/a&gt; with &lt;code&gt;npx -y @maximhq/bifrost&lt;/code&gt; or &lt;code&gt;docker run -p 8080:8080 maximhq/bifrost&lt;/code&gt;, as described in the &lt;a href="https://docs.getbifrost.ai/quickstart/gateway/setting-up" rel="noopener noreferrer"&gt;gateway setup guide&lt;/a&gt;. Then, inside Codex CLI, run &lt;code&gt;/logout&lt;/code&gt;, exit, and export the virtual key in the same terminal you will launch Codex from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENAI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&amp;lt;bifrost_virtual_key&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add a named provider to &lt;code&gt;~/.codex/config.toml&lt;/code&gt; (or a project-level &lt;code&gt;.codex/config.toml&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="py"&gt;model&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"openai/gpt-5.4"&lt;/span&gt;
&lt;span class="py"&gt;model_provider&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"bifrost"&lt;/span&gt;

&lt;span class="nn"&gt;[model_providers.bifrost]&lt;/span&gt;
&lt;span class="py"&gt;name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Bifrost"&lt;/span&gt;
&lt;span class="py"&gt;base_url&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"http://localhost:8080/openai/v1"&lt;/span&gt;
&lt;span class="py"&gt;env_key&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"OPENAI_API_KEY"&lt;/span&gt;
&lt;span class="py"&gt;wire_api&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"responses"&lt;/span&gt;
&lt;span class="py"&gt;supports_websockets&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use a named &lt;code&gt;model_providers&lt;/code&gt; entry rather than &lt;code&gt;openai_base_url&lt;/code&gt;: with &lt;code&gt;openai_base_url&lt;/code&gt;, Codex keeps its built-in OpenAI provider and sends a client-side &lt;code&gt;web&lt;/code&gt; namespace tool that Amazon Bedrock rejects. &lt;code&gt;supports_websockets = false&lt;/code&gt; keeps Codex CLI on HTTPS, which non-OpenAI models require. The full reference is on the &lt;a href="https://docs.getbifrost.ai/cli-agents/codex-cli" rel="noopener noreferrer"&gt;Codex CLI integration page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Models use the &lt;code&gt;provider/model&lt;/code&gt; format, either at launch or mid-session with &lt;code&gt;/model&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nt"&gt;--model&lt;/span&gt; openai/gpt-5-codex
codex &lt;span class="nt"&gt;--model&lt;/span&gt; anthropic/claude-sonnet-4-5-20250929
codex &lt;span class="nt"&gt;--model&lt;/span&gt; gemini/gemini-2.5-pro
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Non-OpenAI models must support tool calling, which Codex CLI relies on for file and terminal operations. To skip manual edits, the &lt;a href="https://docs.getbifrost.ai/quickstart/cli/getting-started" rel="noopener noreferrer"&gt;Bifrost CLI&lt;/a&gt; (&lt;code&gt;npx -y @maximhq/bifrost-cli&lt;/code&gt;) sets &lt;code&gt;OPENAI_BASE_URL&lt;/code&gt; to the gateway's &lt;code&gt;/openai/v1&lt;/code&gt; path, stores the virtual key in the OS keyring, and launches Codex CLI; the walkthrough on &lt;a href="https://www.getmaxim.ai/articles/how-to-use-bifrost-cli-with-coding-agents-like-claude-code/" rel="noopener noreferrer"&gt;using Bifrost CLI with coding agents&lt;/a&gt; shows the flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring Codex Token Usage Across a Team
&lt;/h2&gt;

&lt;p&gt;Bifrost logs every Codex CLI request with input and output tokens, cost, latency, provider, model, and virtual key. Logging runs asynchronously, so it adds no latency, and logs filter by model, provider, token range, or cost range.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.getbifrost.ai/features/observability/default" rel="noopener noreferrer"&gt;built-in request logs&lt;/a&gt; answer questions such as which developer ran the most expensive session this week. For dashboards, Bifrost exposes &lt;a href="https://docs.getbifrost.ai/features/telemetry" rel="noopener noreferrer"&gt;Prometheus metrics&lt;/a&gt; including &lt;code&gt;bifrost_input_tokens_total&lt;/code&gt;, &lt;code&gt;bifrost_output_tokens_total&lt;/code&gt;, and &lt;code&gt;bifrost_cost_total&lt;/code&gt;, labeled by provider, model, and &lt;code&gt;virtual_key_id&lt;/code&gt;, so a Grafana panel can chart Codex cost per developer. Traces can also go to any collector through &lt;a href="https://docs.getbifrost.ai/features/observability/otel" rel="noopener noreferrer"&gt;OpenTelemetry&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Cost figures come from a model catalog that syncs provider pricing every 24 hours, and &lt;a href="https://docs.getbifrost.ai/providers/custom-pricing" rel="noopener noreferrer"&gt;custom pricing&lt;/a&gt; applies negotiated rates. Bifrost &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;benchmarks&lt;/a&gt; show 11 microseconds of overhead per request at 5,000 RPS with a 100% success rate, so none of this tracking slows a session.&lt;/p&gt;

&lt;p&gt;Teams running both coding agents can compare this setup with the guide on &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-monitor-claude-code-token-usage/" rel="noopener noreferrer"&gt;monitoring Claude Code token usage&lt;/a&gt;, and the &lt;a href="https://www.getmaxim.ai/articles/choosing-an-ai-gateway-for-claude-code-complete-guide/" rel="noopener noreferrer"&gt;Claude Code gateway selection guide&lt;/a&gt; covers the Anthropic side of the rollout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I check Codex token usage?
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;/status&lt;/code&gt; in Codex CLI to see the session's model, configuration, and token usage, or &lt;code&gt;/usage&lt;/code&gt; to see daily, weekly, or cumulative ChatGPT token activity. ChatGPT-plan users can also check the Codex usage dashboard for remaining limits. These views cover one developer. For team-wide Codex token usage by developer and model, route Codex CLI through Bifrost and read its &lt;a href="https://docs.getbifrost.ai/features/observability/default" rel="noopener noreferrer"&gt;per-request token logs&lt;/a&gt; or Prometheus metrics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Codex pay to use?
&lt;/h3&gt;

&lt;p&gt;Codex is included in ChatGPT Free, Go, Plus, Pro, Business, Edu, and Enterprise plans, with allowances that differ by plan, and usage beyond the allowance draws on credits. With an OpenAI API key, every request is billed at standard API pricing and cloud features such as GitHub code review are unavailable.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does Codex CLI cost?
&lt;/h3&gt;

&lt;p&gt;Codex CLI cost follows the sign-in method. On a ChatGPT plan, it is the plan price plus any credits used past the included allowance; Plus is $20 per month and Pro starts at $100 per month. With an API key, Codex CLI cost is the per-token rate of the chosen model multiplied by the input, cached input, and output tokens each session consumes.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens when you hit Codex usage limits?
&lt;/h3&gt;

&lt;p&gt;When a ChatGPT-plan user reaches a Codex usage limit during an active turn, the agent can finish that turn, subject to fair use. After that, Plus and Pro users can buy additional credits, and Business or Enterprise workspaces with flexible pricing can buy workspace credits. Limits reset on the schedule shown in the usage dashboard, including five-hour windows on Plus.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I set a spending limit on Codex CLI?
&lt;/h3&gt;

&lt;p&gt;Yes. Routing Codex CLI through Bifrost lets a team attach budgets to each developer's virtual key, a team, a customer, and each provider config. When any applicable budget is exhausted, Bifrost rejects further requests until the budget resets on its daily, weekly, monthly, quarterly, or yearly window.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Codex CLI use non-OpenAI models through Bifrost?
&lt;/h3&gt;

&lt;p&gt;Yes. Bifrost translates Codex CLI's Responses API requests to other providers, so &lt;code&gt;codex --model anthropic/claude-sonnet-4-5-20250929&lt;/code&gt; runs under the same virtual key and budget. The model must support tool calling, and Codex CLI must use HTTPS rather than WebSocket mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Managing Codex Token Usage with Bifrost
&lt;/h2&gt;

&lt;p&gt;Codex token usage scales with every developer, agent turn, and model upgrade, while built-in Codex views report it per account. Bifrost, as the &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;AI gateway layer in front of every model call&lt;/a&gt;, turns that usage into attributed, budgeted, and logged traffic through virtual keys, budgets, routing, and prompt-cache handling. For multi-model Codex setups, see the guide to &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-route-codex-cli-to-any-model/" rel="noopener noreferrer"&gt;running Codex CLI with Claude, Gemini, or local models&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To put budgets and spend visibility on Codex CLI across your engineering organization, &lt;a href="https://getmaxim.ai/bifrost/book-a-demo" rel="noopener noreferrer"&gt;book a demo&lt;/a&gt; with the Bifrost team.&lt;/p&gt;

</description>
      <category>codex</category>
      <category>ai</category>
      <category>gateway</category>
      <category>llmcost</category>
    </item>
    <item>
      <title>A Claude Code gateway authenticates each developer, enforces budgets, and routes Claude Code traffic to Anthropic, Amazon Bedrock, or Vertex AI from one endpoint. This guide covers what to evaluate, how to configure Claude Code with Bifrost, and how to rol</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:30:45 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/a-claude-code-gateway-authenticates-each-developer-enforces-budgets-and-routes-claude-code-1048</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/a-claude-code-gateway-authenticates-each-developer-enforces-budgets-and-routes-claude-code-1048</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-gateway-a-complete-guide-to-choosing-one-17j6" class="crayons-story__hidden-navigation-link"&gt;Claude Code Gateway: A Complete Guide to Choosing One&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" alt="kamya_shah_e69d5dd78f831c profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kamya Shah
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kamya Shah
                
                
              
              &lt;div id="story-author-preview-content-4805488" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kamya_shah_e69d5dd78f831c" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kamya Shah&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-gateway-a-complete-guide-to-choosing-one-17j6" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-gateway-a-complete-guide-to-choosing-one-17j6" id="article-link-4805488"&gt;
          Claude Code Gateway: A Complete Guide to Choosing One
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/claude"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;claude&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/llm"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;llm&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/apigateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;apigateway&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-gateway-a-complete-guide-to-choosing-one-17j6" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-gateway-a-complete-guide-to-choosing-one-17j6#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              2&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            13 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Claude Code Gateway: A Complete Guide to Choosing One</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:30:34 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-gateway-a-complete-guide-to-choosing-one-17j6</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/claude-code-gateway-a-complete-guide-to-choosing-one-17j6</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Claude Code gateway sits between Claude Code and model providers so developers hold gateway credentials instead of provider keys, and usage, budgets, and audit trails live in one place.&lt;/li&gt;
&lt;li&gt;The deciding criteria are forwarding fidelity (streaming, beta headers, error bodies, prompt caching), governance depth, provider coverage, and where the gateway runs.&lt;/li&gt;
&lt;li&gt;Bifrost connects to Claude Code with two settings.json values, &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; and &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; set to a virtual key, and needs no Anthropic account login.&lt;/li&gt;
&lt;li&gt;Bifrost routes Claude Code to Claude on Amazon Bedrock, Vertex AI, or Azure through stable deployment names, and keeps each session on one provider key so prompt cache hits continue.&lt;/li&gt;
&lt;li&gt;Enterprise rollout follows five steps: deploy the gateway, issue one virtual key per developer, distribute managed settings, verify, then lock the endpoint.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A Claude Code gateway is a service that sits between Claude Code and model providers, authenticating each developer, enforcing budgets, and forwarding every request to Anthropic, Amazon Bedrock, Google Vertex AI, or another provider from one endpoint. &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost&lt;/a&gt;, the &lt;a href="https://github.com/maximhq/bifrost" rel="noopener noreferrer"&gt;open-source AI gateway built in Go&lt;/a&gt; by Maxim AI, fills that role for engineering organizations running Claude Code at scale, with 11 microseconds of overhead per request at 5,000 RPS. This guide explains what to evaluate in a Claude Code gateway, why teams searching for a "Claude Code proxy" usually need a gateway, and how to configure, govern, and roll one out.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a Claude Code Gateway?
&lt;/h2&gt;

&lt;p&gt;A Claude Code gateway is an Anthropic Messages-compatible endpoint that Claude Code calls instead of &lt;code&gt;api.anthropic.com&lt;/code&gt;. Developers authenticate with a gateway-issued credential, and the gateway applies access rules, budgets, and routing before forwarding the request with the organization's provider credential. Provider keys never reach developer laptops.&lt;/p&gt;

&lt;p&gt;Claude Code selects the gateway through &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt;. Anthropic's &lt;a href="https://code.claude.com/docs/en/llm-gateway" rel="noopener noreferrer"&gt;guide to other LLM gateways&lt;/a&gt; lists what a gateway centralizes (credentials, usage tracking, cost controls, audit logging, provider switching) and states that Anthropic does not endorse, maintain, or audit third-party gateway products, and does not support routing Claude Code to non-Claude models through any gateway, so model substitution is a choice your team validates and owns.&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%2Fh5lyk0g5fu0xjgbivypt.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%2Fh5lyk0g5fu0xjgbivypt.png" alt="Claude Code and Codex CLI on developer machines send requests with per-developer virtual keys to the Bifrost AI gateway, which forwards them to Anthropic, Bedrock, or Vertex AI" width="800" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Developers hold gateway credentials; provider keys, budgets, and routing decisions stay in one place the platform team operates.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The same gateway can serve Codex CLI; see &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-route-codex-cli-to-any-model/" rel="noopener noreferrer"&gt;Codex CLI routing across any model&lt;/a&gt;. The &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;AI gateway architecture explainer&lt;/a&gt; covers the general pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude Code Proxy vs Gateway: Which One Teams Need
&lt;/h2&gt;

&lt;p&gt;Teams search for a "Claude Code proxy" for three reasons: running Claude Code against non-Anthropic models, sending traffic through a corporate HTTPS proxy, or adding cost and access control. Only the first two are proxy problems; cost control and access policy need identity, budgets, and logs, which is gateway work.&lt;/p&gt;

&lt;p&gt;Open-source Claude Code proxy projects typically translate Anthropic-format requests into another provider's format for one developer. A corporate &lt;code&gt;HTTPS_PROXY&lt;/code&gt; is a &lt;a href="https://code.claude.com/docs/en/network-config" rel="noopener noreferrer"&gt;network control&lt;/a&gt; that sits between Claude Code and every server, including the gateway. Neither knows which developer sent a request or what it cost.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Need&lt;/th&gt;
&lt;th&gt;Translation proxy&lt;/th&gt;
&lt;th&gt;Corporate HTTPS proxy&lt;/th&gt;
&lt;th&gt;Claude Code gateway (Bifrost)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Use other providers' models&lt;/td&gt;
&lt;td&gt;Yes, usually one developer&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes, 25+ providers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per-developer credentials&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Virtual key per developer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Budgets and rate limits&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Virtual key, team, customer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Request logs with tokens and cost&lt;/td&gt;
&lt;td&gt;Varies&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Built in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Central provider switching&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes, no laptop changes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Bifrost is an AI gateway rather than a proxy: it holds governance state, resolves models across providers, and records every request. The &lt;a href="https://www.getmaxim.ai/articles/5-best-ai-gateways-in-2026/" rel="noopener noreferrer"&gt;5 best AI gateways in 2026&lt;/a&gt; roundup compares self-hosted and managed options.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Claude Code Enterprise Rollouts Need a Gateway
&lt;/h2&gt;

&lt;p&gt;Claude Code enterprise deployments need per-developer attribution, enforceable spend limits, provider redundancy, and one place to revoke access. Without a gateway, each developer authenticates to Anthropic directly and spend is visible only in aggregate on the invoice.&lt;/p&gt;

&lt;p&gt;Cost scales with agent activity rather than seat count. Four problems appear at team scale:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Attribution&lt;/strong&gt;: finance cannot tell which team or developer drove a spike.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spend control&lt;/strong&gt;: no per-developer cap exists until someone reads the invoice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offboarding&lt;/strong&gt;: revoking access means rotating shared provider keys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provider dependency&lt;/strong&gt;: a rate limit or outage on one account blocks everyone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bifrost addresses each through &lt;a href="https://docs.getbifrost.ai/features/governance/virtual-keys" rel="noopener noreferrer"&gt;virtual keys&lt;/a&gt;: one per developer, revocable on its own, with budgets checked before every request. The &lt;a href="https://www.getmaxim.ai/bifrost/resources/governance" rel="noopener noreferrer"&gt;Bifrost governance overview&lt;/a&gt; describes how keys, teams, and customers fit together, and the &lt;a href="https://www.getmaxim.ai/bifrost/enterprise" rel="noopener noreferrer"&gt;Bifrost Enterprise&lt;/a&gt; tier adds RBAC, SSO, and in-VPC deployment for regulated teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Criteria for Evaluating a Claude Code Gateway
&lt;/h2&gt;

&lt;p&gt;Evaluate a Claude Code gateway on forwarding fidelity first, then governance, provider coverage, observability, and deployment model. Claude Code adds request fields and beta headers with each release, and Anthropic's &lt;a href="https://code.claude.com/docs/en/llm-gateway-protocol" rel="noopener noreferrer"&gt;gateway compatibility guide&lt;/a&gt; states that a gateway which strips or rewrites them breaks the matching feature.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criterion&lt;/th&gt;
&lt;th&gt;What to test&lt;/th&gt;
&lt;th&gt;Failure symptom in Claude Code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Streaming&lt;/td&gt;
&lt;td&gt;Events relayed as they arrive, SSE pings kept&lt;/td&gt;
&lt;td&gt;Stalls, idle-timeout aborts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Beta header pass-through&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;anthropic-beta&lt;/code&gt; and &lt;code&gt;anthropic-version&lt;/code&gt; forwarded verbatim&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;400&lt;/code&gt; errors naming unknown fields&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Error bodies&lt;/td&gt;
&lt;td&gt;Upstream errors forwarded unmodified&lt;/td&gt;
&lt;td&gt;Automatic retry and recovery stop working&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt caching&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;cache_control&lt;/code&gt; preserved; sessions stay on one key&lt;/td&gt;
&lt;td&gt;High &lt;code&gt;input_tokens&lt;/code&gt;, low cache reads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tool-call streaming&lt;/td&gt;
&lt;td&gt;Tool arguments streamed intact by the upstream&lt;/td&gt;
&lt;td&gt;Empty &lt;code&gt;arguments&lt;/code&gt;, failed file edits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Governance&lt;/td&gt;
&lt;td&gt;Budgets and rate limits per developer, team, customer&lt;/td&gt;
&lt;td&gt;Spend found after the fact&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Self-hosted, in-VPC, or air-gapped&lt;/td&gt;
&lt;td&gt;Source code leaves your network&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Overhead&lt;/td&gt;
&lt;td&gt;Published figure with instance type and load&lt;/td&gt;
&lt;td&gt;Latency compounds over long sessions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Claude Code's retry logic matches on the upstream's error wording, so a gateway that wraps errors in its own envelope breaks recovery even when it keeps the status code. Prompt caching depends on routing too: a session that moves between provider keys misses the cache it warmed a turn earlier.&lt;/p&gt;

&lt;p&gt;On overhead, Bifrost publishes &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;sustained benchmarks&lt;/a&gt; of 11 µs per request at 5,000 RPS with a 100% success rate. The &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateways-in-2026-a-production-ready-comparison/" rel="noopener noreferrer"&gt;production-ready LLM gateway comparison&lt;/a&gt; scores general-purpose gateways on these criteria, and &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;what an AI gateway does and why it matters&lt;/a&gt; covers the concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Bifrost Works as a Claude Code Gateway
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost AI gateway&lt;/a&gt; exposes an Anthropic-compatible endpoint at &lt;code&gt;/anthropic&lt;/code&gt;, authenticates Claude Code with a virtual key, checks budgets and rate limits, resolves the model through routing rules, and pins the session to one provider key. Claude Code needs no code changes, only a base URL and a credential.&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%2Feksuxxngjz8u7sq4gd1d.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%2Feksuxxngjz8u7sq4gd1d.png" alt="A Claude Code request passes through virtual key authentication, budget and rate limit checks, routing rules, and session affinity before reaching the provider; a failed budget check rejects the request" width="799" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: Policy checks run before any provider is called, and session affinity keeps a session on the provider whose prompt cache it already warmed.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The capabilities that matter most for Claude Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Session affinity&lt;/strong&gt;: Claude Code sends &lt;code&gt;x-claude-code-session-id&lt;/code&gt; on every request, and &lt;a href="https://docs.getbifrost.ai/providers/session-affinity" rel="noopener noreferrer"&gt;session affinity&lt;/a&gt; adopts it with no configuration, so a session and its subagents stay on one provider and key and keep hitting the same prompt cache.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model aliasing&lt;/strong&gt;: &lt;a href="https://docs.getbifrost.ai/providers/routing-rules" rel="noopener noreferrer"&gt;routing rules&lt;/a&gt; can rewrite an alias such as &lt;code&gt;sonnet-model&lt;/code&gt; to any configured provider and model, matched on the &lt;code&gt;claude-cli&lt;/code&gt; user agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Provider coverage&lt;/strong&gt;: 25+ providers and 10,000+ models through one API, listed on the &lt;a href="https://docs.getbifrost.ai/providers/supported-providers/overview" rel="noopener noreferrer"&gt;supported providers page&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failover&lt;/strong&gt;: &lt;a href="https://docs.getbifrost.ai/features/fallbacks" rel="noopener noreferrer"&gt;automatic fallbacks&lt;/a&gt; rotate keys on &lt;code&gt;429&lt;/code&gt; and retry &lt;code&gt;5xx&lt;/code&gt; errors with backoff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Request logs&lt;/strong&gt;: &lt;a href="https://docs.getbifrost.ai/features/observability/default" rel="noopener noreferrer"&gt;built-in observability&lt;/a&gt; records inputs, outputs, tokens, cost, and latency for each request, asynchronously.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since Claude Code 2.1.212, Anthropic enforces &lt;code&gt;anthropic-version&lt;/code&gt; and related headers. In Bifrost, set &lt;strong&gt;Settings &amp;gt; Client Settings &amp;gt; Allowed Headers&lt;/strong&gt; to &lt;code&gt;*&lt;/code&gt;, or add the list from the &lt;a href="https://docs.getbifrost.ai/cli-agents/claude-code" rel="noopener noreferrer"&gt;Bifrost Claude Code integration guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude Code Environment Variables for a Gateway
&lt;/h2&gt;

&lt;p&gt;Claude Code reads gateway configuration from the &lt;code&gt;env&lt;/code&gt; block of &lt;code&gt;settings.json&lt;/code&gt;. With Bifrost, two variables are required: &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; pointing at the &lt;code&gt;/anthropic&lt;/code&gt; endpoint and &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; holding a virtual key. The token is sent as a bearer header, so no Anthropic account login is needed.&lt;/p&gt;

&lt;p&gt;Merge the block into the most specific settings file that applies: &lt;code&gt;~/.claude/settings.json&lt;/code&gt; (user), &lt;code&gt;.claude/settings.json&lt;/code&gt; (project), or &lt;code&gt;.claude/settings.local.json&lt;/code&gt; (personal override). Remove any top-level &lt;code&gt;model&lt;/code&gt; field, because it overrides the environment-based model selection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_BASE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://localhost:8080/anthropic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_AUTH_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-bifrost-virtual-key"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_DEFAULT_SONNET_MODEL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"claude-sonnet-4-6"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_DEFAULT_HAIKU_MODEL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"claude-haiku-4-5"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Variable&lt;/th&gt;
&lt;th&gt;Value with Bifrost&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;http://localhost:8080/anthropic&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sends Claude Code traffic to the gateway&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Bifrost virtual key&lt;/td&gt;
&lt;td&gt;Bearer credential; replaces subscription login&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ANTHROPIC_CUSTOM_HEADERS&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;x-bf-vk: &amp;lt;key&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Alternative; still requires an Anthropic account login&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;ANTHROPIC_DEFAULT_SONNET_MODEL&lt;/code&gt;, &lt;code&gt;_HAIKU_&lt;/code&gt;, &lt;code&gt;_OPUS_&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;provider/model&lt;/code&gt; or an alias&lt;/td&gt;
&lt;td&gt;Maps each Claude Code tier to a model&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fills &lt;code&gt;/model&lt;/code&gt; from the gateway's model list (2.1.129+)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Restores a default that is off behind custom base URLs&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Gateway model discovery only lists model IDs beginning with &lt;code&gt;claude&lt;/code&gt; or &lt;code&gt;anthropic&lt;/code&gt;. The &lt;a href="https://docs.getbifrost.ai/quickstart/cli/getting-started" rel="noopener noreferrer"&gt;Bifrost CLI&lt;/a&gt; skips manual setup entirely: &lt;code&gt;npx -y @maximhq/bifrost-cli&lt;/code&gt; configures the base URL, key, and model, stores the virtual key in the OS keyring, and launches Claude Code. Pinning tiers to GPT, Gemini, or local models is covered in the comparison of &lt;a href="https://www.getmaxim.ai/articles/5-ai-gateways-developers-use-to-run-claude-code-with-non-anthropic-models/" rel="noopener noreferrer"&gt;AI gateways for running Claude Code with non-Anthropic models&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Claude Code on Amazon Bedrock Through Bifrost
&lt;/h2&gt;

&lt;p&gt;To run Claude Code on Bedrock through Bifrost, map Bifrost deployment names to Bedrock model IDs on the AWS Bedrock provider key, allow the &lt;code&gt;bedrock&lt;/code&gt; provider on the developer's virtual key, and set Claude Code's tier variables to names such as &lt;code&gt;bedrock/claude-sonnet-5&lt;/code&gt;. AWS credentials stay on the gateway.&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%2Ftucm35a5uwyvugo3pnz1.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%2Ftucm35a5uwyvugo3pnz1.png" alt="Claude Code sends the model bedrock/claude-sonnet-5, Bifrost matches the deployment name claude-sonnet-5 on the Bedrock provider key, and forwards the Bedrock model ID global.anthropic.claude-sonnet-5" width="800" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: Developers only ever see stable deployment names; the Bedrock model ID and AWS credentials live on the Bifrost provider key.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"env"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_BASE_URL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://gateway.example.com/anthropic"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_AUTH_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"your-bifrost-virtual-key"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_DEFAULT_OPUS_MODEL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bedrock/claude-opus-4-8"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_DEFAULT_SONNET_MODEL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bedrock/claude-sonnet-5"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ANTHROPIC_DEFAULT_HAIKU_MODEL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"bedrock/claude-haiku-4-5-20251001"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the provider key restricts &lt;code&gt;models&lt;/code&gt;, list every deployment name there; mappings do not expand the allowlist. Test with &lt;code&gt;/model&lt;/code&gt;, then confirm in Bifrost &lt;strong&gt;Logs&lt;/strong&gt; that the request resolved to the expected Bedrock model ID. The full steps and a troubleshooting table are in the &lt;a href="https://docs.getbifrost.ai/runbooks/claude-code-bedrock" rel="noopener noreferrer"&gt;Claude Code with Bedrock runbook&lt;/a&gt;, and a walkthrough lives in &lt;a href="https://www.getmaxim.ai/articles/route-claude-code-through-aws-bedrock-using-bifrost/" rel="noopener noreferrer"&gt;routing Claude Code through AWS Bedrock with Bifrost&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Compared with Claude Code's native Bedrock mode (&lt;code&gt;CLAUDE_CODE_USE_BEDROCK=1&lt;/code&gt;), this path keeps per-developer keys, budgets, and logs, and lets one settings file switch a tier to Vertex AI or Azure. Through &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt;, Claude Code sends its full capability set; if a Bedrock upstream rejects pre-release fields with &lt;code&gt;400&lt;/code&gt; errors, set &lt;code&gt;CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting Claude Code MCP Servers Through Bifrost
&lt;/h2&gt;

&lt;p&gt;Bifrost also acts as an MCP gateway for Claude Code, aggregating every connected MCP server behind one &lt;code&gt;/mcp&lt;/code&gt; endpoint. One &lt;code&gt;claude mcp add&lt;/code&gt; command replaces a config entry per server, and the virtual key in the header scopes which tools each developer can call.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add &lt;span class="nt"&gt;--transport&lt;/span&gt; http bifrost http://localhost:8080/mcp &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer your-virtual-key"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--scope&lt;/span&gt; user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run &lt;code&gt;/mcp&lt;/code&gt; inside Claude Code to confirm &lt;code&gt;bifrost&lt;/code&gt; is connected. When inference also routes through Bifrost, turn off auto tool injection to keep the two paths separate. Per-key &lt;a href="https://docs.getbifrost.ai/mcp/filtering" rel="noopener noreferrer"&gt;MCP tool filtering&lt;/a&gt; controls which tools appear.&lt;/p&gt;

&lt;p&gt;Tool definitions matter for cost behind any gateway. Claude Code turns MCP tool search off when &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; points to a non-first-party host, per Anthropic's &lt;a href="https://code.claude.com/docs/en/mcp" rel="noopener noreferrer"&gt;MCP documentation&lt;/a&gt;, so every tool definition loads upfront unless tool search is re-enabled. Bifrost &lt;a href="https://docs.getbifrost.ai/mcp/code-mode" rel="noopener noreferrer"&gt;Code Mode&lt;/a&gt; cut input tokens by 92.8% in a 508-tool benchmark by exposing tools through four meta-tools.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.getmaxim.ai/bifrost/resources/mcp-gateway" rel="noopener noreferrer"&gt;Bifrost MCP gateway&lt;/a&gt; page and the guide to &lt;a href="https://www.getmaxim.ai/articles/how-to-reduce-mcp-token-costs-for-claude-code-at-scale/" rel="noopener noreferrer"&gt;reducing MCP token costs for Claude Code&lt;/a&gt; cover the details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Budgets and Rate Limits for Claude Code Teams
&lt;/h2&gt;

&lt;p&gt;Bifrost enforces Claude Code budgets at four levels (customer, team, virtual key, and provider config) and rate limits at the virtual key and provider config levels. Every applicable budget is checked before a request is forwarded, and any single failure blocks it, so a developer cannot exceed a team cap through their own key.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Budget&lt;/th&gt;
&lt;th&gt;Rate limits&lt;/th&gt;
&lt;th&gt;Typical Claude Code use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Customer&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Business unit or cost center&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Team&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Platform, mobile, data teams&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Virtual key&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Requests and tokens&lt;/td&gt;
&lt;td&gt;One per developer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provider config&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Requests and tokens&lt;/td&gt;
&lt;td&gt;Cap Opus-tier spend on one provider&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Budgets reset on &lt;code&gt;1d&lt;/code&gt;, &lt;code&gt;1w&lt;/code&gt;, &lt;code&gt;1M&lt;/code&gt;, &lt;code&gt;1Q&lt;/code&gt;, or &lt;code&gt;1Y&lt;/code&gt; windows and can be &lt;a href="https://docs.getbifrost.ai/features/governance/budget-and-limits" rel="noopener noreferrer"&gt;calendar-aligned&lt;/a&gt; to UTC boundaries. Virtual keys are deny-by-default for providers.&lt;/p&gt;

&lt;p&gt;In Bifrost Enterprise, &lt;a href="https://docs.getbifrost.ai/enterprise/access-profiles" rel="noopener noreferrer"&gt;access profiles&lt;/a&gt; auto-issue a governed virtual key to each user from a role, and &lt;a href="https://docs.getbifrost.ai/enterprise/alerting/overview" rel="noopener noreferrer"&gt;alerting&lt;/a&gt; notifies Slack, Microsoft Teams, PagerDuty, or a webhook when a budget crosses a threshold.&lt;/p&gt;

&lt;p&gt;For dashboards and per-developer reporting, see &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-monitor-claude-code-token-usage/" rel="noopener noreferrer"&gt;monitoring Claude Code token usage with an AI gateway&lt;/a&gt;. Teams running both agents can apply the same keys to &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-manage-codex-cli-token-spend/" rel="noopener noreferrer"&gt;Codex CLI token spend&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rolling Out a Claude Code Gateway Across the Organization
&lt;/h2&gt;

&lt;p&gt;A Claude Code gateway rollout has five steps: deploy the gateway with provider credentials, issue one virtual key per developer, distribute the base URL and credential through managed settings, verify each machine, then restrict Claude Code to the gateway endpoint. The first four match Anthropic's rollout checklist.&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%2Fe5sww99lrther9uvuw78.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%2Fe5sww99lrther9uvuw78.png" alt="Five rollout steps run left to right: deploy Bifrost, issue a virtual key per developer, distribute managed settings, verify with status and gateway logs, then lock the endpoint with allowedProviders" width="800" height="148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: Lock the endpoint last, after every machine has proven it reaches the gateway, so a distribution gap never blocks a developer.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deploy&lt;/strong&gt;: run Bifrost with &lt;code&gt;npx -y @maximhq/bifrost&lt;/code&gt; or Docker, then move to &lt;a href="https://docs.getbifrost.ai/enterprise/clustering" rel="noopener noreferrer"&gt;clustering&lt;/a&gt; or an &lt;a href="https://docs.getbifrost.ai/enterprise/invpc-deployments" rel="noopener noreferrer"&gt;in-VPC deployment&lt;/a&gt; for production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Issue keys&lt;/strong&gt;: one virtual key per developer, or access profiles issued from SSO roles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distribute&lt;/strong&gt;: push the &lt;code&gt;env&lt;/code&gt; block through a managed settings file via MDM; a managed &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; cannot be overridden by a developer's shell.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify&lt;/strong&gt;: have each developer run &lt;code&gt;/status&lt;/code&gt;, then confirm their requests appear in Bifrost logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lock&lt;/strong&gt;: set &lt;code&gt;allowedProviders&lt;/code&gt; to &lt;code&gt;["customEndpoint"]&lt;/code&gt; in managed settings (Claude Code 2.1.285+) so sessions pointed anywhere else are refused.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For machines where configuring each tool is impractical, AI Gateway + Bifrost Edge extends the same governance to the endpoint: Bifrost remains the policy engine, and &lt;a href="https://docs.getbifrost.ai/edge/overview" rel="noopener noreferrer"&gt;Bifrost Edge&lt;/a&gt;, currently in alpha, routes Claude Code traffic from each laptop through it with no settings.json changes. The guide to &lt;a href="https://www.getmaxim.ai/articles/governing-ai-coding-agents-secure-claude-code-and-codex-enterprise-rollouts/" rel="noopener noreferrer"&gt;governing coding agents in enterprise rollouts&lt;/a&gt; covers policy design across agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the difference between a Claude Code proxy and a Claude Code gateway?
&lt;/h3&gt;

&lt;p&gt;A Claude Code proxy typically forwards or translates requests for one developer, often to reach a non-Anthropic model. A Claude Code gateway adds identity, budgets, rate limits, request logs, and central provider switching for a whole organization. Bifrost is an AI gateway: each developer authenticates with their own virtual key, and every request is checked against budgets and recorded with tokens and cost.&lt;/p&gt;

&lt;h3&gt;
  
  
  What LLM does Claude Code use?
&lt;/h3&gt;

&lt;p&gt;Claude Code uses Anthropic's Claude models by default: Sonnet as the main tier, Opus for complex tasks, and Haiku for lightweight work. Behind a gateway, each tier maps to whatever the &lt;code&gt;ANTHROPIC_DEFAULT_*_MODEL&lt;/code&gt; variables specify, including Claude on Bedrock or Vertex AI. Anthropic does not support non-Claude models through gateways; &lt;a href="https://www.getmaxim.ai/articles/5-ai-gateways-developers-use-to-run-claude-code-with-non-anthropic-models/" rel="noopener noreferrer"&gt;running Claude Code with non-Anthropic models&lt;/a&gt; covers what teams test.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does a gateway slow Claude Code down?
&lt;/h3&gt;

&lt;p&gt;Bifrost adds 11 microseconds per request at 5,000 RPS in sustained benchmarks, which is negligible next to model response times. The larger performance factor is prompt caching: Bifrost session affinity keeps each Claude Code session on one provider key, so cache reads continue across turns instead of resetting when routing changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do developers still need a Claude subscription behind a gateway?
&lt;/h3&gt;

&lt;p&gt;No, not when the gateway credential is set. With &lt;code&gt;ANTHROPIC_AUTH_TOKEN&lt;/code&gt; holding a Bifrost virtual key, requests carry that credential instead of a claude.ai login, and usage is billed to the provider account behind the gateway. Setting only &lt;code&gt;ANTHROPIC_BASE_URL&lt;/code&gt; without a credential keeps the subscription login active, so its usage limits and billing still apply.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Claude Code use Amazon Bedrock through a gateway?
&lt;/h3&gt;

&lt;p&gt;Yes. In Bifrost, map deployment names such as &lt;code&gt;claude-sonnet-5&lt;/code&gt; to Bedrock model IDs on the AWS Bedrock provider key, allow &lt;code&gt;bedrock&lt;/code&gt; on the virtual key, and set Claude Code's tier variables to &lt;code&gt;bedrock/claude-sonnet-5&lt;/code&gt;. AWS credentials stay on the gateway, and each request is logged with the resolved Bedrock model ID for verification.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do you set budgets for a Claude Code team?
&lt;/h3&gt;

&lt;p&gt;Issue each developer a virtual key with its own budget and rate limits, attach the keys to a team with a team budget, and optionally group teams under a customer budget. Bifrost checks every applicable budget before forwarding a request. Alerting can notify the team before a cap is reached.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Running Claude Code Through Bifrost
&lt;/h2&gt;

&lt;p&gt;A Claude Code gateway gives platform teams per-developer credentials, enforceable budgets, routing to Bedrock and Vertex AI, and request-level logs without changing how developers use Claude Code. Bifrost does this with two settings.json values and 11 µs of overhead. The &lt;a href="https://www.getmaxim.ai/bifrost/resources/claude-code" rel="noopener noreferrer"&gt;Bifrost Claude Code resource page&lt;/a&gt; has setup details, and to plan a Claude Code enterprise rollout with the team, &lt;a href="https://getmaxim.ai/bifrost/book-a-demo" rel="noopener noreferrer"&gt;book a Bifrost demo&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>ai</category>
      <category>llm</category>
      <category>apigateway</category>
    </item>
    <item>
      <title>An LLM gateway is the layer that authenticates, routes, governs, and logs every model call through one API. This comparison ranks Bifrost, LiteLLM, Kong AI Gateway, Cloudflare AI Gateway, and AWS Bedrock on overhead, failover, governance depth, MCP support</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:29:29 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/an-llm-gateway-is-the-layer-that-authenticates-routes-governs-and-logs-every-model-call-through-3m0</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/an-llm-gateway-is-the-layer-that-authenticates-routes-governs-and-logs-every-model-call-through-3m0</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/best-llm-gateways-in-2026-a-production-ready-comparison-34ak" class="crayons-story__hidden-navigation-link"&gt;Best LLM Gateways in 2026: A Production-Ready Comparison&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" alt="kamya_shah_e69d5dd78f831c profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kamya Shah
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kamya Shah
                
                
              
              &lt;div id="story-author-preview-content-4805480" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kamya_shah_e69d5dd78f831c" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kamya Shah&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/best-llm-gateways-in-2026-a-production-ready-comparison-34ak" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/best-llm-gateways-in-2026-a-production-ready-comparison-34ak" id="article-link-4805480"&gt;
          Best LLM Gateways in 2026: A Production-Ready Comparison
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/llm"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;llm&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/gateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;gateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/api"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;api&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/best-llm-gateways-in-2026-a-production-ready-comparison-34ak" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/best-llm-gateways-in-2026-a-production-ready-comparison-34ak#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              5&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            15 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Best LLM Gateways in 2026: A Production-Ready Comparison</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:29:18 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/best-llm-gateways-in-2026-a-production-ready-comparison-34ak</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/best-llm-gateways-in-2026-a-production-ready-comparison-34ak</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An LLM gateway is production-ready when it adds negligible latency under load, fails over across providers without application code, enforces budgets per team, governs MCP tool calls, and deploys where compliance requires.&lt;/li&gt;
&lt;li&gt;Bifrost adds 11 microseconds of overhead per request at 5,000 requests per second with a 100% success rate, and enforces budgets at the customer, team, virtual key, and provider-config levels.&lt;/li&gt;
&lt;li&gt;LiteLLM Proxy covers 100+ LLMs in Python, but production deployments run PostgreSQL and Redis alongside it, and SSO, audit logs, and Prometheus metrics require an enterprise license.&lt;/li&gt;
&lt;li&gt;Kong AI Gateway adds AI plugins to Kong Gateway; its AI MCP Proxy plugin needs Kong Gateway 3.12 and an AI Gateway Enterprise license.&lt;/li&gt;
&lt;li&gt;Cloudflare AI Gateway and AWS Bedrock are managed services, so neither runs inside your own network or spans every cloud from one control plane.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An LLM gateway is the layer between applications and model providers that authenticates, routes, governs, and logs every model call through one API. &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost&lt;/a&gt;, the &lt;a href="https://github.com/maximhq/bifrost" rel="noopener noreferrer"&gt;open-source AI gateway written in Go&lt;/a&gt; and built by Maxim AI, is the best choice for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. This guide compares the five LLM gateways most often shortlisted for production in 2026 (Bifrost, LiteLLM, Kong AI Gateway, Cloudflare AI Gateway, and AWS Bedrock) on gateway overhead, failover, governance depth, MCP support, deployment model, and compliance. Every competitor capability below was checked against that vendor's own documentation, and anything a vendor does not publish is marked "Not published."&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is an LLM Gateway?
&lt;/h2&gt;

&lt;p&gt;An LLM gateway is a control layer that sits between AI applications and model providers, exposing one API while handling authentication, routing, failover, spend limits, and logging for every request. Applications call the gateway instead of each provider SDK, so changing a model or adding a provider becomes configuration rather than a code change.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://menlovc.com/perspective/2025-the-state-of-generative-ai-in-the-enterprise/" rel="noopener noreferrer"&gt;Menlo Ventures estimated enterprise spend on foundation model APIs at $12.5 billion in 2025&lt;/a&gt;. Without a shared layer, each team that drives that spend writes its own retry logic, stores its own provider keys, and reports cost in its own format.&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%2Fgc4zmlhfnhhqf2xujqma.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%2Fgc4zmlhfnhhqf2xujqma.png" alt="Applications and agents send requests to one LLM gateway, which routes them to hosted, cloud, and self-hosted models and MCP tool servers while writing logs and metrics" width="800" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Every model call and tool call crosses the same layer, so access, spend, and failover are decided once instead of in each application.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As Figure 1 shows, a production gateway now carries tool calls over the &lt;a href="https://modelcontextprotocol.io/" rel="noopener noreferrer"&gt;Model Context Protocol&lt;/a&gt; as well as model calls. The broader architecture is covered in &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;what an AI gateway is and why it matters&lt;/a&gt;, and teams choosing their first gateway by use case can start with the &lt;a href="https://www.getmaxim.ai/articles/5-best-ai-gateways-in-2026/" rel="noopener noreferrer"&gt;roundup of AI gateways for self-hosted and managed teams&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  LLM gateway vs LLM proxy vs LLM router
&lt;/h3&gt;

&lt;p&gt;The three terms overlap, and vendors use them loosely. In practice they describe different scopes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LLM proxy&lt;/strong&gt;: forwards requests to one or more providers behind a unified API. Scope is translation and forwarding.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM router&lt;/strong&gt;: decides which model or provider serves each request, based on cost, latency, content, or rules. Scope is the routing decision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM gateway&lt;/strong&gt;: combines both and adds identity, budgets, rate limits, guardrails, audit trails, and observability. Scope is control of all AI traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Production teams need the gateway scope, because forwarding and routing alone do not answer who spent what or what happens when a provider returns errors for an hour. The same distinction applies to tools, where &lt;a href="https://www.getmaxim.ai/articles/mcp-gateway-vs-mcp-proxy-vs-mcp-server-key-differences/" rel="noopener noreferrer"&gt;an MCP gateway differs from an MCP proxy and an MCP server&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Evaluate an LLM Gateway for Production
&lt;/h2&gt;

&lt;p&gt;Evaluate an LLM gateway on six production criteria: overhead under sustained load, failover behavior, governance depth, MCP and agent support, deployment model, and observability. Feature checklists hide the differences that matter, so ask each vendor for a measured number, a documented mechanism, or a deployment option rather than a yes or no.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criterion&lt;/th&gt;
&lt;th&gt;Why it decides production readiness&lt;/th&gt;
&lt;th&gt;What to verify&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Gateway overhead&lt;/td&gt;
&lt;td&gt;Added latency compounds on every request and every agent step&lt;/td&gt;
&lt;td&gt;A published figure with instance type, request rate, and what the number excludes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failover&lt;/td&gt;
&lt;td&gt;Provider 429s and 5xx errors are routine at scale&lt;/td&gt;
&lt;td&gt;Retries per provider, fallback chains across providers, and whether apps need retry code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Governance depth&lt;/td&gt;
&lt;td&gt;Budgets and access belong to the platform, not each app&lt;/td&gt;
&lt;td&gt;Budget levels, virtual keys, rate limits, RBAC, SSO, and which tier they sit in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP and agent support&lt;/td&gt;
&lt;td&gt;Agents route tool calls as well as model calls&lt;/td&gt;
&lt;td&gt;Tool filtering per key, MCP auth types, and execution control&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment model&lt;/td&gt;
&lt;td&gt;Data residency rules out some options entirely&lt;/td&gt;
&lt;td&gt;Self-hosted, in-VPC, on-prem, air-gapped, or managed only&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Observability and compliance&lt;/td&gt;
&lt;td&gt;Debugging, cost attribution, and audits depend on it&lt;/td&gt;
&lt;td&gt;Request logs, Prometheus, OpenTelemetry, audit logs, and log export targets&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&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%2Fxvxj2dj5p1zwqb533x88.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%2Fxvxj2dj5p1zwqb533x88.png" alt="A request passes through key authentication, budget and rate limit checks, and routing to a primary provider, with rejection on exceeded limits and a fallback provider after retries are exhausted" width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: Policy checks run before any provider is called, and failover happens inside the gateway, not in application code.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Figure 2 is the request path to test every candidate against. The &lt;a href="https://www.getmaxim.ai/bifrost/resources/buyers-guide" rel="noopener noreferrer"&gt;LLM Gateway Buyer's Guide&lt;/a&gt; expands these criteria into a procurement checklist, and &lt;a href="https://www.getmaxim.ai/articles/how-to-evaluate-an-llm-gateway-for-enterprise-scalability/" rel="noopener noreferrer"&gt;evaluating an LLM gateway for enterprise scalability&lt;/a&gt; covers load-testing method.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best LLM Gateways Compared at a Glance
&lt;/h2&gt;

&lt;p&gt;The best LLM gateway for production covers all six criteria in one control plane. Bifrost is the only option here that combines an open-source core, published microsecond-level overhead, four budget levels, and model plus MCP traffic in one deployment you can host in your own VPC.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Bifrost&lt;/th&gt;
&lt;th&gt;LiteLLM&lt;/th&gt;
&lt;th&gt;Kong AI Gateway&lt;/th&gt;
&lt;th&gt;Cloudflare AI Gateway&lt;/th&gt;
&lt;th&gt;AWS Bedrock&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Form&lt;/td&gt;
&lt;td&gt;Go gateway, open source (Apache 2.0)&lt;/td&gt;
&lt;td&gt;Python proxy, open source with enterprise tier&lt;/td&gt;
&lt;td&gt;AI plugins on Kong Gateway&lt;/td&gt;
&lt;td&gt;Managed service on Cloudflare's network&lt;/td&gt;
&lt;td&gt;Managed AWS service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Published overhead&lt;/td&gt;
&lt;td&gt;11 µs at 5,000 RPS (t3.xlarge)&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deployment&lt;/td&gt;
&lt;td&gt;Self-hosted, in-VPC, on-prem, air-gapped&lt;/td&gt;
&lt;td&gt;Self-hosted; production runs PostgreSQL and Redis&lt;/td&gt;
&lt;td&gt;Self-hosted, or Konnect control plane with your data planes&lt;/td&gt;
&lt;td&gt;Managed only&lt;/td&gt;
&lt;td&gt;Managed only, in AWS regions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Failover&lt;/td&gt;
&lt;td&gt;Retries plus cross-provider fallback chains&lt;/td&gt;
&lt;td&gt;Load balancing, routing, fallbacks&lt;/td&gt;
&lt;td&gt;Routing and load balancing across providers&lt;/td&gt;
&lt;td&gt;Retries and model fallbacks&lt;/td&gt;
&lt;td&gt;Cross-Region inference within AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Budgets&lt;/td&gt;
&lt;td&gt;Customer, team, virtual key, provider config&lt;/td&gt;
&lt;td&gt;Per virtual key and user&lt;/td&gt;
&lt;td&gt;Token rate limits and spend caps&lt;/td&gt;
&lt;td&gt;Budget and rate limits per key in Dynamic Routing&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MCP&lt;/td&gt;
&lt;td&gt;MCP client and server, six auth types, Code Mode&lt;/td&gt;
&lt;td&gt;MCP Gateway&lt;/td&gt;
&lt;td&gt;AI MCP Proxy (3.12+, enterprise license)&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;AgentCore Gateway (separate service)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;"Not published" means the vendor documentation read for this comparison does not state the figure or feature. Gateway overhead deserves the most scrutiny: in a &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;500 RPS benchmark against LiteLLM&lt;/a&gt;, Bifrost measured 0.99 ms of gateway overhead against 40 ms, and a P99 latency of 1.68 s against 90.72 s, on the same t3.medium instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Bifrost: Lowest-Overhead LLM Gateway with Built-In Governance
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost AI gateway&lt;/a&gt; is open source, written in Go, and unifies 25+ providers and 10,000+ models behind one OpenAI-compatible API. Bifrost adds 11 microseconds of overhead per request at 5,000 RPS with a 100% success rate in sustained benchmarks, and it governs model calls and MCP tool calls from the same deployment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance.&lt;/strong&gt; The &lt;a href="https://docs.getbifrost.ai/benchmarking/getting-started" rel="noopener noreferrer"&gt;benchmarking suite&lt;/a&gt; measured 11 µs of Bifrost overhead on a t3.xlarge and 59 µs on a t3.medium, both at 5,000 RPS with zero failed requests. Existing OpenAI, Anthropic, and Google GenAI clients switch over by changing only the base URL, as a &lt;a href="https://docs.getbifrost.ai/features/drop-in-replacement" rel="noopener noreferrer"&gt;drop-in replacement&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Failover and routing.&lt;/strong&gt; &lt;a href="https://docs.getbifrost.ai/features/retries-and-fallbacks" rel="noopener noreferrer"&gt;Retries and fallbacks&lt;/a&gt; work in two layers: retries rotate keys on 429 and auth errors and back off on 5xx, then fallbacks move the request to the next provider once retries are exhausted. &lt;a href="https://docs.getbifrost.ai/providers/routing-rules" rel="noopener noreferrer"&gt;Routing rules&lt;/a&gt; use &lt;a href="https://cel.dev/" rel="noopener noreferrer"&gt;Common Expression Language&lt;/a&gt; to route on headers, parameters, capacity, and organizational scope, evaluated from virtual key to team to customer to global.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Governance.&lt;/strong&gt; &lt;a href="https://docs.getbifrost.ai/features/governance/virtual-keys" rel="noopener noreferrer"&gt;Virtual keys&lt;/a&gt; are the unit of access: each one restricts providers and models and carries its own budget and rate limits. The &lt;a href="https://docs.getbifrost.ai/features/governance/budget-and-limits" rel="noopener noreferrer"&gt;budget hierarchy&lt;/a&gt; checks every applicable level before a request proceeds, as Figure 3 shows.&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%2Fhhyw2yquctc4l09qp8yw.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%2Fhhyw2yquctc4l09qp8yw.png" alt="A request authenticated by a Bifrost virtual key is checked against provider config, virtual key, team, and customer budgets, and is routed to the provider only when every level passes" width="800" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: Any single budget failure blocks the request, so a team cap holds even when an individual virtual key still has room.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCP gateway.&lt;/strong&gt; Bifrost acts as both an MCP client and an MCP server, with &lt;a href="https://docs.getbifrost.ai/mcp/auth/overview" rel="noopener noreferrer"&gt;six MCP authentication types&lt;/a&gt; (None, Headers, OAuth 2.0, Per-User OAuth, Per-User Headers, and Token Exchange) and tool filtering per request, per client, or per virtual key. Tool calls are not executed automatically unless Agent Mode is configured. &lt;a href="https://docs.getbifrost.ai/mcp/code-mode" rel="noopener noreferrer"&gt;Code Mode&lt;/a&gt; cut input tokens by 58.2% at 96 tools and 92.8% at 508 tools in benchmark rounds, with around 40% faster execution in large deployments, a pattern detailed in &lt;a href="https://www.getmaxim.ai/articles/code-execution-with-mcp-how-code-mode-cuts-agent-token-costs-by-90/" rel="noopener noreferrer"&gt;how Code Mode cuts agent token costs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enterprise deployment and compliance.&lt;/strong&gt; Bifrost Enterprise is a strict superset of the open-source gateway and adds the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.getbifrost.ai/enterprise/clustering" rel="noopener noreferrer"&gt;Clustering&lt;/a&gt; with gossip-based state sync, six service-discovery methods, and zero-downtime rolling updates&lt;/li&gt;
&lt;li&gt;Adaptive load balancing that shifts weights using live error rate and latency per model and key&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.getbifrost.ai/enterprise/invpc-deployments" rel="noopener noreferrer"&gt;In-VPC deployments&lt;/a&gt; on AWS, GCP, Azure, and Cloudflare, plus on-prem and air-gapped installs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.getbifrost.ai/enterprise/guardrails" rel="noopener noreferrer"&gt;Guardrails&lt;/a&gt; with native secrets detection and custom regex, plus AWS Bedrock Guardrails, Azure Content Safety, Google Model Armor, and Microsoft Presidio&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.getbifrost.ai/enterprise/audit-logs" rel="noopener noreferrer"&gt;Audit logs&lt;/a&gt; of administrative activity, signed with an HMAC key and archivable to S3 or GCS&lt;/li&gt;
&lt;li&gt;RBAC, OIDC single sign-on through Okta, Microsoft Entra, and Keycloak, and secret storage in HashiCorp Vault, AWS Secrets Manager, or GCP Secret Manager&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Observability ships in the open-source gateway: request logs with tokens and cost, &lt;a href="https://docs.getbifrost.ai/features/observability/prometheus" rel="noopener noreferrer"&gt;Prometheus metrics&lt;/a&gt;, and OpenTelemetry traces.&lt;/p&gt;

&lt;p&gt;Coding agents can share the same deployment; see &lt;a href="https://www.getmaxim.ai/articles/choosing-an-ai-gateway-for-claude-code-complete-guide/" rel="noopener noreferrer"&gt;choosing an AI gateway for Claude Code&lt;/a&gt; and &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-route-codex-cli-to-any-model/" rel="noopener noreferrer"&gt;routing Codex CLI to any model&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Bifrost is built for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. It serves as a centralized AI gateway to route, govern, and secure all AI traffic across models and environments with ultra low latency. Bifrost unifies LLM gateway, MCP gateway, and Agents gateway capabilities into a single platform. Designed for regulated industries and strict enterprise requirements, it supports air-gapped deployments, VPC isolation, and on-prem infrastructure. It provides full control over data, access, and execution, along with robust security, policy enforcement, and governance capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. LiteLLM Proxy: Python LLM Gateway with a Wide Provider Catalog
&lt;/h2&gt;

&lt;p&gt;LiteLLM Proxy is an open-source, Python-based LLM gateway that exposes 100+ LLMs through an OpenAI-compatible interface. It is a common starting point for Python teams, and its production footprint and enterprise licensing are the two factors that most affect a production decision.&lt;/p&gt;

&lt;p&gt;What LiteLLM provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Virtual keys with budgets per key and per user, plus rate limiting&lt;/li&gt;
&lt;li&gt;Load balancing, routing, and fallbacks across deployments&lt;/li&gt;
&lt;li&gt;Caching, logging, alerting, and spend tracking&lt;/li&gt;
&lt;li&gt;An MCP Gateway and an Agent Gateway for A2A traffic&lt;/li&gt;
&lt;li&gt;Self-hosted deployment through Docker, and a Rust AI Gateway in beta&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Production considerations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LiteLLM's production reference architecture places PostgreSQL and Redis alongside the proxy in every deployment mode.&lt;/li&gt;
&lt;li&gt;SSO for the admin UI, audit logs, secret manager integrations, Prometheus metrics, and per-key guardrail control are listed as enterprise features.&lt;/li&gt;
&lt;li&gt;Overhead under load is not published by LiteLLM. In Bifrost's 500 RPS test on a t3.medium, LiteLLM completed 88.78% of requests with a P99 latency of 90.72 s.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Python-centric teams that want a self-hosted proxy with a broad provider catalog and can operate PostgreSQL and Redis alongside it. Teams that outgrow it can compare options on the &lt;a href="https://www.getmaxim.ai/bifrost/resources/litellm-alternative" rel="noopener noreferrer"&gt;LiteLLM alternative&lt;/a&gt; page.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Kong AI Gateway: AI Plugins on an Existing API Platform
&lt;/h2&gt;

&lt;p&gt;Kong AI Gateway adds AI-specific plugins to Kong Gateway, so organizations already running Kong for REST traffic can apply the same control plane to LLM traffic. Capabilities arrive as individual plugins, which suits existing Kong operators more than teams adopting Kong only for AI.&lt;/p&gt;

&lt;p&gt;What Kong AI Gateway provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Routing and load balancing across AI providers, including OpenAI, Anthropic, Azure AI, Amazon Bedrock, and Gemini&lt;/li&gt;
&lt;li&gt;AI Semantic Cache and AI Prompt Compressor for token cost reduction&lt;/li&gt;
&lt;li&gt;Token rate limiting and spend caps, with AI Consumer Groups scoping model access by team&lt;/li&gt;
&lt;li&gt;AI Prompt Guard, AI Semantic Prompt Guard, and AI Sanitizer for PII redaction, plus integrations with AWS, Azure, and GCP guardrail services&lt;/li&gt;
&lt;li&gt;Audit logs, metrics exporters, and OpenTelemetry spans through Konnect&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Production considerations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The AI MCP Proxy plugin, which bridges MCP and HTTP and exposes REST APIs as MCP tools, requires Kong Gateway 3.12 and is available only with an AI Gateway Enterprise license.&lt;/li&gt;
&lt;li&gt;Deployment is self-hosted Kong Gateway or a Konnect-managed control plane with data planes in your environment.&lt;/li&gt;
&lt;li&gt;Gateway overhead for the AI plugin chain is not published.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Organizations already standardized on Kong that want LLM traffic governed by the same platform team and tooling. A side-by-side view is in &lt;a href="https://www.getmaxim.ai/articles/best-kong-ai-gateway-alternatives-in-2026/" rel="noopener noreferrer"&gt;Kong AI Gateway alternatives&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Cloudflare AI Gateway: Managed Gateway on Cloudflare's Network
&lt;/h2&gt;

&lt;p&gt;Cloudflare AI Gateway is a managed service that routes LLM calls through Cloudflare's global network with one line of code. Core features (dashboard analytics, caching, and rate limiting) are free, but the service does not run inside your own network.&lt;/p&gt;

&lt;p&gt;What Cloudflare AI Gateway provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Response caching, rate limiting, and request retries with model fallbacks&lt;/li&gt;
&lt;li&gt;Analytics on requests, tokens, and cost, plus request logging&lt;/li&gt;
&lt;li&gt;Dynamic Routing with conditional branches, percentage splits, and per-key budget and rate limits that switch to a fallback when exceeded&lt;/li&gt;
&lt;li&gt;DLP scanning, plus guardrails billed as Workers AI token usage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Production considerations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cloudflare AI Gateway runs only on Cloudflare's network, so it does not meet requirements that request data stay inside your own VPC or on-prem environment.&lt;/li&gt;
&lt;li&gt;Logpush for exporting logs requires the Workers Paid plan.&lt;/li&gt;
&lt;li&gt;MCP governance and published gateway overhead are not stated on the AI Gateway documentation pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Teams already building on Cloudflare Workers that want managed caching, analytics, and basic routing without operating infrastructure. Self-hosted options are compared in &lt;a href="https://www.getmaxim.ai/articles/best-cloudflare-ai-gateway-alternative-in-2026/" rel="noopener noreferrer"&gt;the Cloudflare AI Gateway alternative guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. AWS Bedrock: Managed Model Access and AgentCore Gateway on AWS
&lt;/h2&gt;

&lt;p&gt;AWS Bedrock is a managed, serverless platform that provides access to hundreds of foundation models inside the AWS account boundary. It is not a cross-cloud gateway: its controls apply to models served through Bedrock, and MCP lives in a separate service, AgentCore Gateway.&lt;/p&gt;

&lt;p&gt;What AWS Bedrock provides:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bedrock Guardrails for content filtering and PII detection&lt;/li&gt;
&lt;li&gt;Cross-Region inference that routes requests across AWS Regions within a geography or globally&lt;/li&gt;
&lt;li&gt;Intelligent Prompt Routing, prompt caching, and model distillation for cost control&lt;/li&gt;
&lt;li&gt;Compliance coverage including ISO, SOC, GDPR, and FedRAMP High, with HIPAA eligibility; Bedrock does not use customer data to train models&lt;/li&gt;
&lt;li&gt;AgentCore Gateway, a fully managed gateway that converts APIs, Lambda functions, and existing services into MCP-compatible tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Production considerations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Providers outside Bedrock's catalog, such as OpenAI's own API or self-hosted models, need a separate routing layer.&lt;/li&gt;
&lt;li&gt;Cross-Region inference profiles do not support Provisioned Throughput.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Organizations standardized on AWS whose model traffic stays inside Bedrock. Teams that want Bedrock plus other providers can put Bifrost in front of it, keeping native Bedrock SDK calls while adding budgets and cross-provider failover, as described on the &lt;a href="https://www.getmaxim.ai/bifrost/resources/aws-bedrock" rel="noopener noreferrer"&gt;Bifrost for AWS Bedrock&lt;/a&gt; page and in &lt;a href="https://www.getmaxim.ai/articles/best-aws-bedrock-gateway-alternatives-in-2026/" rel="noopener noreferrer"&gt;AWS Bedrock gateway alternatives&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Choose an LLM Gateway for Your Constraints
&lt;/h2&gt;

&lt;p&gt;Choose an LLM gateway by eliminating options on hard constraints first: where data may travel, which platforms you have already standardized on, and how many clouds and providers you use. Feature comparisons only matter among the options that survive those three questions, and the &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;AI gateway architecture and core features guide&lt;/a&gt; explains what each remaining feature does.&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%2Fs2wpupdojesel5bps8ar.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%2Fs2wpupdojesel5bps8ar.png" alt="Decision flow on data residency, an existing Kong deployment, and single-cloud workloads, ending at Bifrost, Kong AI Gateway, or a managed cloud gateway" width="799" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: Data residency and existing platform commitments narrow the choice faster than feature lists do.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Constraint&lt;/th&gt;
&lt;th&gt;Best fit&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Request data must stay in your VPC, on-prem, or air-gapped&lt;/td&gt;
&lt;td&gt;Bifrost&lt;/td&gt;
&lt;td&gt;Self-hosted with in-VPC and air-gapped installs, governance included&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-cloud or multi-provider with strict latency budgets&lt;/td&gt;
&lt;td&gt;Bifrost&lt;/td&gt;
&lt;td&gt;11 µs overhead at 5,000 RPS and cross-provider fallback chains&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model calls and MCP tool calls under one policy set&lt;/td&gt;
&lt;td&gt;Bifrost&lt;/td&gt;
&lt;td&gt;MCP client and server with per-key tool filtering in the same deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Kong already runs your API platform&lt;/td&gt;
&lt;td&gt;Kong AI Gateway&lt;/td&gt;
&lt;td&gt;Reuses the existing control plane and operators&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;All model traffic stays in AWS Bedrock&lt;/td&gt;
&lt;td&gt;AWS Bedrock&lt;/td&gt;
&lt;td&gt;IAM, Regions, and compliance stay inside one account boundary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workers-based app needing managed caching&lt;/td&gt;
&lt;td&gt;Cloudflare AI Gateway&lt;/td&gt;
&lt;td&gt;No infrastructure, free core features&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Teams whose apps and agents use more than one provider land in the first three rows. The security side of that decision is covered in &lt;a href="https://www.getmaxim.ai/articles/llm-gateway-security-prompt-injection-pii-audit-compliance/" rel="noopener noreferrer"&gt;LLM gateway security for prompt injection, PII, and audit&lt;/a&gt;, and the &lt;a href="https://www.getmaxim.ai/bifrost/enterprise" rel="noopener noreferrer"&gt;Bifrost Enterprise&lt;/a&gt; page covers clustering and private deployment for regulated teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the best LLM gateway?
&lt;/h3&gt;

&lt;p&gt;For production enterprise workloads, Bifrost is the best LLM gateway in this comparison. It adds 11 microseconds of overhead at 5,000 RPS, fails over across 25+ providers, enforces budgets at four levels, governs MCP tool calls, and deploys self-hosted, in-VPC, or air-gapped. Kong AI Gateway suits existing Kong users.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does AWS have an LLM gateway?
&lt;/h3&gt;

&lt;p&gt;AWS offers two related services. Bedrock provides managed access to foundation models with Guardrails and Cross-Region inference, and AgentCore Gateway is a managed gateway that converts APIs and Lambda functions into MCP-compatible tools. Neither routes to providers outside AWS, so multi-provider teams usually place a gateway such as Bifrost in front of Bedrock to add budgets and cross-provider failover.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the Bifrost LLM gateway?
&lt;/h3&gt;

&lt;p&gt;Bifrost is an open-source AI gateway built in Go that gives applications one OpenAI-compatible API for 25+ providers and 10,000+ models. It handles retries, fallbacks, virtual keys, hierarchical budgets, semantic caching, and MCP tool governance, adding 11 microseconds of overhead per request at 5,000 RPS. Bifrost runs self-hosted, in-VPC, on-prem, or air-gapped.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is LiteLLM an LLM gateway?
&lt;/h3&gt;

&lt;p&gt;Yes. LiteLLM Proxy is a Python-based LLM gateway that exposes 100+ models through an OpenAI-compatible API, with virtual keys, budgets, fallbacks, and an MCP Gateway. Production deployments run PostgreSQL and Redis alongside it, and features such as admin SSO, audit logs, and Prometheus metrics require an enterprise license. Teams comparing migration paths can review &lt;a href="https://www.getmaxim.ai/bifrost/resources/migrating-from-litellm" rel="noopener noreferrer"&gt;migrating from LiteLLM to Bifrost&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between an MCP gateway and an LLM gateway?
&lt;/h3&gt;

&lt;p&gt;An LLM gateway governs model calls: which caller may use which model, at what cost, with what failover. An MCP gateway governs tool calls: which agent may reach which MCP server and tool, under which credentials. Bifrost runs both in one deployment, so a single virtual key carries model budgets and MCP tool permissions together, as covered on the &lt;a href="https://www.getmaxim.ai/bifrost/resources/mcp-gateway" rel="noopener noreferrer"&gt;MCP gateway&lt;/a&gt; page.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much latency does an LLM gateway add?
&lt;/h3&gt;

&lt;p&gt;Bifrost measured 11 microseconds of overhead at 5,000 RPS on a t3.xlarge, and 0.99 ms against LiteLLM's 40 ms in a separate 500 RPS test with a 60 ms mock upstream. Ask every vendor for instance type, request rate, and what the figure excludes, because numbers from different methods are not comparable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try Bifrost as Your Production LLM Gateway
&lt;/h2&gt;

&lt;p&gt;A production LLM gateway has to add almost no latency, recover from provider failures on its own, enforce budgets per team, govern MCP tool calls, and run where your compliance rules allow. Bifrost covers all five with an open-source core and Bifrost Enterprise for clustering and private deployment. Measured results are on the &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;Bifrost performance benchmarks&lt;/a&gt; page, and the governance model is outlined in &lt;a href="https://www.getmaxim.ai/bifrost/resources/governance" rel="noopener noreferrer"&gt;how Bifrost governs AI usage&lt;/a&gt;. To run Bifrost against your own workload and plan an enterprise AI gateway rollout, &lt;a href="https://getmaxim.ai/bifrost/book-a-demo" rel="noopener noreferrer"&gt;book a demo&lt;/a&gt; with the Bifrost team.&lt;/p&gt;

</description>
      <category>llm</category>
      <category>ai</category>
      <category>gateway</category>
      <category>api</category>
    </item>
    <item>
      <title>AI gateways put one API in front of many model providers and centralize routing, failover, budgets, and logging. This roundup compares Bifrost, Cloudflare AI Gateway, Vercel AI Gateway, LiteLLM, and OpenRouter by use case, from regulated enterprises to pro</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:27:42 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/ai-gateways-put-one-api-in-front-of-many-model-providers-and-centralize-routing-failover-budgets-1ffc</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/ai-gateways-put-one-api-in-front-of-many-model-providers-and-centralize-routing-failover-budgets-1ffc</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/5-best-ai-gateways-in-2026-picks-by-use-case-3fmf" class="crayons-story__hidden-navigation-link"&gt;5 Best AI Gateways in 2026: Picks by Use Case&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" alt="kamya_shah_e69d5dd78f831c profile" class="crayons-avatar__image" width="800" height="1067"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kamya Shah
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kamya Shah
                
                
              
              &lt;div id="story-author-preview-content-4805466" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kamya_shah_e69d5dd78f831c" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" class="crayons-avatar__image" alt="" width="800" height="1067"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kamya Shah&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/5-best-ai-gateways-in-2026-picks-by-use-case-3fmf" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/5-best-ai-gateways-in-2026-picks-by-use-case-3fmf" id="article-link-4805466"&gt;
          5 Best AI Gateways in 2026: Picks by Use Case
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/llm"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;llm&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/apigateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;apigateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/aigateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;aigateway&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/5-best-ai-gateways-in-2026-picks-by-use-case-3fmf" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/5-best-ai-gateways-in-2026-picks-by-use-case-3fmf#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              &lt;span class="hidden s:inline"&gt;Add&amp;nbsp;Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            15 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>5 Best AI Gateways in 2026: Picks by Use Case</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:27:18 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/5-best-ai-gateways-in-2026-picks-by-use-case-3fmf</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/5-best-ai-gateways-in-2026-picks-by-use-case-3fmf</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI gateways put one API in front of many model providers and centralize routing, failover, budgets, and logging, so applications stop integrating with each provider separately.&lt;/li&gt;
&lt;li&gt;Bifrost is the best overall choice for enterprise and platform teams: open source under Apache 2.0, 11 µs of overhead at 5,000 RPS, and deployable in a VPC, on-prem, or air-gapped.&lt;/li&gt;
&lt;li&gt;Cloudflare AI Gateway and Vercel AI Gateway are managed services that fit teams already building on those platforms and willing to route prompts through a vendor network.&lt;/li&gt;
&lt;li&gt;LiteLLM is a self-hosted Python gateway with an MIT-licensed core; SSO, audit logs, and several governance features require an enterprise license.&lt;/li&gt;
&lt;li&gt;OpenRouter is a hosted model marketplace with one key for hundreds of models, best for prototyping and model exploration rather than governed production traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AI gateways are the infrastructure layer between applications and LLM providers: they expose one API and handle routing, failover, budgets, and logging for every model call. &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost&lt;/a&gt;, the &lt;a href="https://github.com/maximhq/bifrost" rel="noopener noreferrer"&gt;open-source AI gateway written in Go&lt;/a&gt; and built by Maxim AI, is the best choice for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. This roundup compares five AI gateways by use case (self-hosted versus managed, developer versus platform teams) for teams choosing a first gateway.&lt;/p&gt;

&lt;h2&gt;
  
  
  What AI Gateways Do and Why Teams Adopt Them
&lt;/h2&gt;

&lt;p&gt;AI gateways are a single control point that receives model requests from applications, applies authentication and spend policy, routes each call to a provider, retries or fails over on errors, and records tokens, cost, and latency. Teams adopt them once more than one application, provider, or team is calling models, because those concerns stop fitting inside application code.&lt;/p&gt;

&lt;p&gt;Multi-provider use is now common. Menlo Ventures' &lt;a href="https://menlovc.com/perspective/2025-the-state-of-generative-ai-in-the-enterprise/" rel="noopener noreferrer"&gt;2025 State of Generative AI in the Enterprise&lt;/a&gt; report puts enterprise AI spend at $37 billion in 2025, with Anthropic, OpenAI, and Google together accounting for 88% of enterprise LLM API usage. Running two or more of them multiplies SDKs, credentials, rate limits, and invoices.&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%2F5rmcglxn4a41dt5t4x56.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%2F5rmcglxn4a41dt5t4x56.png" alt="Three applications send requests through one AI gateway layer that authenticates, enforces budgets, routes, and logs each call before it reaches hosted APIs, cloud platforms, or self-hosted models" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Every application integrates once with the gateway; provider choice, budgets, and logging move out of application code.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As Figure 1 shows, the gateway turns many provider integrations into one. It removes the same problems for most teams:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provider-specific code:&lt;/strong&gt; each provider has its own SDK, request format, and error codes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outages and rate limits:&lt;/strong&gt; a &lt;code&gt;429&lt;/code&gt; or &lt;code&gt;5xx&lt;/code&gt; becomes a user-facing failure without retries and fallbacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Invisible spend:&lt;/strong&gt; costs surface on invoices instead of per team or per key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credential sprawl:&lt;/strong&gt; raw provider keys end up in services, notebooks, and laptops.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the full component breakdown, see the cluster guide on &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;what an AI gateway is and how its architecture works&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Choose the Best AI Gateway
&lt;/h2&gt;

&lt;p&gt;The best AI gateway is the one whose deployment model matches where your data is allowed to go, and whose governance depth matches how many teams share it. Settle those two questions first; provider coverage, failover, and observability are table stakes that most of the five tools below cover in some form.&lt;/p&gt;

&lt;p&gt;The criteria below separate the five tools in practice; a weighted scoring matrix is in the &lt;a href="https://www.getmaxim.ai/bifrost/resources/buyers-guide" rel="noopener noreferrer"&gt;LLM gateway buyer's guide&lt;/a&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Criterion&lt;/th&gt;
&lt;th&gt;What to check&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Deployment model&lt;/td&gt;
&lt;td&gt;Self-hosted, in-VPC, on-prem, air-gapped, or managed only&lt;/td&gt;
&lt;td&gt;Decides whether prompts and logs leave your network&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Governance depth&lt;/td&gt;
&lt;td&gt;Scoped keys, budgets per team or customer, rate limits, RBAC&lt;/td&gt;
&lt;td&gt;Decides whether one gateway can serve many teams safely&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reliability&lt;/td&gt;
&lt;td&gt;Retries, key rotation, provider and model fallback chains&lt;/td&gt;
&lt;td&gt;Keeps provider incidents from becoming application incidents&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Overhead&lt;/td&gt;
&lt;td&gt;Published per-request latency under sustained load&lt;/td&gt;
&lt;td&gt;Gateway latency compounds in agent loops with many calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agent support&lt;/td&gt;
&lt;td&gt;MCP tool routing, coding agent integrations&lt;/td&gt;
&lt;td&gt;Agent traffic needs the same policy as chat traffic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Licensing&lt;/td&gt;
&lt;td&gt;Open source license and which features are paywalled&lt;/td&gt;
&lt;td&gt;Determines lock-in and the cost of governance features&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Teams evaluating gateways for production SLAs, compliance, and MCP depth should also read the &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateways-in-2026-a-production-ready-comparison/" rel="noopener noreferrer"&gt;production-focused comparison of the best LLM gateways&lt;/a&gt;, which scores Bifrost against Kong AI Gateway and AWS Bedrock on those criteria. Policy design itself is covered on the &lt;a href="https://www.getmaxim.ai/bifrost/resources/governance" rel="noopener noreferrer"&gt;Bifrost governance resource page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Gateways Compared at a Glance
&lt;/h2&gt;

&lt;p&gt;The five AI gateways split into two groups: Bifrost and LiteLLM are self-hosted, while Cloudflare AI Gateway, Vercel AI Gateway, and OpenRouter are managed services. Bifrost is the only one of the five that combines an Apache 2.0 license, a published microsecond-level overhead figure, and governance features that ship in the open-source build.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Gateway&lt;/th&gt;
&lt;th&gt;Deployment&lt;/th&gt;
&lt;th&gt;License&lt;/th&gt;
&lt;th&gt;Model access&lt;/th&gt;
&lt;th&gt;Failover&lt;/th&gt;
&lt;th&gt;Budgets and keys&lt;/th&gt;
&lt;th&gt;Published overhead&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Bifrost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Self-hosted, in-VPC, on-prem, air-gapped&lt;/td&gt;
&lt;td&gt;Apache 2.0&lt;/td&gt;
&lt;td&gt;25+ providers, 10,000+ models&lt;/td&gt;
&lt;td&gt;Retries, key rotation, fallback chains&lt;/td&gt;
&lt;td&gt;Virtual keys, hierarchical budgets, rate limits&lt;/td&gt;
&lt;td&gt;11 µs at 5,000 RPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cloudflare AI Gateway&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Managed (Cloudflare network)&lt;/td&gt;
&lt;td&gt;Managed service&lt;/td&gt;
&lt;td&gt;Workers AI, OpenAI, Anthropic, Google Gemini, Replicate, more&lt;/td&gt;
&lt;td&gt;Request retry and model fallback&lt;/td&gt;
&lt;td&gt;Spend limits, rate limiting&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Vercel AI Gateway&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Managed (callable from any infrastructure)&lt;/td&gt;
&lt;td&gt;Managed service&lt;/td&gt;
&lt;td&gt;Models across providers via AI SDK, OpenAI, and Anthropic APIs&lt;/td&gt;
&lt;td&gt;Provider and model fallbacks&lt;/td&gt;
&lt;td&gt;Budgets per team, project, key, member&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LiteLLM&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Self-hosted (Docker)&lt;/td&gt;
&lt;td&gt;MIT core, enterprise license for some features&lt;/td&gt;
&lt;td&gt;100+ LLMs&lt;/td&gt;
&lt;td&gt;Load balancing and fallbacks&lt;/td&gt;
&lt;td&gt;Virtual keys, budgets, rate limits&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;OpenRouter&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Managed (hosted only)&lt;/td&gt;
&lt;td&gt;Managed service&lt;/td&gt;
&lt;td&gt;Hundreds of models, one endpoint&lt;/td&gt;
&lt;td&gt;Automatic fallbacks&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Bifrost's overhead figure comes from its &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;published performance benchmarks&lt;/a&gt;. "Not published" means the vendor page reviewed carries no figure, not that the capability is absent.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Bifrost: The Open Source AI Gateway for Enterprise Teams
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.getmaxim.ai/bifrost" rel="noopener noreferrer"&gt;Bifrost AI gateway&lt;/a&gt; is open source and gives applications one OpenAI-compatible API to 25+ providers and 10,000+ models, adding 11 microseconds of overhead per request at 5,000 RPS. Governance, failover, caching, and MCP tool routing run in the same Go binary, which runs on a laptop or Kubernetes, with Bifrost Enterprise adding in-VPC and air-gapped deployment.&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%2Fa5gfdse0v9z9wiqtz2lu.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%2Fa5gfdse0v9z9wiqtz2lu.png" alt="A request passes through Bifrost virtual key checks, budget and rate limit checks, and a cache lookup, then routes to a primary provider with a fallback provider on failure" width="800" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: Governance and cache checks run before any provider call, and the fallback chain engages only after retries on the primary are exhausted.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance and deployment
&lt;/h3&gt;

&lt;p&gt;Bifrost adds 11 µs of overhead per request at a sustained 5,000 RPS with a 100% success rate on a t3.xlarge instance, as documented in the &lt;a href="https://docs.getbifrost.ai/benchmarking/getting-started" rel="noopener noreferrer"&gt;benchmarking methodology&lt;/a&gt;. The gateway starts with zero configuration, and providers are added through the web UI, API, or config file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; @maximhq/bifrost
&lt;span class="c"&gt;# or&lt;/span&gt;
docker run &lt;span class="nt"&gt;-p&lt;/span&gt; 8080:8080 maximhq/bifrost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Existing code moves over as a &lt;a href="https://docs.getbifrost.ai/features/drop-in-replacement" rel="noopener noreferrer"&gt;drop-in replacement&lt;/a&gt;: change the SDK base URL and swap the provider key for a Bifrost virtual key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&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="n"&gt;openai&lt;/span&gt;&lt;span class="p"&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;http://localhost:8080/openai&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;bifrost-virtual-key&amp;gt;&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;/div&gt;



&lt;p&gt;The &lt;a href="https://docs.getbifrost.ai/providers/supported-providers/overview" rel="noopener noreferrer"&gt;supported providers matrix&lt;/a&gt; covers OpenAI, Anthropic, AWS Bedrock, Google Vertex AI, Azure OpenAI, Mistral, Groq, Ollama, vLLM, and OpenRouter, among others.&lt;/p&gt;

&lt;h3&gt;
  
  
  Routing, failover, and caching
&lt;/h3&gt;

&lt;p&gt;Bifrost handles provider errors in two layers. &lt;a href="https://docs.getbifrost.ai/features/fallbacks" rel="noopener noreferrer"&gt;Retries and fallbacks&lt;/a&gt; first retry transient &lt;code&gt;5xx&lt;/code&gt; errors with exponential backoff and rotate to another API key on &lt;code&gt;429&lt;/code&gt; or auth failures; when retries are exhausted, the request moves to the next provider in the fallback chain, which gets its own retry budget.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.getbifrost.ai/features/semantic-caching" rel="noopener noreferrer"&gt;Semantic caching&lt;/a&gt; runs in two modes: direct hash matching replays identical requests, and semantic matching serves a cached answer for similar prompts using embeddings. Caching engages only for requests that carry a cache key and requires a vector store such as Redis, Valkey, Weaviate, or Qdrant, so measure hit rates on your own traffic. The trade-offs are covered in the guide to &lt;a href="https://www.getmaxim.ai/articles/semantic-caching-for-llms-how-to-cut-token-spend-with-ai-gateways/" rel="noopener noreferrer"&gt;cutting token spend with semantic caching&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Governance and security
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.getbifrost.ai/features/governance/virtual-keys" rel="noopener noreferrer"&gt;Virtual keys&lt;/a&gt; are the primary governance entity in Bifrost: each key carries its own model and provider allow-list, budget, and rate limits. &lt;a href="https://docs.getbifrost.ai/features/governance/budget-and-limits" rel="noopener noreferrer"&gt;Hierarchical budgets&lt;/a&gt; stack at the virtual key, team, and customer levels, with reset windows from one day to one year. These controls ship in the open-source build.&lt;/p&gt;

&lt;p&gt;Bifrost Enterprise adds &lt;a href="https://docs.getbifrost.ai/enterprise/guardrails" rel="noopener noreferrer"&gt;guardrails&lt;/a&gt; (built-in secrets detection and custom regex, plus external providers such as AWS Bedrock Guardrails, Azure Content Safety, Google Model Armor, and Patronus AI), clustering, RBAC, and signed &lt;a href="https://docs.getbifrost.ai/enterprise/audit-logs" rel="noopener noreferrer"&gt;audit logs of administrative activity&lt;/a&gt;. Regulated teams can run it through &lt;a href="https://docs.getbifrost.ai/enterprise/invpc-deployments" rel="noopener noreferrer"&gt;in-VPC deployments&lt;/a&gt; on AWS, Google Cloud, Azure, or Cloudflare.&lt;/p&gt;

&lt;h3&gt;
  
  
  MCP and coding agents
&lt;/h3&gt;

&lt;p&gt;Bifrost acts as both a client and a server for the &lt;a href="https://modelcontextprotocol.io/" rel="noopener noreferrer"&gt;Model Context Protocol&lt;/a&gt;, so tool calls pass through the same keys and logs as model calls; the &lt;a href="https://www.getmaxim.ai/bifrost/resources/mcp-gateway" rel="noopener noreferrer"&gt;MCP gateway resource page&lt;/a&gt; covers the architecture. &lt;a href="https://docs.getbifrost.ai/mcp/code-mode" rel="noopener noreferrer"&gt;Code Mode&lt;/a&gt; replaces large tool catalogs with four meta-tools and cut input tokens by 92.8% at 508 tools in Bifrost's benchmark.&lt;/p&gt;

&lt;p&gt;For coding agents, Bifrost exposes OpenAI, Anthropic, and Gemini-compatible endpoints, so Claude Code, Codex CLI, and Gemini CLI point at it with a base URL change. The &lt;a href="https://docs.getbifrost.ai/quickstart/cli/getting-started" rel="noopener noreferrer"&gt;Bifrost CLI&lt;/a&gt; launches those agents against the gateway with keys and models preconfigured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Bifrost is built for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. It serves as a centralized AI gateway to route, govern, and secure all AI traffic across models and environments with ultra low latency. Bifrost unifies LLM gateway, MCP gateway, and Agents gateway capabilities into a single platform. Designed for regulated industries and strict enterprise requirements, it supports air-gapped deployments, VPC isolation, and on-prem infrastructure. It provides full control over data, access, and execution, along with robust security, policy enforcement, and governance capabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Cloudflare AI Gateway
&lt;/h2&gt;

&lt;p&gt;Cloudflare AI Gateway is a managed gateway that runs on Cloudflare's network and is available on all Cloudflare plans. It adds caching, rate limiting, request retry and model fallback, analytics, and logging in front of providers including Workers AI, OpenAI, Anthropic, Google Gemini, and Replicate, without any infrastructure for the team to operate.&lt;/p&gt;

&lt;p&gt;Cloudflare's feature list also covers spend limits, dynamic routing, an auto router that picks a lower-cost model per request, content-moderation guardrails, data loss prevention, and bring-your-own-key storage.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Strengths:&lt;/strong&gt; no servers to run, plus request, token, and cost analytics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trade-offs:&lt;/strong&gt; the gateway runs only as a managed service, so prompts and logs pass through Cloudflare's network; no self-hosted option is published.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Teams already building on Cloudflare Workers that want caching, rate limiting, and cost analytics in front of a few providers with nothing to operate, and whose compliance posture allows prompts to transit a third-party network.&lt;/p&gt;

&lt;p&gt;Teams that outgrow it usually want self-hosting or per-team governance; see &lt;a href="https://www.getmaxim.ai/articles/best-cloudflare-ai-gateway-alternative-in-2026/" rel="noopener noreferrer"&gt;the best Cloudflare AI Gateway alternative&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Vercel AI Gateway
&lt;/h2&gt;

&lt;p&gt;Vercel AI Gateway is a managed gateway that gives applications one endpoint to models across providers, with provider and model fallbacks, request logs, budgets, and bring-your-own-key support. Vercel states that it adds zero markup to provider token prices, including with BYOK, and that calling applications do not need to run on Vercel.&lt;/p&gt;

&lt;p&gt;Applications call it through the AI SDK, the OpenAI Chat Completions and Responses APIs, or the Anthropic Messages API. Request logs record provider attempts, latency, tokens, and cost per request.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Strengths:&lt;/strong&gt; tight AI SDK integration, multimodal coverage (text, image, video, speech, embeddings), and budgets scoped to a team, project, API key, or team member.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trade-offs:&lt;/strong&gt; budgets are soft caps that cover spend billed through Vercel system credentials; BYOK spend is metered separately and does not count toward those limits. The gateway is managed only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Frontend and full-stack teams building with Next.js and the AI SDK that want model access, fallbacks, and spend visibility from the same vendor that hosts their application.&lt;/p&gt;

&lt;p&gt;Teams that need the gateway inside their own network compare options in &lt;a href="https://www.getmaxim.ai/articles/best-vercel-ai-gateway-alternatives-in-2026/" rel="noopener noreferrer"&gt;Vercel AI Gateway alternatives for 2026&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. LiteLLM
&lt;/h2&gt;

&lt;p&gt;LiteLLM is a self-hosted Python gateway, the LiteLLM Proxy, that calls 100+ LLMs through one OpenAI-format interface. Its MIT-licensed core lists virtual keys, budgets, rate limits, spend tracking, load balancing, fallbacks, caching, guardrails, and an admin UI, deployed with Docker on infrastructure the team runs.&lt;/p&gt;

&lt;p&gt;Several governance features sit behind LiteLLM's enterprise license, including SSO for the admin UI, audit logs with retention policies, JWT authentication, secret manager integrations, and custom guardrails per API key. Teams should price that license into any comparison against gateways that ship those controls in the open-source build.&lt;/p&gt;

&lt;p&gt;Performance is the other consideration. In &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;Bifrost's head-to-head benchmark&lt;/a&gt; at 500 RPS on a t3.medium instance, LiteLLM recorded a P99 latency of 90.72 seconds against 1.68 seconds for Bifrost, with roughly 9.5x lower throughput and about three times the memory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Strengths:&lt;/strong&gt; large provider catalog and a familiar Python SDK.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trade-offs:&lt;/strong&gt; Python runtime overhead under concurrency, and SSO and audit logs require a paid license.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Python-first teams and prototypes that want a self-hosted gateway with broad provider coverage and moderate request volumes.&lt;/p&gt;

&lt;p&gt;Teams searching for LiteLLM alternatives usually want lower overhead or governance without a separate license; the &lt;a href="https://www.getmaxim.ai/bifrost/resources/litellm-alternative" rel="noopener noreferrer"&gt;LiteLLM alternative resource page&lt;/a&gt; compares the two and maps the migration. Bifrost also offers &lt;a href="https://docs.getbifrost.ai/integrations/litellm-sdk" rel="noopener noreferrer"&gt;LiteLLM SDK compatibility&lt;/a&gt;, so existing LiteLLM client code can point at it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. OpenRouter
&lt;/h2&gt;

&lt;p&gt;OpenRouter is a hosted service that gives developers access to hundreds of AI models through a single OpenAI-compatible endpoint. It handles provider fallbacks automatically and picks a cost-effective provider for each request. Inference is billed at provider rates with no markup, while credit purchases carry a fee (5.5% with a $0.80 minimum by card).&lt;/p&gt;

&lt;p&gt;Bring-your-own-key usage is free up to a monthly allowance, after which OpenRouter charges a 5% fee. Prompts and completions are not logged by default. Configurable spend limits per team or per key are not addressed in the FAQ reviewed for this comparison, and no self-hosted option is published.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Strengths:&lt;/strong&gt; fastest way to try many models with one account and one key, with unified billing across providers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trade-offs:&lt;/strong&gt; hosted only, and per-team governance, guardrails, and audit controls are not part of its published feature set.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Individual developers, demos, and model evaluation work where trying many models quickly matters more than self-hosting or per-team policy.&lt;/p&gt;

&lt;p&gt;The most common OpenRouter alternatives are self-hosted gateways that keep the convenience of one API; &lt;a href="https://www.getmaxim.ai/articles/best-openrouter-alternative-in-2026-a-production-ai-gateway-comparison/" rel="noopener noreferrer"&gt;the best OpenRouter alternative for production&lt;/a&gt; covers them, and a three-way &lt;a href="https://www.getmaxim.ai/articles/openrouter-vs-litellm-vs-bifrost-ai-gateway-comparison/" rel="noopener noreferrer"&gt;OpenRouter vs LiteLLM vs Bifrost comparison&lt;/a&gt; breaks down the LiteLLM vs OpenRouter question. Teams can also keep OpenRouter as one &lt;a href="https://docs.getbifrost.ai/providers/supported-providers/openrouter" rel="noopener noreferrer"&gt;upstream provider behind Bifrost&lt;/a&gt; and apply virtual key budgets on top.&lt;/p&gt;

&lt;h2&gt;
  
  
  Self-Hosted vs Managed AI Gateways
&lt;/h2&gt;

&lt;p&gt;Self-hosted AI gateways run inside your network, so prompts, responses, and logs stay in infrastructure you control until the provider call. Managed AI gateways remove operational work but route every prompt through the vendor's network first. For regulated data, that difference usually decides the shortlist before any feature comparison starts.&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%2F84iwucmdg1k7kyq81rgm.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%2F84iwucmdg1k7kyq81rgm.png" alt="Two lanes compare request paths: a self-hosted gateway runs inside the company network before calling providers, while a managed gateway sends prompts through a vendor network first" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: With a self-hosted gateway, prompts and logs stay inside infrastructure you control until the provider call; with a managed one, they pass through a vendor network.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The practical trade-offs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Data residency:&lt;/strong&gt; a self-hosted gateway such as Bifrost keeps request logs in your own database; Bifrost also supports &lt;a href="https://docs.getbifrost.ai/deployment-guides/enterprise/on-premise" rel="noopener noreferrer"&gt;on-premise and air-gapped deployment&lt;/a&gt; for environments with no cloud identity federation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Operations:&lt;/strong&gt; managed gateways need no patching; Bifrost self-hosts as a single binary or container.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost model:&lt;/strong&gt; managed services charge platform or credit fees; self-hosted gateways cost only their compute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Failure domain:&lt;/strong&gt; a managed gateway adds the vendor's availability to the request path.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A dedicated comparison of &lt;a href="https://www.getmaxim.ai/articles/best-self-hosted-ai-gateway-in-2026/" rel="noopener noreferrer"&gt;the best self-hosted AI gateway options&lt;/a&gt; goes deeper on this path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which AI Gateway Fits Your Team
&lt;/h2&gt;

&lt;p&gt;The right pick follows from the team's constraints, not feature counts. Regulated enterprises and platform teams that serve many internal consumers need Bifrost; product teams already on Cloudflare or Vercel can start with those platforms' gateways; and individual developers exploring models can start with OpenRouter.&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%2F66yl3ob16uc56knas5os.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%2F66yl3ob16uc56knas5os.png" alt="Decision flow asking whether traffic must stay in your network, whether the team runs on Cloudflare or Vercel, and whether the work is a prototype" width="798" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: Data residency and team type settle most gateway decisions before any feature comparison starts.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use case&lt;/th&gt;
&lt;th&gt;Recommended gateway&lt;/th&gt;
&lt;th&gt;Reason&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Regulated enterprise (finance, healthcare, public sector)&lt;/td&gt;
&lt;td&gt;Bifrost&lt;/td&gt;
&lt;td&gt;In-VPC, on-prem, and air-gapped deployment with audit logs and guardrails&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Platform team serving many internal teams&lt;/td&gt;
&lt;td&gt;Bifrost&lt;/td&gt;
&lt;td&gt;Virtual keys and hierarchical budgets per team and customer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coding agents (Claude Code, Codex CLI)&lt;/td&gt;
&lt;td&gt;Bifrost&lt;/td&gt;
&lt;td&gt;Anthropic and OpenAI-compatible endpoints, any model behind them, per-developer budgets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;App already running on Cloudflare Workers&lt;/td&gt;
&lt;td&gt;Cloudflare AI Gateway&lt;/td&gt;
&lt;td&gt;Managed caching and analytics on the same platform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Next.js product team on Vercel&lt;/td&gt;
&lt;td&gt;Vercel AI Gateway&lt;/td&gt;
&lt;td&gt;AI SDK integration and budgets per project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Python prototype with modest traffic&lt;/td&gt;
&lt;td&gt;LiteLLM&lt;/td&gt;
&lt;td&gt;Self-hosted, Python SDK, broad provider catalog&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model exploration and demos&lt;/td&gt;
&lt;td&gt;OpenRouter&lt;/td&gt;
&lt;td&gt;One key for hundreds of hosted models&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Coding-agent rollouts need their own planning because token volume per developer is high. The guide to &lt;a href="https://www.getmaxim.ai/articles/choosing-an-ai-gateway-for-claude-code-complete-guide/" rel="noopener noreferrer"&gt;choosing an AI gateway for Claude Code&lt;/a&gt; covers settings, model slots, and budgets, and the companion guide on how to &lt;a href="https://www.getmaxim.ai/articles/best-ai-gateway-to-route-codex-cli-to-any-model/" rel="noopener noreferrer"&gt;route Codex CLI to any model&lt;/a&gt; covers the &lt;code&gt;config.toml&lt;/code&gt; provider setup.&lt;/p&gt;

&lt;p&gt;Whichever gateway you choose, the core layers stay the same; the pillar guide to &lt;a href="https://www.getmaxim.ai/articles/what-is-an-ai-gateway-architecture-features-and-why-it-matters/" rel="noopener noreferrer"&gt;AI gateway architecture and core features&lt;/a&gt; explains each one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are AI gateways?
&lt;/h3&gt;

&lt;p&gt;AI gateways are middleware that sit between applications and model providers, exposing one API while handling authentication, routing, retries, failover, caching, budgets, and logging. Applications send every model request to the gateway instead of calling providers directly. Bifrost, for example, exposes OpenAI, Anthropic, and Gemini-compatible endpoints that route to 25+ providers, so switching models becomes a configuration change rather than a code change.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the top AI gateways?
&lt;/h3&gt;

&lt;p&gt;The top AI gateways in 2026 are Bifrost, Cloudflare AI Gateway, Vercel AI Gateway, LiteLLM, and OpenRouter. Bifrost leads for enterprise and platform teams because it is open source, self-hostable, and adds 11 µs of overhead at 5,000 RPS. Cloudflare and Vercel suit teams already on those platforms, LiteLLM suits Python prototypes, and OpenRouter suits model exploration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which AI gateways are open source?
&lt;/h3&gt;

&lt;p&gt;Of the five gateways in this list, Bifrost and LiteLLM are open source. Bifrost is licensed under the &lt;a href="https://www.apache.org/licenses/LICENSE-2.0" rel="noopener noreferrer"&gt;Apache License 2.0&lt;/a&gt; and ships virtual keys, budgets, rate limits, and fallbacks in the open-source build. LiteLLM's core is MIT-licensed, with SSO, audit logs, and some governance features under an enterprise license, while Cloudflare AI Gateway, Vercel AI Gateway, and OpenRouter are managed services. The &lt;a href="https://www.getmaxim.ai/articles/the-best-open-source-ai-gateway-in-2026/" rel="noopener noreferrer"&gt;open-source AI gateway roundup&lt;/a&gt; covers more options.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the best OpenRouter alternatives?
&lt;/h3&gt;

&lt;p&gt;The best OpenRouter alternatives keep a single API across many models while adding self-hosting and per-team governance. Bifrost is the strongest option for production: it routes to 25+ providers, including OpenRouter itself, and adds virtual keys, hierarchical budgets, and fallback chains inside your own network. Vercel AI Gateway is a managed alternative for teams on Vercel, and LiteLLM is a self-hosted Python option.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much latency does an AI gateway add?
&lt;/h3&gt;

&lt;p&gt;Overhead depends mainly on the runtime. Bifrost adds 11 microseconds per request at a sustained 5,000 RPS in its &lt;a href="https://www.getmaxim.ai/bifrost/resources/benchmarks" rel="noopener noreferrer"&gt;published benchmark results&lt;/a&gt;, which is negligible next to model response times measured in seconds. Python-based gateways add more under concurrency, and most managed gateways do not publish an overhead figure, so ask vendors for sustained-load numbers before committing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should you self-host or use a managed AI gateway?
&lt;/h3&gt;

&lt;p&gt;Self-host when prompts or logs cannot leave your network, when many teams share the gateway, or when request volume makes per-request platform fees expensive. Use a managed gateway when operational simplicity matters most and your compliance posture allows third-party data transit. Bifrost supports both paths for enterprises through &lt;a href="https://www.getmaxim.ai/bifrost/enterprise" rel="noopener noreferrer"&gt;Bifrost Enterprise&lt;/a&gt; deployments in a VPC, on-prem, or air-gapped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try Bifrost as Your AI Gateway
&lt;/h2&gt;

&lt;p&gt;Among the AI gateways compared here, Bifrost is the one built for enterprise and platform teams: open source, self-hosted inside your network, 11 µs of overhead at 5,000 RPS, and governance through virtual keys and hierarchical budgets in the open-source build. Teams moving from OpenRouter or LiteLLM keep one OpenAI-compatible API and gain control over their data. To see how Bifrost fits your infrastructure, &lt;a href="https://getmaxim.ai/bifrost/book-a-demo" rel="noopener noreferrer"&gt;book a demo&lt;/a&gt; with the Bifrost team.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>apigateway</category>
      <category>aigateway</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:25:21 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/-5649</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/-5649</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" class="crayons-story__hidden-navigation-link"&gt;What Is an AI Gateway? Architecture, Features, and Why It Matters&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" alt="kamya_shah_e69d5dd78f831c profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kamya Shah
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kamya Shah
                
                
              
              &lt;div id="story-author-preview-content-4805404" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kamya_shah_e69d5dd78f831c" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kamya Shah&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" id="article-link-4805404"&gt;
          What Is an AI Gateway? Architecture, Features, and Why It Matters
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/apigateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;apigateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/gateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;gateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/llm"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;llm&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              1&lt;span class="hidden s:inline"&gt;&amp;nbsp;comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            17 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>An AI gateway is the control layer between your apps and every LLM provider. Learn its architecture, request flow, core features, and how to choose one.</title>
      <dc:creator>Kamya Shah</dc:creator>
      <pubDate>Tue, 06 Oct 2026 08:25:03 +0000</pubDate>
      <link>https://dev.to/kamya_shah_e69d5dd78f831c/an-ai-gateway-is-the-control-layer-between-your-apps-and-every-llm-provider-learn-its-51do</link>
      <guid>https://dev.to/kamya_shah_e69d5dd78f831c/an-ai-gateway-is-the-control-layer-between-your-apps-and-every-llm-provider-learn-its-51do</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" class="crayons-story__hidden-navigation-link"&gt;What Is an AI Gateway? Architecture, Features, and Why It Matters&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" alt="kamya_shah_e69d5dd78f831c profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/kamya_shah_e69d5dd78f831c" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Kamya Shah
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Kamya Shah
                
                
              
              &lt;div id="story-author-preview-content-4805404" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/kamya_shah_e69d5dd78f831c" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3522106%2F50d11e9f-8be6-4fbb-b034-1c4168bf3a12.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Kamya Shah&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Oct 6&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" id="article-link-4805404"&gt;
          What Is an AI Gateway? Architecture, Features, and Why It Matters
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/apigateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;apigateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/gateway"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;gateway&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/llm"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;llm&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/kamya_shah_e69d5dd78f831c/what-is-an-ai-gateway-architecture-features-and-why-it-matters-46dd#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              1&lt;span class="hidden s:inline"&gt;&amp;nbsp;comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            17 min read
          &lt;/small&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
  </channel>
</rss>
