feat(images): expose temperature control for Gemini image models - #260
Open
HSbedi87 wants to merge 2 commits into
Open
feat(images): expose temperature control for Gemini image models#260HSbedi87 wants to merge 2 commits into
HSbedi87 wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #259
Adds an optional
temperatureparameter end to end for the Gemini imagemodels 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 sothe 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.
pytestbackend,ng buildfrontend - both clean)search.model.tsandmodel-config.ts