mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-16 23:52:40 -06:00
a57e8c70f5
* feat(meta): add Muse Spark 1.2 models * fix(meta): verify Muse Spark 1.2 catalog metadata * fix(meta): verify Muse Spark 1.2 contracts * docs(meta): quote discounted services terms * fix(meta): preserve replay fields for simple completions * test(meta): align stream host adapter types * fix(meta): apply catalog cap for zero max tokens * fix(meta): preserve omitted output cap * fix(meta): scope responses stream wrapper * fix(ai): preserve source API for stream wrappers * fix(ai): distinguish hook and dispatch APIs * test(ai): adapt plugin streams synchronously * chore(plugin-sdk): refresh API baseline * chore(plugin-sdk): refresh sharded API baseline --------- Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
87 lines
3.0 KiB
Markdown
87 lines
3.0 KiB
Markdown
# Meta provider
|
|
|
|
Official OpenClaw provider plugin for the **Meta API** — an OpenAI-compatible
|
|
**Responses API** endpoint (`POST /v1/responses`).
|
|
|
|
- **Base URL:** `https://api.meta.ai/v1`
|
|
- **Auth:** `Authorization: Bearer $MODEL_API_KEY`
|
|
- **Models:** `muse-spark-1.1`, `muse-spark-1.2`, `muse-spark-1.2-contributor` (reasoning models)
|
|
- Context window: 1,048,576 tokens (input + output share the budget)
|
|
- Reasoning effort: `minimal | low | medium | high | xhigh` (OpenClaw default: `high`)
|
|
- Vision: image input in `user` messages
|
|
- Tool calling + streaming
|
|
- Stateless encrypted reasoning replay (`store: false`)
|
|
|
|
> [!WARNING]
|
|
> Meta's [pricing documentation](https://dev.meta.ai/docs/pricing-rate-limits/) and
|
|
> [Terms of Service](https://dev.meta.ai/legal/terms-of-service) distinguish Standard
|
|
> Services from Contributor/Discounted Services:
|
|
>
|
|
> - Standard Services are the default. Meta says prompts and completions submitted to
|
|
> Standard Services are not used to train Meta models.
|
|
> - By using Contributor/Discounted Services, you permit Meta to use Content submitted
|
|
> to and generated by those services as described in the Terms. Under the Terms, use
|
|
> of Discounted Services acknowledges that permission. You must not submit sensitive,
|
|
> confidential, or personal information to the Discounted Services.
|
|
>
|
|
> Meta's [Geographic Use Policy](https://dev.meta.ai/legal/geographic-use-policy)
|
|
> governs availability. It limits API access in some jurisdictions and adds end-user
|
|
> deployment restrictions for products built with the Contributor/Discounted model;
|
|
> those additional restrictions do not apply to your own use or products built with
|
|
> Standard Services.
|
|
|
|
Meta's [model catalog](https://dev.meta.ai/docs/models) lists text, image, video,
|
|
audio, and PDF input for these models. OpenClaw's model catalog directly represents
|
|
text and image input only; the other upstream modalities are not model-manifest input
|
|
values. Meta does not publish an exact maximum-output figure for these catalog rows.
|
|
|
|
## Usage
|
|
|
|
Install the plugin and restart Gateway:
|
|
|
|
```bash
|
|
openclaw plugins install @openclaw/meta-provider
|
|
openclaw gateway restart
|
|
```
|
|
|
|
Set the API key and select the model:
|
|
|
|
```bash
|
|
export MODEL_API_KEY=<key>
|
|
```
|
|
|
|
```json5
|
|
// ~/.openclaw/openclaw.json
|
|
{
|
|
agents: {
|
|
defaults: {
|
|
model: { primary: "meta/muse-spark-1.1" },
|
|
},
|
|
},
|
|
}
|
|
```
|
|
|
|
Or run onboarding and choose **Meta**.
|
|
|
|
## Thinking / reasoning
|
|
|
|
`--thinking <level>` and `/think <level>` map to Responses API `reasoning.effort`.
|
|
OpenClaw defaults to `high`. Meta's
|
|
[reasoning documentation](https://dev.meta.ai/docs/reasoning/) says that an
|
|
omitted effort uses a model-determined level, so `high` is an OpenClaw policy rather
|
|
than Meta's omitted-parameter default. `off` maps to `minimal` because Muse Spark does
|
|
not accept `none`.
|
|
|
|
## Docs
|
|
|
|
See `docs/providers/meta.md` for setup, onboarding, and smoke tests.
|
|
|
|
## Live test
|
|
|
|
```bash
|
|
export MODEL_API_KEY=<key>
|
|
pnpm test:live -- extensions/meta/meta.live.test.ts
|
|
```
|
|
|
|
The live suite exercises enabled Meta cases against `POST /v1/responses`.
|