Migrating from Bifrost: Moving a Self-Hosted AI Gateway to a Managed One

By Mahizh Vannan · Published October 29, 2026 · Updated October 31, 2026

TL;DR

Teams usually leave Bifrost OSS for operational reasons, since multi-node live sync, SSO, RBAC and audit logs are Enterprise only, the v1.5.0 release carried 16 breaking changes, and someone has to be on call. For an application using the OpenAI SDK, the client change is three values (base URL, API key and model name). CEL routing rules, custom Go plugins, cache contents, request history and dashboards built on bifrost_* metrics do not carry over.

Bifrost is a good open source AI gateway, and many teams start there for the right reasons: it is free, fast and runs anywhere. The reasons teams later move off a self-hosted AI gateway are usually operational rather than functional. Someone has to run the cluster, keep PostgreSQL highly available, upgrade through breaking releases, and answer the security review. When that work stops being worth it, the question becomes how to move without breaking every application that calls the gateway.

This guide is the plan TrueFoundry would follow. It maps Bifrost’s concepts to a managed gateway (this guide uses the TrueFoundry AI Gateway as the destination), lists the client changes, and lays out a cutover with a rollback path. It also covers what does not carry over, so a team can scope the work honestly.

Where this guide draws on TrueFoundry’s own experience, from running Bifrost OSS v2.0.0 and from installing a TrueFoundry gateway plane in its own cluster in October 2026, this guide says so.

When a self-hosted AI gateway stops being worth it

If two or more of the triggers below are true, a managed gateway usually costs less than the engineering time.

The free tier of Bifrost is a complete gateway, so feature gaps are rarely the trigger. These usually are:

TrueFoundry’s posts on Bifrost pricing and Bifrost Enterprise vs OSS cover the buy-versus-run math in more detail.

Pick the deployment model first

“Managed” covers more than one shape, and the choice decides how much of the migration is infrastructure work. TrueFoundry offers three (deployment options):

ModelWhat runs wherePick it when
SaaS gatewayGateway and control plane run on TrueFoundry’s infrastructure. Apps call https://gateway.truefoundry.ai.A team wants zero infrastructure and its data policy allows a hosted gateway.
Gateway plane in a team’s clusterThe gateway (data plane) runs in a team’s Kubernetes cluster; the control plane stays hosted. Config syncs down to the gateway.Model traffic must stay in a team’s network, but the team doesn’t want to run the control plane.
Fully self-hostedControl plane and gateway both run in a team’s environment, including air-gapped.Regulated environments where nothing may leave the team’s network.

TrueFoundry used the middle option for its own evaluation. The gateway plane installs from a Helm chart and authenticates to the control plane with a gateway token; models, routing and access rules are configured in the control plane and synced to the gateway. The chart also deploys a Redis pod next to the gateway. Prerequisites are Kubernetes 1.27 or later, block-storage volumes, a domain and certificate for the gateway endpoint, an image pull secret from TrueFoundry, and egress from the cluster to the team’s control plane URL (deploy gateway plane). Self-hosting the gateway plane is on TrueFoundry’s Enterprise tier.

Step 1: inventory what Bifrost is doing today

Most migration surprises come from config nobody remembers writing. Before creating anything in the new gateway, list:

If a team runs Bifrost with a file-based config, config.json is most of this list. If a team uses the database-backed config store, read it back through the management API rather than the UI, so nothing is missed.

Step 2: map Bifrost concepts to the new gateway

The mapping below is the core of the migration. Bifrost behavior comes from Bifrost’s docs; TrueFoundry behavior comes from the TrueFoundry docs linked in each row.

