feat: implements template/raw methods for fetching configs#204
Open
andrewklatzke wants to merge 1 commit into
Open
feat: implements template/raw methods for fetching configs#204andrewklatzke wants to merge 1 commit into
andrewklatzke wants to merge 1 commit into
Conversation
jsonbailey
approved these changes
Jun 25, 2026
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
Related issues
https://launchdarkly.atlassian.net/jira/software/c/projects/AIC/boards/2045?selectedIssue=AIC-2843
Describe the solution you've provided
Implements three methods:
completion_config_templateagent_config_templatejudge_config_templateTo mirror the base names. Each of these retrieves the config without running the interpolation process.
Describe alternatives you've considered
Alternatively users can use the base
.variationmethod to retrieve the config, but then things like typing are foisted onto the consumer rather than the SDK itself. We're opting to add a method so that users still receive the niceties (tracker, types).Additional context
Add any other context about the pull request here.
Note
Low Risk
Additive SDK surface with default interpolation unchanged; behavior change is isolated to new template methods and optional
interpolate=Falsepaths.Overview
Adds
completion_config_template,agent_config_template, andjudge_config_templateonLDAIClientso callers get the same typed configs and trackers as the existing*_configAPIs, but with Mustache placeholders left unrendered in message content / instructions (including judge reserved{{message_history}}/{{response_to_evaluate}}when using the judge template path).Internal evaluation now accepts an
interpolateflag (default true) so__evaluateskipschevronrendering when false; the template methods call withvariables=Noneandinterpolate=False. Each template method emits a dedicated$ld:ai:usage:*-config-templatetrack event.New
test_config_template.pycovers placeholder preservation, parity with rendered configs, tracking, and defaults.Reviewed by Cursor Bugbot for commit 1c06d35. Bugbot is set up for automated code reviews on this repo. Configure here.