Skip to main content

Pi provider

Pi settings and models are installed readonly, so the llama.cpp provider is declared once in shared chezmoi source and rendered into ~/.pi/agent/models.json for both profiles:

,llama-cpp serve
pi --model llama-cpp/local # primary
pi --model llama-cpp/local-max # abliterated sibling

The provider declares both local models:

FieldValue / reason
Modelslocal, local-max
Base URLhttp://127.0.0.1:8080/v1
API modeopenai-completions
Template compatibilityQwen thinking-compatible
apiKey!command form (!printf ...)

Work LiteLLM/Azure keys use $ENV_VAR syntax. Pi's startup migration therefore has nothing to rewrite and never attempts to write the read-only ~/.pi/agent/models.json.

If llama-server starts with --api-key, export LLAMA_CPP_API_KEY before launching Pi.