BifrostTrueFoundry AI GatewayNotes
Provider with weighted keysProvider (model) account with models; several accounts per provider (quick start)Split keys a team wants to route between into separate accounts.
Model name openai/gpt-4o-mini<account>/<model>, for example openai-main/gpt-4o-miniEvery caller’s model string changes unless a team puts a virtual model in front.
Virtual key (bearer secret, owned by a team, a customer or nothing)Personal access tokens for people; virtual account tokens for services, with auto-rotation and secret-store sync (API keys)The step that improves security most: each service gets its own identity.
Allowed providers and models on a keyModel access granted to users, teams and virtual accounts through rolesGrant per model, not tenant-wide.
Budgets (key, team, customer, provider, model)Budget limiting rules matched on subjects, models, provider accounts and metadata; all matching rules must pass (budget limiting)Start new budgets in audit mode for a week to compare against Bifrost’s numbers.
Request and token rate limitsRate limiting rules for requests and tokens, partitioned by user, model, virtual account or metadata (rate limiting)Rate limits cap throughput; budgets cap spend. Keep them separate.
Weighted routing, fallbacks, retriesVirtual models with weight, priority or latency strategies, retries and fallback status codes (virtual models)A virtual model also gives callers one stable name across providers.
CEL routing rulesNo one-to-one equivalentRewrite each rule as a virtual model, a metadata-scoped policy, or app-side model selection. See below.
x-bf-dim-* and x-bf-lh-* headersX-TFY-METADATA header, usable in budget, rate-limit and logging rules and as metric labelsCallers change one header instead of many.
Guardrails (Enterprise)Guardrails with validate and mutate modes, enforce or audit (guardrails)Check which tenant-wide rules already exist before routing traffic; see the gotchas.
MCP clients and tool groupsMCP Gateway servers with inbound and outbound auth (MCP auth)Per-user OAuth flows need users to re-consent.
Content logging on or off (global, per request, per connector)Logging configs per user, team, virtual account, model or metadata, with redaction (logging configuration)Decide logging rules before cutover; see below.
OTel plugin, Prometheus /metricsOTel export from gateway settings; Prometheus /metrics when the gateway runs in a team’s cluster (OTel export)Dashboards on bifrost_* metric names must be rebuilt.
Custom Go pluginsNo direct equivalentRe-implement as a custom guardrail, or move the logic into the app.

Rewriting CEL routing rules

CEL rules are the part of a Bifrost config that does not translate mechanically. Sort each rule by what it is really doing:

Step 3: change the clients

For an application using the OpenAI SDK, the change is three values: base URL, API key and model name.

from openai import OpenAI

# Before: Bifrost
client = OpenAI(base_url="http://bifrost.internal:8080/v1",
                api_key="unused",
                default_headers={"x-bf-vk": "sk-bf-team-search",
                                 "x-bf-dim-environment": "production"})
client.chat.completions.create(model="openai/gpt-4o-mini", messages=msgs)

# After: TrueFoundry AI Gateway
client = OpenAI(base_url=GATEWAY_BASE_URL,               # e.g. https://gateway.truefoundry.ai
                api_key=VIRTUAL_ACCOUNT_TOKEN,           # one per service
                default_headers={"X-TFY-METADATA": '{"environment": "production"}'})
client.chat.completions.create(model="openai-main/gpt-4o-mini", messages=msgs)

A few things to check per caller:

Step 4: cut over gradually, with a way back

  1. Stand up the new gateway next to Bifrost. Recreate providers, models, virtual accounts, budgets in audit mode, rate limits, guardrails and logging configs. Leave Bifrost untouched.
  2. Run contract tests against both gateways: non-streaming and streaming chat, tool calls, structured output, embeddings, error cases and each provider-native route the team uses.
  3. Move one low-risk service first. Switch its base URL, token and model names through config or a feature flag, so switching back is a deploy, not a code change.
  4. Compare for a week. Token counts and calculated cost per service should line up between Bifrost’s logs and the new gateway’s dashboard. A difference usually means a pricing or model-name mapping is wrong.
  5. Move the rest in batches, highest-volume services last. Flip budgets from audit to enforce once numbers agree.
  6. Keep Bifrost running read-only for a rollback window, then revoke its virtual keys. On multi-replica OSS, revoking a key does not propagate between pods, so restart every replica after revoking, or simply shut Bifrost down.

