← Back to Aider Integration
TROUBLESHOOTING GUIDE · HTTP 429 RESOLUTION

Fix Aider CLI “429 Rate Limit Exceeded” & TPM Exhaustion

How to resolve openai.RateLimitError, Tier 1 TPM throttles, and session aborts when pairing with Aider on large repositories.

Terminal Output:
openai.RateLimitError: Error code: 429 - { 'error': { 'message': 'Rate limit reached for requests per min (RPM) or tokens per min (TPM). Limit: 40000.000000 / min.' }}
Retrying in 20.0 seconds... (Session stalled)

Why Aider Hits 429 Errors So Quickly

1. Whole Repository Maps

Aider’s repo map summarizes hundreds of functions and classes into the context window on every turn, sending 40k+ tokens instantly.

2. Strict Per-Account Quotas

OpenAI and Anthropic enforce conservative Tier 1/2 TPM ceilings. Two sequential git diff requests breach the minute quota.

3. Flaky DeepSeek / Upstream Drops

Direct calls to budget providers often return “Server busy” 503s or timeout drops during peak European and US hours.

The 60-Second Fix: Newton's Multi-Supplier Edge Proxy

By pointing Aider's base URL to Newton's, your requests route through pooled enterprise capacity across qualified tier-4 providers. When one supplier is at peak load, Newton's transparently routes the git diff to alternate verified capacity in under 150ms.

Add to your shell profile (~/.zshrc or ~/.bashrc):
# Route Aider through Newton's edge with automatic 429 failover
export OPENAI_API_BASE="https://newtons.dev/api/v1"
export OPENAI_API_KEY="newt_your_key_here"

# Launch Aider on any repo with zero rate limits
aider --model openai/claude-sonnet-5-5

Bonus: 90% Savings With Native Prompt Caching

Because Aider repeatedly passes your project AST and git diff history, cache hit rates regularly surpass 85%. Newton's passes 100% of upstream cache discount savings directly through to your balance:

  • Claude 3.7 Sonnet: Cached input tokens are billed at $0.375/M (vs $3.00/M full price).
  • DeepSeek V3 / R1: Cached input tokens are billed at $0.07/M (vs $0.27/M full price).
  • GPT-4o: Cached prompt tokens automatically discount by 50% at $1.25/M.

Eliminate Aider 429 Errors Right Now

Create an unfunded account, load $5 prepaid credit, and connect your Aider CLI in under 60 seconds.

Get Newton's API Key →