For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cline integration

Configure Cline with the nexos.ai API Gateway for multi-provider LLM access in VS Code and in the terminal. A guide for API keys, provider config, and model selection.

Connect Cline to the nexos.ai API Gateway to use the models available in your nexos.ai platform directly inside Visual Studio Code or from the Cline CLI.

Cline supports any OpenAI-compatible endpoint through its OpenAI Compatible provider. By pointing it at nexos.ai, every request Cline makes (chat, tool calls, file edits) is routed through nexos.ai using your nexos.ai API key, with the usual load balancing, cost tracking and observability.

What is Cline?

Cline is an open-source (Apache 2.0) AI coding agent for VS Code, JetBrains IDEs and the terminal. It reads and edits files, runs terminal commands and uses MCP servers, asking for your approval before each action unless you enable auto-approve.

Key features:

  • Plan & Act modes – plan a change with the model first, then let it implement the plan. Each mode can use a different model.

  • Provider agnostic – works with 30+ providers and any OpenAI-compatible endpoint, including the nexos.ai Gateway.

  • Checkpoints – roll back file changes made during a task while keeping the conversation.

  • MCP support – connect Model Context Protocol servers to extend the agent with external tools.

  • Rules and skills – project and global instructions that Cline follows in every task.

  • Cline CLI – the same agent in your terminal, interactive or scripted.

Useful links:


Prerequisites

  • A nexos.ai API key (user key or team key). See How to generate a nexos.ai API key.

  • Visual Studio Code 1.101.0 or later (Cursor, Windsurf, VSCodium and other Open VSX editors also work), and/or Node.js 20 or later (22 recommended) for the Cline CLI.

  • At least one model in your nexos.ai workspace that supports the Chat Completions endpoint and native tool calling. Cline edits files and runs commands through tool calls, so a model without function calling cannot do agentic work.


How to connect Cline (VS Code) with nexos.ai

1. Generate your nexos.ai API key

In your nexos.ai workspace open the API Keys tab, select Generate API Key, enter a name for the key and click Generate. Copy the key immediately: it is shown only once and cannot be retrieved after the dialog is closed.

The key inherits the settings configured by your organization owner (enabled models, fallbacks, limits). API usage requires purchased API credits.

2. Install the Cline extension

  • VS Code Extensions tab (recommended) – open the Extensions view (Ctrl+Shift+X / Cmd+Shift+X), search for "Cline", select Cline by saoudrizwan and click Install.

  • Command line:

On macOS, if you get command not found: code, open VS Code, press Cmd+Shift+P and run Shell Command: Install 'code' command in PATH, then open a new terminal.

  • Open VSX (VSCodium, Windsurf and other editors without Marketplace access) – search for "Cline" in the editor's Extensions view.

After installation a Cline icon appears in the VS Code Activity Bar. On first launch Cline asks How will you use Cline? Select Bring my own API key ("Use Cline with your provider of choice"). A Cline account is not needed for the nexos.ai setup: do not pick Absolutely Free, ClinePass or Frontier Model, which use Cline's own service.

2026-10-21_19-09-47-20261021-170947.png

3. Configure the OpenAI Compatible provider

On the Configure your provider screen, or later in Cline Settings (gear icon in the Cline panel), fill in the provider settings:

Setting

Value

API Provider

OpenAI Compatible

Base URL

https://api.nexos.ai/v1

OpenAI Compatible API Key

The nexos.ai key generated in step 1

Model ID

Once the Base URL and API key are filled in, Cline loads the models available to your key. Pick a chat model from the list, e.g. Claude Sonnet 5.5, or choose Use custom model ID… and enter the ID exactly as returned by GET /v1/models. The list also contains embedding and image models: pick a chat model.

Custom Headers

None (do not click Add Header)

Set Azure API version, Use Azure Identity Authentication

Leave unchecked

Reasoning Effort

None for Claude models (see Prompt caching and reasoning)

2026-10-21_19-15-46-20261021-171546.png

4. Set the model configuration

Cline does not know the limits or prices of nexos.ai models: until you set them, it shows Context: 128K, Input: Free, Output: Free under the model. Expand Model Configuration and enter the values from the nexos.ai Models endpoint:

Cline field

Source in /v1/models

Example for Claude Sonnet 5.5

Context Window Size

context_length

1000000

Max Output Tokens

up to max_tokens

32000 (maximum 128000)

Supports Images

image in input_modalities

checked

Input Price / 1M tokens

