pi-provider-gdpr-inference0.1.0
Pi provider for Entrim — a GDPR-compliant EU inference platform (OpenAI-compatible, live model discovery)
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-provider-gdpr-inference
A pi provider package that registers an entrim provider over
Entrim's OpenAI-compatible API at https://api.entrim.ai/v1. Entrim is a
GDPR-compliant EU inference platform.
What it does
- Registers
entrimas a pi provider (appears in/modelasentrim/...). - Reuses pi's built-in
openai-completionsimplementation — no custom streaming code, so tool calls, usage/cost accounting, cancellation, and context-overflow handling all come for free. - Auto-discovers the model catalog from
GET /v1/modelsonce a key is available, and persists it so the list is available offline on restart.
Install
pi install npm:pi-provider-gdpr-inference
# try once without installing:
pi -e ./pi-provider-gdpr-inference
Then provide a key (either way works):
export ENTRIM_API_KEY=sk-...
# or run the interactive login:
/model
Verify it registered:
pi --list-models | grep entrim
# or inside pi:
/model # search "entrim"
Use a model:
pi --model entrim/deepseek-ai/DeepSeek-V4.1-Flash
How it works
- A small bootstrap model list is registered so the provider is usable immediately after load.
- On startup/refresh, pi calls
refreshModels. If a credential resolves, it fetchesGET /v1/models, maps the LiteLLM-styledataarray to pi model configs, and returns them — pi replaces the bootstrap list with the live one. - The list is persisted via
context.publish({ persist }); on a later offline start,refreshModelsrestores it before touching the network.
Customization
Users can override the endpoint, headers, or per-model metadata in their own
~/.pi/agent/models.json — pi composes models.json overrides above the
registered provider.
Notes for maintainers
- Keep
@earendil-works/pi-aiand@earendil-works/pi-coding-agentinpeerDependencies(host-supplied), never independencies. - Model metadata (
reasoning,contextWindow,maxTokens,cost) inmapModelsis heuristic — refine once real per-model specs are known. /login entriminteractive key login (viaoauth) is left as a commented option inextension.ts; enable it if you want credentials stored inauth.jsonrather than an env var.
Development
npm install # get host peer deps for type-checking
npm run check # tsc --noEmit
Load locally while developing:
pi -e ./pi-provider-gdpr-inference