Add support for Meta Muse Code subscriptions (provider)
- Vorherrschende Sprache
- Rust
- Sterne
- 54.2k
- Forks
- 6.2k
- Ø Merge
- 3 T. 4 Std.
- Gemergte PRs (30 T.)
- 240
Beschreibung
**What problem would this solve?**
Goose currently has no first-class provider for [Meta Muse Code](https://ai.developer.meta.com/docs/muse-code/subscriptions), so subscribers pay per-token elsewhere instead of using their Muse Code subscription quota. This affects goose users on CLI and desktop who want subscription-billed access to the Muse Spark models for agent coding.
**What would a good outcome look like?**
- `goose configure` lists a "Meta Muse Code" provider; the user pastes a `META_MODEL_API_KEY` (same flow OpenCode uses) and gets working sessions.
- Anthropic Messages format (`POST /v1/messages` on `https://api.meta.ai`) with cross-turn thinking replay, tool loops, and live model discovery where the platform supports it.
- The provider shows up in the desktop settings with docs links via the existing inventory metadata.
**Possible approaches**
A working draft implementation exists: #11765 (2 commits, ~190 LOC). It reuses `AnthropicProvider` wholesale — `muse_code_def.rs` only adds metadata, Bearer auth, host config, and a model list enriched from the bundled canonical registry via a new `"muse_code" => "meta"` alias (the established `xai` pattern). Design choices worth confirming in review:
1. **Anthropic Messages endpoint** vs. OpenAI Responses (`/v1/responses`, Meta's "full feature set" endpoint). Messages was chosen because goose's `formats::anthropic` is the most mature path and it supports thinking replay; Responses would need the one-off pattern from `chatgpt_codex.rs`.
2. **`anthropic-version` header** — sent for Claude-Code parity; needs live confirmation Meta accepts it.
3. **Model list** — canonical-registry-backed, with `GET /v1/models` attempted and static fallback if Meta doesn't implement it.
4. **Subscription-only** — no non-subscription API-key fallback in scope.
**Additional context**
- Endpoint facts from the Muse Code subscriptions doc: `/v1/responses` (full features), `/v1/chat/completions` (no cross-turn reasoning), `/v1/messages` (Anthropic-format, thinking replay).
- Models: `muse-spark-1.2` (default), `muse-spark-1.1`, `muse-spark-1.2-contributor` — already present in the bundled canonical registry with reasoning flags and context limits.
- Verification plan for the PR: local CI green (`cargo test -p goose`, clippy `-D warnings`); live testing against an active subscription still pending (header acceptance, `/v1/models` behavior, thinking replay).
- [x] I have verified this does not duplicate an existing feature request
Beitragsleitfaden
Rechercherichtung
Review the draft implementation in PR #11765, focusing on `muse_code_def.rs`. Understand how it reuses `AnthropicProvider`. The key files are in the `providers` module. Test by running `cargo test -p goose` and verify the provider works with the Meta API endpoint `https://api.meta.ai/v1/messages`. Check the bundled canonical registry for model definitions. Ensure the `anthropic-version` header is accepted and that the `/v1/models` endpoint behaves as expected.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 65/100