API для Cline в VS CodeAPI for Cline in VS Code

Cline — бесплатное расширение-агент для VS Code. Встроенный Copilot менять адрес API не умеет, поэтому агента подключаем через Cline — это два поля в настройках.Cline is a free agent extension for VS Code. The built-in Copilot cannot change the API address, so we connect the agent through Cline — just two fields in its settings.

Base URL
API KeyAPI Key

Ключ не отправляется с этой страницы: команды собираются локально в браузере. Без галочки выше ключ исчезнет после закрытия страницы. Ключ — как пароль: не показывай его на скриншотах, не отправляй в чаты и не добавляй в Git. Нет ключа — зарегистрируйся: личный ключ выпустится сам. Кнопки скачивания готовых файлов (settings.json, codex-setup.bat) — на странице «Подключение» — генератор конфигураций.Your key never leaves this page: commands are assembled locally in your browser. Without the checkbox above, the key disappears when you close the page. Treat the key like a password: never show it in screenshots, chats, or Git. No key yet? Register — a personal key is issued automatically. Download buttons for ready-made files are on the full connection page.

Как подключить

API для Cline в VS CodeAPI for Cline in VS Code

Ключ из поля выше автоматически подставляется в команды и конфиги.Your key from the field above is inserted into the commands and configs automatically.

  1. В VS Code открой «Расширения» (Ctrl+Shift+X) → в поиске набери ClineInstall.
  2. Кликни по иконке Cline в левой панели → шестерёнка (Settings).
  3. API Provider: выбери OpenAI Compatible.
  4. Base URL: вставь
  5. Model ID: впиши модель точно как в каталоге, например gpt-5.6-terra (в некоторых версиях поле называется просто Model — это оно). Готово.
API Keysk-ВАШ_КЛЮЧ

Совет по расходу. Не включай полное авто-одобрение действий сразу после подключения: агент делает много запросов, и каждый расходует токены. Сначала посмотри вживую, как он работает, потом ослабляй контроль.

Встроенный GitHub Copilot не поддерживает смену адреса API — это ограничение VS Code, а не сервера. Поэтому для своего API и нужен Cline (или другое расширение с поддержкой Base URL).

  1. In VS Code open “Extensions” (Ctrl+Shift+X) → search for ClineInstall.
  2. Click the Cline icon in the left panel → the gear (Settings).
  3. API Provider: choose OpenAI Compatible.
  4. Base URL: paste
  5. Model ID: enter the model exactly as in the catalog, for example gpt-5.6-terra (in some versions the field is simply called Model — that's the one). Done.
API Keysk-ВАШ_КЛЮЧ

Spending tip. Don't enable full auto-approval of actions right after connecting: the agent makes many requests, and every one spends tokens. Watch how it works live first, then relax the controls.

The built-in GitHub Copilot doesn't support changing the API address — a VS Code limitation, not the server's. That's why Cline (or another extension with Base URL support) is needed for a custom API.

Частые ошибки

Ошибка «model not found» или пустой ответ
Model ID должен в точности совпадать с ID из таблицы моделей — со всеми дефисами и точками. Скопируй ID оттуда в один клик.
401 — ключ не принят
Ключ скопирован не целиком. Возьми его кнопкой «Копировать» из карточки вверху страницы и вставь в Cline ещё раз.
Токены тают слишком быстро
Агентные расширения тратят много токенов: каждый шаг — отдельный запрос. Экономия: для простых шагов ставь дешёвую модель (например gpt-5.6-luna), дорогую включай только для сложных. Расход виден на странице баланса.
A “model not found” error or an empty response
The Model ID must match the ID from the model table exactly — every hyphen and dot. Copy the ID from there in one click.
401 — the key is not accepted
The key wasn't copied in full. Take it with the “Copy” button from the card at the top of the page and paste it into Cline again.
Tokens are melting too fast
Agent extensions spend a lot of tokens: every step is a separate request. To save: use a cheap model for simple steps (for example gpt-5.6-luna) and switch to an expensive one only for hard tasks. Spending is visible on the balance page.

Ограничения и совместимость

Cline хранит ключ в локальных настройках VS Code на твоём компьютере.

Агент расходует заметно больше токенов, чем обычный чат: он шлёт контекст задачи в каждом шаге. Следи за балансом.

Названия полей в Cline могут меняться между версиями расширения — ориентируйся на «Base URL», «API Key», «Model ID».

Cline stores the key in VS Code's local settings on your computer.

An agent spends noticeably more tokens than a regular chat: it sends the task context with every step. Keep an eye on your balance.

Field names in Cline may change between extension versions — look for “Base URL”, “API Key”, “Model ID”.

Вопросы и ответы

Почему не использовать встроенный Copilot?
Copilot не даёт поменять адрес API — он работает только с серверами GitHub. Cline (и другие расширения с полем Base URL) позволяют подключить свой ключ.
Какая модель лучше для Cline?
Для кода — gpt-5.6-terra или claude-sonnet-5. Экономный вариант для рутины — gpt-5.6-luna.
Куда сохраняется мой ключ?
В локальные настройки VS Code на твоём компьютере. На серверы Cline он не отправляется, но и в облако не пишется — при переустановке системы пропадёт.
Как увидеть, сколько токенов съел агент?
Открой «Баланс и логи» и вставь ключ: там видно каждое списание с указанием модели.
Why not use the built-in Copilot?
Copilot doesn't let you change the API address — it only works with GitHub's servers. Cline (and other extensions with a Base URL field) let you connect your own key.
Which model is best for Cline?
For code — gpt-5.6-terra or claude-sonnet-5. A budget option for routine — gpt-5.6-luna.
Where is my key stored?
In VS Code's local settings on your computer. It is not sent to Cline's servers, and it isn't synced to the cloud either — it will disappear if you reinstall your system.
How do I see how many tokens the agent ate?
Open Balance and logs and paste your key: every charge is listed there with the model name.