pi-meta-oauth
Use Muse Spark models inside pi via OAuth device login; prompt-cache friendly, dynamic model catalog.
- What
- Use Muse Spark models inside pi via OAuth device login; prompt-cache friendly, dynamic model catalog.
- Cost
- Free
- Needs
- Run Muse Spark models inside pi with OAuth login.
- Install
- Copy the installer prompt below into your Muse — your agent does the rest.
Paid API required: this extension is free, but using it bills your Meta Model API account (standard models from $1.25/$4.25 per million input/output tokens; discounted contributor models cost cents per million but allow Meta to use your prompts and completions for product improvement, including training future models). Curated by Skill Harbor: pi-meta-oauth connects the pi coding agent to Meta's Model API through OAuth. Install it, run `/login meta`, and pi walks you through a device-code login against auth.meta.com that mints a Model API key (re-minted daily, stored in ~/.pi/agent/auth.json). It routes Muse Spark models through pi's openai-responses provider, where the prompt cache actually works (cache is near 0% on the chat-completions route), sends prompt_cache_retention 24h by default, and keeps a dynamic Muse model catalog with the real 1M-token context windows. By @BlockedPath (Justin Barlow), listed here with credit to its creator. Honest caveats: the opt-in META_MUSE_USER_AGENT=1 flag makes pi identify as Meta's first-party Muse client to unlock reasoning effort "max" on the contributor model; it relies on undocumented server behavior, is not supported by Meta, may stop working without notice and may conflict with Meta's terms, so enable it only if you accept that risk; use a standard model such as muse-spark-1.3 if you do not want the contributor terms. Skill Harbor never reviews the code, review it yourself before use.
Version:
Install
Copy the install package below, then paste it into MuseCommunity-built. Skill Harbor doesn't audit code — review the source before installing.
Run Muse Spark models inside pi with OAuth login. Prerequisites: pi (pi.dev) installed; a Meta account; billing enabled on the Meta Model API (usage is billed per token, see the pricing table in the repo README). 1. Install the extension: `pi install npm:pi-meta-oauth` (or `pi install git:github.com/BlockedPath/pi-meta-oauth` to track main, or a local checkout path). 2. Log in: run `/login meta` inside pi. Pi displays a device code, opens Meta's authorization flow, and mints a Model API key stored in ~/.pi/agent/auth.json under provider "meta". Prefer a static key? Set META_API_KEY (or MODEL_API_KEY) and skip the login entirely. 3. Verify: `pi --list-models meta`, then `pi -p --provider meta --model muse-spark-1.3 "Reply exactly: META_OK"`. 4. To scope pi's model picker to Meta models, set `enabledModels: ["meta/*"]` in pi's config. Privacy note: discounted contributor models (muse-spark-*-contributor) allow Meta to use your prompts and completions for product improvement, including training. Use a standard model such as muse-spark-1.3 if you do not want the contributor terms. Optional and risky: setting META_MUSE_USER_AGENT=1 unlocks reasoning effort "max" on the contributor model by sending the Muse CLI's User-Agent. This is undocumented, unsupported by Meta, may stop working without notice and may conflict with Meta's terms; enable it only if you accept that risk for your account.
Saved to your recent installs. Find it anytime on /connect.
Questions
How do I install a build?
Every product page includes a copy-paste install prompt. Paste it into your Muse and it sets the build up for you — no manual configuration.
Where does my money go?
Straight to the seller. Skill Harbor never processes payments: checkout happens on the seller’s own page, usually Stripe.
What does the ✓ next to a creator’s name mean?
It means we confirmed the identity of the person behind the listing. It says nothing about the code itself — always check a build before installing it.