HAI Gateway Docs

VS Code (Cline)

Use Cline plugin in VS Code with AI models

VS Code + Cline

Cline is one of the most popular AI coding plugins for VS Code, supporting multiple model backends. With HAI Gateway, you can use Claude, GPT, Gemini and more directly in the editor.

Install Cline Plugin

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search Cline and install

Configure Claude Model

  1. Click the Cline icon in the sidebar
  2. Select API ProviderAnthropic
  3. Fill in the configuration:
SettingValue
API Keysk-pat-YOUR_ACCESS_TOKEN
Base URLhttps://api.hai.network/anthropic
Modelclaude-sonnet-4-20250514

Configure OpenAI Model

  1. Select API ProviderOpenAI Compatible
  2. Fill in the configuration:
SettingValue
API Keysk-pat-YOUR_ACCESS_TOKEN
Base URLhttps://api.hai.network/openai/v1
Modelgpt-4.1

Configure Gemini Model

  1. Select API ProviderOpenAI Compatible
  2. Fill in the configuration:
SettingValue
API Keysk-pat-YOUR_ACCESS_TOKEN
Base URLhttps://api.hai.network/google/v1beta
Modelgemini-2.5-pro
ModelUse CaseCharacteristics
claude-sonnet-4-20250514Complex coding tasksStrong reasoning, high code quality
gpt-4.1Rapid iterative developmentFast response speed
gpt-4.1-miniDaily coding assistanceBest cost-effectiveness
gemini-2.5-proLarge codebase analysisUltra-long context window
OpenAI Model Characteristics

GPT series models offer fast response speeds, making them ideal for rapid iterative development. gpt-4.1-mini provides the best cost-effectiveness.