Use DeepSeek, Kimi or GLM in Claude Code: Which Models Work and How to Choose

Pointing Claude Code at non-Claude models only works if the model declares the Anthropic protocol. Learn how to pick one, estimate cost and handle the known limits, with a live model table.

Home / Setup guides / Use DeepSeek, Kimi or GLM in Claude Code: Which Models Work and How to Choose

By VisionCoder team · Updated 2026-11-15 · Checked 2026-11-10

Disclosure: we build VisionCoder, one of the options below, so our description of it is the least neutral part. Statements about other products cite only their official docs, with the checked date (2026-11-10). Prices and models follow the live data below.

The limit first

People search for "use DeepSeek / Kimi / GLM in Claude Code" because they want a different or lower-cost model behind a tool they already like. Before anything else: Anthropic's documentation states that routing Claude Code to non-Claude models through any gateway is not supported (checked 2026-11-10; sources at the end). So this is a "connects, but no official support" setup. You may hit incompatible fields or unreliable tool calls. Try it on a throwaway project first. We do not vouch for how any model behaves inside Claude Code.

Step 1: check the protocol

Claude Code speaks the Anthropic protocol (/v1/messages). The VisionCoder gateway does not convert protocols: a model can only be called over the protocols it has declared. If a model has not declared the Anthropic protocol, Claude Code gets a 400 with error number 400159, and the response lists the paths that model does support.

That is by design. Converting between protocols means rewriting requests or responses, which makes billing and behaviour harder to reason about, so the gateway only forwards. The rule for Claude Code is simple: pick only from models that declare the Anthropic protocol.

The table below is generated from the public model catalog each time the page is served. Models that do not declare the protocol never appear in it.

Step 2: narrow the list

  1. Context length. Claude Code packs files and conversation into the context window. A small window means constant compaction or truncation.
  2. Input and output prices together. Coding sessions send far more input than output, so do not look at only one of them.
  3. Cache-hit price. Repeated content in a session that hits the prompt cache is billed at the cache-hit rate, usually below the normal input rate. The gateway tries to keep a session on the same route to help upstream caching; see routing and failover.
  4. Your own test. Run the same small task on two or three candidates. It tells you more than any spec sheet.

Step 3: estimate the cost

Each call is priced on four items: input, output, cache hit and cache write. Each is multiplied first, divided afterwards, and the total is rounded up once. A quick estimate for one turn:

Every model page has a cost estimate block that does this with the current prices. It is an estimate, not a bill; the expanded arithmetic on each call record governs. Rules: billing.

Connecting

Create a key and look up the gateway address on the API Keys page, then point Claude Code at it. Full steps, environment variables and a verification command are in the guide, so we do not duplicate them:

Common errors

Sources

Third-party names: Claude, GPT, Gemini and similar names and trademarks belong to their respective owners. VisionCoder is not affiliated with them and uses the names only to describe callable models. Unofficial note: VisionCoder is not affiliated with the owners of Claude Code, whose name and trademark belong to them.

Related guides

Sign in to get an API key

中文