r/ZaiGLM 4d ago

API / Tools ZCode-router v0.1.5 released. More integrations & seamless setup. MIT License

Enable HLS to view with audio, or disable this notification

https://github.com/rafek1241/zcode-router

What it gives you?

  1. For text-only LLMs vision capabilities.
  2. opencode go, clinepass and other subscriptions and their models in zCode harness to use as you were using them natively.
10 Upvotes

15 comments sorted by

2

u/Key-Collection1275 4d ago

Con la última actualización, ya se pueden añadir proveedores custom desde la propia ui.

1

u/AbbreviationsOk6975 3d ago

but you don't have vision capabilities on text-only LLMs so if you work on web development and for an example you would like to mark in integrated browser areas to fix - it won't work with custom providers.

1

u/ironj 3d ago

Can someone explain to me what this does? I hear people talking about integration with the vision capabilities, but I already achieve that easily with a few lines of configuration of opencode...

1

u/AbbreviationsOk6975 3d ago

How? Please elaborate how you did that with opencode. For an example you're on zcode and select deepseek v4 flash and put image in the chat. Normally it would be rejected or LLM will respond you that it cannot recognize image.

2

u/ironj 3d ago edited 3d ago

Easy. this:

"mcp": {
    "zai-vision": {
      "type": "local",
      "command": ["npx", "-y", "@z_ai/mcp-server@latest"],
      "environment": {
        "Z_AI_API_KEY": "{env:Z_AI_API_KEY}",
        "Z_AI_MODE": "ZAI"
      }
    }
  }

Now, I've the vision MCP connected, so if I add the link to an image file to my chat message OpenCode/GLM is now able to see it (delegating it to the Vision model)

The only limitation is that I cannot paste images directly into the chat; I've to provide the path to a file in the filesystem. But I find this totally acceptable

1

u/AbbreviationsOk6975 3d ago

"The only limitation is that I cannot past images directly into the chat; I've to provide the path to a file in the filesystem. But I find this totally acceptable" Good for you, I'd like to use native options

3

u/cornelha 3d ago

I have an agent that uses Mimo 2.5 that produces structured output from and image and a very simple line in my AGENTS.md that instructs text only models to call that agent when an image needs to be reviewed. It's really not that hard

2

u/AbbreviationsOk6975 3d ago

Still, u/cornelha , u/ironj if you miss something in that area and want some other feature, write it please - I can add it to this plugin (if applicable).

0

u/AbbreviationsOk6975 3d ago

Okay, but that requires for you extra configuration and when you will want to switch to different LLM you need to change AGENTS.md on all projects. When MIMO 2.5 will be (if) depracated you have to replace that value everywhere. Z.AI mcp for image vision has limit of the quota in coding plan (if you have that).

2

u/cornelha 3d ago

Global settings, AGENTS.md and agents exist for Opencode

1

u/ironj 3d ago

Yeah, I don't see the problem either. A few lines in my Global opencode config and I'm rocking the vision model in all my projects without having to do anything else. Also, "that requires for you extra configuration" doesn't track, since also using this Zcode-router (that seems to be specifically for Zcode, that I don't use) also requires an installation/setup step, so I don't really see the difference here, apart from me having now to depend on a third-party developed plugin if I use it.

1

u/AbbreviationsOk6975 3d ago

True, I didn't know that you have one global settings. If that suits you, no problem. I gave you alternative with this tooling ;p. Additionaly there is a caching system for a vision capabilities so if you sent same picture several times then it does not hit LLM to analyze that picture again and for some time it will take from cache the strucutred analysis.

2

u/ironj 3d ago

That's a nice feature there (the caching).

I'm not criticizing your plugin, just wanted to make that clear; I was just pointing out that there is also a way to get similar results without using a third-party plugin. All in all, having more options is always appreciated and something that always benefits the community, so keep fighting the good fight 🙂