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

opencode · LLMReleased 2026-09-02

How to Use Gemini 3.8 Flash in opencode

Gemini 3.8 Flash suits code changes across multiple files, document analysis, and tasks that need several reasoning steps. Google reports stronger software engineering and reasoning than Gemini 3.7 Flash, with greater token use possible on difficult work.

Prompts to try with Gemini 3.8 Flash in opencode

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

Use Gemini 3.8 Flash to trace authentication through this project. Identify where expired sessions are handled, propose the smallest consistent fix, and run the relevant tests after making it.

Gemini 3.8 Flashopencode
Try asking
  • Use Gemini 3.8 Flash with high reasoning effort to investigate duplicate processing during retries. Trace the relevant code, reproduce the failure, and add a regression test with the fix.

  • Use Gemini 3.8 Flash to replace the duplicated date parsing in this project with one shared implementation. Preserve existing behavior and check every caller.

  • Use Gemini 3.8 Flash to compare the API implementation with the project's documented contract. Return a table of mismatches with file locations and a focused test for each confirmed issue.

  • Use Gemini 3.8 Flash to review this branch for behavior changes. Explain the affected paths, identify missing regression coverage, and keep the review under 800 words.

How to set up Gemini 3.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.

    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 Gemini 3.8 Flash

    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": "vertex",
        "model": "google/gemini-3.8-flash",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

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

Gemini 3.8 Flash providers and prices

Spiral runs Gemini 3.8 Flash through Vertex AI and Gemini. Open a card for today's price, with every fee included. Name one in your prompt, or let opencode pick.

Vertex AILLM
Gemini 3.8 Flash
google/gemini-3.8-flash
GeminiData

Settings you can ask for

Ask opencode for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Max tokens1 to 65536

The most output tokens to generate.

Reasoning effortlow, medium, or highmedium

How much the model reasons.

Every API field of Gemini 3.8 Flash is on its tool page: open its card above.

What can you do with Gemini 3.8 Flash in opencode?

Gemini 3.8 Flash can help carry code changes across multiple files and investigate bugs that span several modules. Give it a concrete acceptance test and have it check the completed change.

Refactor code across files

Use Gemini 3.8 Flash to trace a change through related modules, update callers, and check the result with focused tests.

Investigate difficult bugs

Give Gemini 3.8 Flash the relevant code and failure details. Ask for a reproducible explanation, a small fix, and a regression check.

Compare lengthy documents

Ask Gemini 3.8 Flash to compare supplied document text, identify conflicting requirements, and cite the passages behind each finding.

Extract records from text

Use Gemini 3.8 Flash to turn order notes or meeting summaries into structured records, with explicit rules for missing information.

Triage incoming requests

Ask Gemini 3.8 Flash to classify request text, summarize the issue, and draft the next question using a fixed set of categories.

Review analytical reports

Have Gemini 3.8 Flash examine supplied figures and explanations, flag unsupported conclusions, and list calculations that need an independent check.

Gemini 3.8 Flash success rate and speed on Spiral

Success and speed over the last 24 hours, across every run of these tools on Spiral.

Success rate
100.0%
Fastest median run time
1.7s
Runs, last 24 hours
44,302
ToolSuccessMedian timeRuns
Gemini 3.8 Flash100.0%1.7s44,033
Gemini 3.8 Flash Media Understanding (image, video, audio, PDF)98.1%12.1s269

Questions about Gemini 3.8 Flash in opencode

Can opencode use Gemini 3.8 Flash?

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

How much does Gemini 3.8 Flash cost in opencode?

Up to $0.040005 per run at the default inputs. $1.95 per 1M input tokens, $0.195 per 1M cached input tokens, $0.054166668 per 1M cache write tokens, $9.75 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 a Vertex AI account to use Gemini 3.8 Flash in opencode?

No. Spiral runs Gemini 3.8 Flash on its own Vertex AI account. You sign in to Spiral once and never paste a key.

How long does it take to set up Gemini 3.8 Flash in opencode?

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

Which provider runs Gemini 3.8 Flash?

Spiral offers Gemini 3.8 Flash through Vertex AI and Gemini. Name one in your prompt, or let opencode pick.

Does opencode wait while Gemini 3.8 Flash runs?

Gemini 3.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 Gemini 3.8 Flash good at?

It is designed for software engineering, agent tasks, and analysis that takes several reasoning steps. Google reports improvements over Gemini 3.7 Flash in these areas.

How much text can Gemini 3.8 Flash handle?

Google lists an input limit of 1,048,576 tokens and an output limit of 65,536 tokens. For a long report, specify the sections and desired length instead of asking it to fill the available space.

When should I increase reasoning effort?

Use high effort for difficult mathematics or analysis with several dependent steps. Low effort suits quick drafts and simpler analysis; higher effort can increase token use.

Can Gemini 3.8 Flash return structured data?

Yes, it supports structured outputs with a JSON Schema. Define the information you need and how missing values should appear, then validate the extracted values against the source.

What should I check before trusting an answer?

Gemini 3.8 Flash can hallucinate. Check citations, calculations, and code behavior, and ask it to distinguish evidence from assumptions.

Get started

Start using Gemini 3.8 Flash 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