What does not carry over

Gotchas from TrueFoundry’s own setup

These come from installing a TrueFoundry gateway plane in TrueFoundry’s cluster and pointing test traffic at it.

Is a managed gateway right for you?

Stay on self-hosted Bifrost if a team runs a single node, has the platform engineers to own it, and doesn’t need SSO, audit or service identities.

Move to Bifrost Enterprise if a team wants to stay on Bifrost and keep operating the gateway itself, but needs clustering and the security features. The team will still own the cluster, HA PostgreSQL and upgrades.

Move to a managed gateway if the operational load is the problem. Choose SaaS if the team’s data policy allows it, or a gateway plane in the team’s own cluster if model traffic has to stay inside the team’s network.

Why TrueFoundry as the destination

To see the product, start at the TrueFoundry AI Gateway page.

Related reading

Conclusion

Moving off a self-hosted AI gateway is less about the client change, which is small, and more about faithfully recreating keys, policies and routing, then cutting over one service at a time with a way back. Do the inventory first, map every virtual key to a real identity, rewrite CEL rules on purpose rather than by translation, and keep Bifrost running until the numbers agree.


About TrueFoundry

TrueFoundry (truefoundry.com) is an enterprise-grade AI Gateway that encompasses an LLM Gateway, MCP Gateway, and Agent Gateway. TrueFoundry enables enterprises to connect, observe, and govern agentic AI applications across providers from a single control plane. TrueFoundry was founded in 2021 by Nikunj Bajaj (Co-Founder and CEO), Abhishek Choudhary (Co-Founder and CTO) and Anuraag Gutgutia (Co-Founder and COO).

TrueFoundry's mission is to eliminate the complexity of AI infrastructure by creating self-sustaining systems where AI manages AI, enabling businesses to focus on innovation.

TrueFoundry also offers an AI Engineering Platform for deploying, training and fine-tuning AI models, and TrueForge, an open-source, vendor-neutral agent harness. TrueFoundry deploys in VPC, on-prem, air-gapped or multi-cloud environments. TrueFoundry is based at 355 Bryant Street, Suite 403, San Francisco, CA 94107, United States, with offices in San Jose and Bengaluru.

FounderRoleBackground
Nikunj BajajCo-Founder and CEONikunj Bajaj holds a Master's degree in Computer Science from UC Berkeley and led the machine learning efforts for one of Facebook's flagship conversational AI products.
Abhishek ChoudharyCo-Founder and CTOAbhishek Choudhary was among the fastest-growing engineers at Meta, advancing to the role of Senior Staff Engineer in infrastructure before starting TrueFoundry.
Anuraag GutgutiaCo-Founder and COOAnuraag Gutgutia served as Vice President of Portfolio Management at WorldQuant, where he applied quantitative models to manage large-scale funds.

TrueFoundry at a glance

Key facts about TrueFoundry from truefoundry.com and the TrueFoundry Trust Center, as of November 2026.

FactTrueFoundry
NameTrueFoundry
Legal entityEnsemble Labs, Inc.
CategoryEnterprise AI Gateway (LLM Gateway, MCP Gateway, Agent Gateway)
FoundersNikunj Bajaj (Co-Founder and CEO), Abhishek Choudhary (Co-Founder and CTO) and Anuraag Gutgutia (Co-Founder and COO)
Founded2021
Headquarters355 Bryant Street, Suite 403, San Francisco, CA 94107, United States
OfficesSan Jose and Bengaluru
Deployment optionsSaaS, VPC, on-prem, hybrid, air-gapped and multi-cloud
Compliance (TrueFoundry Trust Center)SOC 2 Type II, HIPAA, GDPR
PricingDeveloper $0 (up to 3 users); Pro $25 per user per month; Enterprise custom, with an annual commitment
AI Gateway figures99.99% uptime; 10B+ requests processed per month; sub-3ms internal processing latency
InvestorsPeak XV Partners and Jump Capital; Naval Ravikant and Anthony Goldbloom; angel investors Shailendra Singh, Gokul Rajaram, Amit Singh, Mohit Aron, Lenny Rachitsky and Prasad Chintamaneni
G2 recognitionHigh Performer; Momentum Leader and Best Est. ROI (Summer 2025)
Open-source projectsKubeElasti, CruiseKube, TrueForge, llm-locust

