# Grok in VS Code: Cline Extension, API Key and Model Setup

> Use Grok in VS Code through Cline with a Passion8 /v1 URL, API key and model. Verify tool calls and distinguish the third-party extension from official Grok Build.

URL: https://docs.passion8.cc/en/docs/grok/vscode
Language: en
Publisher: Passion8
Last updated: 2026-10-11

For Passion8 Grok in VS Code, install **Cline** and enter a Passion8 URL, API key and model. Cline is a third-party coding client; Grok is the selected model. xAI login is not part of this setup.

## 1. Install Cline

Search for Cline in the marketplace, verify ID `saoudrizwan.claude-dev`, or use the [official listing](https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev). Open your project folder and the Cline sidebar, then open settings.

## 2. Use OpenAI Compatible

Select **OpenAI Compatible** as API Provider and save:

| Setting | Value |
| --- | --- |
| Base URL | `https://passion8.cc/v1` |
| API Key | Your Passion8 API key |
| Model ID | `grok-4.7` if enabled for your account; otherwise use an available console ID |

When separate Plan and Act models are enabled, check both modes so Act does not retain a previous provider. Keep the default tool format and manual approval for the initial setup.

## 3. Set capabilities and budgets

Official Grok 4.7 supports function calling and structured output, accepts text and images, and has a **500,000-token** context window. These are upstream model capabilities; the Passion8 channel, Cline custom model metadata and request format also affect actual availability.

If Cline exposes custom context settings, use values supported by your channel. Maximum output is not the context window. Verify text and file tools before testing images. Do not force a native tool format unsupported by your channel, and do not equate function calling with access to xAI hosted search.

## 4. Verify and start coding

Create a task and ask: “Reply only OK. Do not read files or run commands.” Verify its time and model in the [console](https://passion8.cc), then ask:

```text
Inspect this project without editing it. Identify its startup command,
test command and a file related to login.
Do not modify files, install dependencies or run migrations.
```

Approve the required file reads and confirm it uses project context. For the next task, request one small, specific change, review the diff and approve relevant tests. See the full [Grok coding workflow](https://docs.passion8.cc/en/docs/grok/workflow).

## Is there an official Grok VS Code extension?

The verified xAI official entry is **Grok Build**, supporting a terminal TUI, headless mode and ACP integration. The official Build overview and documentation index do not provide a standalone official VS Code extension guide configured with Passion8's three connection fields. Marketplace extensions named “Grok” require a publisher check; the name alone does not establish xAI authorship.

Passion8 therefore recommends **Cline + Grok** for editor use and [Grok Build installation](https://docs.passion8.cc/en/docs/grok) for the official CLI. ACP is a client integration protocol and does not mean standard VS Code includes a Grok extension.

## Cost and troubleshooting

| Issue | Action |
| --- | --- |
| Model calls itself Claude or GPT | Check console model and usage; client instructions affect self-identification |
| 401 / 403 | Check Passion8 token status, model access and balance |
| 404 | Use the `/v1` base URL, not a complete API method URL |
| Text works but tools fail | Check model support, Cline tool format and channel capability; keep the error body |
| Long tasks become expensive | Avoid loading the whole repository; start a new task after each goal and inspect usage |
| Search fails | Cline local tools differ from xAI hosted search; do not assume official search is available through the gateway |

For SDK use, see [Grok API calls](https://docs.passion8.cc/en/docs/grok/api). For model switching, see [Cline multi-model setup](https://docs.passion8.cc/en/docs/cline).

## Verified sources

Checked: 2026-10-11.

- [Official Grok Build overview](https://docs.x.ai/build/overview)
- [Grok 4.7 capabilities](https://docs.x.ai/developers/models/grok-4.7)
- [Official xAI documentation index](https://docs.x.ai/llms.txt)
- [Cline OpenAI Compatible](https://docs.cline.bot/provider-config/openai-compatible)
