mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
27 lines
932 B
TypeScript
27 lines
932 B
TypeScript
import type {
|
|
ProviderDefaultThinkingPolicyContext,
|
|
ProviderThinkingProfile,
|
|
} from "openclaw/plugin-sdk/core";
|
|
import { buildProviderReplayFamilyHooks } from "openclaw/plugin-sdk/provider-model-shared";
|
|
import { createGoogleThinkingStreamWrapper, isGoogleGemini3ProModel } from "./thinking-api.js";
|
|
|
|
export const GOOGLE_GEMINI_PROVIDER_HOOKS = {
|
|
...buildProviderReplayFamilyHooks({
|
|
family: "google-gemini",
|
|
}),
|
|
resolveThinkingProfile: ({ modelId }: ProviderDefaultThinkingPolicyContext) =>
|
|
({
|
|
levels: isGoogleGemini3ProModel(modelId)
|
|
? [{ id: "off" }, { id: "low" }, { id: "adaptive" }, { id: "high" }]
|
|
: [
|
|
{ id: "off" },
|
|
{ id: "minimal" },
|
|
{ id: "low" },
|
|
{ id: "medium" },
|
|
{ id: "adaptive" },
|
|
{ id: "high" },
|
|
],
|
|
}) satisfies ProviderThinkingProfile,
|
|
wrapStreamFn: createGoogleThinkingStreamWrapper,
|
|
};
|