Genkit JS API reference
    Preparing search index...

    Interface PluginOptions

    Combined plugin options, extending common options with subplugin-specific options

    interface PluginOptions {
        experimental_debugTraces?: boolean;
        googleAuth?: GoogleAuthOptions<JSONClient>;
        location: string;
        models?: (
            | string
            | ModelReference<
                z.ZodObject<
                    {
                        apiKey: z.ZodOptional<z.ZodString>;
                        maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                        stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        topK: z.ZodOptional<z.ZodNumber>;
                        version: z.ZodOptional<z.ZodString>;
                    } & {
                        functionCallingConfig: z.ZodOptional<
                            z.ZodObject<
                                {
                                    allowedFunctionNames: z.ZodOptional<(...)>;
                                    mode: z.ZodOptional<(...)>;
                                },
                                "strip",
                                z.ZodTypeAny,
                                {
                                    allowedFunctionNames?: (...)
                                    | (...);
                                    mode?: (...) | (...) | (...) | (...) | (...);
                                },
                                {
                                    allowedFunctionNames?: (...)
                                    | (...);
                                    mode?: (...) | (...) | (...) | (...) | (...);
                                },
                            >,
                        >;
                        googleSearchRetrieval: z.ZodOptional<
                            z.ZodObject<
                                { disableAttribution: z.ZodOptional<(...)> },
                                "strip",
                                z.ZodTypeAny,
                                { disableAttribution?: (...) | (...) | (...) },
                                { disableAttribution?: (...) | (...) | (...) },
                            >,
                        >;
                        location: z.ZodOptional<z.ZodString>;
                        safetySettings: z.ZodOptional<
                            z.ZodArray<
                                z.ZodObject<
                                    { category: ...; threshold: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { category: ...; threshold: ... },
                                    { category: ...; threshold: ... },
                                >,
                                "many",
                            >,
                        >;
                        temperature: z.ZodOptional<z.ZodNumber>;
                        thinkingConfig: z.ZodOptional<
                            z.ZodObject<
                                {
                                    includeThoughts: z.ZodOptional<(...)>;
                                    thinkingBudget: z.ZodOptional<(...)>;
                                },
                                "strip",
                                z.ZodTypeAny,
                                {
                                    includeThoughts?: (...)
                                    | (...)
                                    | (...);
                                    thinkingBudget?: (...) | (...);
                                },
                                {
                                    includeThoughts?: (...)
                                    | (...)
                                    | (...);
                                    thinkingBudget?: (...) | (...);
                                },
                            >,
                        >;
                        topP: z.ZodOptional<z.ZodNumber>;
                        vertexRetrieval: z.ZodOptional<
                            z.ZodObject<
                                {
                                    datastore: z.ZodObject<(...), (...), (...), (...), (...)>;
                                    disableAttribution: z.ZodOptional<(...)>;
                                },
                                "strip",
                                z.ZodTypeAny,
                                {
                                    datastore: { dataStoreId: ...; location?: ...; projectId?: ... };
                                    disableAttribution?: (...) | (...) | (...);
                                },
                                {
                                    datastore: { dataStoreId: ...; location?: ...; projectId?: ... };
                                    disableAttribution?: (...) | (...) | (...);
                                },
                            >,
                        >;
                    },
                    "passthrough",
                    z.ZodTypeAny,
                    z.objectOutputType<
                        {
                            apiKey: z.ZodOptional<z.ZodString>;
                            maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                            stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            topK: z.ZodOptional<z.ZodNumber>;
                            version: z.ZodOptional<z.ZodString>;
                        } & {
                            functionCallingConfig: z.ZodOptional<
                                z.ZodObject<
                                    { allowedFunctionNames: ...; mode: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { allowedFunctionNames?: ...; mode?: ... },
                                    { allowedFunctionNames?: ...; mode?: ... },
                                >,
                            >;
                            googleSearchRetrieval: z.ZodOptional<
                                z.ZodObject<
                                    { disableAttribution: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { disableAttribution?: ... },
                                    { disableAttribution?: ... },
                                >,
                            >;
                            location: z.ZodOptional<z.ZodString>;
                            safetySettings: z.ZodOptional<
                                z.ZodArray<z.ZodObject<(...), (...), (...), (...), (...)>, "many">,
                            >;
                            temperature: z.ZodOptional<z.ZodNumber>;
                            thinkingConfig: z.ZodOptional<
                                z.ZodObject<
                                    { includeThoughts: ...; thinkingBudget: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { includeThoughts?: ...; thinkingBudget?: ... },
                                    { includeThoughts?: ...; thinkingBudget?: ... },
                                >,
                            >;
                            topP: z.ZodOptional<z.ZodNumber>;
                            vertexRetrieval: z.ZodOptional<
                                z.ZodObject<
                                    { datastore: ...; disableAttribution: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { datastore: ...; disableAttribution?: ... },
                                    { datastore: ...; disableAttribution?: ... },
                                >,
                            >;
                        },
                        z.ZodTypeAny,
                        "passthrough",
                    >,
                    z.objectInputType<
                        {
                            apiKey: z.ZodOptional<z.ZodString>;
                            maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                            stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            topK: z.ZodOptional<z.ZodNumber>;
                            version: z.ZodOptional<z.ZodString>;
                        } & {
                            functionCallingConfig: z.ZodOptional<
                                z.ZodObject<
                                    { allowedFunctionNames: ...; mode: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { allowedFunctionNames?: ...; mode?: ... },
                                    { allowedFunctionNames?: ...; mode?: ... },
                                >,
                            >;
                            googleSearchRetrieval: z.ZodOptional<
                                z.ZodObject<
                                    { disableAttribution: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { disableAttribution?: ... },
                                    { disableAttribution?: ... },
                                >,
                            >;
                            location: z.ZodOptional<z.ZodString>;
                            safetySettings: z.ZodOptional<
                                z.ZodArray<z.ZodObject<(...), (...), (...), (...), (...)>, "many">,
                            >;
                            temperature: z.ZodOptional<z.ZodNumber>;
                            thinkingConfig: z.ZodOptional<
                                z.ZodObject<
                                    { includeThoughts: ...; thinkingBudget: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { includeThoughts?: ...; thinkingBudget?: ... },
                                    { includeThoughts?: ...; thinkingBudget?: ... },
                                >,
                            >;
                            topP: z.ZodOptional<z.ZodNumber>;
                            vertexRetrieval: z.ZodOptional<
                                z.ZodObject<
                                    { datastore: ...; disableAttribution: ... },
                                    "strip",
                                    z.ZodTypeAny,
                                    { datastore: ...; disableAttribution?: ... },
                                    { datastore: ...; disableAttribution?: ... },
                                >,
                            >;
                        },
                        z.ZodTypeAny,
                        "passthrough",
                    >,
                >,
            >
        )[];
        projectId?: string;
    }

    Hierarchy

    • CommonPluginOptions
      • PluginOptions
    Index

    Properties

    experimental_debugTraces?: boolean

    Enables additional debug traces (e.g. raw model API call details).

    googleAuth?: GoogleAuthOptions<JSONClient>

    Provide custom authentication configuration for connecting to Vertex AI.

    location: string

    The Google Cloud region to call.

    models?: (
        | string
        | ModelReference<
            z.ZodObject<
                {
                    apiKey: z.ZodOptional<z.ZodString>;
                    maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                    stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    topK: z.ZodOptional<z.ZodNumber>;
                    version: z.ZodOptional<z.ZodString>;
                } & {
                    functionCallingConfig: z.ZodOptional<
                        z.ZodObject<
                            {
                                allowedFunctionNames: z.ZodOptional<(...)>;
                                mode: z.ZodOptional<(...)>;
                            },
                            "strip",
                            z.ZodTypeAny,
                            {
                                allowedFunctionNames?: (...)
                                | (...);
                                mode?: (...) | (...) | (...) | (...) | (...);
                            },
                            {
                                allowedFunctionNames?: (...)
                                | (...);
                                mode?: (...) | (...) | (...) | (...) | (...);
                            },
                        >,
                    >;
                    googleSearchRetrieval: z.ZodOptional<
                        z.ZodObject<
                            { disableAttribution: z.ZodOptional<(...)> },
                            "strip",
                            z.ZodTypeAny,
                            { disableAttribution?: (...) | (...) | (...) },
                            { disableAttribution?: (...) | (...) | (...) },
                        >,
                    >;
                    location: z.ZodOptional<z.ZodString>;
                    safetySettings: z.ZodOptional<
                        z.ZodArray<
                            z.ZodObject<
                                { category: ...; threshold: ... },
                                "strip",
                                z.ZodTypeAny,
                                { category: ...; threshold: ... },
                                { category: ...; threshold: ... },
                            >,
                            "many",
                        >,
                    >;
                    temperature: z.ZodOptional<z.ZodNumber>;
                    thinkingConfig: z.ZodOptional<
                        z.ZodObject<
                            {
                                includeThoughts: z.ZodOptional<(...)>;
                                thinkingBudget: z.ZodOptional<(...)>;
                            },
                            "strip",
                            z.ZodTypeAny,
                            {
                                includeThoughts?: (...)
                                | (...)
                                | (...);
                                thinkingBudget?: (...) | (...);
                            },
                            {
                                includeThoughts?: (...)
                                | (...)
                                | (...);
                                thinkingBudget?: (...) | (...);
                            },
                        >,
                    >;
                    topP: z.ZodOptional<z.ZodNumber>;
                    vertexRetrieval: z.ZodOptional<
                        z.ZodObject<
                            {
                                datastore: z.ZodObject<(...), (...), (...), (...), (...)>;
                                disableAttribution: z.ZodOptional<(...)>;
                            },
                            "strip",
                            z.ZodTypeAny,
                            {
                                datastore: { dataStoreId: ...; location?: ...; projectId?: ... };
                                disableAttribution?: (...) | (...) | (...);
                            },
                            {
                                datastore: { dataStoreId: ...; location?: ...; projectId?: ... };
                                disableAttribution?: (...) | (...) | (...);
                            },
                        >,
                    >;
                },
                "passthrough",
                z.ZodTypeAny,
                z.objectOutputType<
                    {
                        apiKey: z.ZodOptional<z.ZodString>;
                        maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                        stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        topK: z.ZodOptional<z.ZodNumber>;
                        version: z.ZodOptional<z.ZodString>;
                    } & {
                        functionCallingConfig: z.ZodOptional<
                            z.ZodObject<
                                { allowedFunctionNames: ...; mode: ... },
                                "strip",
                                z.ZodTypeAny,
                                { allowedFunctionNames?: ...; mode?: ... },
                                { allowedFunctionNames?: ...; mode?: ... },
                            >,
                        >;
                        googleSearchRetrieval: z.ZodOptional<
                            z.ZodObject<
                                { disableAttribution: ... },
                                "strip",
                                z.ZodTypeAny,
                                { disableAttribution?: ... },
                                { disableAttribution?: ... },
                            >,
                        >;
                        location: z.ZodOptional<z.ZodString>;
                        safetySettings: z.ZodOptional<
                            z.ZodArray<z.ZodObject<(...), (...), (...), (...), (...)>, "many">,
                        >;
                        temperature: z.ZodOptional<z.ZodNumber>;
                        thinkingConfig: z.ZodOptional<
                            z.ZodObject<
                                { includeThoughts: ...; thinkingBudget: ... },
                                "strip",
                                z.ZodTypeAny,
                                { includeThoughts?: ...; thinkingBudget?: ... },
                                { includeThoughts?: ...; thinkingBudget?: ... },
                            >,
                        >;
                        topP: z.ZodOptional<z.ZodNumber>;
                        vertexRetrieval: z.ZodOptional<
                            z.ZodObject<
                                { datastore: ...; disableAttribution: ... },
                                "strip",
                                z.ZodTypeAny,
                                { datastore: ...; disableAttribution?: ... },
                                { datastore: ...; disableAttribution?: ... },
                            >,
                        >;
                    },
                    z.ZodTypeAny,
                    "passthrough",
                >,
                z.objectInputType<
                    {
                        apiKey: z.ZodOptional<z.ZodString>;
                        maxOutputTokens: z.ZodOptional<z.ZodNumber>;
                        stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        topK: z.ZodOptional<z.ZodNumber>;
                        version: z.ZodOptional<z.ZodString>;
                    } & {
                        functionCallingConfig: z.ZodOptional<
                            z.ZodObject<
                                { allowedFunctionNames: ...; mode: ... },
                                "strip",
                                z.ZodTypeAny,
                                { allowedFunctionNames?: ...; mode?: ... },
                                { allowedFunctionNames?: ...; mode?: ... },
                            >,
                        >;
                        googleSearchRetrieval: z.ZodOptional<
                            z.ZodObject<
                                { disableAttribution: ... },
                                "strip",
                                z.ZodTypeAny,
                                { disableAttribution?: ... },
                                { disableAttribution?: ... },
                            >,
                        >;
                        location: z.ZodOptional<z.ZodString>;
                        safetySettings: z.ZodOptional<
                            z.ZodArray<z.ZodObject<(...), (...), (...), (...), (...)>, "many">,
                        >;
                        temperature: z.ZodOptional<z.ZodNumber>;
                        thinkingConfig: z.ZodOptional<
                            z.ZodObject<
                                { includeThoughts: ...; thinkingBudget: ... },
                                "strip",
                                z.ZodTypeAny,
                                { includeThoughts?: ...; thinkingBudget?: ... },
                                { includeThoughts?: ...; thinkingBudget?: ... },
                            >,
                        >;
                        topP: z.ZodOptional<z.ZodNumber>;
                        vertexRetrieval: z.ZodOptional<
                            z.ZodObject<
                                { datastore: ...; disableAttribution: ... },
                                "strip",
                                z.ZodTypeAny,
                                { datastore: ...; disableAttribution?: ... },
                                { datastore: ...; disableAttribution?: ... },
                            >,
                        >;
                    },
                    z.ZodTypeAny,
                    "passthrough",
                >,
            >,
        >
    )[]
    projectId?: string

    The Google Cloud project id to call.