mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 20:50:20 +00:00
refactor(providers): add family replay and tool hooks
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
||||
import { createProviderApiKeyAuthMethod } from "openclaw/plugin-sdk/provider-auth-api-key";
|
||||
import { buildPassthroughGeminiSanitizingReplayPolicy } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import { buildProviderReplayFamilyHooks } from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import { applyOpencodeGoConfig, OPENCODE_GO_DEFAULT_MODEL_REF } from "./api.js";
|
||||
|
||||
const PROVIDER_ID = "opencode-go";
|
||||
const PASSTHROUGH_GEMINI_REPLAY_HOOKS = buildProviderReplayFamilyHooks({
|
||||
family: "passthrough-gemini",
|
||||
});
|
||||
|
||||
export default definePluginEntry({
|
||||
id: PROVIDER_ID,
|
||||
@@ -44,7 +47,7 @@ export default definePluginEntry({
|
||||
},
|
||||
}),
|
||||
],
|
||||
buildReplayPolicy: ({ modelId }) => buildPassthroughGeminiSanitizingReplayPolicy(modelId),
|
||||
...PASSTHROUGH_GEMINI_REPLAY_HOOKS,
|
||||
isModernModelRef: () => true,
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user