Bifrost
Bifrost is an LLM proxy that routes requests to multiple backends — Anthropic, OpenAI, Bedrock, Gemini, Ollama, and more — with routing rules, prompt cache optimisation, semantic caching, fallback chains, and cost tracking. WednesdayAI communicates with Bifrost as a single provider (bifrost) using an OpenAI-compatible API. Bifrost handles all model-specific logic internally.
Bifrost is self-hosted. You must run a Bifrost instance (locally or on your own infrastructure) before configuring WednesdayAI to use it.
Prerequisites
- A running Bifrost instance. See the Bifrost documentation for setup.
- Optionally, a Bifrost virtual key for authentication.
Quick setup
1. Start Bifrost
Follow the Bifrost setup guide to start your instance and note its base URL.2. Configure WednesdayAI
medium, fast, anthropic/claude-sonnet-4-6).
3. Manual config snippet
apiKey is the name of the environment variable, not the key value itself. Keep secrets in .env, not in committed config files.Model aliases vs direct model IDs
You can use either:- Routing aliases (
medium,fast) — Bifrost maps these to real models via its routing rules. - Direct model IDs (
anthropic/claude-sonnet-4-6) — bypasses routing and targets that model directly.
Provider settings
| Setting | Value |
|---|---|
| Provider ID | bifrost |
| API | OpenAI-compatible |
| Auth env var | BIFROST_API_KEY (optional) |
| Default timeout | 600 seconds |
Usage dashboard
When Bifrost is configured to forward response headers, WednesdayAI records both the configured alias and the actual backend provider/model per call:byProvidershows actual provider spend (e.g.anthropic: $0.42)byConfiguredModelshows spend by alias (e.g.medium: $0.42)
Caching
Bifrost’s prompt cache optimisation and semantic cache run on the Bifrost side. WednesdayAI does not sendcache_control markers to Bifrost — Bifrost’s CacheOptimizer analyses request structure autonomously.
Verification
Troubleshooting
Connection refused
Connection refused
Verify your Bifrost instance is running and the
baseUrl in your config matches its address and port.Agent stalls after first turn
Agent stalls after first turn
This is an upstream provider defect, not a WednesdayAI or Bifrost bug. Some backends (observed on Cloudflare- and Parasail-hosted vLLM endpoints) emit
finish_reason=tool_calls without the accompanying tool-call chunks.Fix: Exclude the offending upstreams at the Bifrost routing layer — pin routes to compliant backends (e.g. SiliconFlow) and exclude non-compliant ones (e.g. Cloudflare).401 Unauthorized
401 Unauthorized