Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just asked glm-4.6 how to setup a z.ai api key with claude code and it kept on saying it has no idea what claude code is...

Quite funny, actually.



Ask and you shall receive!

https://docs.z.ai/devpack/tool/claude

tldr

    "env": {
        "ANTHROPIC_AUTH_TOKEN": "your_zai_api_key",
        "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic"
    }
Although if you want an Actually Good Experience I recommend using Claude Code Router

https://github.com/musistudio/claude-code-router

because it allows you to intercept the requests and forward them to other models. (e.g. GLM doesn't seem to support search or images, so I use Gemini's free tier for that.)

(CCR just launches Claude with the base url set to a local proxy. The more adventurous reader can also set up his own proxy... :)


Does this allow me to use Claude Code as the orchestration harness with GLM 4.6 as the LLM along with other LLMs? Seems so based on your description, thanks for the link.


Explain like I'm 5?


The Pro and Max plans for z.ai+GLM provides an MCP that does image.


Benchmark score

Humans : 1

AI : 0




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: