How to Use Granite 4.2 8B in Windsurf
Granite 4.2 8B handles coding, tool use, and multi-step reasoning. Unlike Granite 4.2 3B, it received additional agent training for software engineering, terminal tasks, and search.
Prompts to try with Granite 4.2 8B in Windsurf
Copy an example into Windsurf, or ask in your own words.
Use Granite 4.2 8B to investigate the project's failing tests. Trace the first failure to its cause, make the smallest justified patch, and rerun the relevant tests. Report the change and any remaining failures.
Use Granite 4.2 8B to trace how this project validates incoming requests. Read the relevant files, identify inconsistent validation rules, and propose a focused change with a concrete before-and-after example.
Use Granite 4.2 8B to diagnose the latest build failure from the terminal output. Check the project's configuration before suggesting commands, then verify whether the proposed fix resolves the failure.
Use Granite 4.2 8B to review this project's tool descriptions. Identify ambiguous arguments and missing failure cases, then revise the descriptions and show example calls for success, missing information, and tool errors.
Use Granite 4.2 8B to review the project's Spanish support messages against its English messages. Follow existing Spanish examples, preserve product names and interpolation tokens, and flag wording that needs a human language review.
How to set up Granite 4.2 8B in Windsurf
Pick the way that suits you. Each takes about two minutes.
Use Spiral's MCP server
- Add the server
Open the Customize page from the Agents window and click MCPs. Under This computer, open the config file, or edit it directly: ~/.config/devin/mcp_config.json on macOS and Linux, %APPDATA%\devin\mcp_config.json on Windows. Add this:
{ "mcpServers": { "spiral": { "url": "https://api.spiral.ai/mcp" } } } - Sign in
Click Authenticate on the Spiral server in Customize › MCPs, or let the agent call Spiral once: your browser opens. Sign in to Spiral, pick the organization and click Authorize. No API key.
devin mcp login spiral
- Check it
Spiral is listed under This computer in Customize › MCPs. From the terminal:
devin mcp list
Use the Spiral skill
- Send Windsurf 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 Granite 4.2 8B
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": "ibm-granite/granite-4.2-8b", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Windsurf finds Granite 4.2 8B on Spiral, shows the price and runs it.
Granite 4.2 8B providers and prices
Spiral runs Granite 4.2 8B through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.000803 per run at the default inputs. $0.078 per 1M input tokens, $0.195 per 1M output tokens.
Settings you can ask for
Ask Windsurf 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 117964 | The most output tokens to generate. | |
| Temperature | 0 to 2 | ||
| Top logprobs | 0 to 20 | ||
| Presence penalty | -2 to 2 | ||
| Reasoning effort | none, low, or high | high | How much the model reasons. |
| Frequency penalty | -2 to 2 | ||
| Repetition penalty | 0 to 2 |
Every API field of IBM: Granite 4.2 8B is on its tool page: open its card above.
What can you do with Granite 4.2 8B in Windsurf?
Turn a failing test or terminal error into a patch you can check with Granite 4.2 8B. Give the agent a concrete failure, relevant project files, and a clear definition of success.
Fix a reproducible software bug
Ask Granite 4.2 8B to trace a failing test, propose a focused patch, and check the result against that test.
Diagnose a terminal failure
Give Granite 4.2 8B command output and the expected result. Request the next diagnostic command and an explanation of what its result would establish.
Research a question across sources
Have Granite 4.2 8B use available search tools to collect evidence, compare conflicting claims, and draft an answer with citations.
Answer questions about policy text
Supply relevant policy passages to Granite 4.2 8B and request an answer with supporting excerpts and unresolved questions.
Draft multilingual support replies
Give Granite 4.2 8B an approved policy, a customer message, and examples in a supported language. Request a reply that preserves product names and policy terms.
Investigate a service incident
Ask Granite 4.2 8B to compare incident reports with available status-tool results, separate observations from hypotheses, and identify the next check.
Plan a multi-step tool task
Give Granite 4.2 8B a goal and clearly described tools. Ask it to identify dependencies, request missing information, and verify tool results before continuing.
More on Granite 4.2 8B and Windsurf
Overview
Granite 4.2 8B in other agents
More Windsurf guides
Questions about Granite 4.2 8B in Windsurf
Can Windsurf use Granite 4.2 8B?
Yes. Add Spiral to Windsurf as an MCP server, and Windsurf can find and run Granite 4.2 8B like any built-in tool.
How much does Granite 4.2 8B cost in Windsurf?
Up to $0.000803 per run at the default inputs. $0.078 per 1M input tokens, $0.195 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Windsurf plan is separate.
Do I need an OpenRouter account to use Granite 4.2 8B in Windsurf?
No. Spiral runs Granite 4.2 8B on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up Granite 4.2 8B in Windsurf?
About two minutes: add the server, then sign in, then check it.
Does Windsurf wait while Granite 4.2 8B runs?
Granite 4.2 8B runs in the background. Windsurf starts the run, checks on it and gives you the text, json when it's ready.
What is Granite 4.2 8B useful for?
Use it for coding tasks, tool-assisted work, and problems that require several decisions. IBM specifically trained it on software engineering, terminal coding, and search workflows.
How much context can Granite 4.2 8B handle?
IBM documents a native 128K-token context window. For long-document work, ask a focused question and request supporting passages so you can check the answer.
Does Granite 4.2 always need to think before answering?
It supports thinking, non-thinking, and low-effort thinking modes. Use full thinking for multi-step problems, brief thinking for simpler decisions, and direct answers for straightforward requests.
Which languages does Granite 4.2 support?
IBM lists English, German, Spanish, French, Japanese, Portuguese, Arabic, Czech, Italian, Korean, Dutch, and Chinese. Performance can differ from English, so include examples of the wording and format you want.
Which sampling settings should I start with?
IBM recommends temperature 1.0 and top-p 0.95 for chat, reasoning, and tool calling. Start there before experimenting with other values.
Start using Granite 4.2 8B in Windsurf
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Windsurf:
set up https://spiral.ai/SKILL.md


