Genkit JS API reference
    Preparing search index...

    Interface ModelReference<CustomOptions>

    A reference to a model that includes optional configuration and version info. Can be passed anywhere a ModelArgument is accepted.

    interface ModelReference<CustomOptions extends z.ZodTypeAny> {
        config?: z.TypeOf<CustomOptions>;
        configSchema?: CustomOptions;
        info?: {
            configSchema?: Record<string, any>;
            label?: string;
            stage?: "stable" | "unstable" | "featured" | "legacy" | "deprecated";
            supports?: {
                constrained?: "all" | "none" | "no-tools";
                contentType?: string[];
                context?: boolean;
                media?: boolean;
                multiturn?: boolean;
                output?: string[];
                systemRole?: boolean;
                toolChoice?: boolean;
                tools?: boolean;
            };
            versions?: string[];
        };
        name: string;
        version?: string;
        withConfig(cfg: z.TypeOf<CustomOptions>): ModelReference<CustomOptions>;
        withVersion(version: string): ModelReference<CustomOptions>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    configSchema?: CustomOptions
    info?: {
        configSchema?: Record<string, any>;
        label?: string;
        stage?: "stable" | "unstable" | "featured" | "legacy" | "deprecated";
        supports?: {
            constrained?: "all" | "none" | "no-tools";
            contentType?: string[];
            context?: boolean;
            media?: boolean;
            multiturn?: boolean;
            output?: string[];
            systemRole?: boolean;
            toolChoice?: boolean;
            tools?: boolean;
        };
        versions?: string[];
    }
    name: string
    version?: string

    Methods