Compare Qwen3.8 27B from Qwen and Gemma 4 31B from Google on key metrics including benchmarks, price, context length, and other model features. Access both models and hundreds of others through the OpenRouter API.


Qwen3.8 27B and Gemma 4 31B are available through the OpenRouter API, so switching between them takes a model slug change rather than a new integration.
Qwen3.8 27B, from Qwen, has a 1,000,000-token context window and is priced at $0.02/M tokens input, $0.50/M tokens output on OpenRouter.
Gemma 4 31B, from Google, has a 262,144-token context window and is priced at $0.10/M tokens input, $0.34/M tokens output on OpenRouter.
| Attribute | Qwen3.8 27B | Gemma 4 31B |
|---|---|---|
| Input price | $0.02/M tokens | $0.10/M tokens |
| Output price | $0.50/M tokens | $0.34/M tokens |
| Context window | 1,000,000 tokens | 262,144 tokens |
| Intelligence Index | 33.7 | 13.9 |
| Coding Index | 68.1 | 33.2 |
| Agentic Index | 45.8 | Not available |
| Latency (p50) | 0.68 s | 0.61 s |
| Throughput (p50) | 42.5 tok/s | 46.0 tok/s |
Benchmark data updated
Qwen3.8 27B and Gemma 4 31B trade off on price: Qwen3.8 27B costs $0.02/M tokens input and $0.50/M tokens output, while Gemma 4 31B costs $0.10/M tokens input and $0.34/M tokens output, so Qwen3.8 27B is cheaper for input tokens and Gemma 4 31B is cheaper for output tokens.
Qwen3.8 27B has the longer context window at 1,000,000 tokens, compared with 262,144 tokens for Gemma 4 31B.
Gemma 4 31B is faster on OpenRouter, generating a median 46.0 tokens per second compared with 42.5 tokens per second for Qwen3.8 27B.
Qwen3.8 27B scores higher on coding, with an Artificial Analysis Coding Index of 68.1 compared with 33.2 for Gemma 4 31B.