chore: remove deprecated AI Explain surface from llm package - #178
Draft
pasiunaite wants to merge 1 commit into
Draft
chore: remove deprecated AI Explain surface from llm package#178pasiunaite wants to merge 1 commit into
pasiunaite wants to merge 1 commit into
Conversation
Agent Fix returns an explanation per fix and code-client-go passes it through on AutofixUnifiedDiffSuggestion.Explanation, so the AI Explain client is no longer needed by any consumer. Removes ExplainWithOptions, Explain, runExplain, explainRequestBody, prepareDiffs, ExplainOptions, Explanations and the request/response types, along with the SnykLLMBindings interface and its panicking PublishIssues, which only existed to model the LLM/explain era. OutputFormat and WithOutputFormat are kept: they are inert now, but consumers still pass them and dropping them would force a simultaneous change on their side.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Description
Follow-up cleanup to #150. Agent Fix populates
explanationon every fix it returns and the client passes it through onAutofixUnifiedDiffSuggestion.Explanation, so the AI Explain client in thellmpackage has no remaining purpose.Removed:
ExplainWithOptions,Explain,ExplainResult,AIRequestrunExplain,explainRequestBody,prepareDiffs,getOrderedResponse,defaultEndpointURLExplainOptions,Explanations,explainResponse,explainVulnerabilityRequest,explainFixRequest,explanationLengthand itsSHORT/MEDIUM/LONGconstantsSnykLLMBindingsinterface and itsPublishIssues, which panicked withimplement meand only existed to model the LLM/explain erabinding_smoke_test.go, which only exercisedExplainDeepCodeLLMBindingis now justGetAutofixDiffs+SubmitAutofixFeedback.OutputFormat, its constants andWithOutputFormatare deliberately kept. They no longer affect behaviour, butsnyk-lsandremy-cli-extensionstill passllm.WithOutputFormat(llm.HTML), and removing them would force a simultaneous change in both. They can go in a later pass once consumers drop the option.Blocked on
Do not merge until snyk-ls has removed its AI Explain path (IDE-2487).
snyk-lsmain is the only remaining consumer, atinfrastructure/code/ai_fix_handler.go(EnrichWithExplaincallingExplainWithOptions). An org-wide code search forExplainWithOptionsandllm.ExplainOptionsreturns that single call site and nothing else.This is a breaking change to a
v1module, so it also needs a call on how to release it — every consumer is first-party, so a minor bump may be acceptable, but that is worth an explicit decision rather than an assumption.Checklist
gofmt,golangci-lint(0 issues),go build ./...,go vet ./llm/...andgo test ./...all pass.go mod tidyproduces no drift. No generated mocks reference the removed interfaces.