genkit icon indicating copy to clipboard operation
genkit copied to clipboard

[Dev UI] Prompt runner does not pass config to "render" action

Open MichaelDoyle opened this issue 4 months ago • 0 comments

The prompt runner cannot render prompts if they do not specify a model in either (a) in the prompt definition or (b) in the genkit instance config.

However, since model is optional in both of these places, is passable to an executable prompt and to generate, and we have the model config present in the runner, this seems like unexpected behavior.

Image

For example, a prompt used like this, would not currently work in the Dev UI.

export const noModelDefinedPrompt = ai.definePrompt({
  name: 'noModelDefinedPrompt',
  input: {
    schema: HelloSchema,
  },
  output: {
    format: 'text',
  },
  prompt: template,
});

noModelDefinedPrompt({ name: 'mike' }, { model: gemini25Flash });

We likely need to thread opts through runAction in tools-api, or something like that.

MichaelDoyle avatar Jul 26 '25 21:07 MichaelDoyle