Plugin Overview
Plugins provide middleware functionality in Bifrost:- PreHook: Intercept and modify requests before they reach providers
- PostHook: Modify responses after providers return
- Cross-cutting concerns: Rate limiting, caching, logging, monitoring
- Custom logic: Add functionality without modifying core Bifrost code
Basic Plugin Examples
Simple Logging Plugin
Rate Limiting Plugin
Response Caching Plugin
Learn More
For advanced plugin development and complete examples:- Plugin Architecture - Understanding plugin system design (essential for new plugin development)
- Plugin Development Guide - Step-by-step guide to building custom plugins
- Plugin Store - Ready-to-use community plugins
Using Plugins
Plugin Order: Plugins execute in the order they’re added. PreHooks run forward, PostHooks run in reverse order.