AIWave API

Aider, Cline and Zed with Chinese AI Models

Configuring Aider, Cline and Zed to use DeepSeek, GLM, Qwen or Kimi comes down to the same two values in each tool: a base URL and an API key. All three speak the OpenAI wire format, so no plugin, fork or provider package is involved. This guide gives the exact configuration for each, explains where they genuinely differ, and works through which tool suits which kind of work.

Get an API key →Compare live pricing →

What these three tools actually are

They get grouped together as “AI coding tools” and then compared on the wrong axis. The useful distinction is where they sit relative to your repository:

Because all three accept a custom endpoint, your model choice is independent of your tool choice. That is worth internalising: you can try all three against the same model this afternoon.

Aider: configuration

Aider reads OpenAI-compatible settings from environment variables. Two exports and you are running:

pip install aider-chat

export OPENAI_API_BASE="https://aiwave.live/v1"
export OPENAI_API_KEY="sk-YOUR_KEY"

aider --model openai/deepseek-v4-pro

The openai/ prefix tells Aider’s model layer to use the OpenAI-compatible driver rather than trying to infer a provider from the name. Omitting it is the most common Aider configuration error and produces a confusing “unknown model” message.

For a persistent setup, put it in .aider.conf.yml at the repository root:

# .aider.conf.yml
model: openai/deepseek-v4-pro
weak-model: openai/deepseek-v4-flash   # used for commit messages and summaries
auto-commits: true
gitignore: true
map-tokens: 1024                        # repository map budget

The weak-model setting deserves attention. Aider uses a second, cheaper model for housekeeping — commit messages, chat summarisation, and deciding which files matter. Pointing that at a fast cheap model while keeping the strong model for edits is free money; the housekeeping calls are frequent and undemanding.

How Aider uses tokens

Aider builds a repository map — a condensed view of your codebase’s structure — and sends it with requests so the model knows what exists without reading everything. The map-tokens setting is a direct cost dial. On a large monorepo, an oversized map is the main reason a session gets expensive.

# add only the files you are working on
aider src/auth/session.py tests/test_session.py

# and keep the map modest on big repositories
aider --map-tokens 512 --model openai/deepseek-v4-pro

Aider prints token counts and a running cost estimate after each exchange, which makes it unusually easy to see the relationship between what you attach and what you pay. Use /tokens to inspect the current context and /clear to drop history when you switch tasks.

Cline: configuration

Cline is configured in the VS Code UI rather than a file. Open the Cline panel, go to its settings, and choose OpenAI Compatible as the API provider:

API Provider:  OpenAI Compatible
Base URL:      https://aiwave.live/v1
API Key:       sk-YOUR_KEY
Model ID:      deepseek-v4-pro

The model ID is free text, so it must match exactly what the endpoint serves. Read the current list rather than guessing:

curl https://aiwave.live/v1/models \
  -H "Authorization: Bearer sk-YOUR_KEY" | jq -r '.data[].id' | sort

Cline and tool calling

Cline is an agent: it plans, reads files, writes edits and runs commands in a loop. That loop depends on the model following instructions reliably across many turns. Two practical consequences.

First, model capability matters more here than in single-shot chat. A model that is fine at answering questions may drift or produce malformed actions over a ten-step agent run. Test on a real task before trusting it with a refactor.

Second, agent loops are token-hungry by construction — each step resends accumulated context. Our analysis of AI agent cost covers why this is precisely where cheaper models change the economics: a workflow that is uneconomic at premium rates becomes routine at a fraction of them. Keep approval gates on for anything that runs commands.

Zed: configuration

Zed keeps assistant settings in its JSON config, reachable via zed: open settings in the command palette:

{
  "language_models": {
    "openai": {
      "api_url": "https://aiwave.live/v1",
      "available_models": [
        {
          "name": "deepseek-v4-pro",
          "display_name": "DeepSeek V4 Pro",
          "max_tokens": 128000
        },
        {
          "name": "deepseek-v4-flash",
          "display_name": "DeepSeek V4 Flash",
          "max_tokens": 128000
        }
      ]
    }
  },
  "assistant": {
    "version": "2",
    "default_model": {
      "provider": "openai",
      "model": "deepseek-v4-pro"
    }
  }
}

The API key goes in Zed’s assistant panel rather than the settings file, which is the right default — settings files end up in dotfile repositories more often than anyone intends. Declare max_tokens honestly; Zed uses it to decide how much context to pack.

Choosing a model for each tool

Current rates for models commonly used with coding tools:

Model IDInput / 1M tokensOutput / 1M tokens
deepseek-v4-flash$0.206$0.412
deepseek-v4-pro$1.09$2.17
qwen3-coder-480b-a35b-instruct$0.12$0.36
glm-4.7-flashfreefree
glm-5$1.55$4.96
kimi-k2.5$0.66$3.30

Rates read from the AIWave pricing endpoint on 2026-07-26. Check live pricing before budgeting — providers revise rates.

The pattern that works across all three tools is the same two-tier approach: a cheap fast model as the default, escalating to a stronger one when the cheap model produces something you would not merge. Aider formalises this with weak-model; in Cline and Zed you switch manually.

Token consumption differs sharply between the tools, and that matters more than the per-token rate:

Work out your own figures with (input tokens ÷ 1,000,000) × input price + (output tokens ÷ 1,000,000) × output price. Aider reports the numbers directly; for the others, the console shows usage per key. Current rates are always on the pricing page.

Which tool for which job

Aider: mechanical changes across many files

Renaming a concept across forty files, adding a parameter to every implementation of an interface, migrating a deprecated call — work that is tedious rather than subtle. Aider’s git integration is the reason: every change is a commit, so reviewing and reverting is normal git work rather than a special AI-tooling problem.

