You can use GLM’s coding plan in Pi, just use the anthropic API instead of the OpenAI compatible one they give.
It also compresses the context at around 100k tokens.
In case anyone is interested: https://github.com/sebastian/pi-extensions/tree/main/.pi/ext...