Skip to content

[JS] googleai/vertexai should default to max model capability support #3017

Closed
@mbleigh

Description

@mbleigh

Right now if you supply an unrecognized model (e.g. gemini-2.5-flash-preview-05-20 which is a valid model string but not in our autocompletes) it seems to fall back to a default set of "supports" that is very limited (i.e. no system message).

The default should be "supports everything" if we don't know any better. Repro:

import { genkit } from "genkit";
import { googleAI } from "@genkit-ai/googleai";

const ai = genkit({
  plugins: [googleAI()],
  model: "googleai/gemini-2.5-flash-preview-05-20",
});

async function main() {
  const { text } = await ai.generate({
    system: "This has a system message.",
    prompt: "And so it blows up.",
  });
  console.log(text);
}

main();

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjs

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions