Gemma 3 4B is 15.0× cheaper per million tokens (blended). GPT-5.1-Codex-Mini has the larger context window (400,000 vs 131,072 tokens, 3.1×). Gemma 3 4B is open-weights; the other is not.
Gemma 3 4B vs GPT-5.1-Codex-Mini
Live catalog fields. Best-in-row is highlighted.
Gemma 3 4Bopen
Google · google__gemma-3-4b-it
GPT-5.1-Codex-Mini
OpenAI · openai__gpt-5.1-codex-mini
Identity
| Field | google__gemma-3-4b-it | openai__gpt-5.1-codex-mini |
|---|---|---|
| Provider | OpenAI | |
| Slug | google__gemma-3-4b-it | openai__gpt-5.1-codex-mini |
| Status | live | live |
| Open weights | Yes | No |
| License | — | — |
| HuggingFace | google/gemma-3-4b-it | — |
Quality
| Field | google__gemma-3-4b-it | openai__gpt-5.1-codex-mini |
|---|---|---|
| Quality index (0–100) | — | — |
Cost
| Field | google__gemma-3-4b-it | openai__gpt-5.1-codex-mini |
|---|---|---|
| Input $ / 1M tokens | $0.05 | $0.25 |
| Cached input $ / 1M | — | $0.03 |
| Output $ / 1M tokens | $0.10 | $2.00 |
Context
| Field | google__gemma-3-4b-it | openai__gpt-5.1-codex-mini |
|---|---|---|
| Max context tokens | 131,072 | 400,000 |
| Max output tokens | 16,384 | 128,000 |
Modalities
| Field | google__gemma-3-4b-it | openai__gpt-5.1-codex-mini |
|---|---|---|
| Input | text, image | image, text |
| Output | text | text |