AI Providers
The tool supports multiple AI providers behind a unified interface. You can switch providers via configuration without changing your workflow.
Supported providers
openai– OpenAI Chat Completions-compatible modelsgemini– Google Geminianthropic– Anthropic Claudeollama– Local models via Ollamamock– Deterministic, no-network mock used by default
See src/Providers/* for exact options exposed by each provider implementation.
Selecting a provider
providers:
default: openai # or gemini | anthropic | ollama | mock
# Additional provider-specific keys may be needed (see source code)
Token budgeting
- Approximate token accounting: characters/4.
- Global cap via
context.diff_token_limitand per-file cap viacontext.per_file_token_cap. - Overflow strategy defaults to
trim; other strategies may be added over time.
Advanced Token Optimization
The system includes sophisticated token cost optimization capabilities that can reduce token usage by 30-50% for input and 40-60% for output:
- Semantic Chunking – Groups related code changes by context (classes, methods, etc.) via
enable_semantic_chunking - Diff Compression – Intelligently compresses diffs while maintaining semantic meaning via
enable_diff_compression - Similar Finding Consolidation – Aggregates similar issues across files via
consolidate_similar_findings - Per-file Limits – Controls review scope with
max_findings_per_fileto prevent overwhelming output - Severity Limits – Fine-tunes output with
severity_limitsto cap findings by severity level
Coding guidelines embedding
If guidelines_file is set in config, its contents are base64-embedded into the prompts for all providers. The system instructions direct the model to decode and apply them strictly during review.
