Setting up Claude code with different backend LLMs – including local ones

Setting up Claude code to run both local and remote models has been a big game changer. This article shows you how to set up the proper environment variables so that Claude picks up any combination of local and remote/paid models you want.