Spiral gives your agent every tool with one account. Browse the tools →

opencode · LLMReleased 2024-07-19

How to Use Mistral NeMo in opencode

Mistral NeMo is a 12B text model for multilingual conversations, long-document summaries, classification, and code generation. It supports up to 128k tokens of context, and Mistral recommends a temperature of 0.3.

Prompts to try with Mistral NeMo in opencode

Copy an example into opencode, or ask in your own words.

Use Mistral NeMo at temperature 0.3 to explain the request validation flow in this project. Read the relevant source files and list the entry point, validation rules, and error responses with file references.

Mistral NeMoopencode
Try asking
  • Use Mistral NeMo to draft unit tests for this project's date parser. Follow the existing test style, cover invalid dates and leap years, and explain any behavior the implementation leaves ambiguous.

  • Use Mistral NeMo to summarize this project's README and architecture documentation into a contributor guide. Include the main modules and one concrete example of how data moves between them.

  • Use Mistral NeMo to translate this project's English interface strings into French and German. Preserve keys, interpolation tokens, product names, and the existing file structure.

  • Use Mistral NeMo at temperature 0.3 to review the changed function and draft the smallest fix for the reported bug. Explain the cause, show the patch, and propose a regression test.

How to set up Mistral NeMo in opencode

Pick the way that suits you. Each takes about two minutes.

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. 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

  1. Create an API key

    In the console, under API keys.

  2. Run Mistral NeMo

    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": "mistralai/mistral-nemo",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: opencode finds Mistral NeMo on Spiral, shows the price and runs it.

Mistral NeMo providers and prices

Spiral runs Mistral NeMo through OpenRouter. Open a card for today's price, with every fee included.

OpenRouterLLM
Mistral: Mistral Nemo
mistralai/mistral-nemo

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Min p0 to 1
Top ka whole number from 0
Top p0 to 1
Logprobson or off
Max tokens1 to 16384

The most output tokens to generate.

Temperature0 to 2
Top logprobs0 to 20
Presence penalty-2 to 2
Frequency penalty-2 to 2
Repetition penalty0 to 2

Every API field of Mistral: Mistral Nemo is on its tool page: open its card above.

What can you do with Mistral NeMo in opencode?

Turn project code and documentation into explanations, code drafts, and tests with Mistral NeMo. Give it the relevant files and one bounded task, such as explaining a function or drafting tests for a reported bug.

Long-report summaries

Ask Mistral NeMo to turn supplied report text into findings, decisions, and open questions. Request a supporting passage for each finding.

Multilingual support drafts

Use Mistral NeMo to draft replies in French, German, Spanish, or Japanese from a supplied customer question and approved policy text.

Support request classification

Give Mistral NeMo a fixed set of categories and examples, then ask it to label each request and flag cases that need review.

Code and test drafts

Ask Mistral NeMo to draft a function and tests from a written specification, with expected behavior and edge cases stated explicitly.

Product text translation

Have Mistral NeMo translate product descriptions or help text while preserving product names, measurements, and a supplied terminology list.

Meeting digests

Ask Mistral NeMo to summarize a supplied transcript into decisions, assigned actions, and unresolved questions without inventing owners or dates.

Follow-up explanations

Use Mistral NeMo to explain supplied technical material, then ask follow-up questions about specific passages or examples.

Questions about Mistral NeMo in opencode

Can opencode use Mistral NeMo?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Mistral NeMo like any built-in tool.

How much does Mistral NeMo cost in opencode?

Up to $0.000162 per run at the default inputs. $0.0377 per 1M input tokens, $0.039 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

Do I need an OpenRouter account to use Mistral NeMo in opencode?

No. Spiral runs Mistral NeMo on its own OpenRouter account. You sign in to Spiral once and never paste a key.

How long does it take to set up Mistral NeMo in opencode?

About two minutes: add the server, then sign in, then check it.

Does opencode wait while Mistral NeMo runs?

Mistral NeMo runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

What is Mistral NeMo good at?

Mistral NeMo supports long-document summarization, classification, translation, code generation, and conversations with follow-up questions. Useful starting tasks include summarizing a report, labeling support requests, and drafting code from a written specification.

How much text can Mistral NeMo handle?

Mistral documents a context window of up to 128k tokens. Input and output share that budget, so leave room for the answer instead of filling it entirely with source text.

Which languages work well with Mistral NeMo?

Mistral highlights English, French, German, Spanish, Italian, Portuguese, Chinese, Japanese, Korean, Arabic, and Hindi. For translation, specify the target language, audience, and terms that must stay unchanged.

What temperature should I use?

Start at 0.3, Mistral’s explicit recommendation for NeMo. Use that as your baseline when comparing prompts for summaries, classification, or code.

How should I structure a Mistral NeMo prompt?

Separate the task, source text, constraints, and desired answer format into clear sections. Add a worked example when you need consistent labels or a particular response structure.

Get started

Start using Mistral NeMo in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options