# Repository Briefing: ggml-org/llama.vscode
> Source: https://repoforai.com/repo/ggml-org/llama.vscode (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/ggml-org/llama.vscode
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (92/100 · Maintenance 35/35 · Adoption 17/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.0.80 (2026-11-30) — https://github.com/ggml-org/llama.vscode/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: Local AI, MCP
- **Momentum**: 1,566 ★ total (+2 24h / +4 7d) · 184 forks
- **Topics**: `copilot`, `developer-tool`, `extension`, `llama`, `llm`, `vscode`
- **When to Use**: Best for: VS Code users who want local inline completions and explicit control over the models and tools used for chat and agent tasks. Skip if: You need a managed service with no local model upkeep, or you primarily work outside VS Code and do not want to switch editors.

## Overview
```text
### Architecture & Core Mechanics
llama.vscode runs as a TypeScript extension in the VS Code extension host. Its manifest points to `./dist/extension.js`, registers `llama-vscode` as a chat model provider, and declares activation events for plaintext, JavaScript, TypeScript, a command, and incoming URIs. The root contains both `src/` and `ui/`; the manifest also contributes an Activity Bar container.

For local inline completion, the extension gathers text around the cursor and can supplement it with a ring of snippets from open or edited files and copied text. A FIM-capable model served by llama.cpp fills the gap between the prefix and suffix. Chat and Llama Agent have separate model roles and can use local or external models. An Env groups role selections so they can be switched together. The MCP boundary sits in VS Code: the agent consumes selected tools from servers that VS Code has already installed and started.

### Key Capabilities & Differentiators
Inline suggestions can trigger as you type. Accept the whole suggestion with `Tab`, just the first line with `Shift+Tab`, or the next word with `Ctrl/Cmd+Right Arrow`. Generation time and cursor-context scope are configurable, performance statistics are visible, and llama.cpp context reuse helps reduce repeated work across requests. Local completion specifically requires a FIM-capable model; the concrete CPU examples use Qwen2.5-Coder GGUF models.

Llama Agent can take file attachments or the current selection, use built-in tools or selected MCP tools, and stop after a configurable maximum number of loops. The extension supports Hugging Face model search and downloads, Env import and export, and external providers such as OpenRouter. It also offers a Telegram bot integration and VS Code deep links that can prefill the agent prompt.

### Trade-offs & Limitations
Compared with a managed coding assistant, local llama.cpp inference gives teams more control over where generation runs, but it shifts model selection, runtime updates, and performance tuning to the workstation. Context reuse can reduce redundant work, not eliminate memory limits or the quality penalty noted for the smallest CPU-only models. Test completion responsiveness separately from chat and agent workloads. If the team uses Vim or Neovim, sibling project llama.vim is the more direct editor fit.

Envs make a mixed local and hosted setup practical, but data handling depends on the active model and tools. Review what file attachments and ring-context snippets can reach a hosted provider, and which MCP tools or remote integrations can receive workspace data. The extension is MIT-licensed; model licenses and external service terms are separate.

### Hardware & Deployment Guide
Install `ggml-org.llama-vscode` from the VS Code Marketplace or Open VSX; the manifest requires VS Code `^1.109.0`. For local inference, the extension offers llama.cpp installation or upgrade. Manual routes include Homebrew on macOS, Winget on Windows, and release binaries on `PATH` or a source build on Linux. Select and start an Env for the roles you need. The CPU-only completion examples use `llama serve` on port `8012` with `--ctx-size 0 --cache-reuse 256`.

Acquire model weights before relying on offline inference: downloading from Hugging Face requires connectivity, whereas local generation need not call a hosted API once the runtime and model are in place. Check tool endpoints separately. An external model is also an option for chat or agent work. In v0.0.79, Requesty joined the OpenAI-compatible provider list; v0.0.80 added model, agent, and tool configuration to the Agent Command Editor and placeholder substitution before prompts and queries are sent.
```

## Key Capabilities
```text
- VS Code runtime: TypeScript extension with `./dist/extension.js` as its entry point, a contributed chat provider, and engine range `^1.109.0`.
- Completion context: FIM uses text around the cursor, with a ring of snippets from open or edited files and copied text plus llama.cpp context reuse.
- Suggestion control: Accept a full suggestion, its first line, or its next word; cap generation time and inspect performance statistics.
- Model configurations: Assign models for completion, chat, embeddings, and tools; switch related selections together through importable and exportable Envs.
- MCP integration: Llama Agent selects tools from MCP servers running in VS Code and exposes a configurable loop limit.
- CPU fallback: `llama serve` examples use Qwen2.5-Coder 0.5B or 1.5B Q8_0 GGUF models with `--cache-reuse 256`.
```

## Quick Start / Clone
```bash
brew install llama.cpp
```
