Skip to content

Add multi-LLM provider support (OpenAI, Anthropic, Google, Ollama)#22

Merged
advaitpatel merged 5 commits intomainfrom
adding-multi-llm-model-support
Feb 23, 2026
Merged

Add multi-LLM provider support (OpenAI, Anthropic, Google, Ollama)#22
advaitpatel merged 5 commits intomainfrom
adding-multi-llm-model-support

Conversation

@advaitpatel
Copy link
Owner

@advaitpatel advaitpatel commented Feb 23, 2026

Summary

Add support for multiple LLM providers to DockSec, allowing users to choose between OpenAI, Anthropic Claude, Google Gemini, and Ollama (local models) for AI-powered security analysis.

Changes

Core Features

  • Multi-provider architecture: Support for 4 LLM providers (OpenAI, Anthropic, Google, Ollama)
  • New CLI flags: --provider and --model for runtime provider/model selection
  • Enhanced configuration: Environment variable support for all providers (LLM_PROVIDER, LLM_MODEL, ANTHROPIC_API_KEY, GOOGLE_API_KEY, OLLAMA_BASE_URL)
  • Optional dependencies: Provider packages are optional - install only what you need

Files Modified

  • requirements.txt - Added langchain-anthropic, langchain-google-genai, langchain-ollama
  • setup.py - Updated dependencies and version to 2026.2.23
  • config_manager.py - Multi-provider configuration with validation
  • utils.py - Rewritten get_llm() with optional provider imports
  • docksec.py - Added --provider and --model CLI arguments
  • README.md - Documentation for all providers with setup examples
  • docs/CHANGELOG.md - Release notes for v2026.2.23

Backward Compatibility

  • No breaking changes - OpenAI remains the default provider
  • Existing .env files work without modification
  • All existing commands work identically
  • Current users don't need to change anything

Usage Examples

Use default (OpenAI)

export OPENAI_API_KEY="your-key"
docksec Dockerfile
export ANTHROPIC_API_KEY="your-key"
docksec Dockerfile --provider anthropic --model claude-3-5-sonnet-20241022
export GOOGLE_API_KEY="your-key"
docksec Dockerfile --provider google --model gemini-1.5-pro
docksec Dockerfile --provider ollama --model llama3.1

Advait Patel added 5 commits February 23, 2026 01:09
## Summary

Add support for multiple LLM providers to DockSec, allowing users to choose between OpenAI, Anthropic Claude, Google Gemini, and Ollama (local models) for AI-powered security analysis.

## Changes

### Core Features
- **Multi-provider architecture**: Support for 4 LLM providers (OpenAI, Anthropic, Google, Ollama)
- **New CLI flags**: `--provider` and `--model` for runtime provider/model selection
- **Enhanced configuration**: Environment variable support for all providers (LLM_PROVIDER, LLM_MODEL, ANTHROPIC_API_KEY, GOOGLE_API_KEY, OLLAMA_BASE_URL)
- **Optional dependencies**: Provider packages are optional - install only what you need

### Files Modified
- `requirements.txt` - Added langchain-anthropic, langchain-google-genai, langchain-ollama
- `setup.py` - Updated dependencies and version to 2026.2.23
- `config_manager.py` - Multi-provider configuration with validation
- `utils.py` - Rewritten get_llm() with optional provider imports
- `docksec.py` - Added --provider and --model CLI arguments
- `README.md` - Documentation for all providers with setup examples
- `docs/CHANGELOG.md` - Release notes for v2026.2.23

## Backward Compatibility

✓ **No breaking changes** - OpenAI remains the default provider
✓ Existing `.env` files work without modification
✓ All existing commands work identically
✓ Current users don't need to change anything

## Usage Examples

### Use default (OpenAI)
export OPENAI_API_KEY="your-key"
docksec Dockerfile
Copy link
Owner Author

@advaitpatel advaitpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all tests are passed

@advaitpatel advaitpatel merged commit cad5892 into main Feb 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant