build(plugins): add bundled provider plugin packages

This commit is contained in:
Peter Steinberger
2026-03-15 16:09:21 -07:00
parent 4adcfa3256
commit 684e5ea249
49 changed files with 1099 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import { emptyPluginConfigSchema, type OpenClawPluginApi } from "openclaw/plugin-sdk/core";
import { buildModelStudioProvider } from "../../src/agents/models-config.providers.static.js";
const PROVIDER_ID = "modelstudio";
const modelStudioPlugin = {
id: PROVIDER_ID,
name: "Model Studio Provider",
description: "Bundled Model Studio provider plugin",
configSchema: emptyPluginConfigSchema(),
register(api: OpenClawPluginApi) {
api.registerProvider({
id: PROVIDER_ID,
label: "Model Studio",
docsPath: "/providers/models",
envVars: ["MODELSTUDIO_API_KEY"],
auth: [],
catalog: {
order: "simple",
run: async (ctx) => {
const apiKey = ctx.resolveProviderApiKey(PROVIDER_ID).apiKey;
if (!apiKey) {
return null;
}
const explicitProvider = ctx.config.models?.providers?.[PROVIDER_ID];
const explicitBaseUrl =
typeof explicitProvider?.baseUrl === "string" ? explicitProvider.baseUrl.trim() : "";
return {
provider: {
...buildModelStudioProvider(),
...(explicitBaseUrl ? { baseUrl: explicitBaseUrl } : {}),
apiKey,
},
};
},
},
});
},
};
export default modelStudioPlugin;

View File

@@ -0,0 +1,9 @@
{
"id": "modelstudio",
"providers": ["modelstudio"],
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {}
}
}

View File

@@ -0,0 +1,12 @@
{
"name": "@openclaw/modelstudio-provider",
"version": "2026.3.14",
"private": true,
"description": "OpenClaw Model Studio provider plugin",
"type": "module",
"openclaw": {
"extensions": [
"./index.ts"
]
}
}