# AI for coding and fixing bugs

- **URL canônica:** https://meirinho.com.br/en/ia/modelos/recomendar/programar/
- **Idioma:** en
- **Atualizado:** 2026-11-17

---
[Recommender](https://meirinho.com.br/en/ia/modelos/recomendar/)

# Best AI model to code and fix bugs

Writing code, fixing bugs and reviewing pull requests. The most used yardstick is SWE-bench Verified, with real repository issues.

[Describe another task](https://meirinho.com.br/en/ia/modelos/recomendar/)

## Suggested models

1. 1 [Claude Opus 4.7](https://meirinho.com.br/en/ia/modelos/claude-opus-4-7/) Anthropic**Why it fits:** Solves 83.5% of SWE-bench Verified issues, where the model has to fix real code and pass the tests.SWE-bench Verified: 83.5%, per [Epoch AI](https://epoch.ai/benchmarks/swe-bench-verified), latest version we checked[? what it is](https://meirinho.com.br/en/ia/modelos/glossario/swe-bench-verified/)
2. **Price:** US$ 5.00 input and US$ 25.00 output per 1M tokens (source: [Anthropic, official page](https://platform.claude.com/docs/en/about-claude/pricing)) Official pricing[?](https://meirinho.com.br/en/ia/modelos/glossario/preco-por-token/)
3. **Estimated cost (see the How we calculate block):** about US$ 0.11 (estimate) Official pricing
4. **Weights:** Closed[?](https://meirinho.com.br/en/ia/modelos/glossario/pesos-abertos/)
5. **Alternative:** [GLM-5.2](https://meirinho.com.br/en/ia/modelos/glm-5-2/), with open weights, 78.7% on SWE-bench Verified
6. 2 [GPT-5.5](https://meirinho.com.br/en/ia/modelos/gpt-5-5/) OpenAI**Why it fits:** Solves 80.6% of SWE-bench Verified issues, where the model has to fix real code and pass the tests.SWE-bench Verified: 80.6%, per [Epoch AI](https://epoch.ai/benchmarks/swe-bench-verified), latest version we checked[?](https://meirinho.com.br/en/ia/modelos/glossario/swe-bench-verified/)
7. **Price:** US$ 5.00 input and US$ 30.00 output per 1M tokens (source: [OpenAI, official page](https://developers.openai.com/api/docs/pricing)) Official pricing[?](https://meirinho.com.br/en/ia/modelos/glossario/preco-por-token/)
8. **Estimated cost (see the How we calculate block):** about US$ 0.12 (estimate) Official pricing
9. **Weights:** Closed[?](https://meirinho.com.br/en/ia/modelos/glossario/pesos-abertos/)
10. **Alternative:** [GLM-5.2](https://meirinho.com.br/en/ia/modelos/glm-5-2/), with open weights, 78.7% on SWE-bench Verified
11. 3 [Gemini 3.5 Flash](https://meirinho.com.br/en/ia/modelos/gemini-3-5-flash/) Google**Why it fits:** Solves 79.3% of SWE-bench Verified issues, where the model has to fix real code and pass the tests.SWE-bench Verified: 79.3%, per [Epoch AI](https://epoch.ai/benchmarks/swe-bench-verified), latest version we checked[?](https://meirinho.com.br/en/ia/modelos/glossario/swe-bench-verified/)
12. **Price:** US$ 1.50 input and US$ 9.00 output per 1M tokens (source: [OpenRouter](https://openrouter.ai/google/gemini-3.5-flash)) OpenRouter[?](https://meirinho.com.br/en/ia/modelos/glossario/preco-por-token/)
13. **Estimated cost (see the How we calculate block):** about US$ 0.036 (estimate) OpenRouter
14. **Weights:** Closed[?](https://meirinho.com.br/en/ia/modelos/glossario/pesos-abertos/)
15. **Alternative:** [GLM-5.2](https://meirinho.com.br/en/ia/modelos/glm-5-2/), with open weights, 78.7% on SWE-bench Verified
16. 4 [GLM-5.2](https://meirinho.com.br/en/ia/modelos/glm-5-2/) Zhipu AI (Z.ai)**Why it fits:** Solves 78.7% of SWE-bench Verified issues, where the model has to fix real code and pass the tests.SWE-bench Verified: 78.7%, per [Epoch AI](https://epoch.ai/benchmarks/swe-bench-verified), latest version we checked[?](https://meirinho.com.br/en/ia/modelos/glossario/swe-bench-verified/)
17. **Price:** US$ 1.40 input and US$ 4.40 output per 1M tokens (source: [Zhipu AI (Z.ai), official page](https://docs.z.ai/guides/overview/pricing)) Official pricing[?](https://meirinho.com.br/en/ia/modelos/glossario/preco-por-token/)
18. **Estimated cost (see the How we calculate block):** about US$ 0.028 (estimate) Official pricing
19. **Weights:** Open[?](https://meirinho.com.br/en/ia/modelos/glossario/pesos-abertos/)
20. **Alternative:** [GPT-5 Mini](https://meirinho.com.br/en/ia/modelos/gpt-5-mini/), cheaper: US$ 0.25 input per 1M tokens, 64.7% on SWE-bench Verified

Order: highest SWE-bench Verified score among code and fix bugs models, one version per model line.

### How we calculate

Change the numbers and the cost of every model on the page is recalculated right away. Without JavaScript, the default values below apply.

Input = lines × characters per line ÷ 4. Output = answer lines × characters per line ÷ 4.

**With these numbers: about 15,000 input tokens and 1,500 output tokens (estimate).**

Conversion used: 1 token is about 4 characters or 0.75 words, OpenAI's rough rule for English text. Other languages can differ. [Conversion source: OpenAI, Understanding and counting tokens](https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them)

Fields marked as assumption are our own guesses, without a source. Adjust them to your case.

Cost of each model = input tokens × input price + output tokens × output price, with prices per 1M tokens. Models that reason before answering can use many more output tokens. It is a reference calculation and does not change the order of the list.

### Other paid models we checked

Reference paid models from the main labs. They are left out of the list above because of a lower score, no score on this metric, or not passing the case filter. Prices come from the company's official page when it publishes them.

| Model | Score on this metric | Price and source | Estimated cost |
| --- | --- | --- | --- |
| [GPT-6 Astra](https://meirinho.com.br/en/ia/modelos/gpt-6-astra/) OpenAI | no score on this metric | US$ 10.00 input and US$ 50.00 output per 1M tokens (source: [OpenAI, official page](https://developers.openai.com/api/docs/pricing#latest-models)) Official pricing | about US$ 0.22 (estimate) Official pricing |
| [GPT-6.1 Sol](https://meirinho.com.br/en/ia/modelos/gpt-6-1-sol/) OpenAI | no score on this metric | US$ 2.00 input and US$ 10.00 output per 1M tokens (source: [OpenAI, official page](https://developers.openai.com/api/docs/pricing#latest-models)) Official pricing | about US$ 0.045 (estimate) Official pricing |
| [GPT-6 Luna](https://meirinho.com.br/en/ia/modelos/gpt-6-luna/) OpenAI | no score on this metric | US$ 0.10 input and US$ 0.50 output per 1M tokens (source: [OpenAI, official page](https://developers.openai.com/api/docs/pricing#latest-models)) Official pricing | about US$ 0.0023 (estimate) Official pricing |
| [Claude Fable 5.2](https://meirinho.com.br/en/ia/modelos/claude-fable-5-2/) Anthropic | no score on this metric | US$ 8.00 input and US$ 40.00 output per 1M tokens (source: [Anthropic, official page](https://platform.claude.com/docs/en/about-claude/pricing#model-pricing)) Official pricing | about US$ 0.18 (estimate) Official pricing |
| [Claude Opus 5.5](https://meirinho.com.br/en/ia/modelos/claude-opus-5-5/) Anthropic | no score on this metric | US$ 4.00 input and US$ 20.00 output per 1M tokens (source: [Anthropic, official page](https://platform.claude.com/docs/en/about-claude/pricing#model-pricing)) Official pricing | about US$ 0.09 (estimate) Official pricing |
| [Claude Sonnet 5.5](https://meirinho.com.br/en/ia/modelos/claude-sonnet-5-5/) Anthropic | no score on this metric | US$ 2.00 input and US$ 10.00 output per 1M tokens (source: [Anthropic, official page](https://platform.claude.com/docs/en/about-claude/pricing#model-pricing)) Official pricing | about US$ 0.045 (estimate) Official pricing |
| [Claude Haiku 5.5](https://meirinho.com.br/en/ia/modelos/claude-haiku-5-5/) Anthropic | no score on this metric | US$ 0.10 input and US$ 0.50 output per 1M tokens (source: [Anthropic, official page](https://platform.claude.com/docs/en/about-claude/pricing#model-pricing)) Official pricing | about US$ 0.0023 (estimate) Official pricing |
| [Gemini 4 Argon](https://meirinho.com.br/en/ia/modelos/gemini-4-argon/) Google | no score on this metric | US$ 2.00 until November 30, 2026; then US$ 4.00 input and US$ 10.00 output per 1M tokens From December 1, 2026: US$ 4.00 / US$ 20.00From December 1, 2026? (source: [Google, official page](https://aistudio.google.com/docs/pricing#gemini-4-argon)) Official pricing | about US$ 0.045 (estimate) Official pricing |
| [Gemini 3.8 Flash](https://meirinho.com.br/en/ia/modelos/gemini-3-8-flash/) Google | no score on this metric | US$ 0.75 until December 31, 2026; then US$ 1.50 input and US$ 3.75 output per 1M tokens From January 1, 2027: US$ 1.50 / US$ 7.50From January 1, 2027? (source: [Google, official page](https://ai.google.dev/gemini-api/docs/pricing#gemini-3.8-flash)) Official pricing | about US$ 0.017 (estimate) Official pricing |
| [Grok 4.7](https://meirinho.com.br/en/ia/modelos/grok-4-7/) xAI | no score on this metric | US$ 2.00 input and US$ 6.00 output per 1M tokens (source: [xAI, official page](https://docs.x.ai/developers/pricing#text-api-pricing)) Official pricing | about US$ 0.039 (estimate) Official pricing |
| [Mistral Large 4](https://meirinho.com.br/en/ia/modelos/mistral-large-4/) Mistral AI | no score on this metric | US$ 0.70 input and US$ 2.10 output per 1M tokens (source: [Mistral AI, official page](https://docs.mistral.ai/inference/pricing)) Official pricing | about US$ 0.014 (estimate) Official pricing |
| [Mistral Medium 3.5](https://meirinho.com.br/en/ia/modelos/mistral-medium-3-5/) Mistral AI | no score on this metric | US$ 1.50 input and US$ 7.50 output per 1M tokens (source: [Mistral AI, official page](https://docs.mistral.ai/models/mistral-medium-3-5-26-04)) Official pricing | about US$ 0.034 (estimate) Official pricing |
| [Command A](https://meirinho.com.br/en/ia/modelos/command-a/) Cohere | no score on this metric | US$ 2.50 input and US$ 10.00 output per 1M tokens (source: [Cohere, official page](https://docs.cohere.com/docs/command-a)) Official pricing | about US$ 0.052 (estimate) Official pricing |
| [Command A+](https://meirinho.com.br/en/ia/modelos/command-a-plus/) Cohere | no score on this metric | US$ 0.30 input and US$ 1.50 output per 1M tokens (source: [OpenRouter](https://openrouter.ai/cohere/command-a-plus); Cohere's official page does not publish this model's price; OpenRouter is kept as reference) OpenRouter | about US$ 0.0067 (estimate) OpenRouter |
| [Nova Premier 1.0](https://meirinho.com.br/en/ia/modelos/nova-premier-v1/) Amazon | no score on this metric | US$ 2.50 input and US$ 12.50 output per 1M tokens (source: [Amazon, official page](https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/current/us-east-1/index.json)) Official pricing | about US$ 0.056 (estimate) Official pricing |
| [Nova 2 Lite](https://meirinho.com.br/en/ia/modelos/nova-2-lite-v1/) Amazon | no score on this metric | US$ 0.30 input and US$ 2.50 output per 1M tokens (source: [Amazon, official page](https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/current/us-east-1/index.json)) Official pricing | about US$ 0.0083 (estimate) Official pricing |
| [GPT-5.3-Codex](https://meirinho.com.br/en/ia/modelos/gpt-5-3-codex/) OpenAI | 74.8% Epoch AI | US$ 1.75 input and US$ 14.00 output per 1M tokens (source: [OpenAI, official page](https://developers.openai.com/api/docs/pricing)) Official pricing | about US$ 0.047 (estimate) Official pricing |
| [Devstral 2](https://meirinho.com.br/en/ia/modelos/devstral-2512/) Mistral AI | no score on this metric | US$ 0.40 input and US$ 2.00 output per 1M tokens (source: [OpenRouter](https://openrouter.ai/mistralai/devstral-2512)) OpenRouter | about US$ 0.009 (estimate) OpenRouter |

Prices in US$ per 1 million tokens, input / output. “From” marks the price the lab has already published on its official pricing page for a future date.

[Full table for code](https://meirinho.com.br/en/ia/modelos/uso/codigo/)

## FAQ

By this page's rule, the list starts with Claude Opus 4.7, GPT-5.5, Gemini 3.5 Flash, GLM-5.2. Order: highest SWE-bench Verified score among code and fix bugs models, one version per model line.

With the default values in the How we calculate block, the estimate ranges from US$ 0.028 to US$ 0.12 among the listed models with a published price. It is only an estimate and you can adjust the numbers on the page.

Yes: GLM-5.2.

No. The recommendation comes from fixed rules over public data from Epoch AI, OpenRouter, Hugging Face and each company's official pricing page, in the latest version we checked. The typed text is only compared with keywords.

## Terms used on this page

- [SWE-bench Verified](https://meirinho.com.br/en/ia/modelos/glossario/swe-bench-verified/)
- [Price per token](https://meirinho.com.br/en/ia/modelos/glossario/preco-por-token/)
- [Open weights](https://meirinho.com.br/en/ia/modelos/glossario/pesos-abertos/)

## Use cases with their own page

## Official pricing pages checked

- [OpenAI](https://platform.openai.com/docs/pricing), latest version we checked.
- [Anthropic](https://docs.anthropic.com/en/docs/about-claude/pricing), latest version we checked.
- [Google](https://ai.google.dev/gemini-api/docs/pricing), latest version we checked.
- [xAI](https://docs.x.ai/docs/models), latest version we checked.
- [Mistral AI](https://mistral.ai/pricing), latest version we checked.
- [Cohere](https://cohere.com/pricing), latest version we checked.
- [Amazon](https://aws.amazon.com/bedrock/pricing/), latest version we checked.

## Sources

- [Epoch AI](https://epoch.ai/benchmarks), CC BY 4.0, latest version we checked.
- [OpenRouter Benchmarks](https://openrouter.ai/benchmarks), CC BY 4.0, latest version we checked.
- [OpenRouter](https://openrouter.ai/api/v1/models), dados públicos da API; exports de benchmarks e rankings em CC BY 4.0, latest version we checked.
- [Hugging Face Hub](https://huggingface.co/api/models), metadados públicos do Hub; licença de cada modelo no repositório, latest version we checked.

Dates come from the sources: OpenRouter listing or Hugging Face repo creation, which may differ from the official launch. Family and version were grouped by rule from the name.

[#](#)
