Skip to content

fix(#3996): preserve Gemini user thinking budgets outside title generation - #4028

Draft
aheritier wants to merge 2 commits into
workspace-media-namingfrom
gemini-direct-image-output
Draft

fix(#3996): preserve Gemini user thinking budgets outside title generation#4028
aheritier wants to merge 2 commits into
workspace-media-namingfrom
gemini-direct-image-output

Conversation

@aheritier

@aheritier aheritier commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

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 test

Issue 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.

…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.
@aheritier aheritier added area/providers/gemini Google Gemini provider support area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/tui For features/issues/fixes related to the TUI kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/providers/gemini Google Gemini provider support area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/tui For features/issues/fixes related to the TUI kind/fix PR fixes a bug (maps to fix:). Use on PRs only.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant