mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 10:16:44 +00:00
* chore(plugins): gate deprecation hygiene in CI and purge internal deprecated usage * fix(agents): migrate auth-profiles oauth import to OAuthProviderId * fix(whatsapp): use durability param in delivery-recovery test * chore(scripts): declare shouldRunDeprecationHygieneChecks in check-changed types * test(plugins): update runtime-api guard for ssrf policy rename
48 lines
1.6 KiB
TypeScript
48 lines
1.6 KiB
TypeScript
/**
|
|
* Meta provider plugin entrypoint.
|
|
*/
|
|
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
|
|
import { buildProviderReplayFamilyHooks } from "openclaw/plugin-sdk/provider-model-shared";
|
|
import { applyMetaConfig, META_DEFAULT_MODEL_REF } from "./onboard.js";
|
|
import { buildMetaProvider } from "./provider-catalog.js";
|
|
import { wrapMetaProviderStream } from "./stream.js";
|
|
import { resolveMetaThinkingProfile } from "./thinking.js";
|
|
|
|
const PROVIDER_ID = "meta";
|
|
|
|
export default defineSingleProviderPluginEntry({
|
|
id: PROVIDER_ID,
|
|
name: "Meta Provider",
|
|
description: "Bundled Meta provider plugin",
|
|
provider: {
|
|
label: "Meta",
|
|
docsPath: "/providers/meta",
|
|
auth: [
|
|
{
|
|
methodId: "api-key",
|
|
label: "Meta API key",
|
|
hint: "Meta (Responses API)",
|
|
optionKey: "metaApiKey",
|
|
flagName: "--meta-api-key",
|
|
envVar: "MODEL_API_KEY",
|
|
promptMessage: "Enter Meta API key",
|
|
defaultModel: META_DEFAULT_MODEL_REF,
|
|
applyConfig: (cfg) => applyMetaConfig(cfg),
|
|
noteMessage: ["Meta provides Responses API inference."].join("\n"),
|
|
noteTitle: "Meta",
|
|
wizard: {
|
|
groupLabel: "Meta",
|
|
groupHint: "Meta (Responses API)",
|
|
},
|
|
},
|
|
],
|
|
catalog: {
|
|
buildProvider: buildMetaProvider,
|
|
buildStaticProvider: buildMetaProvider,
|
|
},
|
|
...buildProviderReplayFamilyHooks({ family: "openai-compatible" }),
|
|
wrapStreamFn: wrapMetaProviderStream,
|
|
resolveThinkingProfile: ({ modelId }) => resolveMetaThinkingProfile(modelId),
|
|
},
|
|
});
|