Best Models for Coding

    Frontier and open-weight models for code generation, review, and agentic coding — compared by price and context window

    Compare
    Use Case
    Lounge Plan
    Capabilities
    Provider
    Status
    Input Price ($/M tokens)
    Output Price ($/M tokens)
    Context Size (tokens)
    42/337
    Models
    37/58
    Providers
    33
    Vision Models (filtered)
    40
    Tool-enabled (filtered)
    0
    Free Models (filtered)
    261 provider offers · page 4 of 6
    Features
    Z AI
    glm-5.2
    $1.40$4.40$0.26
    Moonshot AI
    kimi-k2.7-code-highspeed
    $1.90$8.00$0.38
    Tencent Cloud
    kimi-k2.7-code-highspeed
    $1.90$8.00$0.38
    Alibaba Cloud
    kimi-k2.7-code
    $0.95$4.00$0.19
    Alibaba Cloud(ap-tokyo)
    kimi-k2.7-code
    $0.89$3.71$0.18
    Alibaba Cloud(cn-beijing)
    kimi-k2.7-code
    $0.89$3.71$0.18
    Alibaba Cloud(eu-frankfurt)
    kimi-k2.7-code
    $0.89$3.71$0.18
    Alibaba Cloud(singapore)
    kimi-k2.7-code
    $0.95$4.00$0.19
    Alibaba Cloud(us-virginia)
    kimi-k2.7-code
    $0.89$3.71$0.18
    Moonshot AI
    kimi-k2.7-code
    $0.95$4.00$0.19
    NovitaAI
    kimi-k2.7-code
    $0.95$4.00$0.19
    SCX.ai
    kimi-k2.7-code
    $0.74$3.08$0.14
    Tencent Cloud
    kimi-k2.7-code
    $0.95$4.00$0.19
    Anthropic
    claude-fable-5Plus: needs a Lounge Plus or Pro membership
    $10.00$50.00$1.00
    AWS Bedrock
    claude-fable-5Plus: needs a Lounge Plus or Pro membership
    $10.00$50.00$1.00
    AWS Bedrock(global)
    claude-fable-5Plus: needs a Lounge Plus or Pro membership
    $10.00$50.00$1.00
    AWS Bedrock(us)
    claude-fable-5Plus: needs a Lounge Plus or Pro membership
    $11.00$55.00$1.10
    Azure Anthropic
    claude-fable-5Plus: needs a Lounge Plus or Pro membership
    $10.00$50.00$1.00
    DeepInfra
    minimax-m3
    $0.28$1.10$0.06
    MiniMax
    minimax-m3
    $0.60$2.40$0.12
    NovitaAI
    minimax-m3
    $0.30$1.20$0.06
    Tencent Cloud
    minimax-m3
    $0.30$1.20$0.06
    Anthropic
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.00$25.00$0.50
    AWS Bedrock
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.00$25.00$0.50
    AWS Bedrock(au)
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.50$27.50$0.55
    AWS Bedrock(eu)
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.50$27.50$0.55
    AWS Bedrock(global)
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.00$25.00$0.50
    AWS Bedrock(jp)
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.50$27.50$0.55
    AWS Bedrock(us)
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.50$27.50$0.55
    Azure Anthropic
    claude-opus-4-8Plus: needs a Lounge Plus or Pro membership
    $5.00$25.00$0.50
    xAI
    grok-build-0-1
    $1.00$2.00$0.20
    Google Vertex AI
    gemini-3.5-flashPlus: needs a Lounge Plus or Pro membership
    $1.50$9.00$0.15
    AWS Bedrock
    grok-4-3Plus: needs a Lounge Plus or Pro membership
    $1.25$2.50$0.20
    AWS Bedrock(global)
    grok-4-3Plus: needs a Lounge Plus or Pro membership
    $1.25$2.50$0.20
    AWS Bedrock(us)
    grok-4-3Plus: needs a Lounge Plus or Pro membership
    $1.38$2.75$0.22
    AWS Bedrock(us-west-2)
    grok-4-3Plus: needs a Lounge Plus or Pro membership
    $1.38$2.75$0.22
    Azure
    grok-4-3Plus: needs a Lounge Plus or Pro membership
    $1.25$2.50$0.20
    xAI
    grok-4-3Plus: needs a Lounge Plus or Pro membership
    $1.25$2.50$0.20
    Azure
    gpt-5.5Plus: needs a Lounge Plus or Pro membership
    $5.00$30.00$0.50
    OpenAI
    gpt-5.5Plus: needs a Lounge Plus or Pro membership
    $5.00$30.00$0.50
    Alibaba Cloud
    deepseek-v4-pro
    $1.32$3.96$0.13
    Alibaba Cloud(ap-tokyo)
    deepseek-v4-pro
    $1.27$3.82$0.13
    Alibaba Cloud(cn-beijing)
    deepseek-v4-pro
    $1.27$3.82$0.13
    Alibaba Cloud(eu-frankfurt)
    deepseek-v4-pro
    $1.27$3.82$0.13
    Alibaba Cloud(singapore)
    deepseek-v4-pro
    $1.32$3.96$0.13
    Alibaba Cloud(us-virginia)
    deepseek-v4-pro
    $1.27$3.82$0.13
    Baidu
    deepseek-v4-pro
    $1.32$3.96$0.04
    ByteDance
    deepseek-v4-pro
    $1.32$3.96$0.04
    DeepInfra
    deepseek-v4-pro
    $1.30$2.60$0.10
    DeepSeek
    deepseek-v4-pro
    $0.66$1.98$0.02
    Page 4 of 6

    Newsletter

    Stay ahead of the curve

    Insights on LLM routing, new model launches and cost optimization, sent to your inbox.

    • New models and providers, rounded up
    • Tips to cut LLM costs
    • Major product launches

    No spam. Unsubscribe anytime.

    System status
    AICPA SOC for Service Organizations badgeSOC 2 Type II
    compliant

    Product

  1. Features
  2. AI Gateway
  3. Observability
  4. Image Generation
  5. Models
  6. Providers
  7. Provider status
  8. Rankings
  9. State of LLM Usage
  10. Add Provider
  11. Partners
  12. Lounge
  13. Changelog
  14. DevPass
  15. Compare Models
  16. Enterprise
  17. Resources

    • Legal Overview
    • Apps
    • Templates
    • Agents
    • MCP Server
    • Use Cases
    • Blog
    • Documentation
    • Developer resources
    • Integrations
    • Guides
    • Brand Assets
    • Token Cost Calculator
    • Copilot Cost Calculator
    • Token Counter
    • Context Window Checker
    • Glossary
    • Savings Audit
    • Status & Pricing Badges
    • Referral Program
    • GitHub
    • Discord
    • Twitter
    • About
    • Contact Us

    Compliance

    • Trust Center
    • Security Portal
    • Terms
    • Privacy Policy
    • Provider Information
    • Sub-processors
    • SOC 2 Type II
    • Status

    Compare

    • All Comparisons
    • GitHub Copilot
    • OpenRouter
    • LiteLLM
    • Portkey
    • AWS Bedrock
    • Microsoft Foundry
    • Vercel AI Gateway
    • OpenRouter Alternatives
    • LiteLLM Alternatives
    • Migration Guides

    Models

    • Text Generation
    • Text to Image
    • Image to Image
    • Video Generation
    • Embeddings
    • Decisions
    • Vision
    • Reasoning
    • Tool Calling
    • Web Search
    • Discounted
    • Best for Roleplay
    • Best for Coding
    • Best for Creative Writing
    • Best for Translation
    • Best for Math
    • Best for Cyber Security
    • Best for Reverse Engineering
    • Long Context
    • Cheapest
    • Open Source

    Providers

    • fal
    • OpenAI
    • Anthropic
    • Google AI Studio
    • Google Vertex AI
    • Vertex AI (OpenAI-compatible)
    • Vertex AI (Anthropic)
    • Groq
    • Cerebras
    • xAI
    • DeepSeek
    • Alibaba Cloud
    • Runpod
    • NovitaAI
    • AtlasCloud
    • AWS Bedrock
    • AWS Mantle
    • Azure
    • Azure Anthropic
    • Z AI
    • Moonshot AI
    • Baidu
    • Perplexity
    • Nebius AI
    • Mistral AI
    • CanopyWave
    • Inference.net
    • Together AI
    • ByteDance
    • MiniMax
    • Meta
    • Meta Contributor
    • Sakana AI
    • Xiaomi
    • DeepInfra
    • ElevenLabs
    • Fireworks AI
    • Tencent Cloud
    • TypeSafe AI
    • Cloudflare

    © 2026 LLM Gateway. All rights reserved.

    Best Models for Coding, ranked by real usage

    The most-used models in this category by tokens routed through LLM Gateway over the last 30 days. Usage shows what developers run in production; it is not a quality benchmark.

    1. 1DeepSeek V4.1 Flash 1017519.3B tokens
    2. 2DeepSeek V4.1 Flash164.8B tokens
    3. 3Claude Opus 5.537.6B tokens
    4. 4DeepSeek V4 Pro19.4B tokens
    5. 5Claude Sonnet 5.513B tokens
    6. 6Claude Haiku 5.512.1B tokens
    7. 7Kimi K3.1 Pro8.1B tokens
    8. 8Kimi K34.6B tokens
    9. 9GPT-5.6 Terra3.7B tokens
    10. 10Claude Sonnet 51.7B tokens

    Usage data as of November 24, 2026

    The best coding models combine strong code generation with reliable tool calling, since modern coding agents lean on function calls to edit files and run commands. This page tracks the models developers actually ship with: Anthropic's Claude series, OpenAI's Codex line, Google's Gemini Pro, and fast-improving open-weight options like Qwen3 Coder, Kimi K2.7 Code, GLM, and DeepSeek.

    Access every one of them through a single OpenAI-compatible API with automatic failover, so your coding agent, IDE plugin, or CI pipeline can switch between frontier and budget models without code changes — and you can track exactly what each tool spends.

    Frequently asked questions

    What is the best LLM for coding?

    Claude Sonnet 5 and Claude Opus 4.8 lead most real-world coding evaluations, with OpenAI's GPT-5.3 Codex and Google's Gemini 3.1 Pro close behind. Among open-weight models, Qwen3 Coder, Kimi K2.7 Code, GLM-5.2, and DeepSeek V4 deliver strong results at a fraction of the price.

    What is the cheapest model that is still good at coding?

    Qwen3 Coder 30B (about $0.07 per million input tokens), GLM-4.7 Flash, and DeepSeek V4 Flash are the standouts for budget coding. They handle everyday completion, refactoring, and code review well and are cheap enough to run on every commit.

    Can I use these models with coding agents like Cline or Aider?

    Yes. Any agent that supports an OpenAI-compatible endpoint or custom base URL can route through LLM Gateway with one API key — that includes Cline, Aider, Roo Code, and devpass-code — so you can mix models per task and see per-agent cost analytics.

    Do coding models need tool calling?

    For agentic workflows, yes. Editing files, running tests, and searching a repo all happen through function calls, so pick a model with reliable tool calling — the capability icons in the list above show which provider mappings support tools. For plain autocomplete or one-shot generation, tool calling is optional.

    • Models
    • Docs
    • Pricing
    • Enterprise
    • Enterprise
    • Pricing
    • Docs
    • Models
      • AI Gateway
      • DevPass
      • Lounge
      • Observability
      • Image Generation
      • Blog
      • Changelog
      • Integrations
      • Reliability
      • Features
      • Guardrails
      • Providers
      • Partners
      • Rankings
      • Apps
      • Models
      • Model Timeline
      • Compare
      • Token Cost Calculator
      • Savings Audit
      • State of LLM Usage
      • Referral Program
      • MCP Server
      • CLI
      • Agents
      • AI SDK Provider
      • Agent Skills
      • Templates
      • Guides
    Log InBook a demoGet Started
    1.8k