▲ 187 r/opencode+2 crossposts

How to set up DeepSeek Flash + GLM 5.2 advisor in OpenCode - the exact config

A few people asked how to set up the DS Flash + GLM 5.2 combo from my last post. Here's the exact config.

The idea: DeepSeek Flash handles the routine orchestration (cheap, fast, 1M context). GLM 5.2 steps in as an advisor subagent when the task needs actual reasoning. Flash pays ~$0.0003 per mechanical call. GLM only burns credits on the calls that need it.

The config

Add this to your opencode.jsonc. Any of the three locations work:

~/.config/opencode/opencode.jsonc           # global, all projects
~/.opencode/opencode.jsonc                   # project-level
.opencode/opencode.jsonc                     # per-repo, can commit
{
  "$schema": "https://opencode.ai/config.json",
  "default_agent": "deepseek-flash",
  "agent": {
    "deepseek-flash": {
      "description": "Primary agent. Fast, cheap orchestration for routine engineering work.",
      "mode": "primary",
      "model": "opencode-go/deepseek-v4-flash",
      "steps": 30
    },
    "glm-advisor": {
      "description": "Strategic advisor for second opinions, plan critique, and architecture tradeoffs.",
      "mode": "subagent",
      "hidden": true,
      "model": "opencode-go/glm-5.2",
      "steps": 15,
      "temperature": 0.3,
      "permission": {
        "read": "allow",
        "glob": "allow",
        "grep": "allow",
        "list": "allow",
        "webfetch": "allow",
        "edit": "deny",
        "write": "deny",
        "bash": "deny",
        "task": "deny",
        "question": "allow",
        "todowrite": "deny"
      }
    }
  },
  "provider": {
    "opencode-go": {
      "apiKey": "{env:OPENROUTER_API_KEY}"
    }
  }
}

How it works

Set default_agent to deepseek-flash. Flash handles every session, cheap and fast. When you hit a task that needs judgment -- architecture decision, plan critique, second opinion -- tell Flash to dispatch the glm-advisor subagent via the task tool.

Flash's system prompt already knows how to route:

  • Bounded mechanical work (classify, edit JSON, summarize): handles itself
  • Strategic work (tradeoffs, plan review, second opinions): dispatches to glm-advisor

Prompt for the advisor subagent (optional)

If you want the advisor to follow a consistent output format, save this as .opencode/prompts/glm-advisor.md:

You are a sharp, honest senior advisor. All context is inline in the prompt below.
Never reference files, external sources, or prior conversations.

Structure every response in three sections:
1. CONCLUSION -- your direct answer or recommendation in 1-3 sentences.
2. REASONING -- the key factors, evidence, or logic behind your conclusion.
3. WATCH OUT -- caveats, failure modes, or what may have been missed.

Be direct. If the question has no good answer, say so and explain why.
Do not hedge unnecessarily. Calibrate confidence honestly.

Then reference it in the config by adding to the glm-advisor block:

"prompt": "{file:.opencode/prompts/glm-advisor.md}"

What changes

Before: GLM 5.2 running every call. Burning through opencode-go quota on routine work like "list files" and "run tests."

After: Flash handles everything routine. GLM only fires when you (or Flash) decide analysis is needed. In my usage, roughly 70-80% of calls stay on Flash. The other 20-30% use GLM, and those are the ones that actually needed it.

Why this split

Flash is $0.14/M input, GLM is $1.40/M. For classification and formatting work under 2K tokens, Flash costs about $0.0003 per call. GLM on the same task costs an order of magnitude more for no meaningful quality difference.

The advisor subagent pattern keeps GLM in reserve for the work it actually improves: multi-factor analysis, architecture judgment, and second opinions. Everything else stays on Flash.

Caveats

  • Flash and GLM both have 1M context. Context length is not a differentiator between them.
  • GLM's reasoning mode (effort=max) takes 60-120 seconds. Budget for it if you call it synchronously.
  • The advisor is read-only. It can read files, search, and fetch URLs, but cannot edit files, write code, or run commands. Output lands in the primary agent's context for review.
reddit.com
u/ahriad — 4 days ago

Most WooCommerce stores don’t actually know who their real returning customers are.

Email opens and click rates look useful, but they often miss the bigger picture, actual buying behavior over time.

An analytical WooCommerce CRM plugin should looks at order history to estimate:

  • who is likely to buy again
  • who is starting to drift away
  • how “healthy” your customer base really is

No tracking pixels. No email data. Just purchase history.

If you care about retention, this gives a very different view of your customers than standard CRM tools.

I’m looking for beta testers to try it out and share feedback, curious to hear how it performs on real stores.

reddit.com
u/ahriad — 2 months ago

Most WooCommerce stores don’t actually know who their real returning customers are.

Email opens and click rates look useful, but they often miss the bigger picture, actual buying behavior over time.

An analytical WooCommerce CRM plugin should looks at order history to estimate:

  • who is likely to buy again
  • who is starting to drift away
  • how “healthy” your customer base really is

No tracking pixels. No email data. Just purchase history.

If you care about retention, this gives a very different view of your customers than standard CRM tools.

I’m looking for beta testers to try it out and share feedback, curious to hear how it performs on real stores.

reddit.com
u/ahriad — 2 months ago

I built an analytical WooCommerce CRM plugin that brings predictive machine learning (the BG/NBD model) natively to WordPress. It looks at your order history to estimate:

  • Expected future orders per customer
  • Who is silently starting to drift away (Churn risk)
  • The statistical health of your customer base

No tracking pixels. No unreliable marketing metrics. Just purchase history powering machine learning.

If you care about retention, this gives a very different, proactive view of your customers compared to standard backward-looking CRM tools.

I’m looking for beta testers to try it out. I'm really curious to hear how the machine learning predictions perform on real stores. Let me know if you're interested!

reddit.com
u/ahriad — 2 months ago

Most WooCommerce stores rely on email opens/clicks to judge “engagement,” but I’m starting to think that’s a weak signal for actual retention.

I’ve been testing a probabilistic model (BG/NBD) on pure order data (recency + frequency), and it can predict repeat purchase likelihood surprisingly well, no pixels, no email data, nothing external.

In a few cases, customers that looked “inactive” in email tools still had a high probability of buying again, and vice versa.

Curious, how are you identifying customers at risk of churning? Are email metrics actually working for you?

reddit.com
u/ahriad — 2 months ago