Repository navigation
perf: defer provider SDK imports for static scans - #1164
Open
AdemVessell wants to merge 1 commit into
Open
AdemVessell wants to merge 1 commit into
AdemVessell wants to merge 1 commit into
Conversation
Load provider client modules only when LLM helpers need them. Keep pure sampling controls available to static provenance and retain existing chat_models control exports. Add fresh-process CLI regressions that reject provider SDK imports and preserve controls, disabled analyzer statuses, coverage and findings. Refs NVIDIA#865. AI assistance was used to investigate, implement and verify this change. Signed-off-by: Adem Vessell <ademvessell@gmail.com>
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.
Static
--no-llmscans still load the OpenAI and Anthropic SDKs and their adapters before the disabled LLM nodes return. This change defers those imports until LLM helpers need them and keeps sampling-control parsing available to static report provenance without importing chat clients. Analyzer registration and reporting behavior are unchanged. LangGraph startup remains outside this change. Refs #865.Four fresh-process CLI regressions block provider SDK imports while checking clean scans, configured controls, disabled analyzer statuses and static findings. Local baseline/candidate reports agree apart from timestamps and generated finding IDs.
Validation on macOS arm64 / Python 3.13: lint, formatting, wheel build and 238 static/mocked integration tests pass. The full unit selection produced 27,002 passes and 10 environment-related failures. All 10 reproduced on pristine main and passed on both trees after correcting only local path and Unix-socket conditions; the original full run was not all green. I did not run the complete
make testtarget because it includes live provider/agent checks that may incur charges. Live provider/agent behavior and cross-platform validation remain untested.AI assistance was used to investigate, implement and verify this contribution.