Bifrost CLI — Run Claude Code with Any AI Model
Enterprise AI gateway that lets Claude Code use any LLM provider. Bifrost routes requests to OpenAI, Gemini, Bedrock, Groq, and 20+ providers with automatic failover.
Staging sûr pour cet actif
Cet actif est d'abord staged. Le prompt copié demande à l'agent d'inspecter les fichiers staged avant d'activer scripts, config MCP ou config globale.
npx -y tokrepo@latest install 7ce62a2f-42dd-477a-b23f-3d275f01aa6c --target codexStage les fichiers d'abord; l'activation exige la revue du README et du plan staged.
What it is
Bifrost CLI is an enterprise AI gateway that provides a unified OpenAI-compatible API across 20+ AI providers and 1,000+ models. The CLI component lets developers run Claude Code, Codex CLI, Gemini CLI, and other coding agents with any model from any provider through a single endpoint.
Bifrost is designed for teams that want provider flexibility without rewriting integration code. It handles routing, failover, and load balancing across providers while exposing a standard API that coding agents already understand.
How it saves time or tokens
Without Bifrost, switching between AI providers requires changing API endpoints, authentication, and request formats in your tooling configuration. Bifrost normalizes all providers behind one endpoint, so you switch models by changing a single parameter. Automatic failover means if one provider is down, requests route to the next available provider without manual intervention. This reduces both downtime and the operational overhead of managing multiple AI integrations.
How to use
- Install Bifrost:
npx -y @maximhq/bifrost. - Connect to Claude Code:
claude mcp add --transport http bifrost http://localhost:8080/mcp. - Configure providers in the Bifrost settings (API keys, model preferences, failover rules).
- Use Claude Code as normal -- Bifrost routes requests to your chosen provider.
Example
# Install and start Bifrost
npx -y @maximhq/bifrost
# Or run via Docker
docker run -p 8080:8080 maximhq/bifrost
# Connect Claude Code to Bifrost
claude mcp add --transport http bifrost http://localhost:8080/mcp
# Now Claude Code requests route through Bifrost
# to any configured provider (OpenAI, Gemini, Groq, etc.)
Related on TokRepo
- AI gateway providers -- compare AI gateway solutions on TokRepo.
- AI tools for coding -- explore coding assistants and developer tools.
Common pitfalls
- Not all models support the same features. Switching from Claude to a smaller model may lose tool-use or long-context capabilities. Verify model capabilities before routing production traffic.
- Bifrost adds a network hop between your agent and the provider. For latency-sensitive applications, measure the overhead.
- API key management across 20+ providers requires careful secrets handling. Use environment variables or a secrets manager rather than hardcoding keys in configuration.
Questions fréquentes
Bifrost supports 20+ providers including OpenAI, Google Gemini, AWS Bedrock, Groq, Anthropic, Azure OpenAI, Together AI, Fireworks, and more. New providers are added regularly. Each provider is accessed through the same unified API endpoint.
Yes. Bifrost integrates with Claude Code via MCP (Model Context Protocol). After connecting, Claude Code sends requests through Bifrost which routes them to your chosen provider. This lets Claude Code use models from any supported provider.
Bifrost CLI is available for local development use. Enterprise features like team management, analytics, and SLA-backed failover may have separate pricing. Check the official documentation for current pricing details.
When a provider returns an error or times out, Bifrost automatically retries the request with the next provider in your configured failover chain. This happens transparently -- your application code does not need to handle provider-specific errors.
Yes. Bifrost exposes an OpenAI-compatible API, so any tool that works with the OpenAI API format can connect to Bifrost. This includes Codex CLI, Gemini CLI, Cursor, and custom applications using the OpenAI SDK.
Sources citées (3)
- Bifrost GitHub— Bifrost provides unified API access across 20+ AI providers
- Anthropic MCP Documentation— MCP (Model Context Protocol) for AI tool integration
- OpenAI API Reference— OpenAI-compatible API format as an industry standard
En lien sur TokRepo
Source et remerciements
Created by Maxim. Licensed under Apache 2.0.
maximhq/bifrost — 3.6k+ stars
Fil de discussion
Actifs similaires
Claudable — Web Builder Powered by Local CLI Agents
Claudable is an open-source web builder that leverages local CLI agents (Claude Code, Codex, Gemini) with a repo-first quick start (3,951★).
Claude Code MCP — Run Claude as Agent-in-Agent
MCP server that runs Claude Code CLI in one-shot mode inside other AI tools. Enables Cursor, Windsurf, and Claude Desktop to delegate complex tasks to Claude Code. 1.2K+ stars, MIT.
LLxprt Code — Multi-Provider AI Coding CLI
LLxprt Code is an open-source AI coding CLI that switches across providers (Anthropic, Gemini, Codex, local). Install via brew or npm.
Maestro — Multi-Agent Orchestration for Coding CLIs
Maestro is an Apache-2.0 multi-agent orchestrator with 39 specialists for Gemini CLI, Claude Code, Codex, and Qwen Code, plus review/debug entrypoints.