Pi
Point Pi at a Gateway key.
Run this
Writes the configuration below, backs up anything it touches, and picks up only the models your key actually serves. Run it again after connecting another plan and it adds what is new.
ren inference setup piCheck it worked
pi --provider ren --model anthropic/claude-sonnet-5 -p 'hello'A reply. Both pools live in this one provider, so `--model` also accepts the Codex ids.
Configure it by hand instead
The same result, written yourself. Replace <YOUR_KEY> with your key.
Set `sendSessionAffinityHeaders`
It is off by default on this transport, and without it every turn lands on a different seat and re-pays the cache.
Claude models
~/.pi/agent/models.json
Adds Ren as a provider alongside whatever Pi already has configured.
{
"providers": {
"ren": {
"baseUrl": "https://llm.useren.ai",
"api": "anthropic-messages",
"apiKey": "<YOUR_KEY>",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "anthropic/claude-opus-5",
"reasoning": true
},
{
"id": "anthropic/claude-sonnet-5",
"reasoning": true
},
{
"id": "anthropic/claude-fable-5",
"reasoning": true
},
{
"id": "anthropic/claude-haiku-4-5",
"reasoning": true
}
]
}
}
}ChatGPT models
~/.pi/agent/models.json
Adds Ren as a provider alongside whatever Pi already has configured.
{
"providers": {
"ren": {
"baseUrl": "https://llm.useren.ai",
"api": "anthropic-messages",
"apiKey": "<YOUR_KEY>",
"compat": {
"sendSessionAffinityHeaders": true
},
"models": [
{
"id": "openai/gpt-5.6-sol",
"reasoning": true
},
{
"id": "openai/gpt-5.6-terra",
"reasoning": true
},
{
"id": "openai/gpt-5.6-luna",
"reasoning": true
},
{
"id": "openai/gpt-5.5",
"reasoning": true
},
{
"id": "openai/gpt-5.4",
"reasoning": true
},
{
"id": "openai/gpt-5.4-mini",
"reasoning": true
},
{
"id": "openai/gpt-5.3-codex-spark",
"reasoning": true
}
]
}
}
}