AI-Assisted Coding
Serverless Inference with Cline
This tutorial walks you through using Kimchi's Serverless Endpoints with Cline, an agentic coding tool available as a standalone CLI and as a VS Code extension. You'll configure Cline to use open-source LLMs via Kimchi, providing a cost-effective setup for AI-assisted development.
Overview
By the end of this tutorial, you'll be able to:
- Authenticate Cline against Kimchi as a model provider
- Use MiniMax M2.5 for code generation and execution tasks
- Run Cline interactively in your terminal or headlessly in scripts and CI/CD pipelines
Prerequisites
- A Kimchi API key — Go to Kimchi → API Keys and click Create API key. Copy the key and store it securely.
- Node.js 20 or higher — Check your version with
node --version - Cline CLI installed:
npm install -g clinecline versionStep 1: Authenticate Cline with Kimchi
Cline manages provider configuration through its auth command:
cline auth -p openai -k YOUR_CASTAI_API_KEY -b https://llm.kimchi.dev/openai/v1 -m minimax-m2.5| Flag | Value | Purpose |
|---|---|---|
| -p openai | openai | Tells Cline to use the OpenAI-compatible provider type |
| -k | Your Kimchi API key | Authenticates your requests to Kimchi |
| -b | https://llm.kimchi.dev/openai/v1 | Points Cline at Kimchi's inference endpoint |
| -m | minimax-m2.5 | Sets MiniMax M2.5 as the default model |
Step 2: Verify Your Configuration
Confirm that Cline stored your settings correctly:
cline configYou should see https://llm.kimchi.dev/openai/v1 as the openAiBaseUrl and minimax-m2.5 as the model.
Step 3: Test the Connection
Navigate to a project directory and run a simple test:
cd ~/your-projectcline "What files are in this directory?"Once that succeeds, try a prompt that requires a real inference call:
cline "Explain what this project does in one paragraph"Using Cline
Cline operates in two modes:
- Interactive mode — launches a full terminal interface for hands-on development sessions. Start it by running
clinewith no arguments. - Headless mode — designed for automation. Activates when you pass the
-yflag, pipe input, or redirect output:
Run a task with automatic approval (no prompts):
cline -y "Fix all ESLint errors in src/"Pipe a diff for automated code review:
git diff | cline -y "Review these changes and summarize any issues"Advanced: Headless CI/CD Workflows
Cline's headless mode makes it straightforward to integrate Kimchi into automated pipelines:
In your CI pipeline, authenticate first:
cline auth -p openai -k $CASTAI_API_KEY -b https://llm.kimchi.dev/openai/v1 -m minimax-m2.5Then use Cline in headless mode:
git diff origin/main | cline -y "Review these changes for bugs or regressions"IDE Integration
If you use Cline as a VS Code extension, settings are stored in VS Code's settings.json:
- Open VS Code and navigate to Settings (
Cmd+,on macOS) - Search for Cline
- Set API Provider to
OpenAI Compatible - Set Base URL to
https://llm.kimchi.dev/openai/v1 - Set API Key to your Kimchi API key
- Set Model to
minimax-m2.5
Or add directly to settings.json:
"cline.apiProvider": "openai",
"cline.openAiBaseUrl": "https://llm.kimchi.dev/openai/v1",
"cline.openAiApiKey": "YOUR_CASTAI_API_KEY",
"cline.apiModelId": "minimax-m2.5"