How to Use Gemma 3 4B in Devin
Gemma 3 4B fits document summaries, multilingual drafts, and small coding tasks. It keeps the 128K context window of Gemma 3 12B and Gemma 3 27B, but scores lower on Google's coding benchmarks.
Prompts to try with Gemma 3 4B in Devin
Copy an example into Devin, or ask in your own words.
Use Gemma 3 4B to summarize this project's README and contribution guide in 200 words. Cover the purpose, main components, and development conventions, citing the relevant files.
Use Gemma 3 4B to explain the selected function in plain English. Give one normal input and one edge case, and identify any behavior that the code does not make clear.
Use Gemma 3 4B to draft a helper that removes duplicate strings while preserving their original order. Follow the project's existing language and style, and include examples for empty input and repeated values.
Use Gemma 3 4B to turn the current diff into release notes under 150 words. Include only behavior supported by the changed code, with a file reference for each bullet.
Use Gemma 3 4B to extract action items from the project's planning document. Return only a JSON array with task, owner, deadline, and evidence keys; use null for unstated owners or deadlines.
How to set up Gemma 3 4B in Devin
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add a custom MCP
Open Customize › MCPs. Click + and choose New MCP. Fill in:
- Sign in to Spiral and approve
In Customize › MCPs, open Spiral and choose Connect. Spiral opens: sign in, pick the organization and click Authorize. No API key.
- Check it
On Spiral's configuration page, click Test tools. Devin lists Spiral's tools.
Use the Spiral skill
- Send Devin this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Gemma 3 4B
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "openrouter", "model": "google/gemma-3-4b-it", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Devin finds Gemma 3 4B on Spiral, shows the price and runs it.
Gemma 3 4B providers and prices
Spiral runs Gemma 3 4B through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.000536 per run at the default inputs. $0.065 per 1M input tokens, $0.13 per 1M output tokens.
Settings you can ask for
Ask Devin for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Min p | 0 to 1 | ||
| Top k | a whole number from 0 | ||
| Top p | 0 to 1 | ||
| Logprobs | on or off | ||
| Max tokens | 1 to 16384 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Top logprobs | 0 to 20 | ||
| Presence penalty | -2 to 2 | ||
| Frequency penalty | -2 to 2 | ||
| Repetition penalty | 0 to 2 |
Every API field of Google: Gemma 3 4B is on its tool page: open its card above.
What can you do with Gemma 3 4B in Devin?
Gemma 3 can turn project documentation into explanations, draft small code changes, and extract structured notes. Give it a bounded task with the relevant files, then review the result against the source and tests.
Report summaries
Turn a supplied report into a short brief with findings, supporting passages, and unanswered questions.
Questions about documentation
Answer a specific question from supplied documentation and include the passage supporting the answer.
Email drafts from notes
Convert meeting notes into a follow-up email that preserves stated decisions, owners, and dates.
Multilingual support drafts
Draft a customer reply in the requested language using supplied policy text and approved terminology.
Small code changes
Draft a focused helper function or explain a short code snippet. Review the result and test its behavior.
Text extraction into JSON
Extract names, dates, and action items from supplied text into a defined JSON structure, leaving missing values empty.
More on Gemma 3 4B and Devin
Overview
Gemma 3 4B in other agents
Questions about Gemma 3 4B in Devin
Can Devin use Gemma 3 4B?
Yes. Add Spiral to Devin as an MCP server, and Devin can find and run Gemma 3 4B like any built-in tool.
How much does Gemma 3 4B cost in Devin?
Up to $0.000536 per run at the default inputs. $0.065 per 1M input tokens, $0.13 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Devin plan is separate.
Do I need an OpenRouter account to use Gemma 3 4B in Devin?
No. Spiral runs Gemma 3 4B on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up Gemma 3 4B in Devin?
About two minutes: add a custom MCP, then sign in to Spiral and approve, then check it.
Does Devin wait while Gemma 3 4B runs?
Gemma 3 4B runs in the background. Devin starts the run, checks on it and gives you the text, json when it's ready.
What is Gemma 3 4B useful for?
Start with document summaries, questions about supplied material, email drafts, and small coding tasks. Give it a defined task and the source material it needs.
How much context can Gemma 3 4B handle?
Gemma 3 4B supports a 128K-token context window, matching Gemma 3 12B and Gemma 3 27B. Keep the material relevant to the question instead of filling the window by default.
Which languages does Gemma 3 support?
Google reports out-of-the-box support for over 35 languages and pretrained support for over 140. For multilingual drafts, specify the target language, audience, and terms to preserve.
Can Gemma 3 return JSON?
Yes, Google documents structured output support. State the required keys, give an example object, and validate the returned JSON before using it.
Where does Gemma 3 need extra checking?
It can give inaccurate or outdated answers, and highly complex tasks can be challenging. Supply current evidence for factual work and split broad requests into smaller tasks.
Start using Gemma 3 4B in Devin
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Devin:
set up https://spiral.ai/SKILL.md


