Core Concepts
Understand how Bifrost works.
Execution Layer
Bifrost is an intelligent AI execution layer. It sits between your application and AI model providers. When your application sends a request, Bifrost understands it, optimizes it, selects the best route, executes it, validates the response, and recovers from failures automatically.
bifrost/auto
Use "bifrost/auto" as the model ID to let Bifrost automatically select the optimal model and provider. The routing engine considers capability, cost, latency, health, and quota to make the decision.
Routing Engine
Every routing decision is explainable. Bifrost scores candidates on multiple factors:
Optimization
Bifrost compresses prompts, deduplicates tool output, and uses semantic caching to reduce token usage. Compression preserves intent, constraints, and required context.
Reliability
When a provider fails, Bifrost automatically retries, fails over to another provider, and opens a circuit breaker to prevent repeated failures. Your application stays up.
OpenAI Compatible
Bifrost is a drop-in replacement for OpenAI. Use any OpenAI-compatible SDK, client, or framework. Just point the base URL to Bifrost.