Repository navigation
fix: load trace threads for Mustache sections - #276
Open
anticipate218 wants to merge 3 commits into
Open
anticipate218 wants to merge 3 commits into
anticipate218 wants to merge 3 commits into
Conversation
This branch has not been deployed
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.
The JavaScript
LLMClassifierFromTemplateand PythonLLMClassifiercan skip loading a trace when the prompt only references a thread variable through a Mustache section, inverted section, or unescaped tag. For example,{{#user_messages}}{{content}}{{/user_messages}}can render an empty conversation, and an inverted section can incorrectly report that no users are present.Recognize the
#,^, and&prefixes, including whitespace after the prefix, in the existing thread-variable heuristic. Tests inspect the outgoing model request, exercise both Python sync and async calls, and preserve ordinary/triple-brace references, comment-only templates, and explicit render overrides. Python uses the override handling already merged in #271.Validation against main
b4d93fad00437818797d0c1ed757160a3f062fd2on Windows, with Python 3.13.5, Node 24.22.1, and pnpm 10.33.0:ListContainssucceeds.tsc --noEmitreports the same pre-existingjs/render-messages.test.ts:227index-signature error before and after the change.git diff --checkpass. The aggregate pre-commit entry could not initialize its Node environment because nodeenv cannot parse the current prerelease version it selects; its applicable checks were run separately. Local line-ending normalization was verified to preserve Git blob hashes.The locked development, scipy, and litellm dependencies were installed from the existing package cache after the initial download timed out. The optional documentation extra was not installed. No authenticated live-model evaluation, Linux/macOS run, or full Python-version matrix is claimed.
AI assistance: OpenAI Codex investigated the issue, prepared the changes and tests, and executed these checks. No independent human review is claimed.