Gemma 4 31B as a coding agent in your terminal
Gemma 4 31B by Google, one of 250+ models you can use in Darce, the open source AI coding agent you can undo.
| Model | Gemma 4 31B |
|---|---|
| Vendor | |
| Model id | google/gemma-4-31b-it |
| Context window | 262k tokens |
| Price per 1M tokens | $0.090 input · $0.34 output (OpenRouter) |
| Can do | tool calling · reads images · reasoning |
| Category | Open weights and budget |
Strengths
Google's open-weight Gemma model. Inexpensive, useful for simple tasks.
OpenRouter's description:
Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. Features a 256K token context window, configurable thinking/reasoning mode, native function...
Use Gemma 4 31B as a coding agent in your terminal
Start Darce in your project with Gemma 4 31B:
npm install -g darce-cli
darce --model google/gemma-4-31b-itAlready in a session? Type /model google/gemma-4-31b-it, or open the picker with Ctrl+P. Darce then reads your code, edits files and runs commands with Gemma 4 31B; risky commands ask first, and /undo reverses any change, including what shell commands did. No account yet? npx darce-cli lets you try it free. Which plan includes which models is on the pricing page.
Make it your default or a gear
In ~/.darcerc, set it as the starting model or add it to the gears you move between with Shift+↑ / Shift+↓ (see configuration):
{
"router": { "default": "google/gemma-4-31b-it" },
"gears": ["qwen/qwen3-coder", "google/gemma-4-31b-it"]
}Compare it on your own code
Benchmarks rarely match your repository. Race Gemma 4 31B against two other models on a real task and keep the best diff:
/derby --models google/gemma-4-31b-it,google/gemini-3.1-pro-preview,google/gemini-3.8-flash fix the failing testRead more about /derby and /swarm.
Related models
- Gemini 3.1 Pro Preview (Google): 1.05M tokens, $2.00 / $12.00 per 1M tokens
- Gemini 3.8 Flash (Google): 1.05M tokens, $0.75 / $3.75 per 1M tokens
- Gemini 3.5 Flash Lite (Google): 1.05M tokens, $0.30 / $2.50 per 1M tokens
- gpt-oss-120b (OpenAI): 131k tokens, $0.037 / $0.17 per 1M tokens
- Qwen3 Coder 30B A3B Instruct (Qwen (Alibaba)): 262k tokens, $0.070 / $0.28 per 1M tokens
- DeepSeek V3.2 (DeepSeek): 164k tokens, $0.26 / $0.80 per 1M tokens
- Kimi K2.6 (Moonshot AI): 262k tokens, $0.47 / $2.45 per 1M tokens
All models · Getting started · Claude Code alternative
Model data from OpenRouter, refreshed daily. Prices are OpenRouter's list rates and show relative cost; your Darce allowance is used in proportion to them.