[Integrations](https://spiral.ai/integrations) › [Gemini CLI](https://spiral.ai/integrations/gemini-cli) › [DeepSeek V3.1](https://spiral.ai/integrations/gemini-cli/deepseek-v3-1)

# How to Use DeepSeek V3.1 in Gemini CLI

Use DeepSeek V3.1 for code fixes, research with search tools, and complex reasoning tasks. It combines thinking and non-thinking responses, with standard tool calling documented for non-thinking mode.

|  |  |
| --- | --- |
| Model | DeepSeek V3.1 |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.00507 per run at the default inputs. $0.325 per 1M input tokens, $1.235 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 in Gemini CLI

- Use DeepSeek V3.1 in non-thinking mode to investigate the failing tests in this project. Reproduce one failure, inspect the relevant implementation, make the smallest justified fix, and run the affected tests.
- Use DeepSeek V3.1 to review the current diff. Report only findings with a concrete failure scenario, cite file locations, and propose a test for each finding.
- Use DeepSeek V3.1 with thinking enabled to compare the retry logic in this project with bounded exponential backoff. Explain the tradeoffs and recommend a design before editing.
- Use DeepSeek V3.1 in non-thinking mode to add regression tests for the parser's malformed-input handling. Read the existing tests first and verify observable behavior rather than internal implementation details.
- Use DeepSeek V3.1 to compare this project's README with its public interfaces. Identify claims the code does not support, propose precise documentation changes, and cite the relevant implementation.

## How to set up DeepSeek V3.1 in Gemini CLI

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

### Use Spiral's MCP server

1. **Add the server**: Or add it to `~/.gemini/settings.json` yourself:

```bash
gemini mcp add --scope user --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `gemini` and run:

```text
/mcp auth spiral
```

3. **Check it**: In Gemini CLI, run `/mcp`. From your shell:

```bash
gemini mcp list
```

### Use the Spiral skill

1. **Send Gemini CLI 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**: 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-chat-v3.1",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

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

Setup guide in the docs: https://spiral.ai/docs/quickstarts/gemini-cli

## DeepSeek V3.1 tools and prices

- [DeepSeek: DeepSeek V3.1](https://spiral.ai/tools/openrouter/deepseek/deepseek-chat-v3.1) (OpenRouter): Up to $0.00507 per run at the default inputs. $0.325 per 1M input tokens, $1.235 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| min_p | 0 to 1 | — |  |
| tools |  | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |

## What can you do with DeepSeek V3.1 in Gemini CLI?

Turn project code and test failures into proposed patches with DeepSeek V3.1. Give the agent relevant files, expected behavior, and a clear verification target.

### Debug a failing test

Give DeepSeek V3.1 the failure, relevant code, and expected behavior. Ask for a minimal patch and a regression test that reproduces the bug.

### Review a proposed code change

Ask DeepSeek V3.1 to inspect a diff for behavior changes, missing error handling, and test gaps. Request a concrete failure scenario for each finding.

### Compare technical designs

Use DeepSeek V3.1 to compare implementation approaches against stated constraints. Request a recommendation, assumptions, and conditions that would change the decision.

### Research a technical question

Give DeepSeek V3.1 access to a search tool and ask it to investigate a question across several sources. Require dated evidence and links for the final conclusions.

### Compare long specifications

Provide specification text within the documented 128K context window. Ask DeepSeek V3.1 to identify conflicting requirements and quote the passages behind each conflict.

### Triage operational errors

Supply error logs and incident notes as text. Ask DeepSeek V3.1 to group recurring failures, rank possible causes, and propose checks that distinguish them.

### Turn support questions into technical investigations

Ask DeepSeek V3.1 to compare a reported problem with supplied documentation, identify missing evidence, and draft focused diagnostic questions.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All Gemini CLI guides](https://spiral.ai/integrations/gemini-cli)

## DeepSeek V3.1 in other agents

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

## More Gemini CLI guides

- [DeepSeek V3 0324](https://spiral.ai/integrations/gemini-cli/deepseek-v3-0324)
- [DeepSeek V3.1 Terminus](https://spiral.ai/integrations/gemini-cli/deepseek-v3-1-terminus)
- [DeepSeek V3](https://spiral.ai/integrations/gemini-cli/deepseek-v3)
- [DeepSeek V3.2](https://spiral.ai/integrations/gemini-cli/deepseek-v3-2)
- [DeepSeek R1 0528](https://spiral.ai/integrations/gemini-cli/deepseek-r1-0528)
- [DeepSeek V3.2 Exp](https://spiral.ai/integrations/gemini-cli/deepseek-v3-2-exp)

## Questions about DeepSeek V3.1 in Gemini CLI

**Can Gemini CLI use DeepSeek V3.1?**

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

**How much does DeepSeek V3.1 cost in Gemini CLI?**

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

**Do I need an OpenRouter account to use DeepSeek V3.1 in Gemini CLI?**

No. Spiral runs DeepSeek V3.1 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 in Gemini CLI?**

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

**Does Gemini CLI wait while DeepSeek V3.1 runs?**

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

**What is DeepSeek V3.1 useful for?**

Code generation, tool use, and reasoning tasks are its main targets. Try it for debugging, research with search tools, or comparing technical approaches against explicit constraints.

**When should I use thinking mode?**

DeepSeek V3.1 supports thinking and non-thinking responses. Try thinking mode for problems with several constraints or competing explanations, and non-thinking mode for direct drafting or extraction.

**How much context does DeepSeek V3.1 support?**

DeepSeek documents a 128K context window in both modes. For long material, specify the sections to compare and the evidence you want quoted.

**Can DeepSeek V3.1 research current information?**

Yes, when supplied with a search tool. DeepSeek documents a process that searches across multiple turns; ask for dated sources and links supporting the final claims.

**Can DeepSeek V3.1 call tools while thinking?**

DeepSeek documents standard tool calling in non-thinking mode. It also documents a separate search-agent format for thinking mode, so ordinary tool calling and search during reasoning should be treated separately.

