Octokraft uses AI models for semantic code analysis: understanding PR intent, finding issues that static analyzers miss, generating architecture reviews, detecting conventions, and creating documentation.
Model Slots
Octokraft uses four model slots that you can configure independently:
| Slot | Used For | Required |
|---|
| Large (OpenAI-compatible) | PR analysis, architecture reviews, health assessments | Yes |
| Small (OpenAI-compatible) | Convention detection, drift analysis, summarization | Yes |
| Large (Anthropic) | Optional override for specific tasks | No |
| Small (Anthropic) | Optional override for specific tasks | No |
Cloud Configuration
For cloud-hosted Octokraft, AI models are managed for you. No configuration is needed.
Per-Project Configuration (BYOK)
Each project can use its own AI model configuration. This is useful when you want to:
- Bring your own API keys to control costs and billing
- Choose specific models for cost or capability reasons
- Route through your own proxy (e.g., OpenRouter)
Configure per-project AI settings in Settings > AI & Analysis.
For each model slot, you can set:
| Field | Description |
|---|
| Provider | The model provider |
| Model | Specific model to use (e.g., gpt-4o, claude-sonnet-4-20250514) |
| API Key | Your API key for the provider |
| Base URL | Custom endpoint for OpenAI-compatible proxies |
Per-project settings override the platform defaults. If you clear a slot’s configuration, it falls back to the platform-managed model.
Supported Providers
Any OpenAI-compatible API works, including:
- OpenAI — GPT-4o, GPT-4o-mini, and others
- Anthropic — Claude Sonnet, Claude Haiku, and others
- OpenRouter — access to multiple providers through a single API
- Azure OpenAI — for Azure-hosted deployments
- AWS Bedrock — via an OpenAI-compatible gateway
- Self-hosted models — Ollama, vLLM, or any OpenAI-compatible server
Usage Tracking
Monitor AI token usage per project in Settings > AI & Analysis. The usage view shows total tokens consumed and a cost breakdown by model slot.
Best Practices
- Start with the defaults. The platform-managed models work well for most codebases.
- Use smaller models for lightweight tasks. Convention detection and summarization do not need the most capable model.
- Use the most capable models for deep analysis. PR analysis and architecture reviews benefit from stronger reasoning.
- Monitor usage and adjust. If costs are higher than expected, consider switching the small slot to a cheaper model.