pricing.input_cost_per_token × 1,000,000

2.2

Output Price / 1M tokens

pricing.output_cost_per_token × 1,000,000

11

Cline uses the context window to decide when to condense a long conversation, and the prices only for its own cost estimate. The nexos.ai usage dashboard remains the source of truth for costs. If a model has no max_tokens or pricing in the response, leave those fields empty. Leave Temperature empty unless you need a specific value.

When picking a model make sure that its endpoints include chat_completion and that it has "supports_tools": true. Frontier coding models such as the current Claude Sonnet/Opus, GPT-5 family or Gemini Pro models do; small or older models often do not.

5. Send your first message

Open a project folder, start a new task in the Cline panel and send a simple request, for example "Explain what this repository does". Cline asks for approval before reading files or running commands; approve the file reads. The request is visible in your nexos.ai usage dashboard, which confirms that traffic is flowing through the Gateway.

2026-10-21_19-21-00-20261021-172100.png

Cline now routes all requests through the nexos.ai API Gateway, giving you access to multiple LLM providers through a single endpoint with centralized cost tracking, limits and observability.


Prompt caching and reasoning

  • Prompt caching works without any setting. For Claude models the nexos.ai Gateway applies caching automatically, so the repeated part of the conversation (system prompt, tool definitions, earlier steps) is billed at the reduced cached-input price. GPT models cache automatically as well.

  • Reasoning effort with Claude models – keep Reasoning Effort at None (the default) for Claude models used through OpenAI Compatible. With a reasoning level set, a task can stop with Model ended without a recognized finish reason. Reasoning effort works with GPT models.

Use OpenAI Compatible for Claude models too. Cline's Anthropic provider only offers Anthropic's own model names in its model list, and the Cline CLI does not allow a custom base URL for it, so it cannot be pointed at nexos.ai models. The OpenAI Compatible provider covers all chat models in nexos.ai, including Claude.


Using the Cline CLI with nexos.ai

  1. Install the CLI (Node.js 20 or later):

  1. Export your nexos.ai API key, e.g. in ~/.zshrc or ~/.bashrc:

  1. Configure nexos.ai as the OpenAI Compatible provider and choose the default model:

Cline saves the provider, including the key, in ~/.cline/data/settings/providers.json (readable only by your user). The VS Code extension reads the same file.

  1. Start Cline in your project directory, interactively or with a task:

  1. Optionally, switch to another nexos.ai model with -m. Cline keeps the model you pass as the new default for later runs:

For Claude models, do not pass a reasoning level with --thinking (or pass --thinking none); see Prompt caching and reasoning.


Keep all traffic on nexos.ai

  • Do not sign in to a Cline account and do not select the Cline provider. The CLI uses the Cline provider by default until you run cline auth for another provider.

  • Plan and Act models – if you enable Use different models for Plan and Act modes, configure both modes with the OpenAI Compatible provider and nexos.ai models.


Advanced configuration

Different models for Plan and Act

Enable Use different models for Plan and Act modes (at the bottom of the provider settings) to plan with a strong model (e.g. Claude Sonnet 5.5) and implement with a cheaper, faster one (e.g. GPT 5.4 mini). Both use the same Base URL and API key; set the Model Configuration for each model.

MCP servers

MCP servers are configured independently of the model provider (Cline panel → MCP Servers, or cline mcp in the CLI). They work unchanged with the nexos.ai Gateway, as long as the selected model supports tool calling.


Troubleshooting

  • "Model Not Found" – the model ID must be exactly as returned by GET /v1/models for your key, including spaces (e.g. Claude Sonnet 5.5). If the model is missing from the list, ask your workspace administrator to enable it.

  • Connection errors or 404 responses – check that the Base URL is exactly https://api.nexos.ai/v1, including /v1, and that the API Provider is OpenAI Compatible.

  • The model list does not load – check the API key. You can always choose Use custom model ID… and type the ID.

  • Model ended without a recognized finish reason with a Claude model – set Reasoning Effort to None for that model.

  • The agent answers in plain text but never edits files, or errors mention tools – the selected model does not support native tool calling. Switch to a model with "supports_tools": true.

  • Long tasks fail with a context-length error – set Context Window Size in Model Configuration (step 4).

  • Requests do not show up in the nexos.ai usage dashboard – the Cline provider is selected instead of OpenAI Compatible. See Keep all traffic on nexos.ai.

For CLI logs run cline doctor log. Community help: Cline Discord, GitHub Issues.

Last updated