chore: circumvents judge_config calls to make judge evaluations in optimization#197
Merged
andrewklatzke merged 1 commit intoJun 2, 2026
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 806b564. Configure here.
806b564
into
aklatzke/AIC-2599/sdk-field-additions
7 checks passed
3 tasks
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.

Requirements
Describe the solution you've provided
Updates the judges to fetch from
.variationdirectly so we can avoid the warning stemming from the judge_config call when we're using our own history. Additionally, if we receive a message that is just asystemmessage (new format) we'll just auto-append our user message with that data.Describe alternatives you've considered
This is a fix/chore stemming from some updates to the base SDK.
Note
Medium Risk
Changes how judge prompts are resolved for optimization runs (private SDK client access and custom interpolation); behavior should match intent but diverges from the public judge_config contract if flag shape or SDK rules differ.
Overview
Config judges in optimization no longer go through
LDAIClient.judge_config._judge_confignow reads the judge flag via_client.variation, applies local{{key}}interpolation (includingmessage_historyandresponse_to_evaluate), and buildsAIJudgeConfigitself so the SDK does not strip or warn on those reserved variables.New-style judge templates that only define a system message get an automatic user turn built from optimization history and the response under test, so downstream
_evaluate_config_judgestill sees a full system/user conversation.Tests mock raw flag variations instead of
judge_config, and add coverage for system-only templates and template interpolation.Reviewed by Cursor Bugbot for commit 806b564. Bugbot is set up for automated code reviews on this repo. Configure here.