braintrust and openai packages.
wrapOpenAI to automatically trace requests made through Cloudflare AI Gateway. Configure your client to use Cloudflare’s unified API endpoint, and Braintrust will capture all requests, responses, and metrics.
.env
Switching providers
Cloudflare AI Gateway’s unified API allows you to easily switch between different AI providers by changing themodel parameter and corresponding API key. All requests are automatically traced by Braintrust regardless of which provider you use.