Meta Model API (Muse Spark, Muse Wonder) as an AI provider

未關閉
#4,070 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
3/5
預估耗時
1-2 天
新手友好度
66/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
swift
領域
ai, desktop

研究方向

Start in apple/TablePro/Models/AI/AIProviderPreset.swift and read the existing Requesty preset and the model fetching and chat streaming paths it uses. Check the Meta API details in the issue, especially the default model and filtering fetched models to chat models. Done when the Meta preset works with authentication, model selection, reasoning, tool calls, and streaming as described.

由索引模型根據 Issue 內容生成。

描述

enhancement platform-macos
Problem

Meta's Muse models (Muse Spark, Muse Wonder) are served by the Meta Model API. Using them today means adding a Custom provider and typing the endpoint and model ID by hand.

Proposed solution

Add Meta as an AIProviderPreset (apple/TablePro/Models/AI/AIProviderPreset.swift), next to Requesty. No new AIProviderType case.

API facts from https://dev.meta.ai/docs/:

  • Base URL https://api.meta.ai/v1, OpenAI-compatible POST /v1/chat/completions. Preset endpoint is https://api.meta.ai.
  • Auth: Authorization: Bearer <key>. Keys from https://dev.meta.ai/api-keys/.
  • Bad, missing or revoked key returns 401 (invalid_api_key), so rejectsBadKeyWithForbidden: false. 403 means the key lacks access to a model.
  • GET /v1/models lists models, newest first.
  • Chat models: muse-spark-1.3 (recommended), muse-spark-1.2, muse-spark-1.1, muse-wonder-1.0 (preview). 1,048,576 token context.
  • -contributor variants are cheaper but Meta may train on the content.
  • reasoning_effort accepts minimal, low, medium, high, xhigh, max. none returns 400. Our ReasoningEffort wire values all fit.
  • Tool calling and SSE streaming are supported.
  • Public preview, availability varies by country.

To check while building:

  • Default model is muse-spark-1.3, not the first fetched model.
  • Fetched list includes non-chat models (muse-image-1.0, muse-voice-transcribe-1.0, sam-3.1). Keep them out of the chat model picker.
  • Server accepts stream_options.include_usage.
  • Streamed tool-call chunks parse with the current OpenAI-compatible decoder.
Alternatives considered

Custom provider with https://api.meta.ai works if the user knows the model ID. OpenRouter also serves Muse Spark.

主要語言
Swift
星號
6.2k
分支
412
平均合併
3 小時 56 分鐘
30 天內合併 PR
669

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

TableProApp/TablePro 的其他 Issue

查看 TableProApp/TablePro 的全部 Issue

相似的 Issue

更多 Swift Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。