6 ms·
Forgive my stupidity but how do you run Claude Code with non-Anthropic models?
by jonstewart 14d ago
Forgive my stupidity but how do you run Claude Code with non-Anthropic models?
- tokencanopy 14d agoClaude 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
- EFLKumo 14d agoClaude 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.
- verdverm 14d agoThe full list for the curious https://code.claude.com/docs/en/env-vars#variables https://code.claude.com/docs/en/env-vars#variables
- deleted 14d ago[deleted]
- krat0sprakhar 14d agoHere's an example for using it with GLM:https://docs.z.ai/devpack/tool/claude https://docs.z.ai/devpack/tool/claude ... works similarly for other models
- nijave 14d agoI use routatic/proxy (actually my own fork with various changes/fixes http://github.com/nijave/proxy/ 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/6f5e5793a992619808135ce85fa49855 https://gist.github.com/nijave/6f5e5793a992619808135ce85fa49...