Files
openclaw/extensions/meta
Peter Steinberger 964c8c84c1 refactor: consolidate coercion ownership (#122299)
* refactor: consolidate coercion ownership

Centralize four canonical coercion helpers, migrate exact core and plugin duplicates through narrow Plugin SDK facades, and enforce declaration and plugin-normalization ownership boundaries.

The sweep adds eight focused SDK exports while deleting more production and tooling code than it adds. User-visible behavior is unchanged except for safer equivalent object and UI parsing at existing boundaries.

* fix: guard integer option ownership

Register resolveIntegerOption with the canonical function owner and extend the declaration-guard fixture so future local duplicates fail validation.

* fix: keep integer helpers on numeric facade

Remove the unshipped duplicate string-coerce exports and route every affected plugin consumer through the existing number-runtime contract.

* fix: point numeric coercion to number runtime

Make boundary and declaration diagnostics recommend the canonical numeric facade, with failing-before coverage for both guidance paths.
2026-08-11 17:14:53 -07:00
..

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 and 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 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 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:

openclaw plugins install @openclaw/meta-provider
openclaw gateway restart

Set the API key and select the model:

export MODEL_API_KEY=<key>
// ~/.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 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

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.