Skip to main content
Pi is a terminal coding agent. Configure abliteration.ai as a custom OpenAI-compatible provider and enable Pi’s session-affinity headers so requests from the same conversation are routed together for better prompt-cache reuse.

Install

Pi requires Node.js 22.19 or later.

Set your API key

Get an ak_... key from the console, then export it in your shell:

Configure the provider

Add the following provider to ~/.pi/agent/models.json:
Keep sendSessionAffinityHeaders enabled. Pi auto-detects this behavior only for known providers, so the custom abliteration.ai provider must enable it explicitly. Pi then sends its session ID in x-session-affinity, which abliteration.ai uses as a cache-routing hint. See Pi’s provider compatibility reference and prompt caching on abliteration.ai.
Do not replace this setting with one static custom header. Pi derives a stable value for each session, keeping unrelated conversations in separate affinity groups.

Start Pi

Run pi, enter /model, and select the abliteration provider and your preferred model. Use Abliterated Model when you need image input; Abliterated Model Large V2 is text-only.
Last modified on September 11, 2026