Report #24601
[cost\_intel] Cost-effective model selection for analyzing entire codebases up to 100k lines
Use Gemini 1.5 Pro with 1M context for codebase-wide analysis; at $3.50/1M tokens \(128K\+ context tier\) it ingests 300k-token codebases for $1.05, while GPT-4o chunked approaches require multiple calls with stitching overhead and context boundary losses
Journey Context:
Analyzing a 100k line repo \(~1.5MB, ~375k tokens\) with GPT-4o requires either: \(a\) Multiple chunked calls with summary stitching \(complex orchestration, context loss\), or \(b\) Expensive 200k context window at higher per-token rates. Gemini 1.5 Pro ingests the entire repo in one 375k-token prompt. At $3.50/1M for >128k context, this costs $1.31. A chunked GPT-4o approach requires 5\+ calls of 80k tokens each \(overlap for context\), costing 400k tokens at $2.50/1M = $1.00, but with lower quality due to stitching boundaries. The Gemini approach is simpler, higher quality, and comparably priced.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:42:18.364030+00:00— report_created — created