anomalyco / anomalyco/opencode

ollama-cloud: glm-5.3-flash dropped from model cache due to unmapped family 'glm5_next'

Open
#45,568 3 comments 0 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Aug 27, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

glm-5.3-flash:cloud (released on Ollama 2026-08-26) is silently dropped from opencode's ollama-cloud model cache and never appears in opencode models ollama-cloud or the TUI model picker, even though it is registered in ~/.ollama/config.json and reachable on Ollama's API.

Root cause: opencode's ollama-cloud cache builder normalizes each model's family field from Ollama's /api/show response to a canonical family name. The new GLM-5.3-Flash architecture reports family: "glm5_next", which has no mapping in opencode's family normalization table, so the model is silently discarded during cache construction.

  • Existing GLM models map glm5.2glm and glm5.1glm.
  • glm5_next is a new architecture (Z.ai redesigned GLM-5.3 with linear + sparse attention, 320B total / 18B active, first natively multimodal GLM) and needs its own entry.
  • The model supports vision (capabilities: completion, thinking, tools, vision), so attachment: true should be set — currently glm-5.2 is attachment: false.
Plugins

None.

OpenCode version

1.18.23

Steps to reproduce
  1. Run ollama launch opencode --model glm-5.3-flash:cloud. This writes ~/.ollama/config.json:
    {
      "integrations": {
        "opencode": {
          "models": ["glm-5.3-flash:cloud", "glm-5.2:cloud"]
        }
      }
    }
    
    Confirmed working via ollama's own launcher.
  2. Run opencode models ollama-cloud. Expected: glm-5.3-flash listed. Actual: absent (only glm-5.2 and glm-5.1 appear).
  3. Run opencode run --model ollama-cloud/glm-5.3-flash:cloud "say hi". Actual: fails with:
    Error: {
      "name": "UnknownError",
      "data": {
        "message": "Unexpected server error. Check server logs for details.",
        "ref": "err_60ae5eb7"
      }
    }
    
  4. Verify the model is reachable on Ollama's API (works):
    curl -s "https://ollama.com/v1/models/glm-5.3-flash:cloud"
    => {"id":"glm-5.3-flash:cloud","object":"model","created":1787752800,"owned_by":"ollama"}
    
    curl -s "https://ollama.com/api/show" -d '{"name":"glm-5.3-flash:cloud"}'
    => {
      "capabilities": ["completion", "thinking", "tools", "vision"],
      "details": {
        "parent_model": "glm-5.3-flash:cloud",
        "family": "glm5_next",
        "parameter_size": "321323031390",
        "quantization_level": "FP8"
      },
      "model_info": {
        "general.architecture": "glm5_next",
        "general.parameter_count": 321323031390,
        "glm5_next.context_length": 1048576,
        "glm5_next.embedding_length": 4096
      },
      "modified_at": "2026-08-26T07:00:00-07:00"
    }
    
  5. Inspect ~/.cache/opencode/models.json — the ollama-cloud provider has families:
    ['deepseek-flash', 'deepseek-thinking', 'gemma', 'glm', 'gpt-oss', 'kimi-k2', 'kimi-k3', 'minimax', 'minimax-m3', 'mistral-large', 'nemotron', 'qwen']
    
    No glm5_next / glm5.3 present. glm-5.2 (works) reports family: "glm5.2" → normalized to glm; glm-5.3-flash (dropped) reports family: "glm5_next" → no normalization entry.
Screenshot and/or share link

N/A — reproduction is fully CLI-driven; outputs included in Steps to reproduce.

Operating System

macOS (darwin)

Terminal

iTerm2

Suggested fix

Add glm5_nextglm (or a new glm5-next family) to the ollama family normalization map used by the ollama-cloud cache builder. Set attachment: true for this model since GLM-5.3-Flash supports vision (the first natively multimodal GLM).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.