feat(ai): add Google Gemini provider + improved error handling#166
Open
sivaangayarkanni wants to merge 2 commits into
Open
feat(ai): add Google Gemini provider + improved error handling#166sivaangayarkanni wants to merge 2 commits into
sivaangayarkanni wants to merge 2 commits into
Conversation
Add complete Google Gemini API integration as a new LLM provider: - Implement GeminiProvider with HTTP-based API client - Add comprehensive test suite with 7 test cases - Update provider factory to support gemini provider - Support configurable model, temperature, and max tokens - Default to gemini-1.5-flash model feat(bpf): add enhanced error handling with contextual hints Add LoadError type and classification utilities: - WrapLoadError() for enriching errors with context - classifyLoadError() with 11+ error pattern mappings - Helper functions: IsPermissionError, IsBTFError, IsVerifierError - Actionable user-facing fix hints for common BPF load failures - Complete test coverage with 20+ test cases feat(ai): enhance correlation analysis with new patterns Add 3 new correlation patterns to fallback analyzer: - Memory + cgroup memory detection - Scheduler + syscall correlation - TCP + memory buffer exhaustion detection Signed-off-by: Sivaangayarkanni <siva.21.baba@gmail.com>
1abef82 to
37702d6
Compare
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.
What
Added Google Gemini as a new AI provider, introduced 3 new AI correlation patterns, and improved error handling with a structured
LoadErrortype and helper functions.Why
Fixes #165
How
gemini.goandgemini_test.gowith pure HTTP integration (no SDK).fallback.gowith 3 new correlation patterns.errors.gowithLoadErrortype + helper functions (IsPermissionError,IsBTFError,IsVerifierError).Testing
go build ./...passesgo test ./...passesgo vet ./...passesgolangci-lint run ./...passessudo ./bin/kerno doctor --aisudo ./bin/bpf-verify --read 5sconfirms 6/6 programs still load./scripts/verify.shpasses (or specific phase:./scripts/verify.sh quality)Checklist
feat(ai): add Google Gemini provider + improved error handling)git commit -s)scripts/verify.sh