interface PluginOptions {
    apiKey?: string | false;
    apiVersion?: string | string[];
    baseUrl?: string;
    experimental_debugTraces?: boolean;
    models?: (
        | string
        | ModelReference<
            z.ZodObject<
                z.objectUtil.extendShape<
                    {
                        maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                        stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        temperature: z.ZodOptional<z.ZodNumber>;
                        topK: z.ZodOptional<z.ZodNumber>;
                        topP: z.ZodOptional<z.ZodNumber>;
                        version: z.ZodOptional<z.ZodString>;
                    },
                    {
                        apiKey: z.ZodOptional<z.ZodString>;
                        codeExecution: z.ZodOptional<
                            z.ZodUnion<
                                [z.ZodBoolean, z.ZodObject<(...), (...), (...), (...), (...)>],
                            >,
                        >;
                        contextCache: z.ZodOptional<z.ZodBoolean>;
                        functionCallingConfig: z.ZodOptional<
                            z.ZodObject<
                                {
                                    allowedFunctionNames: z.ZodOptional<(...)>;
                                    mode: z.ZodOptional<(...)>;
                                },
                                "strip",
                                z.ZodTypeAny,
                                {
                                    allowedFunctionNames?: (...)
                                    | (...);
                                    mode?: (...) | (...) | (...) | (...) | (...);
                                },
                                {
                                    allowedFunctionNames?: (...)
                                    | (...);
                                    mode?: (...) | (...) | (...) | (...) | (...);
                                },
                            >,
                        >;
                        responseModalities: z.ZodOptional<
                            z.ZodArray<z.ZodEnum<[(...), (...), (...)]>, "many">,
                        >;
                        safetySettings: z.ZodOptional<
                            z.ZodArray<
                                z.ZodObject<
                                    { category: ...; threshold: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { category: ...; threshold: ... },
                                    { category: ...; threshold: ... },
                                >,
                                "many",
                            >,
                        >;
                    },
                >,
                "passthrough",
                z.ZodTypeAny,
                z.objectOutputType<
                    z.objectUtil.extendShape<
                        {
                            maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                            stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            temperature: z.ZodOptional<z.ZodNumber>;
                            topK: z.ZodOptional<z.ZodNumber>;
                            topP: z.ZodOptional<z.ZodNumber>;
                            version: z.ZodOptional<z.ZodString>;
                        },
                        {
                            apiKey: z.ZodOptional<z.ZodString>;
                            codeExecution: z.ZodOptional<z.ZodUnion<[(...), (...)]>>;
                            contextCache: z.ZodOptional<z.ZodBoolean>;
                            functionCallingConfig: z.ZodOptional<
                                z.ZodObject<
                                    { allowedFunctionNames: ...; mode: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { allowedFunctionNames?: ...; mode?: ... },
                                    { allowedFunctionNames?: ...; mode?: ... },
                                >,
                            >;
                            responseModalities: z.ZodOptional<
                                z.ZodArray<z.ZodEnum<(...)>, "many">,
                            >;
                            safetySettings: z.ZodOptional<
                                z.ZodArray<
                                    z.ZodObject<(...), (...), (...), (...), (...)>,
                                    "many",
                                >,
                            >;
                        },
                    >,
                    z.ZodTypeAny,
                    "passthrough",
                >,
                z.objectInputType<
                    z.objectUtil.extendShape<
                        {
                            maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                            stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            temperature: z.ZodOptional<z.ZodNumber>;
                            topK: z.ZodOptional<z.ZodNumber>;
                            topP: z.ZodOptional<z.ZodNumber>;
                            version: z.ZodOptional<z.ZodString>;
                        },
                        {
                            apiKey: z.ZodOptional<z.ZodString>;
                            codeExecution: z.ZodOptional<z.ZodUnion<[(...), (...)]>>;
                            contextCache: z.ZodOptional<z.ZodBoolean>;
                            functionCallingConfig: z.ZodOptional<
                                z.ZodObject<
                                    { allowedFunctionNames: ...; mode: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { allowedFunctionNames?: ...; mode?: ... },
                                    { allowedFunctionNames?: ...; mode?: ... },
                                >,
                            >;
                            responseModalities: z.ZodOptional<
                                z.ZodArray<z.ZodEnum<(...)>, "many">,
                            >;
                            safetySettings: z.ZodOptional<
                                z.ZodArray<
                                    z.ZodObject<(...), (...), (...), (...), (...)>,
                                    "many",
                                >,
                            >;
                        },
                    >,
                    z.ZodTypeAny,
                    "passthrough",
                >,
            >,
        >
    )[];
}

Properties

apiKey?: string | false

Provide the API key to use to authenticate with the Gemini API. By default, an API key must be provided explicitly here or through the GEMINI_API_KEY or GOOGLE_API_KEY environment variables.

If false is explicitly passed, the plugin will be configured to expect an apiKey option to be provided to the model config at call time.

apiVersion?: string | string[]
baseUrl?: string
experimental_debugTraces?: boolean
models?: (
    | string
    | ModelReference<
        z.ZodObject<
            z.objectUtil.extendShape<
                {
                    maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                    stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    temperature: z.ZodOptional<z.ZodNumber>;
                    topK: z.ZodOptional<z.ZodNumber>;
                    topP: z.ZodOptional<z.ZodNumber>;
                    version: z.ZodOptional<z.ZodString>;
                },
                {
                    apiKey: z.ZodOptional<z.ZodString>;
                    codeExecution: z.ZodOptional<
                        z.ZodUnion<
                            [z.ZodBoolean, z.ZodObject<(...), (...), (...), (...), (...)>],
                        >,
                    >;
                    contextCache: z.ZodOptional<z.ZodBoolean>;
                    functionCallingConfig: z.ZodOptional<
                        z.ZodObject<
                            {
                                allowedFunctionNames: z.ZodOptional<(...)>;
                                mode: z.ZodOptional<(...)>;
                            },
                            "strip",
                            z.ZodTypeAny,
                            {
                                allowedFunctionNames?: (...)
                                | (...);
                                mode?: (...) | (...) | (...) | (...) | (...);
                            },
                            {
                                allowedFunctionNames?: (...)
                                | (...);
                                mode?: (...) | (...) | (...) | (...) | (...);
                            },
                        >,
                    >;
                    responseModalities: z.ZodOptional<
                        z.ZodArray<z.ZodEnum<[(...), (...), (...)]>, "many">,
                    >;
                    safetySettings: z.ZodOptional<
                        z.ZodArray<
                            z.ZodObject<
                                { category: ...; threshold: ... },
                                "strip",
                                z.ZodTypeAny,
                                { category: ...; threshold: ... },
                                { category: ...; threshold: ... },
                            >,
                            "many",
                        >,
                    >;
                },
            >,
            "passthrough",
            z.ZodTypeAny,
            z.objectOutputType<
                z.objectUtil.extendShape<
                    {
                        maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                        stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        temperature: z.ZodOptional<z.ZodNumber>;
                        topK: z.ZodOptional<z.ZodNumber>;
                        topP: z.ZodOptional<z.ZodNumber>;
                        version: z.ZodOptional<z.ZodString>;
                    },
                    {
                        apiKey: z.ZodOptional<z.ZodString>;
                        codeExecution: z.ZodOptional<z.ZodUnion<[(...), (...)]>>;
                        contextCache: z.ZodOptional<z.ZodBoolean>;
                        functionCallingConfig: z.ZodOptional<
                            z.ZodObject<
                                { allowedFunctionNames: ...; mode: ... },
                                "strip",
                                z.ZodTypeAny,
                                { allowedFunctionNames?: ...; mode?: ... },
                                { allowedFunctionNames?: ...; mode?: ... },
                            >,
                        >;
                        responseModalities: z.ZodOptional<
                            z.ZodArray<z.ZodEnum<(...)>, "many">,
                        >;
                        safetySettings: z.ZodOptional<
                            z.ZodArray<z.ZodObject<(...), (...), (...), (...), (...)>, "many">,
                        >;
                    },
                >,
                z.ZodTypeAny,
                "passthrough",
            >,
            z.objectInputType<
                z.objectUtil.extendShape<
                    {
                        maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                        stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        temperature: z.ZodOptional<z.ZodNumber>;
                        topK: z.ZodOptional<z.ZodNumber>;
                        topP: z.ZodOptional<z.ZodNumber>;
                        version: z.ZodOptional<z.ZodString>;
                    },
                    {
                        apiKey: z.ZodOptional<z.ZodString>;
                        codeExecution: z.ZodOptional<z.ZodUnion<[(...), (...)]>>;
                        contextCache: z.ZodOptional<z.ZodBoolean>;
                        functionCallingConfig: z.ZodOptional<
                            z.ZodObject<
                                { allowedFunctionNames: ...; mode: ... },
                                "strip",
                                z.ZodTypeAny,
                                { allowedFunctionNames?: ...; mode?: ... },
                                { allowedFunctionNames?: ...; mode?: ... },
                            >,
                        >;
                        responseModalities: z.ZodOptional<
                            z.ZodArray<z.ZodEnum<(...)>, "many">,
                        >;
                        safetySettings: z.ZodOptional<
                            z.ZodArray<z.ZodObject<(...), (...), (...), (...), (...)>, "many">,
                        >;
                    },
                >,
                z.ZodTypeAny,
                "passthrough",
            >,
        >,
    >
)[]