@gaurav-321/pi-local-llm

Pi extension: llama-swap provider with dynamic model discovery

Packages

Package details

extension

Install @gaurav-321/pi-local-llm from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@gaurav-321/pi-local-llm
Package
@gaurav-321/pi-local-llm
Version
1.1.1
Published
Jul 1, 2026
Downloads
102/mo · 27/wk
Author
gaurav-321
License
Apache-2.0
Types
extension
Size
79.1 KB
Dependencies
1 dependency · 0 peers
Pi manifest JSON
{
  "extensions": [
    "dist/index.js"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@gaurav-321/pi-local-llm

Pi coding agent extension for local LLM providers: LM Studio, llama.cpp, and llama-swap.

Features

  • Registers a llama-swap provider with dynamic model discovery
  • Supports LM Studio, llama.cpp, and llama-swap backends
  • Per-model context window detection with overrides
  • Optional config via ~/.pi/agent/pi-llama-swap.json

Install

pi install npm:@gaurav-321/pi-local-llm

Or load directly:

pi -e /path/to/pi-llama-swap

Quick Start

  1. Start your local LLM server (LM Studio, llama.cpp, or llama-swap)
  2. Load the extension: pi -e /path/to/pi-llama-swap
  3. Select a model: /model → pick llama-swap/your-model-id

Config

Create ~/.pi/agent/pi-llama-swap.json:

{
  "origin": "http://127.0.0.1",
  "port": 8080,
  "apiKey": "optional"
}

Commands

Command Description
/llama-swap-set-context-length <n> Override context window for current model

License

MIT