Skip to main content

Overview

Bifrost provides 100% compatible endpoints for OpenAI, Anthropic, and Gemini APIs, making it seamless to integrate with any agent that uses these providers. By simply pointing your agent’s base URL to Bifrost, you unlock powerful features like:
  • Universal Model Access: Use any provider/model configured in Bifrost with any agent (e.g., use GPT-5 with Claude Code, or Claude Sonnet 4.5 with Codex CLI)
  • MCP Tools Integration: All Model Context Protocol tools configured in Bifrost become available to your agents
  • Built-in Observability: Monitor all agent interactions in real-time through Bifrost’s logging dashboard
  • Load Balancing: Automatically distribute requests across multiple providers and regions
  • Advanced Features: Governance, caching, failover, and more - all transparent to your agent

Example Integrations

LibreChat

It is a modern, open-source chat client that supports multiple providers. Setup:
  1. Install LibreChat: There are multiple ways of local setup, please follow the LibreChat documentation for more details.
  2. Add Bifrost as a custom provider: Now that you have LibreChat installed, you can add Bifrost as a custom provider. Add the following to your librechat.yaml file:
    custom:
     - name: "Bifrost"
       apiKey: "dummy" # Add the authentication key if login is enabled, otherwise add a placeholder
       baseURL: "http://host.docker.internal:8080/v1" # Or localhost:8080 if running locally, or {your-bifrost-container}:8080 if running in the same docker network
       models:
         default: ["openai/gpt-4o"] # Replace with the model you want to use
         fetch: true
       titleConvo: true
       titleModel: "openai/gpt-4o" # Replace with the model you want to use for chat title generation
       summarize: false # Set to true if you want to enable chat summary generation
       summaryModel: "openai/gpt-4o" # Replace with the model you want to use for chat summary generation
       forcePrompt: false # Set to true if you want to enable force prompt generation
       modelDisplayLabel: "Bifrost" 
       iconURL: https://getbifrost.ai/bifrost-logo.png
    
    If you’re running LibreChat in a docker container, LibreChat does not automatically use the librechat.yaml file, please check the Step 1 of the LibreChat documentation for more details.
  3. Run LibreChat Now you can start using Bifrost as a provider in LibreChat, with all the features of Bifrost.

Claude Code

It brings Sonnet 4.5 directly to your terminal with powerful coding capabilities. Setup:
  1. Install Claude Code
    npm install -g @anthropic-ai/claude-code
    
  2. Configure Environment Variables
    export ANTHROPIC_API_KEY=dummy-key  # Handled by Bifrost (only set when using virtual keys)
    export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
    
  3. Run Claude Code
    claude
    
Now all Claude Code traffic flows through Bifrost, giving you access to any provider/model configured in your Bifrost setup, plus MCP tools and observability.
This setup automatically detects if you’re using Anthropic MAX account instead of a regular API key authentication :)

Codex CLI

It provides powerful code generation and completion capabilities. Setup:
  1. Install Codex CLI
    npm install -g @openai/codex
    
  2. Configure Environment Variables
    export OPENAI_API_KEY=dummy-key  # Handled by Bifrost (only set when using virtual keys)
    export OPENAI_BASE_URL=http://localhost:8080/openai
    
  3. Run Codex
    codex
    

Gemini CLI

It is Google’s powerful coding assistant with advanced reasoning capabilities. Setup:
  1. Install Gemini CLI
    npm install -g @google/gemini-cli
    
  2. Configure Environment Variables
    export GEMINI_API_KEY=dummy-key  # Handled by Bifrost (only set when using virtual keys)
    export GOOGLE_GEMINI_BASE_URL=http://localhost:8080/genai
    
  3. Run Gemini CLI
    gemini
    
  4. Select Use Gemini API Key in the CLI prompt for authentication.
Gemini CLI authentication

Qwen Code

