refactor: add non-interactive provider plugin setup

This commit is contained in:
Peter Steinberger
2026-03-13 01:08:29 +00:00
parent bcbf429d6b
commit 87ad1ce9b1
13 changed files with 490 additions and 63 deletions

View File

@@ -4,8 +4,10 @@ import {
ensureOllamaModelPulled,
OLLAMA_DEFAULT_BASE_URL,
promptAndConfigureOllama,
configureOllamaNonInteractive,
type OpenClawPluginApi,
type ProviderAuthContext,
type ProviderAuthMethodNonInteractiveContext,
type ProviderAuthResult,
type ProviderDiscoveryContext,
} from "openclaw/plugin-sdk/core";
@@ -50,6 +52,12 @@ const ollamaPlugin = {
defaultModel: `ollama/${result.defaultModelId}`,
};
},
runNonInteractive: async (ctx: ProviderAuthMethodNonInteractiveContext) =>
configureOllamaNonInteractive({
nextConfig: ctx.config,
opts: ctx.opts,
runtime: ctx.runtime,
}),
},
],
discovery: {