Skip to content
Docs

Cline with AI Gateway

Cline is a VS Code extension that provides autonomous coding assistance. You can configure it to use AI Gateway for unified model access and spend monitoring.

Run the Vercel CLI setup command for Cline CLI:

terminal
npx vercel ai-gateway setup --agent cline

The command provisions a key and writes Cline's provider store at ~/.cline/data/settings/providers.json.

To configure the Cline VS Code extension manually, use these steps:

  1. Go to the AI Gateway section in the Vercel dashboard sidebar and click API keys to create a new API key.

  2. Install the Cline extension from the VS Code marketplace.

  3. Open the Cline settings panel in VS Code.

  4. In the settings panel:

    1. Select Vercel AI Gateway as your API Provider
    2. Paste your AI Gateway API Key
    3. Choose a model from the auto-populated catalog, or enter a specific model ID

    Cline automatically fetches all available models from AI Gateway. You can browse the full catalog on the models page.

  5. Your requests will now be routed through AI Gateway. You can verify this by checking your AI Gateway Overview in the Vercel dashboard.

Models follow the creator/model-name format. Check the models catalog for the right slug to avoid "404 Model Not Found" errors.

View your usage, spend, and request activity in the AI Gateway section in the Vercel dashboard sidebar. The observability dashboard tracks:

  • Input and output token counts (including reasoning tokens)
  • Cached input and cache creation tokens
  • Latency metrics (average TTFT)
  • Per-project and per-model costs

See the observability documentation for more details.

Maintain separate API keys for different environments (dev, staging, production) to better track usage across your workflow.

Common issues and solutions:

  • 401 Unauthorized: Verify you're sending the AI Gateway key to the AI Gateway endpoint
  • 404 Model Not Found: Copy the exact model ID from the models catalog
  • Slow first token: Check dashboard average TTFT and consider streaming-optimized models
Last updated September 13, 2026

Was this helpful?

supported.