> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekhub.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Modelos de chat

> 28 modelos para conversación y razonamiento — actualizado julio 2026

<Warning>
  **Cambio de precios Google (julio 2026):** Gemini 2.5 Flash pasó de $0.15/$0.60 a **$0.30/$2.50** por 1M tokens (2–4× incremento). Para reemplazo económico, considera `google/gemini-2.5-flash-lite` ($0.10/$0.40) o el nuevo `google/gemini-3.6-flash`.
</Warning>

## Frontier (recomendados)

| ID                                  | Provider  | Context | Input \$/1M | Output \$/1M | Best for                               |
| ----------------------------------- | --------- | ------- | ----------- | ------------ | -------------------------------------- |
| `anthropic/claude-fable-5`          | Anthropic | 1M      | \$10        | \$50         | Razonamiento profundo, escritura larga |
| `anthropic/claude-opus-5`           | Anthropic | 1M      | \$5         | \$25         | Top-tier reasoning, código complejo    |
| `anthropic/claude-sonnet-5`         | Anthropic | 1M      | \$3         | \$15         | Sweet spot precio/calidad              |
| `anthropic/claude-haiku-4-5`        | Anthropic | 200k    | \$1         | \$5          | Tareas simples, alto volumen           |
| `google/gemini-3.6-flash`           | Google    | 1M      | \$1.50      | \$7.50       | Multimodal, context largo              |
| `google/gemini-3.5-flash-lite`      | Google    | 1M      | \$0.30      | \$2.50       | Barato con context 1M                  |
| `google/gemini-3.1-pro-preview`     | Google    | 1M      | \$2         | \$12         | Preview del nuevo Pro                  |
| `google/gemini-2.5-pro`             | Google    | 1M      | \$1.25      | \$10         | Context largo, multimodal              |
| `google/gemini-2.5-flash`           | Google    | 1M      | \$0.30      | \$2.50       | ⚠ subió precio jul 2026                |
| `google/gemini-2.5-flash-lite`      | Google    | 1M      | \$0.10      | \$0.40       | Más barato del catálogo                |
| `openai/gpt-5.6-sol`                | OpenAI    | 400k    | \$5         | \$30         | Flagship OpenAI                        |
| `openai/gpt-5.6-terra`              | OpenAI    | 400k    | \$2         | \$12         | GPT-5.6 balanceado                     |
| `openai/gpt-5.6-luna`               | OpenAI    | 400k    | \$0.20      | \$1.20       | GPT-5.6 más barato                     |
| `openai/gpt-5.5`                    | OpenAI    | 400k    | \$5         | \$30         | Alternativo top                        |
| `openai/gpt-5.4-mini`               | OpenAI    | 400k    | \$0.75      | \$4.50       | OpenAI barato                          |
| `openai/gpt-5.1`                    | OpenAI    | 400k    | \$1.25      | \$10         | Reasoning general                      |
| `openai/o3-mini`                    | OpenAI    | 200k    | \$1.10      | \$4.40       | Razonamiento (CoT)                     |
| `deepseek/deepseek-v4-flash`        | DeepSeek  | 128k    | \$0.14      | \$0.28       | Open-weight ultra barato               |
| `deepseek/deepseek-v4-pro`          | DeepSeek  | 128k    | \$0.44      | \$0.87       | Reasoning open-weight                  |
| `moonshot/kimi-k3`                  | Moonshot  | 256k    | \$3         | \$15         | Chinese frontier, código               |
| `moonshot/kimi-k2.7-code`           | Moonshot  | 256k    | \$0.95      | \$4          | Especializado en código                |
| `moonshot/kimi-k2.7-code-highspeed` | Moonshot  | 256k    | \$0.95      | \$8          | Kimi Code low-latency                  |
| `xai/grok-4.5`                      | xAI       | 500k    | \$2         | \$6          | Acceso a X data                        |
| `xai/grok-4.3`                      | xAI       | 1M      | \$1.25      | \$2.50       | Context 1M, barato                     |
| `xai/grok-4.20-reasoning`           | xAI       | 1M      | \$1.25      | \$2.50       | Reasoning barato                       |
| `xai/grok-build`                    | xAI       | 256k    | \$1         | \$2          | Especializado en dev tasks             |

## Legacy (backward compat)

Estos siguen operativos por compat pero no se recomiendan para nuevas integraciones:

| ID                            | Reemplazo sugerido                 |
| ----------------------------- | ---------------------------------- |
| `anthropic/claude-opus-4-8`   | `anthropic/claude-opus-5`          |
| `anthropic/claude-sonnet-4-6` | `anthropic/claude-sonnet-5`        |
| `openai/gpt-5`                | `openai/gpt-5.6-terra` o `gpt-5.5` |
| `openai/gpt-4.1-mini`         | `openai/gpt-5.4-mini`              |

**Retirados en julio 2026:** `openai/gpt-4.1`, `openai/o4-mini`, `deepseek/deepseek-chat`, `deepseek/deepseek-reasoner`, `moonshot/kimi-k2`, `moonshot/moonshot-v1-128k`, `xai/grok-3`, `xai/grok-3-mini`, `xai/grok-4`.

## Cuándo usar cada uno

### Tareas críticas

**Claude Fable 5** o **Claude Opus 5** o **GPT-5.6 Sol**. Top de su clase en razonamiento.

### Producción a escala

**Claude Sonnet 5**. Balance precio/calidad — lo elegirías a ciegas si no supieras el resto.

### Alto volumen / costo bajo

**Gemini 2.5 Flash Lite**, **GPT-5.6 Luna** o **DeepSeek V4 Flash**. Subdólar por 1M tokens.

### Razonamiento (chain of thought)

**DeepSeek V4 Pro**, **o3-mini** o **Grok 4.20 Reasoning**. Diseñados para razonamiento estructurado.

### Context muy largo (1M tokens)

**Gemini 3.6 Flash / 2.5 Pro / 2.5 Flash** o **Grok 4.3** o **Claude Fable/Opus/Sonnet 5**. Procesan documentos enteros.

### Código

**Kimi K2.7 Code**, **Claude Sonnet 5** o **Grok Build**. Strong code performance.

## Failover natural

Como todos los modelos comparten el mismo endpoint y SDK, **failover entre providers es trivial**:

```python theme={null}
def call_with_fallback(messages):
    for model in ["anthropic/claude-sonnet-5", "openai/gpt-5.6-terra", "google/gemini-2.5-pro"]:
        try:
            return client.chat.completions.create(model=model, messages=messages)
        except Exception:
            continue
    raise RuntimeError("Todos los providers fallaron")
```
