anomalyco / anomalyco/opencode
ollama-cloud: glm-5.3-flash dropped from model cache due to unmapped family 'glm5_next'
@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.2→glmandglm5.1→glm. glm5_nextis 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), soattachment: trueshould be set — currentlyglm-5.2isattachment: false.
Plugins
None.
OpenCode version
1.18.23
Steps to reproduce
- Run
ollama launch opencode --model glm-5.3-flash:cloud. This writes~/.ollama/config.json:
Confirmed working via ollama's own launcher.{ "integrations": { "opencode": { "models": ["glm-5.3-flash:cloud", "glm-5.2:cloud"] } } } - Run
opencode models ollama-cloud. Expected:glm-5.3-flashlisted. Actual: absent (onlyglm-5.2andglm-5.1appear). - 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" } } - 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" } - Inspect
~/.cache/opencode/models.json— the ollama-cloud provider has families:
No['deepseek-flash', 'deepseek-thinking', 'gemma', 'glm', 'gpt-oss', 'kimi-k2', 'kimi-k3', 'minimax', 'minimax-m3', 'mistral-large', 'nemotron', 'qwen']glm5_next/glm5.3present.glm-5.2(works) reportsfamily: "glm5.2"→ normalized toglm;glm-5.3-flash(dropped) reportsfamily: "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_next → glm (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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.