---
description: "Choosing an AI gateway for Claude Code: six evaluation criteria, per-developer budgets, MCP tool governance, and what changes behind a custom base URL."
title: "Choosing an AI Gateway for Claude Code: Complete Guide"
image: https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w1200/2026/09/choosing-an-ai-gateway-for-claude-code-complete-guide-bifrost-isometric.png
---

Try Bifrost Enterprise free for 14 days. [Request access](https://www.getmaxim.ai/#enterprise-trial)

## TL;DR

- Claude Code only talks to Anthropic by default, so at team scale it has no per-developer budgets, no multi-provider failover, no centralized observability, and no audit trail for compliance.
- An AI gateway closes those gaps by sitting between Claude Code and any provider, enforcing governance, routing across providers, and logging every request.
- Evaluate a Claude Code gateway on six criteria: latency overhead, tool-call streaming compatibility, governance and budget enforcement, multi-provider abstraction, observability, and deployment model.
- Bifrost covers all six: [11 µs overhead](https://www.getmaxim.ai/resources/benchmarks), full tool-call streaming, per-key budgets on [virtual keys](https://docs.getbifrost.ai/features/governance/virtual-keys), [native MCP support](https://docs.getbifrost.ai/mcp/overview), and self-hosted or [in-VPC deployment](https://docs.getbifrost.ai/enterprise/invpc-deployments).
- Integration is a one-line change to Claude Code's base URL; the [LLM gateway buyer's guide](https://www.getmaxim.ai/resources/buyers-guide) compares gateways head-to-head.

Claude Code has become one of the most widely adopted agentic coding tools in enterprise engineering organizations, but its native architecture only talks to Anthropic's API. The moment a team scales beyond a few seats, the operational gaps show up fast: no per-developer budgets, no multi-provider failover, no centralized observability, and no audit trail for compliance. An AI gateway for Claude Code closes those gaps by sitting between the CLI and any LLM provider, intercepting every request to enforce governance, route across providers, and log usage. This guide walks through the criteria that matter when choosing one, the architectural trade-offs to weigh, and how [Bifrost](https://www.getmaxim.ai), the [open-source AI gateway](https://github.com/maximhq/bifrost) built by Maxim AI, addresses each requirement.

## Why Claude Code Needs an AI Gateway

Claude Code's design depends on heavy tool calling. A single coding session can fan out into dozens of API calls for file reads, terminal commands, and code edits, and each one hits Anthropic's API directly when no gateway is in the path. That works for individual developers. It does not work for teams running Claude Code across hundreds of engineers, where a single point of failure or an uncapped credit card becomes a real liability.

Anthropic's own documentation recommends using an [LLM gateway](https://www.getmaxim.ai/llm-gateway) for centralized usage tracking, custom rate limiting, and authentication management in enterprise deployments. The pattern is the same one API gateways brought to REST traffic, now adapted to LLM workloads. Specifically, an AI gateway for Claude Code provides:

- **Authentication and access control**: developers never hold raw Anthropic API keys
- **Per-developer and per-team budgets**: hard caps and rate limits prevent runaway spend
- **Multi-provider routing**: failover to OpenAI, Bedrock, Vertex, or Azure when Anthropic rate-limits or has an outage
- **Centralized observability**: token usage, latency, and tool-call traces in one place
- **Audit logs**: structured records for SOC 2, GDPR, HIPAA, and ISO 27001 reviews

The [Stack Overflow 2025 Developer Survey](https://survey.stackoverflow.co/2025/) found that most developers now use or plan to use AI tools in their development work. At that adoption rate, per-developer cost visibility and provider redundancy stop being optional.

The same argument extends to the other coding agents: [Codex CLI](https://www.getmaxim.ai/articles/best-ai-gateway-to-manage-codex-cli-token-spend/), [Cursor](https://www.getmaxim.ai/articles/self-hosted-ai-gateway-for-cursor-with-claude-or-ollama/), and [OpenCode](https://www.getmaxim.ai/articles/best-ai-gateway-for-opencode-token-tracking-and-access-controls/).

One caveat to set early: Anthropic states in the same documentation that it does not endorse, maintain, or audit third-party gateway products, and does not support routing Claude Code to non-Claude models through any gateway. Teams do run that configuration, and the sections below cover how, but treat it as unsupported by Anthropic rather than a documented path.

## Key Criteria for Evaluating a Claude Code Gateway

Not every gateway is built for Claude Code's request profile. Three properties matter most: latency overhead, tool-call streaming fidelity, and governance depth. A fourth, less obvious one is release cadence: Anthropic's [gateway compatibility guide](https://code.claude.com/docs/en/llm-gateway-protocol) notes that Claude Code adds capabilities with each release, and a gateway that does not forward them breaks the matching feature.

| Criterion | What to check | Why it matters for Claude Code |
| --- | --- | --- |
| Latency overhead | A published figure with instance type and request rate | Agentic sessions make dozens of calls, so overhead compounds per session |
| Tool-call streaming | Full Anthropic streaming support, including tool-use and extended thinking | A dropped tool call breaks file edits mid-session |
| Governance depth | Budgets and rate limits per key, team, and customer | Per-developer caps are the reason most teams adopt a gateway |
| Multi-provider routing | Independent override of the Sonnet, Opus, and Haiku tiers | Failover when Anthropic rate-limits, plus cheaper models for light tiers |
| Observability | Request logs with tokens and cost, Prometheus, OpenTelemetry | Per-developer attribution needs gateway-side logs |
| Deployment model | Self-hosted, in-VPC, or air-gapped | Claude Code prompts carry proprietary source code |
| Forwarding fidelity | Error bodies, beta headers, and `tool_reference` blocks passed through unmodified | Claude Code's retry and tool-search paths depend on them |

### Latency overhead per request

Claude Code makes rapid-fire API calls during agentic sessions. A Python-based proxy that adds several milliseconds per request can compound into seconds of user-visible delay across a long session. Look for gateways with sub-millisecond overhead under sustained load. Bifrost adds 11 microseconds per request at 5,000 RPS in published [performance benchmarks](https://www.getmaxim.ai/resources/benchmarks), which is the floor of what modern AI gateways should deliver.

### Tool-call streaming compatibility

Claude Code relies on streaming tool-call arguments for file operations, terminal commands, and edits. Some proxies do not stream function call arguments correctly and return empty `arguments` fields, which causes Claude Code to fail on tool-based actions. Always verify that the gateway under evaluation supports the full Anthropic streaming specification, including extended thinking and tool-use streaming.

One default changes behind any gateway: fine-grained tool streaming is reserved for direct connections, so it is off whenever requests route through a custom base URL. Developers turn it back on with `CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING=1`, and the gateway has to forward it.

Two forwarding rules matter just as much. Claude Code recovers from upstream rejections by matching on the error wording, so a gateway that wraps upstream errors in its own envelope breaks that recovery path. And extended thinking fails if the gateway rewrites the `system`, `tools`, or earlier `messages` content, because the preserved-thinking check compares them against the request that produced the thinking.

### Governance and budget enforcement

A useful gateway enforces budgets at multiple levels: per virtual key, per team, per customer, and per organization. It should support hard cutoffs, rate limits, model-level access restrictions, and budget reset windows that match how finance teams account for spend.

### Multi-provider abstraction

Claude Code uses three model tiers (Sonnet, Opus, Haiku) that map directly to Anthropic models by default. A capable gateway lets you override each tier independently with any provider and model combination, for example keeping Opus on Anthropic for complex reasoning while pointing the Haiku tier at a cheaper model. Bear in mind Anthropic's position above: routing Claude Code to non-Claude models through a gateway is not supported by Anthropic, so validate tool use on every model you substitute. Teams already running that setup are compared in [AI gateways for running Claude Code with non-Anthropic models](https://www.getmaxim.ai/articles/5-ai-gateways-developers-use-to-run-claude-code-with-non-anthropic-models/) and [using Claude Code with Gemini models](https://www.getmaxim.ai/articles/best-ai-gateway-to-use-claude-code-with-gemini-models/).

A gateway can also feed the model picker: with `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1`, Claude Code queries the gateway's `/v1/models` endpoint at startup and adds what it returns to `/model`. Discovery is off by default so a shared key does not expose every model to every developer.

![](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/2026/09/image-97.png)

### MCP tool search behind a gateway

Claude Code defers MCP tool definitions by default through tool search, so only tool names and server instructions load at session start. It turns that off when `ANTHROPIC_BASE_URL` points to a non-first-party host, because most proxies do not forward `tool_reference` blocks, and `ENABLE_TOOL_SEARCH` overrides the fallback. On Claude Code v2.1.227 or later, organizations can keep it on through managed settings. The practical consequence is that routing model traffic through any gateway brings every MCP tool definition back into context unless the gateway forwards those blocks, which is why gateway-side tool filtering and [MCP token reduction](https://www.getmaxim.ai/articles/how-to-reduce-mcp-token-costs-for-claude-code-at-scale/) matter more in this configuration, not less.

### Observability and audit trails

The gateway should emit structured logs and metrics that integrate with the team's existing stack: Prometheus, OpenTelemetry, Datadog, Grafana, New Relic, or Honeycomb. For regulated environments, audit logs of administrative activity plus per-request logs are both needed, one for who changed policy and one for who called which model.

### Deployment model

Managed gateways are faster to start with but offer less control over data residency and failure handling. Self-hosted, in-VPC deployments matter when compliance requires that LLM traffic never leaves the private network.

## Common Architectural Trade-offs

Most teams choosing an AI gateway for Claude Code end up balancing four trade-offs. Understanding them upfront prevents painful migrations later.

- **Managed vs self-hosted**: Managed services minimize setup but limit logging granularity and can add network hops outside your VPC. Self-hosted gateways like Bifrost give full control over deployment topology, log retention, and failure handling.
- **Python-based vs Go-based**: Python proxies are easier to extend with custom logic, but they add millisecond-scale overhead. Go-based gateways trade plugin convenience for native concurrency and microsecond-scale overhead.
- **Single-purpose proxies vs full governance platforms**: Some gateways do routing well but lack budgets, RBAC, or audit logging. A full governance platform consolidates routing, governance, observability, and MCP infrastructure in one layer.
- **Provider breadth vs feature depth**: A gateway that supports 100+ providers may not implement tool-call streaming correctly for all of them. Verify the providers you actually use, not just the headline number.

## How Bifrost Compares as an AI Gateway for Claude Code

Bifrost is purpose-built for the Claude Code use case. It is a high-performance, open-source AI gateway written in Go, available on [GitHub](https://github.com/maximhq/bifrost) under an open license, and designed as a drop-in proxy for Claude Code with no client-side code changes required. Integration is a one-line change: set Claude Code's `ANTHROPIC_BASE_URL` to the Bifrost endpoint, and every request flows through the gateway.

Bifrost covers the criteria above end to end:

- **Performance**: 11µs overhead at 5,000 RPS sustained, written in Go for native concurrency
- **Tool-call streaming**: full Anthropic API compatibility, including the `thinking` parameter for extended reasoning
- **Multi-provider routing**: 20+ providers behind a single OpenAI-compatible API, with [automatic failover and load balancing](https://docs.getbifrost.ai/features/fallbacks) across providers and keys
- **Governance**: [virtual keys](https://docs.getbifrost.ai/features/governance/virtual-keys) with hierarchical budgets at four levels (virtual key, team, customer, provider config), [rate limits](https://docs.getbifrost.ai/features/governance/budget-and-limits), and per-key model access restrictions
- **Observability**: built-in real-time monitoring, native Prometheus metrics, OpenTelemetry tracing, and a Datadog connector in the Enterprise tier
- [**MCP gateway**](https://www.getmaxim.ai/mcp-gateway): [native MCP support](https://docs.getbifrost.ai/mcp/overview) so Claude Code can discover and execute tools across multiple MCP servers through a single endpoint
- **Enterprise**: in-VPC deployments, RBAC with SSO via Okta and Microsoft Entra, immutable audit logs, vault integrations for HashiCorp Vault, AWS Secrets Manager, Google Secret Manager, and Azure Key Vault

For teams evaluating gateways head-to-head, the [LLM Gateway Buyer's Guide](https://www.getmaxim.ai/resources/buyers-guide) provides a detailed capability matrix across the categories above.

## Configuring Claude Code with Bifrost

The integration pattern is intentionally minimal. Once Bifrost is running, point Claude Code at it with two environment variables:

```bash
export ANTHROPIC_BASE_URL="<http://localhost:8080/anthropic>"
export ANTHROPIC_API_KEY="your-bifrost-virtual-key"
```

From there, Claude Code's three model tiers can be overridden independently. Replace any tier with a model from any configured provider using the `provider/model-name` format:

```bash
# Replace Sonnet tier with GPT-5 for primary coding tasks
export ANTHROPIC_DEFAULT_SONNET_MODEL="openai/gpt-5"

# Keep Opus on Anthropic for complex reasoning
export ANTHROPIC_DEFAULT_OPUS_MODEL="anthropic/claude-opus-4-5-20251101"

# Replace Haiku with a fast open-source model on Groq
export ANTHROPIC_DEFAULT_HAIKU_MODEL="groq/llama-3.3-70b-versatile"
```

Alternative models must support tool use for Claude Code's file operations, terminal commands, and code editing to work correctly. The full integration walkthrough is documented in the [Claude Code integration guide](https://www.getmaxim.ai/resources/claude-code).

## Governance Patterns for Team-Scale Deployments

![](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/2026/09/image-98.png)

Once the gateway is in place, governance becomes the operational layer that turns Claude Code from an individual tool into a managed platform.

**Per-developer budgets and access policies.** Issue a unique virtual key per developer, scoped to a daily or monthly budget. When a developer hits the cap, Bifrost stops routing requests for that key until the budget resets. Reset frequencies of 1 minute, 1 hour, 1 day, 1 week, or 1 month cover most billing cycles.

**Team and project hierarchies.** Roll virtual keys up under team-level and customer-level budgets. Finance can cap a project at $5,000 per month while still letting individual developers within that project have their own per-key limits. Budget overruns are enforced at the gateway, not in retrospective spreadsheets.

**Provider access restrictions.** A virtual key for the QA team might only permit `openai/gpt-4o-mini`, while senior engineers get access to `openai/gpt-5` and `anthropic/claude-sonnet-4-5`. Tool filtering on MCP servers extends the same pattern to which tools each key can call.

**Compliance routing.** For regulated workloads, route all traffic through AWS Bedrock or Google Vertex AI to keep requests inside the VPC for data residency. Bifrost's [in-VPC deployment](https://docs.getbifrost.ai/enterprise/invpc-deployments) ensures no Claude Code traffic leaves the private network.

For a deeper view of how these governance patterns reduce token cost and tighten access control, the [Bifrost MCP Gateway post](https://www.getmaxim.ai/bifrost/blog/bifrost-mcp-gateway-access-control-cost-governance-and-92-lower-token-costs-at-scale) covers the access control and Code Mode patterns in detail.

## What to Verify Before Production Rollout

Before rolling a Claude Code gateway out to a full engineering org, validate the following in a staging environment:

- Tool-call streaming works correctly for the providers and models the team actually uses
- Failover triggers within an acceptable window when the primary provider rate-limits or returns 5xx errors
- Budget cutoffs apply within a single request cycle, not after a delayed reconciliation
- Logs contain the fields needed for compliance reviews (request ID, virtual key, model, token counts, latency, tool-call inputs and outputs)
- The gateway's metrics flow into the team's existing observability stack without lossy transformation
- MCP tool filtering applies per virtual key when MCP servers are connected

This checklist matters because Claude Code's developer experience is sensitive to small failures. A dropped tool call mid-session is worse than a slightly higher per-request cost.

## Frequently Asked Questions

### Why does Claude Code need an AI gateway?

Claude Code talks only to Anthropic's API, so at team scale it lacks per-developer budgets, multi-provider failover, centralized observability, and an audit trail. An AI gateway sits between the CLI and any provider to add all four. [Bifrost](https://www.getmaxim.ai) is purpose-built for this, as a drop-in proxy requiring no client-side code changes.

### What should you evaluate in a Claude Code gateway?

Weigh six criteria: latency overhead per request, tool-call streaming compatibility, governance and budget enforcement, multi-provider abstraction, observability and audit trails, and deployment model. Tool-call streaming matters most, because Claude Code depends on it for file operations, and a gateway that mishandles it will break the agent.

### Does an AI gateway slow Claude Code down?

Only if the gateway's runtime is slow. Claude Code makes rapid-fire API calls during agentic loops, so overhead compounds. [Bifrost adds roughly 11 microseconds](https://www.getmaxim.ai/resources/benchmarks) at 5,000 requests per second, which is imperceptible, whereas a heavier runtime can add milliseconds per call that accumulate across a session.

### Can a gateway break Claude Code's tool calls?

Yes, if it does not stream tool-call arguments the way Claude Code expects. Some gateways buffer or reformat streamed responses, which causes file operations to fail. Verify full Anthropic API compatibility, including streamed tool calls, before rollout. [Bifrost's Claude Code integration](https://docs.getbifrost.ai/cli-agents/claude-code) preserves the streaming contract.

### How do you enforce budgets for a Claude Code team?

Issue each developer a [virtual key](https://docs.getbifrost.ai/features/governance/virtual-keys) with its own budget and rate limit, then roll keys up under team and customer scopes. The gateway checks every request against all applicable [budgets](https://docs.getbifrost.ai/features/governance/budget-and-limits) before forwarding it, so spend is capped in real time rather than discovered on the monthly invoice.

### Should you use a managed or self-hosted gateway for Claude Code?

Managed gateways start faster but keep request data on the vendor's network and offer less control. Self-hosted gateways require operating the service but keep prompts and code inside your own infrastructure. For regulated teams, [in-VPC deployment](https://docs.getbifrost.ai/enterprise/invpc-deployments) is usually the deciding factor, since Claude Code prompts often contain proprietary source code.

## Try Bifrost as Your AI Gateway for Claude Code

An [AI gateway](https://www.getmaxim.ai/articles/top-5-llm-gateways-in-2026-a-production-ready-comparison/) for Claude Code is no longer a nice-to-have for any team running the agent at scale. Provider redundancy, per-developer budgets, MCP tool governance, and compliance audit trails are the baseline for production. Bifrost provides all of these in a single open-source package, with 11µs overhead, 20+ providers, native MCP support, and enterprise features that match what large engineering organizations require.

To see how Bifrost can govern your Claude Code rollout end to end, [book a demo with the Bifrost team](https://www.getmaxim.ai/book-a-demo) or explore the [Bifrost GitHub repository](https://github.com/maximhq/bifrost) to start running it locally.

## Read next

[![Tokenmaxxing: What It Means and How to Govern AI Token Spend](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/11/tokenmaxxing-what-it-means-and-how-to-govern-ai-token-spend-bifrost-1920x1080.png) Tokenmaxxing is the practice of treating AI token consumption as a proxy for productivity. This guide explains where the term came from, why usage leaderboards backfired, what engineering leaders measure instead, and how to govern token spend with budgets, attribution, and routing.](https://www.getmaxim.ai/articles/tokenmaxxing/)

[![9 Best Self-Hosted AI Tools for Enterprise Teams](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/11/9-best-self-hosted-ai-tools-for-enterprise-teams-bifrost-1920x1080@2x.png) Self-hosted AI runs models, apps, and data services on infrastructure a team controls. This guide ranks nine tools by stack layer, including Bifrost, vLLM, Ollama, Open WebUI, and Qdrant, and shows how one gateway governs the whole stack.](https://www.getmaxim.ai/articles/self-hosted-ai-tools/)

[![7 Best Private AI Platforms for Regulated Enterprises](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/11/7-best-private-ai-platforms-for-regulated-enterprises-bifrost-1920x1080@2x.png) A private AI platform runs models and AI traffic inside infrastructure the organization controls. This guide ranks seven options, including Bifrost, NVIDIA AI Enterprise, Red Hat OpenShift AI, and Google Distributed Cloud air-gapped, on deployment, isolation, and governance.](https://www.getmaxim.ai/articles/private-ai-platforms/)

## More in AI Gateway

[![Best Codex Security Tools for Enterprise in 2026](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/09/best-codex-security-tools-for-enterprise-in-2026-bifrost-isometric.png) Codex security is the set of controls that decide what OpenAI Codex can reach, send, and change across an engineering organization. This guide compares six tools, including Bifrost, OpenAI managed configuration, Codex Security, and Amazon Bedrock Guardrails.](https://www.getmaxim.ai/articles/best-codex-security-tools-for-enterprise-in-2026/)

[![Top 5 Envoy AI Gateway Alternatives for LLM Routing](https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w720/2026/08/top-5-envoy-ai-gateway-alternatives-for-llm-routing-bifrost-isometric.png) Compare the top Envoy AI Gateway alternatives built for purpose-built LLM routing. Bifrost is the best choice for enterprises running mission-critical AI workloads that require best-in-class performance, scalability, and reliability. Rate limit errors accounted for roughly 60% of all LLM call failures observed in February 2026,](https://www.getmaxim.ai/articles/top-5-envoy-ai-gateway-alternatives-for-llm-routing/)

```json
{
    "@context": "https://schema.org",
    "@type": "Article",
    "publisher": {
        "@type": "Organization",
        "name": "Maxim Articles",
        "url": "https://www.getmaxim.ai/articles/",
        "logo": {
            "@type": "ImageObject",
            "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w256h256/2025/08/thumbnail.png",
            "width": 60,
            "height": 60
        }
    },
    "author": {
        "@type": "Person",
        "name": "Kuldeep Paul",
        "image": {
            "@type": "ImageObject",
            "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/2025/08/1727978381919.jpeg",
            "width": 800,
            "height": 800
        },
        "url": "https://www.getmaxim.ai/articles/author/kuldeep/",
        "sameAs": []
    },
    "headline": "Choosing an AI Gateway for Claude Code: Complete Guide",
    "url": "https://www.getmaxim.ai/articles/choosing-an-ai-gateway-for-claude-code-complete-guide/",
    "datePublished": "2026-10-02T03:36:00.000Z",
    "dateModified": "2026-10-19T05:37:30.000Z",
    "image": {
        "@type": "ImageObject",
        "url": "https://storage.ghost.io/c/84/03/8403f2f6-141c-411a-8f55-a32d4291533e/content/images/size/w1200/2026/09/choosing-an-ai-gateway-for-claude-code-complete-guide-bifrost-isometric.png",
        "width": 1200,
        "height": 675
    },
    "keywords": "AI Gateway",
    "description": "A guide to choosing an AI gateway for Claude Code: six evaluation criteria, per-developer budgets, the configuration, and the defaults Claude Code changes when ANTHROPIC_BASE_URL points at a gateway.",
    "mainEntityOfPage": "https://www.getmaxim.ai/articles/choosing-an-ai-gateway-for-claude-code-complete-guide/"
}
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Why does Claude Code need an AI gateway?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Claude Code talks only to Anthropic's API, so at team scale it lacks per-developer budgets, multi-provider failover, centralized observability, and an audit trail. An AI gateway sits between the CLI and any provider to add all four. Bifrost is purpose-built for this, as a drop-in proxy requiring no client-side code changes."
      }
    },
    {
      "@type": "Question",
      "name": "What should you evaluate in a Claude Code gateway?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Weigh six criteria: latency overhead per request, tool-call streaming compatibility, governance and budget enforcement, multi-provider abstraction, observability and audit trails, and deployment model. Tool-call streaming matters most, because Claude Code depends on it for file operations, and a gateway that mishandles it will break the agent."
      }
    },
    {
      "@type": "Question",
      "name": "Does an AI gateway slow Claude Code down?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Only if the gateway's runtime is slow. Claude Code makes rapid-fire API calls during agentic loops, so overhead compounds. Bifrost adds roughly 11 microseconds at 5,000 requests per second, which is imperceptible, whereas a heavier runtime can add milliseconds per call that accumulate across a session."
      }
    },
    {
      "@type": "Question",
      "name": "Can a gateway break Claude Code's tool calls?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, if it does not stream tool-call arguments the way Claude Code expects. Some gateways buffer or reformat streamed responses, which causes file operations to fail. Verify full Anthropic API compatibility, including streamed tool calls, before rollout. Bifrost's Claude Code integration preserves the streaming contract."
      }
    },
    {
      "@type": "Question",
      "name": "How do you enforce budgets for a Claude Code team?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Issue each developer a virtual key with its own budget and rate limit, then roll keys up under team and customer scopes. The gateway checks every request against all applicable budgets before forwarding it, so spend is capped in real time rather than discovered on the monthly invoice."
      }
    },
    {
      "@type": "Question",
      "name": "Should you use a managed or self-hosted gateway for Claude Code?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Managed gateways start faster but keep request data on the vendor's network and offer less control. Self-hosted gateways require operating the service but keep prompts and code inside your own infrastructure. For regulated teams, in-VPC deployment is usually the deciding factor, since Claude Code prompts often contain proprietary source code."
      }
    }
  ]
}
```
