Cline

Configure a custom provider in the Cline VS Code extension.

Cline is an AI coding extension for VS Code that can read and write files and run commands. It supports several API providers; two of them work with this site:

ProviderBase URLModelsBest for
OpenAI Compatible (recommended)https://tokenfunc.com/v1Any model on this site, entered by nameMost cases
Anthropichttps://tokenfunc.comOnly Claude models from Cline's built-in listClaude only, with full reasoning and caching

Cline calls tools constantly, so pick a model with tool calling, for example claude-sonnet-4-5.

Install

Search for Cline in the VS Code Extensions view and install it. A Cline icon appears in the activity bar.

  1. Open the API settings

    Click the gear icon at the top right of the Cline panel, or the model name below the input box. Set API Provider to OpenAI Compatible.

  2. Enter the connection details

    FieldValue
    Base URLhttps://tokenfunc.com/v1
    API Keysk-xxxxxxxxxxxxxxxx
    Model IDclaude-sonnet-4-5

    Pick the Model ID from the dropdown (Cline fetches this site's model list) or type it.

    Screenshot pendingCline's OpenAI Compatible form with Base URL, API Key and Model ID filled intools/cline-openai-compatible.png

  3. Set the model parameters

    Expand Model Configuration and fill it in for the model you chose:

    • Context Window Size: the model's context length, for example 200000 for flagship Claude and GPT models. Left empty, a small default applies and long tasks may be cut short.
    • Max Output Tokens: the maximum output per call, for example 8192.
    • Supports Images: check it if the model can read images.
  4. Verify

    Give Cline a small task such as "Read the README and summarize it in three sentences". If it reads the file and answers, you are set.

Option 2: Anthropic

  1. Choose the provider

    Set API Provider to Anthropic and enter sk-xxxxxxxxxxxxxxxx as the Anthropic API Key.

  2. Override the base URL

    Check Use custom base URL and enter https://tokenfunc.com (without /v1).

    Screenshot pendingCline's Anthropic settings with Use custom base URL checked and this site's address enteredtools/cline-anthropic.png

  3. Choose a model

    Pick a Claude model from the Model dropdown. That list is built into Cline, and the name must match a model on this site; check it on the Model Square.

Tips

  • Cline has a Plan mode and an Act mode with separate model settings. Configure both.
  • To see what each task cost, check Usage Logs in the console.

Troubleshooting

SymptomCause and fix
Invalid API KeyWrong key or no quota left. Check it on API Keys
Model Not FoundThe Model ID does not match a model on this site
Connection error / 404OpenAI Compatible is missing /v1, or the Anthropic address has an extra /v1
Context length error halfway through a taskContext Window Size is larger than the model's real limit. Use the actual value
Calls the same tool over and over, broken outputThe model is not capable enough. Switch to a flagship model