Strip nulls from remote eval prompt parameter defaults#508
Merged
ekeith (evanmkeith) merged 1 commit intoJun 12, 2026
Conversation
## Summary Fix Python remote eval prompt parameter defaults that include explicit `None` / JSON `null` values from `PromptData.as_dict()`. `PromptData.as_dict()` currently preserves optional prompt fields like `tools`, `name`, `function_call`, and `tool_calls` as `None`. When these values are used as a `type: "prompt"` parameter default, the remote eval manifest contains explicit `null`s. The playground schema expects these fields to be omitted when unset, so the remote eval can fail to appear or fail to parse. This strips `None` values recursively only when serializing prompt parameter defaults, leaving the generic `PromptData.as_dict()` behavior unchanged. ## Test Plan - Add/updated Python parameter serialization test covering a `PromptData` prompt default with unset optional fields. - Verify serialized remote eval parameter container omits `tools`, `name`, `function_call`, and `tool_calls` when unset. - Manually verify `bt eval <repro>.py --dev` lists the remote eval in the playground.
john (j13huang)
approved these changes
Jun 12, 2026
john (j13huang)
left a comment
Contributor
There was a problem hiding this comment.
Okay, after mucking around a little bit, this looks pretty good. Thanks Evan. I made some frontend changes to support the null-fields format as well https://github.com/braintrustdata/braintrust/pull/15672
(For posterity, I explored some other serialization changes for SerializableDataClass but it's probably overkill 60ae807)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Python remote eval prompt parameter defaults that include explicit
None/ JSONnullvalues fromPromptData.as_dict().PromptData.as_dict()currently preserves optional prompt fields liketools,name,function_call, andtool_callsasNone. When these values are used as atype: "prompt"parameter default, the remote eval manifest contains explicitnulls. The playground schema expects these fields to be omitted when unset, so the remote eval can failto appear or fail to parse.
This strips
Nonevalues recursively only when serializing prompt parameter defaults, leaving the genericPromptData.as_dict()behavior unchanged.Test Plan
PromptDataprompt default with unset optional fields.tools,name,function_call, andtool_callswhen unset.bt eval <repro>.py --devlists the remote eval in the playground.