Urgent.News

What's breaking now, across hundreds of outlets.

AI

How to use Claude Code with DeepSeek, Kimi, GLM, Qwen, and MiniMax

Originally published at alwaysagent.app . The original is kept up to date. Claude Code is a terminal coding agent, not a single locked-in model. Because DeepSeek, Moonshot (Kimi), Z.ai (GLM), Alibaba Cloud Model Studio (Qwen), and MiniMax all publish official Anthropic-compatible endpoints, you can connect Claude Code to any of them with a base URL, an API key, and a model mapping. The short…

Claude Code is a versatile terminal coding agent that supports several AI model providers, including DeepSeek, Kimi, GLM, Qwen, and MiniMax. To use Claude Code with any of these models, you need to configure a set of environment variables that specify the base URL, authentication token, and model mappings. These providers all publish official Anthropic-compatible endpoints, allowing Claude Code to communicate with them seamlessly without requiring any third-party proxies or CLI modifications.

To set up Claude Code with DeepSeek, you need to export the following environment variables in your shell profile or Claude Code settings file:

- ANTHROPIC_BASE_URL: Set to https://api.deepseek.com/anthropic

- ANTHROPIC_AUTH_TOKEN: Your DeepSeek API key

- ANTHROPIC_MODEL: The DeepSeek model you want to use (e.g., deepseek-flash)

- ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, and ANTHROPIC_DEFAULT_HAIKU_MODEL: Set to the same DeepSeek model ID

- CLAUDE_CODE_SUBAGENT_MODEL: Set to the same DeepSeek model ID as the primary model

- CLAUDE_CODE_EFFORT_LEVEL: Set to "max" for optimal performance

For Kimi (Moonshot AI), the process is similar. Export the following environment variables:

- ANTHROPIC_BASE_URL: Set to https://api.moonshot.ai/anthropic

- ANTHROPIC_AUTH_TOKEN: Your Kimi API key

- ANTHROPIC_MODEL: The Kimi model you want to use (e.g., kimi-k3)

- ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL, and ANTHROPIC_DEFAULT_FABLE_MODEL: Set to the same Kimi model ID

- CLAUDE_CODE_SUBAGENT_MODEL: Set to the same Kimi model ID as the primary model

- CLAUDE_CODE_AUTO_COMPACT_WINDOW: Set to a larger value (e.g., 1000000) for better performance

Remember to generate and store your API keys securely, preferably in environment files that are not committed to version control. Also, keep in mind that Anthropic may not guarantee Claude Code compatibility with non-Claude models, so it's always a good idea to test each provider on a small task before relying on it for production work.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

24 GB VRAM: What Local LLMs Actually Fit

24 GB is the 32B tier. A 32B model at 4-bit needs about 20 GB, which leaves roughly 4 GB for context and runtime on a 24 GB card.

  • 24 GB VRAM minimum for 32B model at 4-bit precision
  • 24 GB cards can run 70B model at 4-bit with split setup
  • 24 GB card cheaper to rent than buy at $0.27/hour

More from Sunday, 29 November 2026 →