fix[evals] remove braintrust api key requirement

Merged
CH
6mo ago
+205-11

why

what changed

test plan


Summary by cubic

Make Braintrust optional for evals. Evals run without a BRAINTRUST_API_KEY and skip sending logs, removing prior errors/warnings; behavior is unchanged when a key is set.

  • Bug Fixes
    • Added hasBraintrustApiKey() and made tracedSpan() a passthrough when no key.
    • Runner now passes noSendLogs: true to Eval and skips flush() without a key; sends logs and flushes when present.
    • AISdkClientWrapped uses the plain ai SDK unless braintrust can wrap it (key present), avoiding “Please specify an api key” and flush warnings.
    • Added tests covering both key-present and key-absent paths.