mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-03 05:12:15 +00:00
refactor: decouple bundled plugin sdk surfaces
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
import { isMiniMaxModernModelId } from "openclaw/plugin-sdk/minimax";
|
||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
|
||||
import { matchesExactOrPrefix } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import { applyOpencodeZenConfig, OPENCODE_ZEN_DEFAULT_MODEL } from "./api.js";
|
||||
|
||||
const PROVIDER_ID = "opencode";
|
||||
const MINIMAX_MODERN_MODEL_MATCHERS = ["minimax-m2.7"] as const;
|
||||
|
||||
function isModernOpencodeModel(modelId: string): boolean {
|
||||
const lower = modelId.trim().toLowerCase();
|
||||
if (lower.endsWith("-free") || lower === "alpha-glm-4.7") {
|
||||
return false;
|
||||
}
|
||||
return !isMiniMaxModernModelId(lower);
|
||||
return !matchesExactOrPrefix(lower, MINIMAX_MODERN_MODEL_MATCHERS);
|
||||
}
|
||||
|
||||
export default definePluginEntry({
|
||||
|
||||
Reference in New Issue
Block a user