Commit 6efda04
fix: eval parameters omit null description (#613)
## Summary
Remote eval dev mode (`braintrust eval <file> --dev`) hid **all** evals
in the playground UI when any eval declared a parameter without a
`description`.
All three branches of `serialize_eval_parameters` (prompt, model, data)
emitted `"description": null` when unset. The playground's zod schema
only accepts a string or an absent key, and it validates the whole
`/list` response in one
`safeParse` — so one description-less parameter hid every eval on the
endpoint.
Fix: include `description` only when it's not `None`, same as `default`
already is. #508 fixed this pattern for prompt defaults; `description`
was missed.
## Test
With proposed change the remote eval is detected:
<img width="457" height="291" alt="Screenshot 2026-07-22 at 2 13 25 PM"
src="https://github.com/user-attachments/assets/ade8ce11-2843-4b25-a291-dc6a447671e0"
/>
Same remote eval running in 0.30.1 is not detected:
<img width="1746" height="600" alt="image"
src="https://github.com/user-attachments/assets/47409355-fcf2-4c29-8de9-1aeaa6b99099"
/>
---------
Co-authored-by: Abhijeet Prasad <abhijeet@braintrustdata.com>1 parent 079699a commit 6efda04
2 files changed
Lines changed: 59 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
424 | 425 | | |
425 | 426 | | |
426 | 427 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
431 | 434 | | |
432 | 435 | | |
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
440 | 445 | | |
441 | 446 | | |
442 | 447 | | |
| |||
448 | 453 | | |
449 | 454 | | |
450 | 455 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
635 | 635 | | |
636 | 636 | | |
637 | 637 | | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
0 commit comments