llama.vscode

ggml-orgMIT活跃维护

在 VS Code 里接入本地 LLM 做代码和文本补全的扩展,让编辑器具备类似 Copilot 的补全能力,同时数据不必离开本机。

VS Code extension for LLM-assisted code/text completion

v0.0.77发布于 2026-11-05 22:42 UTC1,553star +1 / 7 天171fork同步于 2026-11-10 17:50 UTC

怎么上手

由 README 提炼,执行前请确认
brew install llama.cpp
llama serve --fim-qwen-7b-default
硬件要求按 README 说明

按显存选择模型:64GB 以上用 30B、16GB 以上用 7B、8GB 以上用 3B、8GB 以下用 1.5B;也提供纯 CPU 配置(Qwen2.5-Coder 1.5B/0.5B),但质量明显下降。

8G 显存可跑16G 显存可跑纯 CPU 可运行支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

VS Code 本地 LLM 补全与 Agent 插件,基于 llama.cpp 提供 FIM 代码补全和对话

在 VS Code 里接入本地 LLM 做代码和文本补全的扩展,让编辑器具备类似 Copilot 的补全能力,同时数据不必离开本机。

核心能力

  • 输入时自动建议,Tab 接受整段、Shift+Tab 接受首行
  • 用光标上下文与打开文件分块做环形上下文增强补全
  • 通过智能上下文复用在小显存上支持超长上下文
  • 内置 Llama Agent,支持 MCP 工具与 9 个内部工具
  • 可从 HuggingFace 搜索下载模型并管理 env 分组

容易踩的坑