aider --model openai/deepseek-v4-pro src/**/*.py

> Replace every call to legacy_client.send() with the new
> transport.publish() API. Keep retry behaviour identical.
> Update the tests in the same commit.

Cline: exploratory work in unfamiliar code

When you do not yet know which files matter, an agent that can read, hypothesise and iterate saves real time. It is also the right shape for “make the test pass” loops, where running the suite between attempts is the whole point.

Zed: sustained editing with a model alongside

If you live in an editor and want the assistant to feel like part of it rather than a separate mode, Zed is the most coherent of the three. Its performance is a real differentiator on large files.

Things that go wrong, and why

Aider: “unknown model”

Missing openai/ prefix, or a model ID the endpoint does not serve. Check with the /v1/models call above.

Cline: agent stalls or loops

Usually the model handling tool calls inconsistently. Verify support on the model page and try a stronger model before assuming the tool is broken. See function calling with Chinese AI models.

Zed: model missing from the picker

Entries must be declared in available_models. Zed does not discover models from the endpoint.

All three: intermittent 503

The upstream provider is overloaded. Switch models — that is the practical payoff of configuring more than one. Error codes covers which failures are transient and which indicate a real configuration problem.

Working safely with an agent that runs commands

Cline and Aider can both execute things. That is useful and deserves guardrails.

Aider in a real workflow

Aider’s design assumption is that git is your undo mechanism, and once you work with that rather than against it the tool becomes considerably more useful.

# start on a branch, always
git checkout -b refactor/transport

aider --model openai/deepseek-v4-pro src/transport.py tests/test_transport.py

> /add src/legacy_client.py          # bring another file into context mid-session
> /drop tests/test_transport.py      # and remove one when it stops being relevant
> /tokens                            # what is context costing right now
> /undo                              # revert the last Aider commit
> /clear                             # drop chat history, keep files

The commands that matter most in practice are /add, /drop and /clear. A session that accumulates twenty files and fifty messages costs many times what a focused one does, and produces worse edits because the relevant code is buried. Treat context as something you curate, not something that accretes.

Aider also supports a read-only mode for reference material, which is useful when you want the model to consult a specification without proposing changes to it:

aider --read docs/protocol-spec.md src/parser.py

Cline: keeping an agent on a leash

Agent loops fail in a specific way: they make a reasonable first move, then compound a small misunderstanding over several steps until the result is unrecognisable. Three habits prevent most of this.

Scope the task narrowly. “Fix the failing test in test_session.py::test_expiry” produces far better results than “fix the failing tests”. An agent given a broad goal will explore broadly, and every step of that exploration is billed.

Keep command approval on. Reading the proposed command before it runs takes a second and prevents the categories of accident that are hard to undo. Auto-approve is reasonable for a throwaway sandbox and unwise anywhere else.

Stop early when it is going wrong. If step three looks confused, stop and re-prompt with what you learned rather than hoping step seven recovers. Agents rarely self-correct a wrong premise; they build on it.

On model choice, Cline is the tool where the gap between models shows most clearly. A model that handles single-shot questions well can still drift across a ten-step loop. If an agent run goes sideways repeatedly on a task you consider reasonable, try a stronger model before concluding the tool does not work.

Zed: settings worth knowing

Beyond the base configuration, two Zed settings materially change the assistant experience:

{
  "assistant": {
    "version": "2",
    "default_model": { "provider": "openai", "model": "deepseek-v4-flash" },
    "editor_model": { "provider": "openai", "model": "deepseek-v4-pro" },
    "dock": "right",
    "default_width": 480
  }
}

default_model drives the assistant panel; editor_model drives inline transformations. Splitting them across a cheap and a strong model is the same two-tier idea Aider implements with weak-model — conversation on the cheap model, precise edits on the strong one.

Zed also supports per-project settings in .zed/settings.json, which is the right place for repository-specific model choices. A performance-critical C++ project and a small TypeScript service do not need the same model, and committing that choice means the whole team gets it.

Comparing the three on the same task

The most useful evaluation is not a benchmark; it is running one real task through all three. Pick something representative — a bug you have already fixed, so you know the right answer — and observe four things.

Run the same task on two models within your preferred tool as well. Tool choice and model choice are independent, and teams frequently blame a tool for what is actually a model mismatch.

Using them together

These tools are not mutually exclusive, and the strongest setup uses more than one:

Since all three read the same base URL and key, adding a second tool costs you a configuration block, not another subscription or another account.

Team and security considerations

When these tools are the wrong answer

Being clear about this saves more time than any configuration tip.

Frequently asked questions

Can Aider use DeepSeek?

Yes. Set OPENAI_API_BASE to an OpenAI-compatible endpoint and run aider --model openai/deepseek-v4-pro. The openai/ prefix is required.

Does Cline work with Chinese AI models?

Yes, via the OpenAI Compatible provider with a custom base URL and the exact model ID. Agent reliability depends on how consistently the chosen model handles tool calls.

How do I add a custom model to Zed?

Declare it under language_models.openai.available_models in Zed’s settings, with api_url pointing at your endpoint. Zed does not auto-discover models.

Which of these is cheapest to run?

Aider, if you attach files deliberately, because you control context precisely. Agent tools like Cline consume more by design, since each loop step resends accumulated context.

Do I need a Chinese phone number?

No. Sign up with email or GitHub and pay in USD. See accessing Chinese AI models without a Chinese phone number.

Get an API key →Compare live pricing →

Sources

Every claim above traces back to one of these. Pricing figures come from the AIWave pricing endpoint on 2026-07-26; capability claims come from the vendors’ own documentation.