[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [DeepSeek V3.1 Terminus](https://spiral.ai/integrations/opencode/deepseek-v3-1-terminus)

# How to Use DeepSeek V3.1 Terminus in opencode

DeepSeek V3.1 Terminus is suited to code fixes and research that takes several searches. Compared with DeepSeek V3.1, it improves code and search agent performance and reduces unwanted Chinese-English mixing.

|  |  |
| --- | --- |
| Model | DeepSeek V3.1 Terminus |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.005338 per run at the default inputs. $0.351 per 1M input tokens, $1.30 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with DeepSeek V3.1 Terminus in opencode

- Use DeepSeek V3.1 Terminus in non-thinking mode to investigate this project's failing tests. Reproduce one failure, inspect the relevant files, make the smallest justified fix, and run the affected tests.
- Use DeepSeek V3.1 Terminus to review the current diff for behavior changes. Identify concrete failure cases, cite the relevant code, and propose regression tests before editing.
- Use DeepSeek V3.1 Terminus to trace the latest build failure from the project logs and configuration. Run focused diagnostic commands and report which result supports each conclusion.
- Use DeepSeek V3.1 Terminus to assess this project's dependency upgrade. Read the manifest, search official migration documentation, and list required edits with source links and validation commands.
- Use DeepSeek V3.1 Terminus in thinking mode to compare two refactoring approaches for the module under review. Read its callers and tests, explain the tradeoffs, and recommend a plan before making changes.

## How to set up DeepSeek V3.1 Terminus 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.

```bash
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.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
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.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run DeepSeek V3.1 Terminus**: One request; the result comes back by polling or a webhook.

```bash
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": "deepseek/deepseek-v3.1-terminus",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds DeepSeek V3.1 Terminus on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## DeepSeek V3.1 Terminus tools and prices

- [DeepSeek: DeepSeek V3.1 Terminus](https://spiral.ai/tools/openrouter/deepseek/deepseek-v3.1-terminus) (OpenRouter): Up to $0.005338 per run at the default inputs. $0.351 per 1M input tokens, $1.30 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| tools |  | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |
| reasoning |  | — | Reasoning effort; reasoning tokens count toward max_tokens. |
| max_tokens | 1 to 147456 | — | The most output tokens to generate. |
| temperature | 0 to 2 | — |  |

## What can you do with DeepSeek V3.1 Terminus in opencode?

Turn a reproducible failure into a proposed patch and a test with DeepSeek V3.1 Terminus. Give the agent relevant project files and require it to check the result against the original failure.

### Repair a reproducible bug

Give DeepSeek V3.1 Terminus the failure, relevant code, and expected behavior. Ask for a focused patch and a regression test that demonstrates the fix.

### Investigate a failing build

Use DeepSeek V3.1 Terminus to examine build logs, trace the likely cause, and propose the next diagnostic command. Require command results before accepting a diagnosis.

### Research a technical decision

Have DeepSeek V3.1 Terminus use available search tools to compare documented approaches. Request source links, conflicting evidence, and a recommendation tied to explicit requirements.

### Check a claim across sources

Ask DeepSeek V3.1 Terminus to break a claim into verifiable parts, search for primary evidence, and label each part supported, contradicted, or unresolved.

### Prepare an upgrade assessment

Use DeepSeek V3.1 Terminus with retrieved release notes and migration documentation to identify behavior changes, affected features, and checks to run before upgrading.

### Monitor documentation changes

Give DeepSeek V3.1 Terminus retrieved current and previous documentation text. Request a short account of changed requirements, supporting passages, and follow-up questions.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## DeepSeek V3.1 Terminus in other agents

- [Amp](https://spiral.ai/integrations/amp/deepseek-v3-1-terminus)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/deepseek-v3-1-terminus)
- [Claude](https://spiral.ai/integrations/claude-desktop/deepseek-v3-1-terminus)
- [Claude Code](https://spiral.ai/integrations/claude-code/deepseek-v3-1-terminus)
- [Cline](https://spiral.ai/integrations/cline/deepseek-v3-1-terminus)
- [Codex](https://spiral.ai/integrations/codex/deepseek-v3-1-terminus)
- [Cursor](https://spiral.ai/integrations/cursor/deepseek-v3-1-terminus)
- [Devin](https://spiral.ai/integrations/devin/deepseek-v3-1-terminus)
- [dots](https://spiral.ai/integrations/dots/deepseek-v3-1-terminus)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/deepseek-v3-1-terminus)
- [Gemini](https://spiral.ai/integrations/gemini/deepseek-v3-1-terminus)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/deepseek-v3-1-terminus)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/deepseek-v3-1-terminus)
- [goose](https://spiral.ai/integrations/goose/deepseek-v3-1-terminus)
- [Grok](https://spiral.ai/integrations/grok/deepseek-v3-1-terminus)
- [Grok Build](https://spiral.ai/integrations/grok-build/deepseek-v3-1-terminus)
- [Hermes](https://spiral.ai/integrations/hermes/deepseek-v3-1-terminus)
- [Instinct](https://spiral.ai/integrations/instinct/deepseek-v3-1-terminus)
- [Manus](https://spiral.ai/integrations/manus/deepseek-v3-1-terminus)
- [Muse](https://spiral.ai/integrations/muse/deepseek-v3-1-terminus)
- [Muse Code](https://spiral.ai/integrations/muse-code/deepseek-v3-1-terminus)
- [n8n](https://spiral.ai/integrations/n8n/deepseek-v3-1-terminus)
- [Notion](https://spiral.ai/integrations/notion/deepseek-v3-1-terminus)
- [OpenClaw](https://spiral.ai/integrations/openclaw/deepseek-v3-1-terminus)
- [Perplexity](https://spiral.ai/integrations/perplexity/deepseek-v3-1-terminus)
- [Raycast](https://spiral.ai/integrations/raycast/deepseek-v3-1-terminus)
- [VS Code](https://spiral.ai/integrations/vscode/deepseek-v3-1-terminus)
- [Windsurf](https://spiral.ai/integrations/windsurf/deepseek-v3-1-terminus)
- [Zapier](https://spiral.ai/integrations/zapier/deepseek-v3-1-terminus)

## More opencode guides

- [DeepSeek V3.1](https://spiral.ai/integrations/opencode/deepseek-v3-1)
- [DeepSeek V3.2](https://spiral.ai/integrations/opencode/deepseek-v3-2)
- [DeepSeek V3 0324](https://spiral.ai/integrations/opencode/deepseek-v3-0324)
- [DeepSeek V3.2 Exp](https://spiral.ai/integrations/opencode/deepseek-v3-2-exp)
- [DeepSeek V3](https://spiral.ai/integrations/opencode/deepseek-v3)
- [DeepSeek V4 Flash 0423](https://spiral.ai/integrations/opencode/deepseek-v4-flash-0423)

## Questions about DeepSeek V3.1 Terminus in opencode

**Can opencode use DeepSeek V3.1 Terminus?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run DeepSeek V3.1 Terminus like any built-in tool.

**How much does DeepSeek V3.1 Terminus cost in opencode?**

Up to $0.005338 per run at the default inputs. $0.351 per 1M input tokens, $1.30 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 DeepSeek V3.1 Terminus in opencode?**

No. Spiral runs DeepSeek V3.1 Terminus on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up DeepSeek V3.1 Terminus in opencode?**

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

**Does opencode wait while DeepSeek V3.1 Terminus runs?**

DeepSeek V3.1 Terminus runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What is DeepSeek V3.1 Terminus best suited to?**

Start with code repair and research questions that require several searches. DeepSeek specifically improved code and search agent performance in this update.

**How does Terminus differ from DeepSeek V3.1?**

It targets code and search agent performance and reduces unwanted Chinese-English mixing and abnormal characters. In DeepSeek's tests, SWE Verified rose from 66.0 to 68.4.

**Is Terminus better at every research task?**

No. DeepSeek reports BrowseComp improving from 30.0 to 38.5, while the Chinese-language BrowseComp-zh score falls from 49.2 to 45.0. Test it on representative questions in your target language.

**When should I use thinking mode?**

Use thinking mode as a starting point for analysis with several dependent steps, then compare it with non-thinking mode on your actual tasks. Terminus supports both, but the documented V3.1 template places general tool calling in non-thinking mode and describes a separate search workflow.

**How much context can DeepSeek V3.1 Terminus handle?**

Its documented long-context training reaches 128K tokens. Treat that as context capacity, not a promise that one answer can contain 128K tokens.

