#6355·genkit

GemmaConfigSchema caps temperature at 1.0, but Gemma's maxTemperature is 2.0

Author: cabljacCreated Sep 16, 2026Updated Sep 21, 2026

js/plugins/google-genai/src/googleai/gemini.ts:401 caps Gemma temperature at .max(1.0), with describe text reading "The default value is 1.0."

ListModels reports those as different values:

models/gemma-4-31b-it      temperature 1, maxTemperature 2
models/gemma-4-26b-a4b-it  temperature 1, maxTemperature 2

So the schema uses the default as the ceiling and rejects the top half of the range client-side. temperature: 1.5 on gemma-4-31b-it returns 200 against the API.

Either drop the .max() override and inherit GeminiConfigSchema, or source the bound from Model.maxTemperature at discovery so it tracks a ceiling change. Your call on the config surface. Go doesn't constrain Gemma temperature at all; we're dropping the cap on the Dart side (genkit-ai/genkit-dart#386).