Forgive my stupidity but how do you run Claude Code with non-Anthropic models?

I use routatic/proxy (actually my own fork with various changes/fixes http://github.com/nijave/proxy/ -- fyi the fork is all vibes...)

Some gateways/proxies/hosts also offer multiple endpoints (z.ai has both Anthropic endpoint and Completions endpoint)

Edit: Here's the PoC I made for work although it assumes you're using Cloudflare Access (VPN) with a Cloudflare AI Gateway to hand wave the auth away (auth to the LLM API gets auto injected by Cloudflare Access derived from the client's VPN connection) https://gist.github.com/nijave/6f5e5793a992619808135ce85fa49...

Here's an example for using it with GLM:https://docs.z.ai/devpack/tool/claude ... works similarly for other models

Claude Code supports the base URL env var so you could tell it to talk with any LLM API endpoint that receives the Anthropic style request format, e.g. DeepSeek.

Claude Code allows you to change the config such that you use the harness with different models - you can actually ask a coding agent to configure it for you

[deleted]