Files
openclaw/extensions/gmi/index.ts
2026-07-28 22:06:04 -04:00

39 lines
1.3 KiB
TypeScript

// Gmi plugin entrypoint registers its OpenClaw integration.
import { readConfiguredProviderCatalogEntries } from "openclaw/plugin-sdk/provider-catalog-shared";
import { defineSingleProviderPluginEntry } from "openclaw/plugin-sdk/provider-entry";
import { buildProviderReplayFamilyHooks } from "openclaw/plugin-sdk/provider-model-shared";
import { buildProviderToolCompatFamilyHooks } from "openclaw/plugin-sdk/provider-tools";
import manifest from "./openclaw.plugin.json" with { type: "json" };
const PROVIDER_ID = "gmi";
export default defineSingleProviderPluginEntry({
id: PROVIDER_ID,
name: "GMI Cloud Provider",
description: "GMI Cloud provider plugin",
manifest,
provider: {
label: "GMI Cloud",
docsPath: "/providers/gmi",
aliases: ["gmi-cloud", "gmicloud"],
manifestAuth: {
noteTitle: "GMI Cloud",
noteMessage: "Manage API keys at https://www.gmicloud.ai/",
},
catalog: {
allowExplicitBaseUrl: true,
liveModelDiscovery: true,
},
augmentModelCatalog: ({ config }) =>
readConfiguredProviderCatalogEntries({
config,
providerId: PROVIDER_ID,
}),
...buildProviderReplayFamilyHooks({
family: "openai-compatible",
dropReasoningFromHistory: false,
}),
...buildProviderToolCompatFamilyHooks("openai"),
},
});