Skip to content

chore: reverts judge stripping behavior#1777

Open
andrewklatzke wants to merge 1 commit into
mainfrom
aklatzke/AIC-2848/revert-judge-stripping
Open

chore: reverts judge stripping behavior#1777
andrewklatzke wants to merge 1 commit into
mainfrom
aklatzke/AIC-2848/revert-judge-stripping

Conversation

@andrewklatzke

@andrewklatzke andrewklatzke commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

https://launchdarkly.atlassian.net/jira/software/c/projects/AIC/boards/2045?selectedIssue=AIC-2848

Describe the solution you've provided

This is a reversion of functionality that was added.

Describe alternatives you've considered

Reverts behavior from #1364 that stripped messages off of the judges and then re-created them.

Additional context

This was discussed and there are various concerns about this behavior. Since this is a semi-permanent solution once changes are applied on the server side we don't want to take this step yet.


Note

Medium Risk
Judge configs again expose full legacy message lists to callers, which can change runtime prompts versus the stripped behavior. The widened Runner.run signature is a public API change, though string-based call paths stay backward compatible.

Overview
Reverts judge message stripping from a prior change: stripLegacyJudgeMessages, reserved-variable re-injection for message_history / response_to_evaluate, and related warnings are removed. judgeConfig now returns flag-evaluated messages unchanged (including legacy {{message_history}} / {{response_to_evaluate}} template rows).

Extends the Runner protocol so run accepts string | LDMessage[]. String inputs keep the existing behavior (config messages prepended, multi-turn history updated). A pre-built LDMessage[] is sent to the provider as-is—no config merge and no history mutation—implemented in the OpenAI, LangChain, and Vercel model runners with matching tests.

Reviewed by Cursor Bugbot for commit 1d6223b. Bugbot is set up for automated code reviews on this repo. Configure here.

@andrewklatzke andrewklatzke requested a review from jsonbailey June 26, 2026 20:06
@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26365 bytes
Compressed size limit: 29000
Uncompressed size: 129044 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 38739 bytes
Compressed size limit: 39000
Uncompressed size: 212244 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179579 bytes
Compressed size limit: 200000
Uncompressed size: 831422 bytes

@github-actions

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 31978 bytes
Compressed size limit: 34000
Uncompressed size: 114243 bytes

@andrewklatzke andrewklatzke marked this pull request as ready for review July 6, 2026 17:44
@andrewklatzke andrewklatzke requested a review from a team as a code owner July 6, 2026 17:44
@joker23

joker23 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Should the agent runners also be updated (eg

export class OpenAIAgentRunner implements Runner {
) now that the base runner interface can take in string | LDMessage[]?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants