Run OpenCode on DeepSeek or GLM models

OpenCode on DeepSeek V4.1 Flash or GLM-5.3 instead of a native seat

by Vanja Petreski16 Sep 2026

Prompt for your agent

Goal: Run OpenCode on DeepSeek or GLM instead of a native coding seat
Setup: agents used in source: OpenCode, Claude, Codex.
Before you start: A DeepSeek balance, GLM Coding Plan, or OpenCode Go subscription.
Steps:
1. Install OpenCode: curl installer, Homebrew or npm.
2. Connect a provider with /connect: Keys are stored in ~/.local/share/opencode/auth.json.
3. Pick a model with /models; start on Flash: Confirm the model ID in /models rather than guessing it.
4. Use the right base URL for your agent: DeepSeek: api.deepseek.com (OpenAI) or /anthropic; GLM plan only meters the coding URL.
5. Run /init and commit AGENTS.md: It writes build/test commands, repo shape and conventions.
6. Use Plan vs Build modes: Tab switches Plan (suggest) and Build (edit); /undo and /redo revert.
7. Work off-peak and keep the prefix stable: Off-peak is half price on DeepSeek; GLM off-peak costs half the credits.
Rules: ask me before anything irreversible (sending, posting, paying, deleting); don’t invent data, results or tools I haven’t given you; tell me what you couldn’t verify.
Based on: Vanja Petreski — https://vanja.io/deepseek-glm/ (summarised from source; the source has no explicit step list)

Steps are our summary of the source (it has no explicit step list). Includes a “Based on” credit line.

I tried this

Tell the next builder. One anonymous answer each; click again to undo.

Agents, models and tools only what the source states

Agents
OpenCode Claude Codex
Models
DeepSeek V4.1 Flash (deepseek-flash) DeepSeek V4-Pro-0813 GLM-5.3 GLM-5.3-Flash
Cost
From $10–$18/month for subscriptions, or pay-as-you-go tokens (prices as of 16 Sep 2026)

Sources & credit