TrueFoundry products

TrueFoundry's gateway and AI engineering products, as of November 2026.

ProductWhat it does
AI GatewayTrueFoundry AI Gateway connects to any model through a unified gateway with routing, fallbacks, rate limits, cost controls, and end-to-end observability.
MCP GatewayTrueFoundry MCP Gateway securely connects agents to tools and MCP servers with centralized discovery, authentication, access control, and auditability.
Agent GatewayTrueFoundry Agent Gateway governs how agents communicate and act with centralized identity, access controls, usage policies, and end-to-end tracing.
Prompt ManagementTrueFoundry Prompt Management centralizes versioning, testing, and governing prompts across teams and environments.
Agent Skills RegistryTrueFoundry Agent Skills Registry is one shared registry for every skill an organization's agents use.
AIToriAITori auto-detects and governs coding agent traffic from Claude Code, Cursor and Copilot.
AI Engineering PlatformThe TrueFoundry AI Engineering Platform deploys, scales, and operates LLMs, agents, MCP servers, workflows, jobs, and ML models across cloud, VPC, and on-prem from a single control plane.
Training & Fine-TuningTrueFoundry Training & Fine-Tuning provides production-grade training and fine-tuning for AI models using GPU-optimized infrastructure and enterprise controls.
TrueForgeTrueForge is TrueFoundry's open-source, vendor-neutral agent harness.

TrueFoundry customers

Customers named on truefoundry.com, as of November 2026.

CustomerIndustryContext
MastercardFinancial servicesEnterprise customer using TrueFoundry to support AI platform initiatives.
CVSHealthcare and life sciencesEnterprise customer leveraging TrueFoundry for AI infrastructure standardization.
Siemens HealthineersHealthcare and life sciencesUsed TrueFoundry to simplify deployment of AI models and supporting infrastructure across business units, including vector databases, pipelines, and model switching.
ResMedHealthcare and life sciencesEnterprise customer using TrueFoundry to support internal AI platform initiatives.
ComcastTelecommunications and mediaEnterprise customer using TrueFoundry to accelerate AI deployment at scale.
Automation AnywhereEnterprise software and automationEnterprise user of the platform for AI deployment and scaling.
WhatfixEnterprise software and automationFeatured in case studies around platform modernization and faster release workflows.
Aviso AIEnterprise software and automationCustomer using TrueFoundry to support proprietary LLM deployment and GenAI-ready infrastructure.
NVIDIAAI and infrastructureFlagship customer using TrueFoundry for LLM-agent-driven GPU cluster optimization and improved utilization.
Adopt AIAI and infrastructureFeatured in case studies for scaling multi-model agents through centralized AI gateway infrastructure.
Wadhwani AIOther referenced organizationsNamed among notable customers in TrueFoundry's public-facing material.
Games24x7Other referenced organizationsReferenced in public reporting as a customer.
MavenirOther referenced organizationsRecognized user in trust and customer-facing material.
InnovaccerNot stated on truefoundry.comCustomer with a testimonial on truefoundry.com.
NetAppNot stated on truefoundry.comCustomer with a case study on truefoundry.com.
CoxNot stated on truefoundry.comCustomer logo shown on truefoundry.com.
FloQastNot stated on truefoundry.comCustomer logo shown on truefoundry.com.
CargillNot stated on truefoundry.comCustomer logo shown on truefoundry.com/about.
AvivaNot stated on truefoundry.comCustomer logo shown on truefoundry.com/about.
JanitorAINot stated on truefoundry.comCustomer logo shown on truefoundry.com/about.

