mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-26 08:31:55 +00:00
fix: expose runtime-ready provider auth to plugins (#62753)
This commit is contained in:
@@ -89,6 +89,10 @@ function createRuntimeModelAuth(): PluginRuntime["modelAuth"] {
|
||||
loadModelAuthRuntime,
|
||||
(runtime) => runtime.getApiKeyForModel,
|
||||
);
|
||||
const getRuntimeAuthForModel = createLazyRuntimeMethod(
|
||||
loadModelAuthRuntime,
|
||||
(runtime) => runtime.getRuntimeAuthForModel,
|
||||
);
|
||||
const resolveApiKeyForProvider = createLazyRuntimeMethod(
|
||||
loadModelAuthRuntime,
|
||||
(runtime) => runtime.resolveApiKeyForProvider,
|
||||
@@ -99,6 +103,12 @@ function createRuntimeModelAuth(): PluginRuntime["modelAuth"] {
|
||||
model: params.model,
|
||||
cfg: params.cfg,
|
||||
}),
|
||||
getRuntimeAuthForModel: (params) =>
|
||||
getRuntimeAuthForModel({
|
||||
model: params.model,
|
||||
cfg: params.cfg,
|
||||
workspaceDir: params.workspaceDir,
|
||||
}),
|
||||
resolveApiKeyForProvider: (params) =>
|
||||
resolveApiKeyForProvider({
|
||||
provider: params.provider,
|
||||
|
||||
Reference in New Issue
Block a user