№ 0907GitHub
pi-meta-oauth: Muse Spark in the pi agent
Meta Model API OAuth for the pi coding agent. It routes Muse Spark through the openai-responses provider, since the author notes the Muse prompt cache hits about 0% on /chat/completions, and sends 24h prompt-cache retention.
<img width="3840" height="2160" alt="Meta-Symbol" src="https://github.com/user-attachments/assets/a3074df9-ad80-40ca-b9b9-944b96dda192" />
# pi-meta-oauth
<!-- markdownlint-disable-next-line MD013 -->

[](https://opensource.org/licenses/MIT) [](https://github.com/BlockedPath/pi-meta-oauth/stargazers) [](https://github.com/BlockedPath/pi-meta-oauth/commits/main) [](https://github.com/BlockedPath/pi-meta-oauth/issues) [](https://github.com/BlockedPath/pi-meta-oauth/pulls) [](https://www.conventionalcommits.org/en/v1.0.0/) [](https://www.typescriptlang.org/) [](https://github.com/BlockedPath/pi-meta-oauth/actions/workflows/ci.yml) [](https://pi.dev)
Meta Model API OAuth for [pi](https://pi.dev).
- Use Muse Spark models through Pi's `openai-responses` provider (not `/chat/completions` — Muse prompt cache is ~0% there)
- Send `prompt_cache_retention: "24h"` on Meta Responses requests unless the payload already set a retention
- Device authorization against `https://auth.meta.com`
- Model API-key minting through `POST https://api.meta.ai/muse-code/key`
- Dynamic Muse model catalog from `GET https://api.meta.ai/v1/models`
## Install
```bash
# OAuth-only branch
pi install git:github.com/BlockedPath/pi-meta-oauth@meta-oauth-only
# Or from a local checkout
pi install /absolute/path/to/pi-meta-oauth
pi --list-models meta
```
## Login
```text
/login meta
```
Pi displays a device code, opens the Meta authorization flow, and mints a Model API key. Credentials are stored by Pi in `~/.pi/agent/auth.json` under provider `meta`:
```json
{ "meta"


ChatForm
Tgmlabs