{"_id":"@aliou/pi-edgee","_rev":"5-2ad2300f364788a9869ca56ab2d9c4cc","name":"@aliou/pi-edgee","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.1":{"name":"@aliou/pi-edgee","version":"0.0.1","license":"MIT","_id":"@aliou/pi-edgee@0.0.1","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/pi-edgee#readme","bugs":{"url":"https://github.com/aliou/pi-edgee/issues"},"dist":{"shasum":"daf1565712a2561371a629eef36909e0231a73b6","tarball":"https://registry.npmjs.org/@aliou/pi-edgee/-/pi-edgee-0.0.1.tgz","fileCount":2,"integrity":"sha512-r1sXX9PkCfQS7O2vNwB9z+BJW2tQLnBzDzZKWDvK4nQGuGSUYYYXM7chJ0MXoWUBPBJf0Q3rB33dSQo/kHUHIg==","signatures":[{"sig":"MEUCIQD/r9prv1ebfe8X5InPUNwDnsrWo0qJOzt6Tp0iZ9K7WQIgaTBS/xUdTxe2y/s5gtvNuXRGT0ahO84ONmfhuKwnhjs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3355},"_npmUser":{"name":"aliou","email":"code+npm@general-dexterity.com"},"repository":{"url":"git+https://github.com/aliou/pi-edgee.git","type":"git"},"_npmVersion":"11.12.1","directories":{},"_nodeVersion":"24.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/pi-edgee_0.0.1_1782732089834_0.6122950735491421","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@aliou/pi-edgee","version":"0.1.0","keywords":["pi-package","pi-extension","pi","edgee","provider","gateway"],"license":"MIT","_id":"@aliou/pi-edgee@0.1.0","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/pi-edgee#readme","bugs":{"url":"https://github.com/aliou/pi-edgee/issues"},"pi":{"extensions":["./extensions/provider/index.ts"]},"dist":{"shasum":"a1512da9a6650c47680448644ec3141b4a1e3826","tarball":"https://registry.npmjs.org/@aliou/pi-edgee/-/pi-edgee-0.1.0.tgz","fileCount":10,"integrity":"sha512-x8f8Wg5L/oik2W5btQCawcB9t2woIwpaKs5+jrxRRWPWvF17rlqitv+Gofi3chdtvZmLuJR8RJzwlNhW2WvMbw==","signatures":[{"sig":"MEUCIEXlei+XXH5JeZW+jPnRlew46TbVfeXliZJfHj8m/HntAiEAxlICrpLmQ7CzOERt0UuR34ihX4OCMoO5F9QnEHgmnKo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fpi-edgee@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21058},"pnpm":{"overrides":{"@earendil-works/pi-ai":"$@earendil-works/pi-coding-agent"}},"type":"module","gitHead":"38848637e2bb0e512663713369aee38be8cd39ab","private":false,"scripts":{"lint":"biome check","test":"vitest run","format":"biome check --write","prepare":"[ -d .git ] && husky || true","release":"pnpm changeset publish","version":"changeset version","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest","check:lockfile":"pnpm install --frozen-lockfile --ignore-scripts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"aliou","email":"code+npm@general-dexterity.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:bba32781-e822-4aee-81e6-3b7e3c9f7860"}},"repository":{"url":"git+https://github.com/aliou/pi-edgee.git","type":"git"},"_npmVersion":"11.17.0","description":"Pi provider extension for [Edgee](https://www.edgee.ai), the Agent Gateway that compresses, routes, and observes LLM requests.","directories":{},"_nodeVersion":"24.17.0","dependencies":{"@earendil-works/pi-ai":"$@earendil-works/pi-coding-agent"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.26.1","devDependencies":{"husky":"^9.1.7","vitest":"^4.1.8","typescript":"^6.0.3","@types/node":"^25.9.2","@biomejs/biome":"^2.5.1","@changesets/cli":"^2.31.0","@aliou/biome-plugins":"^0.9.0","@earendil-works/pi-coding-agent":"0.79.0"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.79.0"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-edgee_0.1.0_1782732469299_0.5378861959220846","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aliou/pi-edgee","version":"0.1.1","keywords":["pi-package","pi-extension","pi","edgee","provider","gateway"],"license":"MIT","_id":"@aliou/pi-edgee@0.1.1","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/pi-edgee#readme","bugs":{"url":"https://github.com/aliou/pi-edgee/issues"},"pi":{"extensions":["./extensions/provider/index.ts"]},"dist":{"shasum":"3effbebedade0b02bc316cf2324ed23367d3443a","tarball":"https://registry.npmjs.org/@aliou/pi-edgee/-/pi-edgee-0.1.1.tgz","fileCount":11,"integrity":"sha512-LtEQ03W/Y1jZYjlzYk4aVbgX12oS1sYSw5fYOeCpPbfWwJ/BoaESRPHmG3SQsBQ3PhTK3ntGPLrkbcHl0r99qA==","signatures":[{"sig":"MEUCIQCB1XP+iW9Qcuswrrkl0a7+RY6sQaErrweTNWXa2wsg7gIgLYKHM+Y3SvIyCgKPGQBRtIGL6oJWugF+B6LwLmLOCJI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fpi-edgee@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":24588},"pnpm":{"overrides":{"@earendil-works/pi-ai":"$@earendil-works/pi-coding-agent"}},"type":"module","gitHead":"312b270a51cb58c08ef3a71c8158d19da05c6f19","private":false,"scripts":{"lint":"biome check","test":"vitest run","format":"biome check --write","prepare":"[ -d .git ] && husky || true","release":"pnpm changeset publish","version":"changeset version","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest","check:lockfile":"pnpm install --frozen-lockfile --ignore-scripts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"aliou","email":"code+npm@general-dexterity.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:bba32781-e822-4aee-81e6-3b7e3c9f7860"}},"repository":{"url":"git+https://github.com/aliou/pi-edgee.git","type":"git"},"_npmVersion":"11.18.0","description":"Pi provider extension for [Edgee](https://www.edgee.ai), the Agent Gateway that compresses, routes, and observes LLM requests.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@earendil-works/pi-ai":"$@earendil-works/pi-coding-agent"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.26.1","devDependencies":{"husky":"^9.1.7","vitest":"^4.1.8","typescript":"^6.0.3","@types/node":"^25.9.2","@biomejs/biome":"^2.5.1","@changesets/cli":"^2.31.0","@aliou/biome-plugins":"^0.9.0","@earendil-works/pi-coding-agent":"0.79.0"},"peerDependencies":{"@earendil-works/pi-coding-agent":">=0.79.0"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-edgee_0.1.1_1783169728225_0.8874922811713191","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aliou/pi-edgee","version":"0.1.2","keywords":["pi-package","pi-extension","pi","edgee","provider","gateway"],"license":"MIT","_id":"@aliou/pi-edgee@0.1.2","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/pi-edgee#readme","bugs":{"url":"https://github.com/aliou/pi-edgee/issues"},"pi":{"extensions":["./extensions/provider/index.ts"]},"dist":{"shasum":"12bf3b46e657fb1b8acbd698cb3b4891492ac052","tarball":"https://registry.npmjs.org/@aliou/pi-edgee/-/pi-edgee-0.1.2.tgz","fileCount":10,"integrity":"sha512-4PTjsNsF1aqC8Lm9yuQw3uuYsArNqJ1Et6S2knzdBnqBC/Int3EmMVzrNhNFewcXq1KBsxkHUoh0aLF9LzTHBA==","signatures":[{"sig":"MEQCIGgjqH0m5hle4HTLJ79BCleUq9LXoHVEs4lysJD7LUCZAiACuQAxn2P0rwtVwm44ezbUkkwSuHfdiVQs1Ti6xAiYPQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fpi-edgee@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21180},"type":"module","gitHead":"03cb90626b0338d3515385d68f1147ec0a92b526","private":false,"scripts":{"lint":"biome check","test":"vitest run","format":"biome check --write","prepare":"[ -d .git ] && husky || true","release":"pnpm changeset publish","version":"changeset version","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest","check:lockfile":"pnpm install --frozen-lockfile --ignore-scripts"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","approver":{"name":"aliou","email":"code+npm@general-dexterity.com"},"trustedPublisher":{"id":"github","oidcConfigId":"oidc:bba32781-e822-4aee-81e6-3b7e3c9f7860"}},"repository":{"url":"git+https://github.com/aliou/pi-edgee.git","type":"git"},"_npmVersion":"12.0.1","description":"Pi provider extension for [Edgee](https://www.edgee.ai), the Agent Gateway that compresses, routes, and observes LLM requests.","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.26.1","devDependencies":{"husky":"^9.1.7","vitest":"^4.1.8","typescript":"^6.0.3","@types/node":"^25.9.2","@biomejs/biome":"^2.5.1","@changesets/cli":"^2.31.0","@aliou/biome-plugins":"^0.9.0","@earendil-works/pi-ai":"0.80.10","@earendil-works/pi-coding-agent":"0.80.10"},"peerDependencies":{"@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"peerDependenciesMeta":{"@earendil-works/pi-ai":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/pi-edgee_0.1.2_1784984502970_0.6821169432269825","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"pi":{"extensions":["./extensions/provider/index.ts"]},"_id":"@aliou/pi-edgee@0.1.3","bugs":{"url":"https://github.com/aliou/pi-edgee/issues"},"dist":{"shasum":"c8e63c650d3358db5df364c18d1e17bdb91efacd","tarball":"https://registry.npmjs.org/@aliou/pi-edgee/-/pi-edgee-0.1.3.tgz","integrity":"sha512-DUXpziCgD9gy6XI6AUJ1i3cR9MC/5ZOt8zg4GO4YflG15T5KZnD0S+oZvVto0AIXX/SX45oO2NJl5XLlYxKbGw==","fileCount":11,"unpackedSize":23844,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fpi-edgee@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEJlOOw0ec2INGtvsqQGFCRqiv6aFpl6l8mF1bLRstRuAiAS+XZP5v64nMmn0KyGMLubQRF7mbgqvYxNF8jSIJqQQg=="}]},"name":"@aliou/pi-edgee","type":"module","gitHead":"88e15fce66683c4a34414753ec1d0401c7a3046e","license":"MIT","private":false,"scripts":{"lint":"biome check","test":"vitest run","format":"biome check --write","prepare":"[ -d .git ] && husky || true","release":"pnpm changeset publish","version":"changeset version","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest","check:lockfile":"pnpm install --frozen-lockfile --ignore-scripts"},"version":"0.1.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bba32781-e822-4aee-81e6-3b7e3c9f7860"},"approver":{"name":"aliou","email":"code+npm@general-dexterity.com"}},"homepage":"https://github.com/aliou/pi-edgee#readme","keywords":["pi-package","pi-extension","pi","edgee","provider","gateway"],"repository":{"url":"git+https://github.com/aliou/pi-edgee.git","type":"git"},"_npmVersion":"12.0.2","description":"Pi provider extension for [Edgee](https://www.edgee.ai), the Agent Gateway that compresses, routes, and observes LLM requests.","directories":{},"maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"_nodeVersion":"24.18.0","publishConfig":{"access":"public"},"packageManager":"pnpm@10.26.1","devDependencies":{"husky":"^9.1.7","vitest":"^4.1.8","typescript":"^6.0.3","@types/node":"^25.9.2","@biomejs/biome":"^2.5.1","@changesets/cli":"^2.31.0","@aliou/biome-plugins":"^0.9.0","@earendil-works/pi-ai":"0.84.0","@earendil-works/pi-coding-agent":"0.84.0"},"peerDependencies":{"@earendil-works/pi-ai":">=0.80.8","@earendil-works/pi-coding-agent":">=0.80.8"},"peerDependenciesMeta":{"@earendil-works/pi-ai":{"optional":true},"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-edgee_0.1.3_1786023754280_0.4354676228481653"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-29T11:21:29.638Z","modified":"2026-08-06T13:42:34.802Z","0.0.1":"2026-06-29T11:21:29.978Z","0.1.0":"2026-06-29T11:27:49.383Z","0.1.1":"2026-07-04T12:55:28.304Z","0.1.2":"2026-07-25T13:01:43.063Z","0.1.3":"2026-08-06T13:42:34.450Z"},"bugs":{"url":"https://github.com/aliou/pi-edgee/issues"},"license":"MIT","homepage":"https://github.com/aliou/pi-edgee#readme","keywords":["pi-package","pi-extension","pi","edgee","provider","gateway"],"repository":{"url":"git+https://github.com/aliou/pi-edgee.git","type":"git"},"description":"Pi provider extension for [Edgee](https://www.edgee.ai), the Agent Gateway that compresses, routes, and observes LLM requests.","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"readme":"# pi-edgee\n\nPi provider extension for [Edgee](https://www.edgee.ai), the Agent Gateway that compresses, routes, and observes LLM requests.\n\nLearn more about Edgee in the [official documentation](https://www.edgee.ai/docs/introduction).\n\n## Installation\n\n```bash\npi install npm:@aliou/pi-edgee\n```\n\nSet the API key before use:\n\n```bash\nexport EDGEE_API_KEY=...\n```\n\n## What it provides\n\n- Registers an `edgee` provider in Pi.\n- Uses Edgee's OpenAI-compatible Gateway API directly at `https://edgee.io/v1`, not an SDK.\n- Fetches models from `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.\n- Enriches fetched models from Pi's built-in model registry. For Edgee-only providers such as `meta` or `qwen`, it falls back to OpenRouter models in the registry for matching upstream model metadata.\n- Caches the fetched model catalog through Pi's model store (`models-store.json`). `/model` can refresh it in the background, and `pi update --models` can force a refresh.\n- Uses Pi's native `openai-completions` provider path, so tool calls, streaming usage, and context-overflow normalization all work.\n- Normalizes upstream context-overflow errors through Edgee into Pi's `context_length_exceeded` signal.\n\n## Two APIs\n\nEdgee exposes two separate APIs. This extension only needs the Gateway API:\n\n- **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`.\n- **Console API** (`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.\n\n## Development\n\n```bash\npnpm install\npnpm typecheck\npnpm lint\npnpm test\n```\n\n## Layout\n\n- `extensions/provider/`: Pi extension entry point.\n- `src/edgee/`: Edgee model mapping and API helpers.\n\n## Notes\n\nEdgee 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.\n","readmeFilename":"README.md"}