Skip to content

feat(images): expose temperature control for Gemini image models - #260

Open
HSbedi87 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
HSbedi87:feat/image-temperature
Open

feat(images): expose temperature control for Gemini image models#260
HSbedi87 wants to merge 2 commits into
GoogleCloudPlatform:mainfrom
HSbedi87:feat/image-temperature

Conversation

@HSbedi87

@HSbedi87 HSbedi87 commented Aug 7, 2026

Copy link
Copy Markdown

Fixes #259

Adds an optional temperature parameter end to end for the Gemini image
models that accept it (gemini-2.5-flash-image, gemini-3-pro-image,
gemini-3.1-flash-image, and the Lite variant): DTO field →
GenerateContentConfig → a slider in the prompt box, plus a status chip so
the current value is visible without opening the settings popup.

Imagen and Gemini Omni do not accept this parameter and never receive it -
gated per model via ModelCapability.supportsTemperature.

Range is 0.0-2.0, confirmed per-model against the live API and the model
documentation.

  • Tests pass (pytest backend, ng build frontend - both clean)
  • Documentation: capability and range are documented inline in
    search.model.ts and model-config.ts

Editing an image repeatedly produced the same result, with no way to ask
for more variation. Temperature was never sent, so every request used the
model's default.

The DTO now accepts an optional temperature and threads it into
GenerateContentConfig at both call sites - text-to-image and
image-to-image. Omitting it keeps the model default rather than
substituting one of ours.

The range is 0.0 to 2.0, which the Gemini image model cards document and
a live check confirmed: 2.0 is accepted and 2.5 is rejected. Imagen and
Gemini Omni do not take the parameter and do not receive it.
Extracted from a later commit that bundled it with unrelated Edit Video
changes when this branch was first split. Adds the model-capability flag,
the slider in the settings popup, and a status chip showing the current
value so it does not require opening the popup to check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose temperature control for Gemini image models

1 participant