Repository navigation
Conversation
ctawiah
added this pull request to stack #960
October 23, 2026 00:16
This was referenced Oct 23, 2026
ctawiah
marked this pull request as ready for review
October 23, 2026 14:06
ctawiah
requested review from
nkester-ld and
wchieng
and removed request for
a team
October 23, 2026 14:07
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.
Context
LaunchDarkly can return one attached tool in two forms. The response has a top-level
toolsreference and an expandedmodel.parameters.toolsvalue.ldcli treated the expanded copy as a model setting. The plan reported a model change and a pull wrote the expanded tool into the local file.
What changes
The review output now changes as follows:
Design notes
CanonicalModelremoves only the API-expandedmodel.parameters.toolsvalue, and only when the variation has tool references. A legitimatemodel.parameters.skillsvalue remains.toolsmodel parameter remains unchanged when the variation has no tool attachment.Review focus
Verification
go test ./...go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.9.0 runmake buildTestPromptDiffExcludesExpandedToolsFromModelParametersfailed onmainand passes with this change.TestCatalogClientConfigRemovesExpandedToolsFromModelParametersandTestFingerprintVariationExcludesExpandedToolParametersmake sure that amodel.parameters.skillsvalue stays in the decoded model and changes the fingerprint.Related changes
This stack builds on #937 to #941, which are merged.
ctawiah/fix-prompt-tool-diff-5b1c)ctawiah/plan-referenced-attachments-1e8a)ctawiah/keep-unused-attachments-1e8a)ctawiah/add-attachments-1e8a)ctawiah/route-scopes-1e8a)ctawiah/scope-commands-1e8a)ctawiah/create-attachments-1e8a)ctawiah/create-attachment-flags-1e8a)ctawiah/share-variation-selection-1e8a)ctawiah/create-variations-1e8a)ctawiah/create-variation-flags-1e8a)Note
Overview
LaunchDarkly can echo attached tools both as top-level
toolsrefs and as expandedmodel.parameters.tools. ldcli was treating that duplicate as a real model change, so sync plans, diffs, fingerprints, and pulls could show or persist bogus model updates.This PR introduces shared
CanonicalModelnormalization that drops API-expandedparameters.toolswhen the variation has tool references (while keeping other parameters, includingparameters.skills, and still stripping emptycustom/parametersmaps). It runs when decoding catalog config responses, when computing variation fingerprints, and when building prompt diff JSON—so planning, review output, and apply paths agree.User-visible effect: a pull/diff that only differs in instructions no longer reports “model changed” just because the server returned expanded tool definitions; real parameter changes (e.g. temperature) still surface. Regression tests cover API decode, fingerprints, plan diffs, and end-to-end prompt sync/apply.
Reviewed by Cursor Bugbot for commit cd1cd8e. Bugbot is set up for automated code reviews on this repo. Configure here.