mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-24 08:21:39 +00:00
24 lines
748 B
TypeScript
24 lines
748 B
TypeScript
import { emptyPluginConfigSchema, type OpenClawPluginApi } from "openclaw/plugin-sdk/core";
|
|
|
|
const PROVIDER_ID = "amazon-bedrock";
|
|
const CLAUDE_46_MODEL_RE = /claude-(?:opus|sonnet)-4(?:\.|-)6(?:$|[-.])/i;
|
|
|
|
const amazonBedrockPlugin = {
|
|
id: PROVIDER_ID,
|
|
name: "Amazon Bedrock Provider",
|
|
description: "Bundled Amazon Bedrock provider policy plugin",
|
|
configSchema: emptyPluginConfigSchema(),
|
|
register(api: OpenClawPluginApi) {
|
|
api.registerProvider({
|
|
id: PROVIDER_ID,
|
|
label: "Amazon Bedrock",
|
|
docsPath: "/providers/models",
|
|
auth: [],
|
|
resolveDefaultThinkingLevel: ({ modelId }) =>
|
|
CLAUDE_46_MODEL_RE.test(modelId.trim()) ? "adaptive" : undefined,
|
|
});
|
|
},
|
|
};
|
|
|
|
export default amazonBedrockPlugin;
|