[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Qwen3.8 Flash](https://spiral.ai/integrations/opencode/qwen3-8-flash)

# How to Use Qwen3.8 Flash in opencode

Qwen3.8 Flash suits code repair, long-document analysis, and text extraction into JSON. It pairs a million-token context window with optional thinking for tasks that need more reasoning.

|  |  |
| --- | --- |
| Model | Qwen3.8 Flash |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.002511 per run at the default inputs. $0.195 per 1M input tokens, $0.611 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Qwen3.8 Flash in opencode

- Use Qwen3.8 Flash with thinking enabled to investigate the failing test in this repository. Trace the relevant call path, make the smallest justified fix, and run the affected tests.
- Use Qwen3.8 Flash to map this project's request lifecycle from its entry point to storage. Cite file paths and function names, and keep the explanation under 800 words.
- Use Qwen3.8 Flash with thinking enabled to compare the requirements document with the current implementation. Produce a table of unmet requirements, relevant code, and proposed acceptance checks.
- Use Qwen3.8 Flash to inspect the log parser and its fixtures. Propose JSON records with timestamp, severity, message, and source_line; use null for missing timestamps and validate the output types.
- Use Qwen3.8 Flash with thinking enabled to review the pending diff for boundary conditions and error handling. Report only findings tied to specific code, then suggest a focused regression test for each.

## How to set up Qwen3.8 Flash 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 Qwen3.8 Flash**: 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": "qwen/qwen3.8-flash",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds Qwen3.8 Flash on Spiral, shows the price and runs it.

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

## Qwen3.8 Flash tools and prices

- [Qwen: Qwen3.8 Flash](https://spiral.ai/tools/openrouter/qwen/qwen3.8-flash) (OpenRouter): Up to $0.002511 per run at the default inputs. $0.195 per 1M input tokens, $0.611 per 1M output tokens.

## Settings you can ask for

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

## What can you do with Qwen3.8 Flash in opencode?

Qwen3.8 Flash can help trace bugs and plan changes across a large codebase. Ask your coding agent to gather the relevant files, define the expected behavior, and verify the proposed change.

### Repair a bug across several modules

Use Qwen3.8 Flash to trace a failure through related code, propose a focused patch, and identify a regression test.

### Explain an unfamiliar codebase

Ask Qwen3.8 Flash to map entry points, dependencies, and the path a request takes through the supplied code.

### Compare lengthy policy texts

Have Qwen3.8 Flash compare two policy versions and produce a table of changed obligations with supporting passages.

### Extract records from support messages

Ask Qwen3.8 Flash to turn message text into JSON records containing the issue, product, requested action, and supporting excerpt.

### Find decisions in long conversations

Use Qwen3.8 Flash to extract decisions, unresolved questions, and explicitly assigned owners from conversation transcripts.

### Prepare an implementation plan

Give Qwen3.8 Flash requirements and relevant code, then request a plan covering dependencies, edge cases, and acceptance checks.

### Answer questions from reference material

Provide Qwen3.8 Flash with reference text and ask for answers tied to section labels and short supporting quotations.

### Review recurring operational updates

Have Qwen3.8 Flash compare supplied updates with the previous report and draft a concise list of changes and unresolved issues.

## Overview

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

## Qwen3.8 Flash in other agents

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

## More opencode guides

- [Qwen3.8 27B (batch)](https://spiral.ai/integrations/opencode/qwen3-8-27b-batch)
- [Qwen3.8 Max (0902)](https://spiral.ai/integrations/opencode/qwen3-8-max-0902)
- [Qwen3.8 27B](https://spiral.ai/integrations/opencode/qwen3-8-27b)
- [Qwen3.8 Max (0902) (batch)](https://spiral.ai/integrations/opencode/qwen3-8-max-0902-batch)
- [Qwen3.8 2.4T A95B](https://spiral.ai/integrations/opencode/qwen3-8-2-4t-a95b)
- [Qwen3.8 Max Prime](https://spiral.ai/integrations/opencode/qwen3-8-max-prime)

## Questions about Qwen3.8 Flash in opencode

**Can opencode use Qwen3.8 Flash?**

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

**How much does Qwen3.8 Flash cost in opencode?**

Up to $0.002511 per run at the default inputs. $0.195 per 1M input tokens, $0.611 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 Qwen3.8 Flash in opencode?**

No. Spiral runs Qwen3.8 Flash on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Qwen3.8 Flash in opencode?**

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

**Does opencode wait while Qwen3.8 Flash runs?**

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

**What is Qwen3.8 Flash useful for?**

Use it for code repair, questions across long reference texts, and extracting information into JSON. Give each task a concrete result, such as a patch, an evidence table, or a set of records.

**How much text can Qwen3.8 Flash handle?**

Alibaba lists a million-token context window and a maximum output of 128k tokens. These are token limits, so avoid treating them as fixed word or page counts.

**When should I use thinking?**

Use thinking for debugging, mathematical problems, and decisions that require several stages of analysis. Direct answers suit straightforward questions and routine text processing.

**What can go wrong with JSON extraction?**

JSON Object mode can return valid JSON with unexpected keys or value types. Specify the expected structure, show a completed example, and validate each record before using it.

**How should I prompt Qwen3.8 Flash?**

State the task, provide the relevant context, and define the output format and length. For extraction, include an example record and explain how missing information should be represented.

