Cline with 资产生成
Cline is a VS Code extension that provides autonomous coding assistance. You can configure it to use 资产生成 for unified model access and spend monitoring.
Run the Vercel CLI setup command for Cline CLI:
npx vercel ai-gateway setup --agent clineThe 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:
Go to the 资产生成 section in the Vercel dashboard sidebar and click API keys to create a new API key.
Install the Cline extension from the VS Code marketplace.
Open the Cline settings panel in VS Code.
In the settings panel:
- Select AI 资产生成 as your API Provider
- Paste your 资产生成 API Key
- Choose a model from the auto-populated catalog, or enter a specific model ID
Cline automatically fetches all available models from 资产生成. You can browse the full catalog on the models page.
Your requests will now be routed through 资产生成. You can verify this by checking your 资产生成 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 资产生成 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.
Common issues and solutions:
- 401 Unauthorized: Verify you're sending the 资产生成 key to the 资产生成 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
Was this helpful?