CLI agent

Pointing Claude Code at a non-Anthropic model: what you lose

Claude Code still works after you swap the model — but not every feature survives. This breaks the tool down into client layer, protocol layer and model layer, then says item by item what breaks, what does not, and whether the loss can be recovered.

Verified 2026-10-26Applies to
Claude Code 2.x

The short answer

Claude Code's features live in three layers, and only the middle one is at risk:

  • Client layer (subagents, MCP, file editing, slash commands): runs on your machine. Unaffected by the model.
  • Protocol layer (Messages format, streaming events, cache_control, thinking blocks): whatever the gateway implements.
  • Model layer (reasoning quality, vision input, cache hits): belongs to the model. Change the model, change the capabilities.

The real trade-off happens at the model layer, not the protocol layer. That sets the right expectation: you are replacing the model, not Claude Code.

What breaks, what does not

CapabilityAnthropic ClaudeOn DeepSeek V4Layer
Code editing, multi-file refactors✅✅Client — unaffected
Subagents / Task tool✅✅Client — unaffected
MCP servers✅✅Client — unaffected
Slash commands, hooks✅✅Client — unaffected
Image input (screenshots, mockups)✅❌Model — needs a vision model
Extended thinking✅❌Model — the model produces no thinking blocks
Prompt caching✅⚠️ PartialProtocol + model
WebSearch tool✅❌Server-side tool, Anthropic only
1M context❌ (200K)✅Model — a gain, not a loss
Direct access and CNY billing❌✅Network and billing, see the no-credit-card route

Item by item

Image input stops working

When you paste an image, Claude Code encodes it as an image block and puts it in the message. A text-only model either rejects the parameter or silently drops it — and the silent case is worse, because the model starts guessing at what the picture showed.

Workaround: route vision-dependent tasks to a model that accepts images; pure text refactors do not need it.

Extended thinking never appears

Extended thinking is a model-side reasoning block from Anthropic, surfaced in the Messages protocol as a thinking content block. A gateway can pass such blocks through, but the model has to produce them — with DeepSeek that path is empty.

The alternative is to use a reasoning model directly. deepseek-v4-pro-0813 is a reasoning model; its thinking happens inside the model rather than being exposed as blocks. You get "thinks better", not "you can watch it think".

Prompt caching is partially available

This is the easiest item to misjudge, because there are two layers:

  • Billing: In the example tier below, DeepSeek V4 Pro input costs ¥2.25 and cached input ¥0.075 per million tokens. A listed cache rate explains settlement; it does not prove a request hit the cache.
  • Protocol: Anthropic marks cache breakpoints with cache_control, and that does not map exactly onto upstream cache implementations. The hit rate is decided upstream; the client cannot force it.

Cached input is cheaper in this tier; that rate applies only to hits actually reported by the upstream.

Off-peak (outside 01:00–04:00, 06:00–10:00 UTC (Beijing time 09:00–12:00, 14:00–18:00)) · Time bands from 2026-08-20 13:03:49.577 UTC; peak rates apply all day before then

WebSearch is simply unavailable

Claude Code's WebSearch is not a local tool. It is a server-side tool provided by Anthropic. Once the request goes through a third-party gateway, the upstream does not recognise the tool definition and the call fails or returns unimplemented.

Workaround: use a local MCP fetching tool instead — that is client-layer, so it survives the model swap.

What is unaffected

Worth stating plainly, because it decides whether the swap is worth it:

  • Editing ability: reading and writing files, multi-file diffs, running tests — all client-side.
  • Subagents and parallel work: scheduled by Claude Code itself, not by the model vendor.
  • The MCP ecosystem: databases, browsers, internal systems keep working.
  • Permissions and hooks: local configuration, model-independent.

In other words, Claude Code's value as an agent harness is fully preserved. What you lose is some properties of Claude the model.

Minimising the loss

  1. Match the model to the task: evaluate deepseek-v4-pro-0813 for long-file understanding and refactors, and deepseek-v4.1-flash for typo fixes and commit messages. Compare current input and output rates on the pricing page.
  2. Handle vision separately: do not hand screenshots to a text model. Describe them, or switch to a vision model for that task.
  3. Do not depend on thinking blocks: when you want to see the reasoning, ask for a plan first and then execution.
  4. Measure your own cache hits: estimate costs from your request usage records rather than assuming Anthropic's cache hit rate.

Verification checklist

Three checks that the connection is really live:

Set your own KimiSeek API key in the same terminal that will run curl, replacing the placeholder. A credential configured in your client does not automatically populate this shell variable:

Shell · API key
# Replace the placeholder with your own key from the dashboard.
export KIMISEEK_API_KEY="ks-your-key"
Shell · Anthropic Messages
curl https://api.kimiseek.app/v1/messages \
  -H "x-api-key: ${KIMISEEK_API_KEY:?Set KIMISEEK_API_KEY before running this command}" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-pro-0813",
    "max_tokens": 512,
    "messages": [{"role": "user", "content": "Hello"}]
  }'
  • 200 with a content array → the protocol layer works.
  • Claude Code answers "hello" → the client config is right.
  • Ask it to read and edit a file → the tool-call chain works.

If any step fails, match the error text in the error reference.

When to go back to the official service

Saving money is not always the right call. Three cases argue for staying official:

  • Heavy vision use (mockup to code, UI review)
  • WebSearch-driven live research
  • Extreme sensitivity to cache hit rates (very long system prompts, high call volume)

For other workloads, compare costs using your own input, output and cached-token usage. See the no-credit-card route for explicitly defined examples.

Versions and verification

  • Claude Code: 2.x
  • Verified: 2026-10-26
  • Sources: Anthropic documentation (Messages protocol, extended thinking, cache_control, server-side tools); KimiSeek catalog capability and pricing fields

FAQ

Does pointing Claude Code at a third-party model break its terms?

Claude Code is a client, and pointing ANTHROPIC_BASE_URL at a compatible service is a supported configuration. The thing to avoid is shared accounts or resold top-ups — that is a separate problem, covered in the risk section of the no-credit-card guide.

Does prompt caching actually save money?

Cached input is cheaper in this tier; that rate applies only to hits actually reported by the upstream. Off-peak (outside 01:00–04:00, 06:00–10:00 UTC (Beijing time 09:00–12:00, 14:00–18:00)) · Time bands from 2026-08-20 13:03:49.577 UTC; peak rates apply all day before then

Why is a third-party model more hesitant about editing files?

Usually round-trip loss in the tool-call format. First confirm you are on the native protocol path (Claude Code uses /v1/messages, Codex uses /v1/responses), then check whether the model is a reasoning model.

Is the 1M context actually usable?

DeepSeek V4 Pro lists a context of 1,000,000 with up to 393,000 output tokens. The unit price does not rise with context, but every request re-sends the whole thing, so long contexts cost you on the input side.

Three minutes to your first working call

Create an account and an API key. Calls use your account balance. 30% off your first top-up. Top up ¥500, pay ¥350, receive ¥500 in credit. Top up ¥1000, pay ¥850, receive ¥1000 in credit You can still start with a ¥10 trial top-up.