Applies to:
Summary
Issue: High-volume operations like backfill jobs produce spikes of401 authentication errors (invalid x-api-key) when using https://braintrustproxy.com/v1, with errors lasting 1-2 minutes before resolving automatically.
Cause: The current proxy gateway infrastructure has capacity constraints that trigger temporary rate limiting during high load, manifesting as 401 errors even though authentication is valid.
Resolution: Throttle concurrent requests during backfills or schedule them during off-peak hours until the new gateway is deployed.
Resolution Steps
If running backfill jobs
Step 1: Throttle request rate
Reduce concurrent requests to stay below gateway capacity limits.Step 2: Schedule during off-peak hours
Run backfills when customer traffic is lowest to reduce contention.Step 3: Implement retry logic
Handle transient401 errors with exponential backoff.