mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
20 lines
892 B
TypeScript
20 lines
892 B
TypeScript
// Google provider module implements model/runtime integration.
|
|
import type {
|
|
ProviderDefaultThinkingPolicyContext,
|
|
ProviderThinkingProfile,
|
|
} from "openclaw/plugin-sdk/core";
|
|
import { buildProviderReplayFamilyHooks } from "openclaw/plugin-sdk/provider-model-shared";
|
|
import { buildProviderToolCompatFamilyHooks } from "openclaw/plugin-sdk/provider-tools";
|
|
import { resolveGoogleThinkingProfile } from "./provider-policy.js";
|
|
import { createGoogleThinkingStreamWrapper } from "./thinking-api.js";
|
|
|
|
export const GOOGLE_GEMINI_PROVIDER_HOOKS = {
|
|
...buildProviderReplayFamilyHooks({
|
|
family: "google-gemini",
|
|
}),
|
|
...buildProviderToolCompatFamilyHooks("gemini"),
|
|
resolveThinkingProfile: (context: ProviderDefaultThinkingPolicyContext) =>
|
|
resolveGoogleThinkingProfile(context) satisfies ProviderThinkingProfile | undefined,
|
|
wrapStreamFn: createGoogleThinkingStreamWrapper,
|
|
};
|