Applies to:
Summary
Issue: Code scorers in the Braintrust UI fail withReferenceError: handler is not defined when the scorer function uses any name other than handler.
Cause: The UI code scorer runtime requires the function to be named exactly handler.
Resolution: Rename your scorer function to handler.
Resolution Steps
For TypeScript code scorers
Step 1: Rename function to handler
Update your scorer function name tohandler:
For Python code scorers
Step 1: Rename function to handler
Update your scorer function name tohandler: