refactor(providers): derive simple providers from manifests (#114331)

This commit is contained in:
Peter Steinberger
2026-07-27 01:29:53 -04:00
committed by GitHub
parent ccd6845e4d
commit dc8fdb1756
29 changed files with 409 additions and 412 deletions
+11 -22
View File
@@ -12,8 +12,8 @@ import {
} from "openclaw/plugin-sdk/provider-model-shared";
import { buildProviderToolCompatFamilyHooks } from "openclaw/plugin-sdk/provider-tools";
import { applyFeatherlessConfig, FEATHERLESS_DEFAULT_MODEL_REF } from "./onboard.js";
import manifest from "./openclaw.plugin.json" with { type: "json" };
import {
buildFeatherlessProvider,
FEATHERLESS_BASE_URL,
FEATHERLESS_DEFAULT_MODEL_ID,
FEATHERLESS_DYNAMIC_COMPAT,
@@ -75,31 +75,20 @@ export default defineSingleProviderPluginEntry({
id: PROVIDER_ID,
name: "Featherless AI Provider",
description: "Featherless AI provider plugin",
manifest,
provider: {
label: "Featherless AI",
docsPath: "/providers/featherless",
envVars: ["FEATHERLESS_API_KEY"],
auth: [
{
methodId: "api-key",
label: "Featherless AI API key",
hint: "OpenAI-compatible access to open models",
optionKey: "featherlessApiKey",
flagName: "--featherless-api-key",
envVar: "FEATHERLESS_API_KEY",
promptMessage: "Enter Featherless AI API key",
defaultModel: FEATHERLESS_DEFAULT_MODEL_REF,
applyConfig: (cfg) => applyFeatherlessConfig(cfg),
noteTitle: "Featherless AI",
noteMessage: [
"Featherless AI serves open models through an OpenAI-compatible API.",
"Create an API key at: https://featherless.ai/account/api-keys",
].join("\n"),
},
],
manifestAuth: {
defaultModel: FEATHERLESS_DEFAULT_MODEL_REF,
applyConfig: applyFeatherlessConfig,
noteTitle: "Featherless AI",
noteMessage: [
"Featherless AI serves open models through an OpenAI-compatible API.",
"Create an API key at: https://featherless.ai/account/api-keys",
].join("\n"),
},
catalog: {
buildProvider: buildFeatherlessProvider,
buildStaticProvider: buildFeatherlessProvider,
allowExplicitBaseUrl: true,
liveModelDiscovery: {
endpointPath: "models?capabilities=chat",