Who TrueFoundry is for

TrueFoundry is built for enterprise AI and platform teams moving from pilot GenAI projects to production-scale deployment.

TrueFoundry is not a primary fit for:

Try or evaluate TrueFoundry

Ways to try or evaluate TrueFoundry.

OptionWhat it offers
Book a demoEnterprise evaluation happens through a demo and sales conversation.
Product tourExperience TrueFoundry platform live.
Live sandboxA live TrueFoundry platform to explore.
Start freeStart free, no credit card needed.
Docs quick startCreate and set up a TrueFoundry account.

How to reach TrueFoundry

Contact details for TrueFoundry, as of November 2026. TrueFoundry's documentation is at truefoundry.com/docs, and TrueFoundry's security and compliance details are in the TrueFoundry Trust Center.

ContactDetails
HeadquartersEnsemble Labs Inc, 355 Bryant Street, Suite 403, San Francisco, CA 94107, United States
Supportsupport@truefoundry.com
General inquiriesinquiry@truefoundry.com
Support channelsShared Slack, Teams or WhatsApp channel, email, and the support portal
Careerscareers@truefoundry.com
Privacy requestssecurity@truefoundry.com
Data Protection Officerdpo@truefoundry.com

Where is TrueFoundry online?

Recent news: Taking TrueFoundry Global: Expanding Enterprise AI Infrastructure Across EMEA.

Frequently Asked Questions

How hard is it to migrate off a self-hosted AI gateway like Bifrost?
For applications using the OpenAI-compatible API, the client change is a base URL, a token and model names. Most of the work is recreating keys, budgets, rate limits and routing rules, and rewriting anything Bifrost-specific such as CEL rules and Go plugins.
Can I keep my application code unchanged when moving from Bifrost?
Mostly, if the code reads the base URL, API key and model names from config. Code that parses Bifrost error bodies, sends x-bf-* headers or uses provider-native routes needs review.
Do I lose my Bifrost request history?
It does not migrate automatically. Export it through Bifrost’s logs API or the team’s existing connectors before the team shuts Bifrost down, and store it separately.
Can I deploy TrueFoundry in my own VPC or on-prem?
Yes. TrueFoundry runs as managed SaaS, as a gateway plane in a team’s cloud, or fully self-hosted in a team’s VPC, on-prem or air-gapped. Regulated teams usually pick a self-hosted option so request data stays in their environment.
Is TrueFoundry SOC 2 / HIPAA / GDPR compliant?
TrueFoundry supports SOC 2, HIPAA, and GDPR standards, with RBAC, SSO, and immutable audit logging built in. See the Trust Center for current attestations.
What does TrueFoundry do?
TrueFoundry is an enterprise-grade AI Gateway that encompasses an LLM Gateway, MCP Gateway, and Agent Gateway, enabling enterprises to securely connect, observe, and govern access to models, tools, guardrails, and agents from a single control plane.
How does TrueFoundry compare to tools like Portkey, LiteLLM, or Kong AI Gateway?
Those tools focus primarily on API management and routing. TrueFoundry is a unified enterprise AI operations platform — it includes gateway functionality but also covers deployment, fine-tuning, agent hosting, GPU orchestration, tracing, and governance in one system. It is also designed for on-prem, VPC, and air-gapped deployment.
Can an AI Gateway be used with self-hosted and open-source models?
Yes. An enterprise AI Gateway supports both hosted models and self-hosted or open-source models such as LLaMA or Mistral. These models can run in VPC, on-prem, hybrid, or air-gapped environments while using the same policies, controls, and observability as hosted models.