Pi provider extension for Edgee, the Agent Gateway that compresses, routes, and observes LLM requests.
Pi provider extension for Edgee, the Agent Gateway that compresses, routes, and observes LLM requests.
Learn more about Edgee in the official documentation.
pi install npm:@aliou/pi-edgee
Set the API key before use:
export EDGEE_API_KEY=...
edgee provider in Pi.https://edgee.io/v1, not an SDK.GET https://edgee.io/v1/models when EDGEE_API_KEY is available. Model ids use the {provider}/{model} format (e.g. openai/gpt-5.2); the owned_by field exposes the upstream provider.openai-completions provider path, so tool calls, streaming usage, and context-overflow normalization all work.context_length_exceeded signal.Edgee exposes two separate APIs. This extension only needs the Gateway API:
https://edgee.io) — LLM requests and model listing. Authenticated with an sk-edgee-... API key (EDGEE_API_KEY). Endpoints: /v1/models, /v1/chat/completions, /v1/messages, /v1/responses, /v1/compress, /v1/count_tokens.https://api.edgee.app) — organization management: usage/cost export, gateway API-key management, BYOK. Requires a separate ek_live_... Console token and an org id, not the gateway key. Not used by this extension.pnpm install
pnpm typecheck
pnpm lint
pnpm test
extensions/provider/: Pi extension entry point.src/edgee/: Edgee model mapping and API helpers.Edgee compresses input tokens before they reach the upstream provider, so actual billed cost is usually lower than the cost figures embedded in the model metadata (which reflect upstream list prices from models.dev). Per-request savings are reported in the compression field of Edgee’s responses and are not reflected here.