Skip to main content

Pi provider

Pi settings and models are installed readonly, so the llama.cpp provider is declared in chezmoi source and installed as ~/.pi/agent/models.json per profile:

,llama-cpp serve
pi --model llama-cpp/nemotron-3.5
pi --model llama-cpp/qwen3.5-9b
pi --model llama-cpp/qwen3.8-27b
pi --model llama-cpp/qwen3.8-27b-instruct

The provider declares the llama.cpp router ids:

FieldValue / reason
Modelsllama.cpp router ids
Base URLhttp://127.0.0.1:8080/v1
API modeopenai-completions
Template compatibilityQwen thinking-compatible
apiKey!command form (!printf ...)

Provider keys use $ENV_VAR or !command 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.