Skip to content

Models

Cline

Cline is a coding agent that runs inside VS Code and talks to whichever provider you configure. Unlike editor integrations that proxy through a vendor, Cline calls the endpoint directly from your machine, so a Grafilab base URL and key are all it needs.

  • Cline installed in VS Code and its sidebar panel open.
  • A Grafilab API key. In the console open API (https://app.grafilab.ai/api) and click Generate New Key — see API Keys.

Name the key cline so its spend is separated from your other tools.

The model catalog is live, so list it rather than copying ids from a page. Every entry’s id is the exact string to use in any tool or SDK.

Terminal window
curl https://llm.grafilab.ai/v1/models \
-H "Authorization: Bearer $GRAFILAB_API_KEY" | jq -r '.data[].id'

The same ids appear as cards in the Playground, with context size and prices.

Cline sends the Model ID string verbatim, so it must match a catalog id exactly.

  1. Open the Cline panel and select the ⚙️ settings icon. The API configuration is the first section.

  2. Set API Provider to OpenAI Compatible.

  3. Set Base URL to:

    https://llm.grafilab.ai/v1

    Cline appends /chat/completions itself, so the value ends at /v1.

  4. Paste your Grafilab key into API Key. Leave Use Azure Identity Authentication unchecked.

  5. Enter your Grafilab model id in the Model field (labelled Model ID in some builds).

  6. Open Model Configuration and fill in what Cline cannot discover from an OpenAI-compatible endpoint.

    FieldWhere the value comes from
    Context WindowThe Context figure on the model’s Playground card
    Max Output TokensThe model’s output cap; leave the default if you are unsure
    Image SupportEnable only for a multimodal model
    Computer UseLeave off unless the model advertises tool use you have tested
    Input Price / Output PriceThe Input and Output prices on the Playground card

    The prices only feed Cline’s own cost meter. Grafilab bills from the catalog price regardless of what you type here, so a wrong number produces a misleading estimate, not a wrong charge.

  7. Select Done, then give Cline a small task — “list the files in this folder and summarise what the project does” is a good first one.

Cline can also talk to Grafilab in Anthropic format. Set API Provider to Anthropic, check Use custom base URL, and enter the bare origin:

https://llm.grafilab.ai

Then paste the same key and type the same model id. Note the missing /v1 — Anthropic clients append /v1/messages themselves.

You almost never need this. It is worth trying only if a Cline feature insists on the Messages format. One visible difference: Grafilab accepts and ignores cache_control, so Cline’s cache-write counter stays at 0 for the whole session even though cache reads are reported normally.

Cline shows tokens and an estimated cost under each task. After your first task completes, open API in the console, select View Usage on the cline key, and confirm a request landed today. Rollups can lag by up to about 30 minutes.

  • Set the context window by hand. Cline cannot read a context size from an OpenAI-compatible endpoint, so its default is a guess. Too high and Cline packs a prompt the model rejects; too low and it truncates your files for no reason.
  • Images need a multimodal model. Attaching a screenshot to a task on a text-only model fails at the API, not in Cline.
  • Reasoning traces arrive as reasoning_content. Grafilab returns them under both reasoning and reasoning_content with identical text. Whether Cline renders them depends on the extension version.
  • 429 means an empty wallet. Grafilab uses 429 for insufficient balance rather than throughput, so a rate-limit message from Cline is a billing signal. Top up in the console.
  • Long tasks can stall. Each upstream call has a 120-second bound on time-to-first-token. If a request dies before any output, retry it; the work was not billed.