aaif-goose / aaif-goose/goose

Add support for Meta Muse Code subscriptions (provider)

オープン
#11,766 コメント 4 件 リアクション 0 件 担当者 1 名 @vincenzopalazzo が担当を希望しています GitHub で見る
主要言語
Rust
スター
54.2k
フォーク
6.2k
平均マージ
3日 4時間
マージ済み PR(30日)
240

説明

**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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

PR #11765 のドラフト実装をレビューし、`muse_code_def.rs` に注目してください。これがどのように `AnthropicProvider` を再利用しているかを理解してください。主要なファイルは `providers` モジュール内にあります。`cargo test -p goose` を実行してテストし、provider が Meta API endpoint `https://api.meta.ai/v1/messages` で動作することを確認してください。バンドルされた canonical registry で model 定義を確認してください。`anthropic-version` header が受け入れられること、および `/v1/models` endpoint が期待どおりに動作することを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
api, backend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
65/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。