Claude Code is a powerful command-line interface that allows developers to interact with Anthropic's Claude AI models for coding assistance. This guide provides two battle-tested methods to configure Claude Code to work with multiple LLM providers beyond just Anthropic, including models from DeepSeek, z.ai (GLM), Kimi, and OpenRouter.
This empowers you to switch between the best model for any given task without ever leaving your terminal. Two Approaches to Flexibility
- Shell Functions: A simple, lightweight, and robust method for switching providers before starting a session. Perfect for most use cases.