{"_id":"@aliou/pi-cohere","_rev":"3-34fe851a020ff04e2bc6bf35c0c5f2a9","name":"@aliou/pi-cohere","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"@aliou/pi-cohere","version":"0.0.1","keywords":["pi-package","pi-extension","pi","cohere","provider"],"license":"MIT","_id":"@aliou/pi-cohere@0.0.1","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/pi-cohere#readme","bugs":{"url":"https://github.com/aliou/pi-cohere/issues"},"pi":{"video":"https://assets.aliou.me/github/aliou/pi-cohere/demo.mp4","extensions":["./extensions/provider/index.ts"]},"dist":{"shasum":"e69f439dc92508288cd923f159f7e8393987b834","tarball":"https://registry.npmjs.org/@aliou/pi-cohere/-/pi-cohere-0.0.1.tgz","fileCount":1,"integrity":"sha512-wHgRBfBSka7ACoWk1OEoTj9QoCP2P4t9JtNDAQDq8cQCAf+iXdtWXeLh4vNLzvk758QGFY2ba8YT8H85hxTnag==","signatures":[{"sig":"MEUCIHlK9048ofMkubFChCTordSdEgkNhk3hIJ1OlbBphvSQAiEA5B4eDRnoetRQvO7gWxKicpXpXviVTx8dTXXy9DjTwgo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1601},"pnpm":{"overrides":{"@earendil-works/pi-ai":"$@earendil-works/pi-coding-agent"}},"type":"module","gitHead":"69b7dba0f56f630ba6264d4f84208f6ec7453ffd","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":"aliou","email":"code+npm@general-dexterity.com"},"repository":{"url":"git+https://github.com/aliou/pi-cohere.git","type":"git"},"_npmVersion":"11.12.1","directories":{},"_nodeVersion":"24.15.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.4.16","@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-cohere_0.0.1_1781076243688_0.3110063258672837","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@aliou/pi-cohere","version":"0.1.0","keywords":["pi-package","pi-extension","pi","cohere","provider"],"license":"MIT","_id":"@aliou/pi-cohere@0.1.0","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"homepage":"https://github.com/aliou/pi-cohere#readme","bugs":{"url":"https://github.com/aliou/pi-cohere/issues"},"pi":{"video":"https://assets.aliou.me/github/aliou/pi-cohere/demo.mp4","extensions":["./extensions/provider/index.ts"]},"dist":{"shasum":"6a7ad0265b633668b76525b6cb751422058866ec","tarball":"https://registry.npmjs.org/@aliou/pi-cohere/-/pi-cohere-0.1.0.tgz","fileCount":6,"integrity":"sha512-ZiAS8AueTYE9IkD/l0HUxdYxIyShV3wvqyYtd3euT+ATga3fjM43mqCWN/dKKIB6kcQ5fps47pFa76rGWkQGrg==","signatures":[{"sig":"MEQCIGmFKFel+YfB4VVIGHS/XezYAWZUAuO7EJPScYiYxgjiAiA29E7q49li5iaNb0UNR82G5iWGRE8GU+YHYnCQLNvFng==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fpi-cohere@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":9458},"pnpm":{"overrides":{"@earendil-works/pi-ai":"$@earendil-works/pi-coding-agent"}},"type":"module","gitHead":"6fe34044ede7c39160d2fa612f373e4186300700","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:b60c7021-3f92-433b-8432-6c2dd2083689"}},"repository":{"url":"git+https://github.com/aliou/pi-cohere.git","type":"git"},"_npmVersion":"11.17.0","description":"Pi provider extension for Cohere models.","directories":{},"_nodeVersion":"24.17.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-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-cohere_0.1.0_1782740292263_0.8499325811295044","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"pi":{"video":"https://assets.aliou.me/github/aliou/pi-cohere/demo.mp4","extensions":["./extensions/provider/index.ts"]},"_id":"@aliou/pi-cohere@0.1.1","bugs":{"url":"https://github.com/aliou/pi-cohere/issues"},"dist":{"shasum":"6a625a217b4c657fe923556f115a46aedb5743e3","tarball":"https://registry.npmjs.org/@aliou/pi-cohere/-/pi-cohere-0.1.1.tgz","integrity":"sha512-tTa0+SzvgBGc+siCLxkSXdP+xjC/lt6vdloZCiBovpIyuOLNaCY/82wu8XlJEqVbx+3XvyWYDSCCjTkqzEilMw==","fileCount":7,"unpackedSize":13965,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aliou%2fpi-cohere@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEMCIEmZFgFzQhYeUxXt3ZyNE+oOPujXQMl05NmzADeMrr5pAh8xTPgC9NYZpcOmTFDaQtqK1WbtTc6o+Im5F++yRG7T"}]},"name":"@aliou/pi-cohere","type":"module","gitHead":"8b66f3d696b7250650843f11f9978ecc080ebf39","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.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b60c7021-3f92-433b-8432-6c2dd2083689"},"approver":{"name":"aliou","email":"code+npm@general-dexterity.com"}},"homepage":"https://github.com/aliou/pi-cohere#readme","keywords":["pi-package","pi-extension","pi","cohere","provider"],"repository":{"url":"git+https://github.com/aliou/pi-cohere.git","type":"git"},"_npmVersion":"12.0.2","description":"Pi provider extension for Cohere models.","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-coding-agent":">=0.80.8"},"peerDependenciesMeta":{"@earendil-works/pi-coding-agent":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-cohere_0.1.1_1786023746807_0.708439678226567"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T07:24:03.517Z","modified":"2026-08-06T13:42:27.223Z","0.0.1":"2026-06-10T07:24:03.844Z","0.1.0":"2026-06-29T13:38:12.344Z","0.1.1":"2026-08-06T13:42:26.897Z"},"bugs":{"url":"https://github.com/aliou/pi-cohere/issues"},"license":"MIT","homepage":"https://github.com/aliou/pi-cohere#readme","keywords":["pi-package","pi-extension","pi","cohere","provider"],"repository":{"url":"git+https://github.com/aliou/pi-cohere.git","type":"git"},"description":"Pi provider extension for Cohere models.","maintainers":[{"name":"aliou","email":"code+npm@general-dexterity.com"}],"readme":"# pi-cohere\n\nPi provider extension for Cohere models.\n\n## Installation\n\n```bash\npi install npm:@aliou/pi-cohere\n```\n\nSet the API key before use:\n\n```bash\nexport COHERE_API_KEY=...\n```\n\n## What it provides\n\n- Registers a `cohere` provider in Pi.\n- Uses Cohere HTTP endpoints directly, not the Cohere SDK.\n- Fetches chat-capable models from `GET https://api.cohere.com/v1/models` when `COHERE_API_KEY` is available.\n- Caches fetched models in Pi's model store and refreshes them through `/model` or `pi update --models`.\n- Falls back to a small hardcoded model list when model fetching is unavailable.\n- Uses Cohere's OpenAI-compatible endpoint at `https://api.cohere.ai/compatibility/v1` with Pi's native `openai-completions` provider path.\n- Supports text, vision model metadata, tool calls, streamed usage, and context-overflow normalization.\n\n## Development\n\n```bash\npnpm install\npnpm typecheck\npnpm lint\n```\n\n## Layout\n\n- `extensions/provider/`: Pi extension entry point.\n- `src/cohere/`: Cohere model mapping and API helpers.\n\n## Notes\n\nCohere returns usage in response bodies and a `num_tokens` header for non-streaming chat. I did not see quota, remaining-credit, or rate-limit headers while probing.\n","readmeFilename":"README.md"}