插件需要 FIM 兼容模型,普通对话模型不能直接用于补全;llama.cpp 虽可自动安装,但 Linux 需手动下载二进制并加入 PATH;CPU 配置需指定 --port 8012 等参数,且补全质量明显低于 GPU。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.0.77
  1. v0.0.77最新正式版2026-11-05 · 2026-11-05 22:42 UTC
    • New Telegram command /tokens - shows request and chant tokens/price
    • New telegram command /permissions - shows the current tools permissions mode (setting tools_permissions_mode) and the available modes
    • New telegram command /setpermission x - sets the tools permissions mode by number or name. (the modes are available from command /permissions, i.e. "1", "AllowAll", "auto ask")
    • Add cheapaimodel.ai and llm.buzz to the OpenAI-compatible providers
  2. v0.0.762026-11-01 · 2026-11-01 22:21 UTC
    查看更新说明
    • Update search_source tool to continue working if RAG indexing is off
    • RAG indexing is now off by default as all agent tools could be used without RAG indexing.
    • Add OpenAI compatible providers - CloudGPU and Runcrate
  3. v0.0.752026-11-01 · 2026-11-01 14:19 UTC
    查看更新说明
    • regex_search tool is changed to be independent from RAG search.
    • Refactor tool run_terminal_command
    • For Windows the procedure for installing lama.cpp is changed. If option llama app is selected - the web page llama.app is opened instead of running shell script.
    • Tools permissoins modes introduced - AllowAll, AutoAskIfUnsure, AutoDenyIfUnsure, Ask
  4. v0.0.742026-10-28 · 2026-10-28 07:56 UTC
    查看更新说明
    • Send prompt in sesson (between tool calls) fixed
    • Search files in agent chat is now independent from the RAG indexing
    • Auto-start default tools model for agent
  5. v0.0.732026-10-26 · 2026-10-26 08:57 UTC
    查看更新说明
    • Kimi K3.1 Pro and Kimi K3.1 Pro Highspeed added as predefined models for providers - moonshotai (supports tools on demand), openrouter, orcarouter

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    llama.vscode

    Local LLM-assisted text completion, chat with AI and agentic coding extension for VS Code

    image


    llama vscode-swift0

    Features

    • Auto-suggest on input
    • Accept a suggestion with Tab
    • Accept the first line of a suggestion with Shift + Tab
    • Accept the next word with Ctrl/Cmd + Right Arrow
    • Toggle the suggestion manually by pressing Ctrl + L
    • Control max text generation time
    • Configure scope of context around the cursor
    • Ring context with chunks from open and edited files and yanked text
    • Supports very large contexts even on low-end hardware via smart context reuse
    • Display performance stats
    • Llama Agent for agentic coding
    • Access to the llama-vscode agents from phone via a Telegram bot
    • Deep links vscode://ggml-org.llama-vscode?view=agent&prompt=Hello opens VS Code (if not open), shows lama-vscode agent view and enters "Hello" as a prompt
    • Kimi K3, Kimi K3.1 Pro, Kimi K3 Pro Highspeed - support for dynamically loaded tools (tools on demand) when used from moonshot.ai.
    • Add/remove/export/import for models - completion, chat, embeddings and tools
    • Model selection - for completion, chat, embeddings and tools
    • Env (group of models) concept introduced. Selecting/Deselecting env selects/deselects all the models in it
    • Add/remove/export/import for env
    • Predefined models - both local and external, including DeepSeek V4 Flash 0731, Qwen3.7 Flash, GPT-6 Astra, Claude Fable 5.1, etc.
    • Predefined envs for different use cases - only completion, chat + completion, chat + agent, etc.
    • MCP tools selection for the agent (from VS Code installed MCP Servers)
    • Search and download models from Huggingface directly from llama-vscode

    Installation

    VS Code extension setup

    Install the llama-vscode extension from the VS Code extension marketplace:

    image

    Note: also available at Open VSX

    llama.cpp setup

    • Now automatic on starting llama-vscode - from the official llama.cpp shell script or from brew (Mac, Linux) or Winget (Windows). The details below for the manual installation are left for reference.

    Prerequisites:

    • For macOS: Homebrew must be installed
    • For Windows: Windows Package Manager (winget) is required

    Show llama-vscode menu by clicking on llama-vscode in the status bar or Ctrl+Shift+M and select "Install/Upgrade llama.cpp". This will install llama.cpp automatically for Mac and Windows. For Linux get the latest binaries and add the bin folder to the path.

    Once you have llama.cpp installed, you can select env for your needs from llama-vscode menu "Select/start env..."

    Below are some details how to install llama.cpp manually (if you prefer it).

    Mac OS
    brew install llama.cpp
    
    Windows
    winget install llama.cpp
    
    Any other OS

    Either use the latest binaries or build llama.cpp from source. For more information how to run the llama.cpp server, please refer to the Wiki.

    llama.cpp settings

    Here are recommended settings, depending on the amount of VRAM that you have:

    • More than 64GB VRAM:

      llama serve --fim-qwen-30b-default
      
    • More than 16GB VRAM:

      llama serve --fim-qwen-7b-default
      
    • Less than 16GB VRAM:

      llama serve --fim-qwen-3b-default
      
    • Less than 8GB VRAM:

      llama serve --fim-qwen-1.5b-default
      

    These are llama serve settings for CPU-only hardware. Note that the quality will be significantly lower:

    llama serve \
        -hf ggml-org/Qwen2.5-Coder-1.5B-Q8_0-GGUF \
        --port 8012 -ub 512 -b 512 --ctx-size 0 --cache-reuse 256
    
    llama serve \
        -hf ggml-org/Qwen2.5-Coder-0.5B-Q8_0-GGUF \
        --port 8012 -ub 1024 -b 1024 --ctx-size 0 --cache-reuse 256
    

    You can use any other FIM-compatible model that your system can handle. By default, the models downloaded with the -hf flag are stored in:

    • Mac OS: ~/Library/Caches/llama.cpp/
    • Linux: ~/.cache/llama.cpp
    • Windows: LOCALAPPDATA

    Recommended LLMs

    The plugin requires FIM-compatible models: HF collection

    Llama Agent

    The extension includes Llama Agent

    Features

    • Llama Agent UI in Explorer view
    • Works with local models - gpt-oss 20B is the best choice for now
    • Could work with external models (for example from OpenRouter)
    • MCP Support - could use the tools from the MCP Servers, which are installed and started in VS Code
    • 9 internal tools available for use
    • custom_tool - returns the content of a file or a web page
    • custom_eval_tool - write your own tool in javascript (function with input and return value string)
    • Attach the selection to the context
    • Configure maximum loops for Llama Agent

    Usage

    1. Open Llama Agent with Ctrl+Shift+A or from llama-vscode menu "Show Llama Agent"
    2. Select Env with an agent if you haven't done it before.
    3. Write a query and attach files with the @ button if needed

    More details(https://github.com/ggml-org/llama.vscode/wiki)

    Examples

    Speculative FIMs running locally on a M2 Studio:

    https://github.com/user-attachments/assets/cab99b93-4712-40b4-9c8d-cf86e98d4482

    Implementation details

    The extension aims to be very simple and lightweight and at the same time to provide high-quality and performant local FIM completions, even on consumer-grade hardware.

    Other IDEs