pi-llama-reasoning0.4.0
Use native llama.cpp reasoning efforts in Pi’s thinking selector, with matching token budgets and no extra configuration.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-llama-reasoning
Choose your llama.cpp model’s reasoning level in Pi. When several Pi sessions share a model, the extension assigns them separate server slots when available.

Install
Supports Pi 1.5.2 through 1.8.0. Requires Node.js 22.19.0+.
pi install npm:pi-llama-reasoning
Restart Pi after installing.
Use
- Connect to your llama.cpp router with
/login llama.cppif you haven’t already. - Load a model through
/llama, then select it through/model. - Run
/thinkingand choose a level the model supports, such aslowormedium.
Native efforts use Pi’s thinking token budgets. Explicit reasoning, budget, sampling, slot, and cache settings are preserved. Thinking tokens still count toward the model’s output and context limits.
Sharing a model between agents
Slots help sessions reuse cached conversation history across turns. Pi sessions get separate slots automatically when the server has slots available.
Inspect Slots
Run /slots to inspect slots, busy/idle state, counters, and local session assignments. The footer shows your slot or why it has no assignment.
Example output. A ? means the server did not report that counter.
qwen
├─ Slot 0: idle
│ ├─ context 8192; prompt 23; processed 0; cached 0
│ └─ lease: this session (PID 24180)
└─ Slot 1: busy
├─ context ?; prompt ?; processed ?; cached ?
└─ lease: no local lease
Snapshot only. Counters are not total KV memory usage; local leases do not identify external clients.
Hide the Footer
To hide the slot status, add this to your Pi settings and restart Pi. Slot pinning, /slots, and warning notifications stay available.
{
"piLlamaReasoning": {
"slotStatus": false
}
}
Server Setup
Enable slot inspection on your llama.cpp server and give it enough slots for your sessions. This tested setup provides three:
--slots --parallel 3 --kv-unified --no-cache-idle-slots
Pass these flags to the llama.cpp server. The three slots share one context pool. See the tested setup for details.
- Coordination is local: sessions must share a machine, local cache, server, and model.
- If no slot is available or inspection fails, requests continue without an assignment and Pi shows a warning.
- Pinning supports cache reuse, not guaranteed retention. Other clients, server settings, memory pressure, or model reloads can still force reprocessing.
Limits
- Reasoning levels appear only for loaded models whose server reports supported level names. This includes effort-only templates such as Inkling-2-Mini when using Pi’s unmodified built-in model entry.
- If discovery fails or the reported levels are unsupported, Pi keeps its usual behavior.
- Restart Pi after changing a model’s available reasoning levels;
/reloadwon’t refresh them.
See vision.md for design, implementation, and development notes.