Repository navigation
v1.3.0 - AI Batching
New Feature: AI Batching
Batch multiple days into single AI API calls for improved performance and reduced costs.
What's New
- Batch Processing: AI now processes multiple days per API call (default: 10 days per batch)
- A 30-day analysis now requires only 3 API calls instead of 30
- Configurable via
batch_sizeoption orCODEMETRY_AI_BATCH_SIZEenv variable
Configuration
'ai' => [
'batch_size' => env('CODEMETRY_AI_BATCH_SIZE', 10),
],Benefits
- Fewer API calls: Reduces API round-trips significantly
- Lower latency: Faster analysis completion
- Cost efficiency: Batch requests are more token-efficient
Graceful Failure
If a batch fails, Codemetry marks remaining days with the ai_unavailable confounder and continues without AI for those days.
Documentation
Updated website documentation with batching instructions: