Best Cheap Coding Models via OpenRouter | Generated by AI

Home 2025.11

Best Cheap Models for Coding with Codex CLI via OpenRouter

Based on recent benchmarks, user discussions, and model rankings as of 2025, here are some of the best and most affordable alternatives to GPT-5-Codex for coding tasks in Codex CLI. GPT-5-Codex is indeed pricey (often in the $20-50 input / $60-150 output per million tokens range, depending on the provider), so these focus on cost-effective options with strong coding performance. OpenRouter’s pay-per-use model means you only pay for tokens processed, and many have free tiers or very low rates (under $1 per million tokens combined for input/output).

I’ve prioritized models with high scores on coding benchmarks like SWE-Bench, HumanEval, or Aider, while being cheap or free. Model IDs are formatted for easy use in your config.toml (e.g., model = "provider/model-name"). For exact current pricing, check OpenRouter’s models page, as rates can fluctuate slightly.

Top Recommendations:

These models are OpenAI-compatible, so they’ll work seamlessly in Codex CLI after setting the provider as “openrouter” and your API key. Start with free ones like Grok Code Fast or Kat Coder to test. For coding-specific use, look at SWE-Bench scores—higher means better at solving real GitHub issues. If you need more context or speed, combine with OpenRouter’s routing for auto-fallback to cheaper models.

To integrate: In your config.toml, add a profile like [profiles cheap-coder] with model_provider = "openrouter" and model = "one-of-the-IDs-above".

Top AI Models on OpenRouter 2025: Performance vs Cost Guide
Best Budget Coding LLMs 2025: DeepSeek R1 vs Gemini vs GPT
What are the best LLMs available on OpenRouter to use for coding
Best Free AI Models You Can Use on OpenRouter
Top AI Coding Models in 2025
LLM Rankings - OpenRouter
Top 5 AI Coding Models of March 2025
Models - OpenRouter
whats the best coding model on openrouter? - Reddit


Back

x-ai/grok-4-fast

Donate