Cline
Connect Cline to Mixen — pay from your balance in roubles, with a catalog of 105+ models.
Installation
Section titled “Installation”Cline is an agentic extension for VS Code. Install it from the VS Code Marketplace: Extensions → search for “Cline” → Install. Once installed, the Cline icon appears in the sidebar.
Configuration
Section titled “Configuration”- Open Cline in the VS Code sidebar, then open the extension’s settings — the ⚙️ icon.
- In the API Provider field, select OpenAI Compatible.
- Fill in the connection fields:
Base URL: https://api.mixen.ai/v1API Key: your-api-keyModel: openai/gpt-5.6-sol- In Model Configuration, set Context Window and Max Output Tokens — take the values from the model’s card in the catalog.
Notes:
- Cline works as an agent: file edits and terminal commands run through tool calling. Mixen supports
toolsandtool_choiceon/v1/chat/completions, including multi-turn scenarios withrole: 'tool'. - For agentic tasks, pick models with a large context and reasoning support — they hold up better in multi-step edits.
Verifying the connection
Section titled “Verifying the connection”Before setting up the provider, you can check the key and balance with a minimal generating request:
curl https://api.mixen.ai/v1/chat/completions \ -H "Authorization: Bearer your-api-key" \ -H "Content-Type: application/json" \ -d '{"model":"z-ai/glm-5.3-flash","messages":[{"role":"user","content":"ping"}],"max_tokens":5}'200 with a response — the key and balance work; 401 invalid api key — the key was copied incompletely or isn’t a Mixen API key; 402 — no funds on the balance.
GET /v1/models does not verify the key — it responds without one; use it only to check that the API is reachable.
Picking a model per task
Section titled “Picking a model per task”Cline sends the whole conversation history with every turn, and it snowballs — each next step of an agentic task costs more on input than the previous one. The cache (see below) dampens that growth; the right model handles the rest. Prices are per 1M tokens, input/output; the full price list with cache columns — in the catalog.
| Task | Model | Input / output |
|---|---|---|
| Read-only turns: code questions, search, strategy | GLM 5.3 Flash (z-ai/glm-5.3-flash) |
8.4 / 27.9 ₽ |
| Edits in 1–3 files, familiar context | DeepSeek V4 Pro (deepseek/deepseek-v4-pro) |
116.1 / 232.3 ₽ |
| Multi-step tasks, refactoring, unfamiliar code | GPT-5.6 Sol (openai/gpt-5.6-sol), Claude Sonnet 5 (anthropic/claude-sonnet-5) |
213.9 / 1069.5 ₽ |
The typical pairing is a cheap model on Plan and a stronger one on Act: Cline can keep different models for these modes (see “Tips for agentic work”).
| Mode | What it does | Model |
|---|---|---|
| Plan | reads the codebase, searches, discusses the plan — doesn’t touch files | z-ai/glm-5.3-flash |
| Act | edits files and runs terminal commands | z-ai/glm-5.3, openai/gpt-5.6-sol |
Saving on sessions
Section titled “Saving on sessions”The repeating context prefix — Cline’s system prompt, rules, conversation history, read files — is cached by Mixen automatically, with no settings on your side.
- Repeated context costs ~10% of the input price: for GPT-5.6 Sol the full input is 213.9 ₽ per 1M tokens and 21.4 ₽ from cache; for GLM 5.3 Flash — 8.4 and 1.7 ₽.
- Cache TTL is 5 minutes with sliding renewal: every hit extends the cache’s life. In a dense session without long pauses, the cache lives from the first turn to the last.
- A pause longer than 5 minutes — the first turn after it pays the full input price again. If you return to a task after an hour, don’t be surprised by one “expensive” turn.
Practical takeaways for Cline:
- Plan mode is a cheap turn. Cline reads the codebase, searches, and discusses the plan without touching files: the long input comes from cache, the output is short. Warm up the context in Plan — Act then pays only the delta.
- Long edits are cheaper than they look: full input is paid once, after that it arrives from cache and you mostly pay for output.
- Keep sessions focused: a finished task means a new task, not a continuation of a bloated history.
Responses stream as per-symbol deltas — turns don’t “hang” silently for the whole generation. Streaming doesn’t affect the price.
What a typical session costs
Section titled “What a typical session costs”Let’s price the “Plan on Flash, Act on GPT-5.6 Sol” pairing (input prices: 8.4 and 213.9 ₽ per 1M; from cache — 1.7 and 21.4 ₽):
- Plan: 15 turns of ~40K tokens each. Without cache — 600K × 8.4 ₽ ≈ 5 ₽; with cache ≈ 1.7 ₽. Planning is nearly free, even with many turns.
- Act: 20 turns of ~60K tokens each. Without cache — 1.2M × 213.9 ₽ ≈ 257 ₽; with cache ≈ 59 ₽: the first turn pays full input, then ~90% of the context rides from cache.
The numbers are indicative — real volumes depend on the project and on how many files Cline keeps in context. The key idea: switching Plan → Act doesn’t reset the context, and therefore not the cache either — a base warmed up on the cheap model keeps saving on the expensive one.
The cache share of a given response is visible in the usage.prompt_tokens_details.cached_tokens field — Cline doesn’t show it, but it helps when reconciling the bill. Keep Auto Approve under control: an approved unnecessary command means extra turns, and extra turns mean input you’ll have to pay for.
Reasoning depth
Section titled “Reasoning depth”Our API accepts reasoning_effort: off, low, medium, high, xhigh, or max — the set depends on the model. Allowed values come in GET /v1/models → capabilities.reasoning_efforts; the can_disable_reasoning flag hints whether the model accepts off.
- Reasoning is billed as output tokens and consumes the
max_tokensbudget — for long edits, set headroom on Max Output Tokens in Model Configuration, or the answer gets cut mid-way. - If Cline’s UI doesn’t let you set the reasoning depth for your model, it runs at its default — check the card in the catalog.
Tips for agentic work
Section titled “Tips for agentic work”- Different models for Plan and Act. Enable Use different models for Plan and Act in settings: a cheap “reader” like GLM 5.3 Flash for Plan, an editing model (DeepSeek V4 Pro or GPT-5.6 Sol) for Act. The conversation history carries over when switching modes — no need to retell the plan.
- Project rules live in
.clinerules/. Markdown files in.clinerules/at the project root are committed with the repository; global rules live in~/Documents/Cline/Rules(Windows:Documents\Cline\Rules). Cline reads all.mdand.txtfiles from the directory; apathsfrontmatter with globs activates a rule only for matching files. On conflicts, workspace rules win over global ones. - Auto Approve is granular. File reads, edits, “safe commands”, and “all commands” are separate toggles. There is no fixed allowlist: Cline itself marks each command with a
requires_approvalflag based on the command and its arguments. A sensible default is reads plus safe commands; YOLO mode auto-approves everything and belongs only in an isolated environment. - Context and tools. All Mixen chat endpoints support tools, so Cline’s agent turns work on any tool-calling model; for long tasks what matters is the context window from the model’s card.
An example scoped rule — the file .clinerules/frontend.md:
---paths: - "src/components/**"---Functional components only, state via hooks. Classes and HOCs — only on explicit request.Rules without frontmatter are always active — that’s the right place for global conventions.
Frugal session checklist
Section titled “Frugal session checklist”- Plan — on GLM 5.3 Flash, Act — on GLM 5.3 or GPT-5.6 Sol; the history carries over on switching.
- Warm up the context in Plan: read turns are cheap, and the cache they warm works in Act too.
- Auto Approve — reads and safe commands; everything else — case by case.
- A new task means a new task, not a continuation of a bloated history.
- Context Window in Model Configuration — from the model’s card in the catalog, not by eye.
Useful documentation
Section titled “Useful documentation”- Plan and Act — modes and split models.
- Cline Rules —
.clinerules/, thepathsfrontmatter. - Auto Approve — approval toggles and YOLO mode.
- Mixen catalog — model IDs, prices, and cache columns.
Recommended models
Section titled “Recommended models”| Model | ID |
|---|---|
| GPT-5.6 Sol | openai/gpt-5.6-sol |
| Claude Opus 5 | anthropic/claude-opus-5 |
| GLM 5.3 | z-ai/glm-5.3 |
| DeepSeek V4 Pro | deepseek/deepseek-v4-pro |
| Kimi K3 | moonshotai/kimi-k3 |
Full list — in the catalog.
Troubleshooting
Section titled “Troubleshooting”- “Invalid API Key” / 401 — the key must be from Mixen (starts with
mxn-) and copied in full; also check that the OpenAI Compatible provider is selected. - “Model Not Found” / 404 — the Model ID is entered manually and must exactly match the catalog, including the provider prefix.
- Model loses context in a long task — compare the Context Window in Model Configuration with the model’s card: an inflated value makes Cline send more context than the model can hold.
- The model changed “on its own” after switching Plan/Act — the split-models option is enabled: each mode uses its own. That’s a feature, not a bug — check the settings.
- Edits cut off mid-file — a reasoning model spent the Max Output Tokens budget on thinking; raise the ceiling or lower the reasoning depth.