Tutorial · Cline

Cline with a custom OpenAI-compatible API

Cline is a capable agent, but most connection failures are configuration mistakes: the wrong provider type, a full path instead of a base URL, or a context window that does not match the model.

Short answer. In Cline, select OpenAI Compatible as the API provider, set the base URL to https://api.plugsky.com/v1, paste your key, and enter a model ID from /v1/models. Set the context window to 262,144 and max output to 16,384 for plugsky-coder, leave image support off unless the model handles images, and enable computer use only when the model calls tools reliably.

How Cline talks to the endpoint

Cline runs in VS Code and acts as an agent, not a single-shot chat box. Each step sends a system prompt, the task, selected file context, tool definitions and the conversation so far to /v1/chat/completions. The model replies with text, tool calls, or both. Cline executes the tool, appends the result and asks again. That loop is why context size and per-step cost matter more than they do in a chat window.

The endpoint must support streaming chat completions and OpenAI-style tool_calls. If it only supports plain text completions, Cline will appear to talk but will not edit files or run commands. For background on the agent loop, see what to look for in a coding agent.

Configure the provider

Open the Cline settings panel and choose OpenAI Compatible. Do not choose OpenAI: that provider has no base-URL field, so it cannot reach a different endpoint.

SettingValueWhy it matters
API ProviderOpenAI CompatibleExposes the base URL and model controls.
Base URLhttps://api.plugsky.com/v1A base URL, not the full /chat/completions path.
API KeyYour Plugsky keyKeep it in the environment as PLUGSKY_API_KEY or in the editor's secret storage.
Modelplugsky-coderCopy the exact ID from /v1/models.
Context Window262,144Cline uses this to decide when to summarize.
Max Output Tokens16,384Prevents truncated edits and runaway replies.
Image SupportOff for text modelsTurn on only for a vision model such as plugsky-parse.
Computer UseOn only if tools workEnables the tool loop; a text-only model will stall.

Before configuring the extension, verify the key and model list from a terminal:

curl -s https://api.plugsky.com/v1/models \
  -H "Authorization: Bearer $PLUGSKY_API_KEY" \
  | jq -r '.data[].id' | sort

If that returns 401, the key is wrong. If it returns 404, the base URL is wrong. Fix that before touching Cline settings.

Choose a model and a context budget

All of these Plugsky coding models expose a 262,144-token context, but they do not have the same output budget or latency. Pick for the task, not for the largest number in the table.

Model IDContextMax outputUse it for
plugsky-coder262,14416,384Daily edits and multi-file tool use.
plugsky-coder-fast262,1444,096Small, quick changes where latency matters.
plugsky-coder-ultra262,14416,384Harder refactors and longer reasoning.
plugsky-longctx262,1448,192Large files and long repository context.
plugsky-plus262,1448,192General text and mixed tasks.

Cline resends the conversation on every step. A 200,000-token context does not mean every request costs 200,000 tokens, but a long session with many files will grow. Start a new task when the work changes; do not carry an unrelated 40-turn history into a fresh bug fix.

Tool use and the agent loop

Cline's tools read and write files, run terminal commands and can drive a browser. The model must emit structured tool calls for those actions. plugsky-coder supports function calling, so enable computer use and start with a narrow task: read one file, propose one edit, run one test.

  • Keep a step cap in the task prompt or in Cline's auto-approval settings. An agent that loops is expensive and can make destructive edits.
  • Do not auto-approve shell commands in a production checkout. Use a container, a VM or a throwaway branch.
  • Review the diff before you accept it. A model that can run tests can also rewrite the test that was supposed to catch the bug.
  • If tool calls show up as plain text, the model or endpoint is not returning tool_calls. Switch models before you change the prompt.

Prompt caching and cost

Cline can take advantage of prompt caching when the provider implements it, but an OpenAI-compatible endpoint is not guaranteed to honor Anthropic-style cache_control blocks. Treat every step as uncached until you see cache-hit fields in the provider's usage response. Do not put cache savings in a budget you have not measured.

PlanRequests/dayTokens/dayFair-use concurrency / RPMFit
Free10050KSharedEvaluation and small fixes.
Hobby ($8)1,0002MSharedA solo developer using Cline daily.
Starter ($20)2,0005MSharedTwo or three developers.
Builder ($60)UnlimitedNo monthly cap10 / 600Heavy agent use across projects.
Scale ($120)UnlimitedNo monthly cap16 / 1,200Parallel agents and larger teams.

Builder and Scale are unlimited with no monthly token cap, subject to fair-use concurrency and requests per minute. See pricing for the current terms. Changing plans is a billing action; keep it behind the account owner's approval rather than letting an agent upgrade on its own.

Troubleshooting checklist

SymptomLikely causeFix
401 Invalid API keyWrong key or wrong provider typeRe-paste the key; confirm you selected OpenAI Compatible.
404 Model not foundModel ID typo or duplicated pathCopy the exact ID; use the base URL ending in /v1.
Context length exceededContext window set too high, or history too longMatch the model's real window; start a new task.
Tool calls appear as textModel lacks tool support or computer use is offUse plugsky-coder; enable computer use.
Edits are truncatedMax output too lowRaise it to 16,384 for coder models.
Cost spikesLong history and broad file contextNarrow the task, drop files, and reset the session.

For the broader design questions, see build an AI coding agent and the pricing page.

FAQ

Which provider do I select in Cline?

Choose OpenAI Compatible. The OpenAI provider does not expose a base URL field, so it cannot be pointed at a different endpoint.

What base URL should I use?

Use https://api.plugsky.com/v1. Enter the base URL, not the full /chat/completions path; Cline appends the resource path.

Why does Cline say model not found?

The model ID must match the provider's /v1/models response exactly. Copy it from that response rather than typing a display name.

Does Cline support prompt caching with this endpoint?

Only if the provider implements it. An OpenAI-compatible endpoint is not guaranteed to honor Anthropic-style cache_control blocks, so measure cache hits before assuming savings.

How much does Cline cost on Plugsky?

Free accounts get 100 requests and 50K tokens per day. Paid plans start at $8; Builder and Scale are unlimited with no monthly token cap under fair-use concurrency and RPM limits.

Sources checked 20 November 2026: Cline OpenAI Compatible docs; Cline enterprise provider configuration; OpenAI chat completions reference. Product behavior, endpoint support and plan limits can change; re-check the primary documentation before production rollout.