Back to guides
how to use·September 11, 2026·Updated October 10, 2026·9 min read

How to Use Cline — Separate Models for Plan and Act, and Calculate the Cost of One Task

Many introductory articles stop at installation and the first request. This one goes further — configuring separate models for Plan and Act and determining how much one task costs.

Cline is an open-source AI coding agent that runs in editors such as VS Code. Using it takes three steps: install the extension, configure an API provider and key (Cline itself does not include a model), and plan in Plan mode before executing in Act mode. The models assigned to Plan and Act determine the cost. Turn on “Use different models for Plan and Act” in settings and assign claude-opus-5 to Plan and claude-haiku-4-5 to Act using the same key. This brings the cost of a 20-step task down from about $2.17 with Opus 5 for everything to about $0.69 (calculated at Kunavo's rates).

Most Japanese-language guides stop at installation and the first prompt, leaving the model set to a free model or a single paid model. This page goes further: it walks through configuring separate models for Plan and Act and calculating the cost of one task, all with one key.

What Cline is — its two modes, Plan and Act

Cline runs a loop: it reads files, proposes diffs, runs commands in the terminal, reads the results, and makes further changes. It has two modes, which are described in the official Cline documentation as follows.

  • Plan mode: Read and search the codebase and discuss an approach. It cannot modify files or run commands.
  • Act mode: Modify files and run commands while carrying over the conversation context from Plan.

This division also maps directly to how costs are split. Plan takes fewer turns, and the quality of decisions made here affects the dozen or more steps that follow. Act takes more turns, and resends the task context each time, so token costs add up. Use a strong model for Plan and a cheaper one for Act—Cline's own documentation recommends pairing a model with strong reasoning for planning with a faster model for implementation.

Installation and initial setup

  1. In VS Code, open the Extensions view (Ctrl / Cmd + Shift + X), search for “Cline,” and install it. It is also available for Cursor, Windsurf, JetBrains IDEs, and others.
  2. Open Cline in the sidebar, then select “OpenAI Compatible” as the API Provider in settings (⚙︎).
  3. Enter the Base URL, API Key, and Model ID, then fill in the Model Configuration fields (context length, maximum output, image support, and input/output prices).
Cline settings (⚙︎)
API Provider   OpenAI Compatible
Base URL       https://api.kunavo.com/v1   # /v1 まで入れる
API Key        sk-kn-...                    # /app/keys で発行(表示は一度きり)
Model ID       claude-opus-5

Enter the full Base URL, including /v1.Cline appends only the route, so omitting /v1 results in a 404. A 401 means the URL is correct but the key is wrong. Before asking it to edit files, verify the connection with a small request such as “Explain this file.” Create the key at /app/keys and save it immediately, because it is shown only once.

The Input Price / Output Price fields in Model Configuration determine the cost Cline displays during a task. These prices are not fetched automatically from the endpoint, so leaving them blank or at their defaults will make the displayed cost inaccurate. Enter the price per 1M tokens for the model you use. See the Cline integration documentation for a list of settings.

Use separate models for Plan and Act

Check “Use different models for Plan and Act” in settings to select separate models for Plan and Act. Use the same Base URL and key for both; only the Model ID and prices change.

Use separate models for Plan / Act
[✓] Use different models for Plan and Act

── Plan Mode ─────────────────────────────
API Provider       OpenAI Compatible
Base URL           https://api.kunavo.com/v1
API Key            sk-kn-...
Model ID           claude-opus-5
  Context Window     200000
  Max Output Tokens  64000
  Image Support      on
  Input Price        3.50      # 1M トークンあたり USD
  Output Price       17.50

── Act Mode ──────────────────────────────
API Provider       OpenAI Compatible
Base URL           https://api.kunavo.com/v1
API Key            sk-kn-...            # Plan と同じキーでよい
Model ID           claude-haiku-4-5
  Context Window     200000
  Max Output Tokens  64000
  Image Support      on
  Input Price        0.70
  Output Price       3.50

The reason to use Opus 5 for Plan is simple: Plan uses only a small fraction of the total tokens, but a wrong decision here can waste all the Act steps that follow. Use Haiku 4.5 for Act because, when the plan is concrete, the remaining work is a cycle of editing and execution—and token prices matter most here.

One step costs approximately $0.0434 with the Plan set to Sonnet 5, and approximately $0.11 with Opus 5.Claude Sonnet 5 costs $1.40 / $7.00 per 1M tokens.

If Act gets stuck, switch Act to Opus 5 for that task only.Repeating the same error twice is a signal to switch. Trying to force Haiku through it and accumulating more steps will ultimately cost more. Change just one Model ID in settings; the key and endpoint stay the same.

Calculate the cost of one task

Cline resends the system prompt, task history, and files it has read for every step, so cost depends on the number of steps, not the time taken. As on the other pricing pages on this site, we assume 25,000 input tokens and 1,200 output tokens per step, and 20 steps per task (3 Plan + 17 Act).

ConfigurationOne task (Kunavo)Same configuration at Anthropic list prices
Claude Opus 5 for everything$2.17$3.10
Plan = Opus 5 / Act = Haiku 4.5$0.69$0.99
Claude Haiku 4.5 for everything$0.43$0.62

Splitting Plan and Act lets you keep Opus 5's planning quality for about 32% of the cost of using Opus 5 for everything. Using Haiku for everything costs even less, but considering the rework a mistaken plan can cause, the difference of $0.26 is a modest price for insurance on Plan. This is all the code needed to verify the calculation.

cline_task_cost.py
# 1 タスクの費用を、ステップ数から出す。
# 単価は Kunavo の 1M トークンあたり USD (input, output)。
RATES = {
    "claude-opus-5":    (3.50, 17.50),
    "claude-haiku-4-5": (0.70, 3.50),
}

def step(model, inp=25_000, out=1_200):
    i, o = RATES[model]
    return inp / 1e6 * i + out / 1e6 * o

all_opus = 20 * step("claude-opus-5")
split = 3 * step("claude-opus-5") + 17 * step("claude-haiku-4-5")

print(round(all_opus, 2))   # -> 2.17  全部 Opus 5
print(round(split, 2))      # -> 0.69  Plan = Opus 5 / Act = Haiku 4.5

How to choose models

RoleModelKunavo input / output (per 1M)
Plan (standard)claude-opus-5$3.50 / $17.50
Act (standard)claude-haiku-4-5$0.70 / $3.50
Recovering a stuck Actclaude-opus-5$3.50 / $17.50
Alternative for Plan (at Anthropic list prices)claude-sonnet-5$1.40 / $7.00
A second opinion from a different model familygpt-5-6-sol$2.00 / $12.00

GPT-5.6 Sol charges 2x for input and 1.5x for output on the entire request when the prompt exceeds 272K tokens. If using it for Plan, keeping the Context Window below 272K is a safer choice. For more detail on the difference between Opus and Sonnet, see Claude Opus vs. Sonnet; prices for all Claude models are listed in Claude pricing.

5 habits for keeping costs down

  1. Break up long tasks and start a new task. Every step resends the full history, so each step costs more as a task gets longer. This is the most effective habit.
  2. Use the Anthropic provider for prompt caching. Set API Provider to “Anthropic,” check “Use custom base URL,” and enter https://api.kunavo.com (without /v1, which the client appends as /v1/messages). Claude cache reads cost 10% of the input price; writes cost 1.25 times the input price. See the caching documentation for details. Prompt caching works even if you stay on OpenAI Compatible. On a long prompt, Kunavo sets the cache breakpoints itself on the system prompt and the tool definitions, and also on the last message once the conversation has an assistant turn. In an agent loop, that is every step from the second on. A cache_control that Cline adds stays as it is. Through the Anthropic provider, the request is passed on exactly as Cline sent it and no breakpoints are added, so what gets cached depends on the breakpoints Cline sets.
  3. Put project decisions in .clinerules/. This Markdown file in the project root provides instructions that apply to every conversation. Since it is included in every request, keep it short and limited to project decisions (Cline rules documentation).
  4. Auto-approve read-only actions only. Enabling Auto Approve for actions such as reading files reduces confirmation prompts. Cline's documentation explicitly says YOLO mode, which automatically approves everything, is dangerous; use it only in disposable environments. You can roll back changes with Checkpoints.
  5. Create a dedicated key for Cline and set a monthly limit. At /app/keys, you can set a monthly usage limit per key (requests return 402 once it is reached) and an IP allowlist. To stop the editor, simply disable that key.

Honestly — when a subscription or direct contract is a better fit

If you subscribe to Claude Pro / Max, you can also select Cline's “Claude Code” provider. It uses the allowance from your subscription through the installed Claude Code CLI instead of charging per token. According to Cline's documentation, this method limits image uploads and prompt caching, and responses may not stream token by token. The allowance is shared with chat, so see Claude Pro limits for details on how it works.

When using an API key, Kunavo runs on shared capacity with no dedicated quota or contractual SLA. Teams that need guarantees should contract directly with Anthropic. For individuals and small teams running Cline, pay-as-you-go is a good fit and lets you split Plan and Act with one key.

How Roo Code differs

Roo Code is an extension derived from Cline and supports the same OpenAI Compatible settings (Base URL, key, and model). Its modes differ: instead of Plan / Act, it offers modes such as Architect, Code, Ask, and Debug, with an API configuration profile assigned to each. The same approach applies: use Opus 5 for Architect and a cheaper model for Code. See the Roo Code configuration documentation and Roo Code + Claude API (in English) for instructions.

For a more detailed guide in English, see the Cline + Claude API guide. To compare it with a terminal-based agent, see Cline vs. Claude Code and How to use Claude Code. Prices for all models are on the pricing page.

Frequently asked questions

What is Cline? Is it free to use?

Cline is an open-source AI coding agent that runs in editors such as VS Code. The extension itself is free, but it does not include models, so you pay the model charges for the calls you make. You can pay per token with an API key, or, if you subscribe to Claude Pro / Max, use your subscription allowance through the “Claude Code” provider.

Where do I get a Cline API key?

Get one from the provider you use. With Kunavo, sign up and add funds (starting at $10), then create a key starting with sk-kn- at /app/keys. The key is shown only once, so save it then and paste it into the API Key field in Cline's settings. If you use the Anthropic API directly, create a key in the Anthropic Console.

How do I configure Cline to use Claude?

Set API Provider to OpenAI Compatible, Base URL to https://api.kunavo.com/v1, API Key to your sk-kn- key, and Model ID to a model name such as claude-opus-5. Omitting /v1 from the Base URL results in a 404; a 401 means the key is incorrect. If you use the Anthropic provider, check “Use custom base URL” and enter https://api.kunavo.com without /v1.

What is the difference between Cline's Plan and Act modes?

Plan mode reads and searches code and discusses an approach; it cannot modify files or run commands. Act mode carries over the conversation context from Plan and edits files and runs commands. The usual workflow is to finalize the plan in Plan mode, then switch to Act once you're satisfied.

How do I use different models for Plan and Act?

In Cline's settings, check “Use different models for Plan and Act,” then select a model for each mode. Keep the same Base URL and key and change only the Model ID. For example, assign claude-opus-5 to Plan and claude-haiku-4-5 to Act. Enter the Input Price and Output Price for each model as well so Cline displays costs accurately.

How much does one Cline task cost?

Cost depends on the number of steps, not the time taken. Assuming 25,000 input tokens and 1,200 output tokens per step, and 20 steps per task, a task using Claude Opus 5 for everything costs about $2.17 at Kunavo's rates; splitting Plan to Opus 5 and Act to Claude Haiku 4.5 costs about $0.69. Longer tasks resend more history each time, so starting a new task after breaking up the work is the most effective way to save.

Can I use Cline with a Claude Pro or Max subscription?

Yes. Select Cline's “Claude Code” provider to use the allowance from your subscription through the installed Claude Code CLI instead of paying per token. Cline's documentation says this method limits image uploads and prompt caching. The allowance is shared with chat and Claude Code.

Is Roo Code configured the same way as Cline?

The basics are the same. Roo Code is an extension derived from Cline, and the OpenAI Compatible Base URL, key, and model settings work as they are. The difference is its mode setup: you can assign API configuration profiles to modes such as Architect, Code, Ask, and Debug, allowing you to use a stronger model for Architect and a cheaper one for Code.