fix(#3996): preserve Gemini user thinking budgets outside title generation - #4028
Draft
aheritier wants to merge 2 commits into
Draft
fix(#3996): preserve Gemini user thinking budgets outside title generation#4028aheritier wants to merge 2 commits into
aheritier wants to merge 2 commits into
Conversation
…face Broaden the existing image-output guard and modality tests — previously framed around the gateway route — to explicitly exercise the direct Gemini API and Vertex AI surfaces already handled by wantsImageResponseModalities and checkImageOutputRequestCompatibility. Update the shared doc comment on imageOutputMediaFileInstruction / applyImageOutputMediaFileInstruction to stop calling this the "gateway" route now that all three surfaces are verified.
…ation Title generation requests must omit thinkingConfig so image-capable Gemini models can produce a plain text title. Keep the explicit no-thinking behavior for MCP sampling and ordinary requests unchanged, including Gemini 3 minimum reasoning settings and Gemini 2.5 zero-budget suppression.
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.
What
Preserves Gemini user thinking budgets for ordinary image-output requests while retaining the special title-generation behavior, with guard and integration tests.
Why
Image-output requests must honor the user's configured reasoning budget; only title generation should use its constrained policy.
Validation
task test; Gemini client, modality, guard, and runtime/TUI integration tests.Test instructions
Run:
task testIssue a Gemini image-output request with a non-default user thinking budget and inspect the outgoing request. Expected: the configured budget is preserved. Trigger session title generation separately; expected: its constrained title-generation policy remains unchanged.