{"_id":"@aihubmix/pi-provider-aihubmix","name":"@aihubmix/pi-provider-aihubmix","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aihubmix/pi-provider-aihubmix","version":"0.1.0","description":"Official AIHubMix provider extension for the Pi coding agent","type":"module","license":"MIT","author":{"name":"AIHubMix"},"repository":{"type":"git","url":"git+https://github.com/AIhubmix/pi-provider-aihubmix.git"},"bugs":{"url":"https://github.com/AIhubmix/pi-provider-aihubmix/issues"},"homepage":"https://github.com/AIhubmix/pi-provider-aihubmix#readme","keywords":["pi-package","pi","pi-extension","pi-provider","pi-coding-agent","aihubmix","llm","openai-compatible","anthropic","gemini"],"scripts":{"catalog:update":"tsx scripts/update-catalog.ts","check:sensitive":"node --experimental-strip-types scripts/check-sensitive.ts","test":"node --experimental-strip-types --test tests/*.test.ts","typecheck":"tsc --noEmit","check":"npm run check:sensitive && npm run typecheck && npm test","prepublishOnly":"npm run check"},"pi":{"extensions":["./extensions/index.ts"]},"peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":"*"},"devDependencies":{"@earendil-works/pi-ai":"0.84.2","@earendil-works/pi-coding-agent":"0.84.2","@types/node":"22.19.19","tsx":"4.22.1","typescript":"5.9.3"},"publishConfig":{"access":"public","provenance":true},"engines":{"node":">=22.19.0"},"_id":"@aihubmix/pi-provider-aihubmix@0.1.0","gitHead":"62848af4b65af1f60a9b4b2b43d32373f0773707","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-uo1leSN63FNtpIz8Y/NW8zRfU1lWk+gM1l/sZ1LWAYSz9nGNp8vciSI23FP2N/+PRQGlv8pBI4o+GgNWXP6cbA==","shasum":"9809c94f301f78b82141ca6517c691c3e04e0117","tarball":"https://registry.npmjs.org/@aihubmix/pi-provider-aihubmix/-/pi-provider-aihubmix-0.1.0.tgz","fileCount":13,"unpackedSize":56985,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIA2em2N3mhOG3DNThGCiW+xwa3CAgdzRTR9khZqlIVZiAiBY4ivKMZXigChZ1bDSa9ZHC6oQjAC7nol2BSpciQxHBQ=="}]},"_npmUser":{"name":"chenxue","email":"450907240@qq.com"},"directories":{},"maintainers":[{"name":"chenxue","email":"450907240@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-provider-aihubmix_0.1.0_1787565137476_0.7926050186769131"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-24T09:52:17.365Z","0.1.0":"2026-08-24T09:52:17.602Z","modified":"2026-08-24T09:52:17.781Z"},"maintainers":[{"name":"chenxue","email":"450907240@qq.com"}],"description":"Official AIHubMix provider extension for the Pi coding agent","homepage":"https://github.com/AIhubmix/pi-provider-aihubmix#readme","keywords":["pi-package","pi","pi-extension","pi-provider","pi-coding-agent","aihubmix","llm","openai-compatible","anthropic","gemini"],"repository":{"type":"git","url":"git+https://github.com/AIhubmix/pi-provider-aihubmix.git"},"author":{"name":"AIHubMix"},"bugs":{"url":"https://github.com/AIhubmix/pi-provider-aihubmix/issues"},"license":"MIT","readme":"# @aihubmix/pi-provider-aihubmix\n\nOfficial [AIHubMix](https://aihubmix.com) provider extension for the [Pi coding agent](https://pi.dev).\n\nThe extension registers AIHubMix as the `aihubmix` provider, uses Pi's native API-key login, and keeps the model catalog current through the AIHubMix Models API. It is maintained by AIHubMix and does not add affiliate, referral, or tracking headers to model requests.\n\n## Install\n\n```bash\npi install npm:@aihubmix/pi-provider-aihubmix\n```\n\nSet an API key:\n\n```bash\nexport AIHUBMIX_API_KEY=\"AIHUBMIX_YOUR_API_KEY\"\n```\n\nAlternatively, run `/login` in Pi and select `AIHubMix`.\n\nThen choose a model with `/model`, or run Pi directly:\n\n```bash\npi --provider aihubmix --model gpt-5.6-sol\n```\n\n## Model Catalog\n\nPi can refresh the catalog from:\n\n```text\nhttps://aihubmix.com/api/v1/models?types=llm\n```\n\nThe package also includes an auditable fallback snapshot generated from the AIHubMix provider catalog on [models.dev](https://models.dev). This makes the provider usable when Pi starts offline before it has stored a live catalog.\n\nOpening Pi's model selector refreshes dynamic provider catalogs. Pi persists successful refreshes and restores them on later offline starts.\n\nNon-interactive local development runs such as `pi -e ./extensions/index.ts -p ...` use the committed snapshot or an already persisted catalog. Open the model selector once before testing a newly added live model that is not yet in the snapshot.\n\nOnly LLM records containing all metadata required by Pi are registered: model ID, text input support, context window, maximum output, and input/output pricing. Incomplete records are skipped rather than filled with guessed limits or prices. Pi currently accepts text and image inputs, so other advertised input modalities are not exposed by this extension.\n\nProtocol routing uses the Models API's `endpoints` field:\n\n| Catalog endpoint | Pi API | Base URL |\n| --- | --- | --- |\n| `chat_completions` or legacy empty value | OpenAI Chat Completions | `https://aihubmix.com/v1` |\n| `claude_api` without Chat Completions | Anthropic Messages | `https://aihubmix.com` |\n| `gemini_api` without Chat Completions | Gemini native | `https://aihubmix.com/gemini/v1beta` |\n\nWhen several endpoints are available, the unified OpenAI-compatible endpoint is preferred. Routing never depends on model-name prefixes.\n\nPi sends enabled coding tools with agent requests. If an upstream route rejects tools for a particular model, use `--no-tools` for text-only work or choose a model whose current route supports tool calling.\n\n## Updating the Snapshot\n\n```bash\nnpm install\nnpm run catalog:update\nnpm run check\n```\n\nThe generated file is committed so catalog changes remain reviewable.\n\nAll committed configuration examples use `AIHUBMIX_XXX` placeholders. Never commit a real API key. Start local configuration from `.env.example` and keep the populated file outside version control.\n\n## Local Development\n\n```bash\nnpm install\nnpm run check\npi -e ./extensions/index.ts --list-models aihubmix\n```\n\nTo test an actual request, set `AIHUBMIX_API_KEY` and run:\n\n```bash\npi -e ./extensions/index.ts --provider aihubmix --model gpt-5.6-sol -p \"Reply with exactly: AIHubMix OK\"\n```\n\n## Conflicting Extensions\n\nOnly one extension should register the `aihubmix` provider. Remove other AIHubMix Pi provider packages before installing this official package.\n\n## Agent Documentation\n\nRepository structure, invariants, validation commands, and release gates for coding agents are documented in [`README_AGENT.md`](./README_AGENT.md). Compatible agents can also discover these rules through [`AGENTS.md`](./AGENTS.md).\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-562a7da9f0d73d0639b0dd633dcbeca7"}