GLM 5.2: Set Up Local AI with Cursor/Codex etc
Greg Isenberg and Amir walk through how to set up GLM 5.2, Google's open-source AI model, in coding tools to cut token costs by around 5x.
The gist
-
GLM 5.2 scores 62% on long-horizon tasks versus Claude Opus 4.8's 69%, but costs $0.44 per run versus $2.38.
-
You can add GLM 5.2 to Cursor or Codex in minutes by grabbing an API key and overriding the OpenAI endpoint.
-
Use Claude to handle image description, then pass the output to GLM 5.2 for execution to work around its vision limits.
-
Current low token prices are a subsidy that will likely rise, so building with cheaper open-source models now is a hedge.
"I actually used Opus 4.8 to import screenshots because GLM 5.2 doesn't support vision capabilities. So what I did is I used Opus 4.8 to import screenshots and explain back to me what it sees — 'Tell me what you see specifically on the front-end design for the hero section and ..."
▶ Play at 15:13256 creators recommend it, including Riley Brown, Chris Koerner, and Jason Calacanis.
See all on the Claude page"I personally started using this through Cursor using OpenRouter's API. In my opinion, the best way to get started with this is just go to OpenRouter and Cursor and get that set up through and through."
▶ Play at 6:4559 creators recommend it, including Riley Brown, Claire Vo, and JD Ross.
See all on the Cursor page"If you're using Codex, you can go to OpenRouter, get your OpenRouter key, and then go into the provider, get the endpoint, and then go into Codex, create a profile, and say, 'Hey, I want you to install this open-source model.' Codex does actually support open-source models."
▶ Play at 7:43100 creators recommend it, including Riley Brown, Claire Vo, and Dan Shipper.
See all on the Codex pageWhat they recommend · 4 picks
“I highly highly recommend if you're starting to dabble with this and token usage is a thing for you, get one of these agnostic harnesses set up now — a lot of them are model agnostic.”
“I personally started using this through Cursor using OpenRouter's API. In my opinion, the best way to get started with this is just go to OpenRouter and Cursor and get that set up through and through.”
“If you're using Codex, you can go to OpenRouter, get your OpenRouter key, and then go into the provider, get the endpoint, and then go into Codex, create a profile, and say, 'Hey, I want you to install this open-source model.'”
Get a Sunday email on what Greg and 5 other AI builders start using
Free. Paid ads left out. Unsubscribe in one click.
Also mentioned
Related episodes
Episodes covering similar topics