It is Alibaba’s powerful coding assistant with advanced reasoning capabilities. Setup:
  1. Install Qwen Code
     npm install -g @qwen-code/qwen-code
    
  2. Configure Base URL
    export OPENAI_BASE_URL=http://localhost:8080/openai
    
  3. Run Qwen Code
    qwen
    

Opencode

opencode with Bifrost Setup
  1. Configure Bifrost
{
  "$schema": "https://opencode.ai/config.json",
  // Theme configuration
  "theme": "opencode",
  "autoupdate": true,
  "provider": {
    "openai": {
      "name": "Bifrost",
      "options": {        
        "baseURL": "http://localhost:8080/openai",
        "apiKey": "{{virtual-key-if-enabled}}"
      },
      "models": {
        "openai/gpt-5": {
          "options": {
            "reasoningEffort": "high",
            "textVerbosity": "low",
            "reasoningSummary": "auto",
            "include": [
              "reasoning.encrypted_content"
            ],
          },
        },
        "anthropic/claude-sonnet-4-5-20250929": {
          "options": {
            "thinking": {
              "type": "enabled",
              "budgetTokens": 16000,
            },
          },
        },
      },
    }
  }
}
  1. Select Bifrost models using ctrl+p
Opencode model selection

Editors

Zed editor

Zed editor
  1. Configure Bifrost provider.
   "language_models": {
        "openai_compatible": {
            "Bifrost": {
                "api_url": "{{bifrost-base-url}}/openai",
                "available_models": [
                    {
                        "name": "anthropic/claude-sonnet-4.5",
                        "max_tokens": 200000,
                        "max_output_tokens": 4096,
                        "capabilities": {
                            "tools": true,
                            "images": true,
                            "parallel_tool_calls": true,
                            "prompt_cache_key": false
                        }
                    },
                    {
                        "name": "openai/gpt-4o",
                        "max_tokens": 128000,
                        "max_output_tokens": 4096,
                        "capabilities": {
                            "tools": true,
                            "images": true,
                            "parallel_tool_calls": true,
                            "prompt_cache_key": false
                        }
                    },
                    {
                        "name": "openai/gpt-5",
                        "max_tokens": 256000,
                        "max_output_tokens": 4096,
                        "capabilities": {
                            "tools": true,
                            "images": true,
                            "parallel_tool_calls": true,
                            "prompt_cache_key": false
                        }
                    }
                ]
            }
        }
    }
  1. Reload workspace to make sure Zed editor recognizes and reloads the provider list.

Configuration

Agent integrations work with your existing Bifrost configuration. Ensure you have:

Monitoring Agent Traffic

All agent interactions are automatically logged and can be monitored at http://localhost:8080/logs. You can filter by provider, model, or search through conversation content to track your agents’ performance. Agent Monitoring For complete monitoring capabilities, see Built-in Observability.

MCP Tools Integration

Bifrost automatically sends all configured MCP tools to your agents. This means your agents can access filesystem operations, database queries, web search, and more without any additional configuration.
Important: MCP Tool Execution BehaviorWhen using Bifrost as a gateway, MCP tool calls require manual approval and execution for security reasons. Bifrost returns the tool call information but doesn’t automatically execute it. You need to handle the approval and execution logic by calling the v1/mcp/tool/execute endpoint.Gateway-on-Gateway Limitations: If your agent/editor (like Zed) has its own gateway that routes through Bifrost, the agent’s gateway may not handle MCP tool approvals that come from Bifrost. In such cases, we recommend configuring MCP tools directly in your agent/editor instead of relying on Bifrost’s MCP integration.We intentionally avoid supporting “gateway-on-gateway” MCP setups because handling tool approvals across multiple gateways introduces unnecessary complexity and falls outside the scope of what an LLM gateway should manage. While we’re working on an agentic mode that will allow Bifrost to automatically execute certain tool calls, the current design prioritizes security and clear responsibility boundaries.
For setup and available tools, see MCP Integration.

Next Steps