Skip to content

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

Draft
aheritier wants to merge 1 commit into
workspace-media-namingfrom
gemini-direct-image-output
Draft

fix(#3996): preserve Gemini user thinking budgets outside title generation#4028
aheritier wants to merge 1 commit 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.

@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
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from b4dbc21 to 84d8c20 Compare August 24, 2026 15:13
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 84d8c20 to a89ad52 Compare August 25, 2026 08:00
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from a89ad52 to 1b7dc6c Compare August 25, 2026 08:17
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 1b7dc6c to 9b1176c Compare August 25, 2026 08:33
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 9b1176c to 53d7a5c Compare August 25, 2026 20:24
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 53d7a5c to c56cc55 Compare August 26, 2026 11:10
@aheritier
aheritier force-pushed the gemini-direct-image-output branch 3 times, most recently from 5339887 to c56cc55 Compare September 1, 2026 16:07
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from c56cc55 to 2c8d6b1 Compare September 1, 2026 16:30
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 2c8d6b1 to 97877c1 Compare September 1, 2026 19:58
aheritier

This comment was marked as resolved.

@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 97877c1 to 5f8df8a Compare September 6, 2026 16:15
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 5f8df8a to db6f22e Compare September 7, 2026 11:19
@aheritier
aheritier force-pushed the gemini-direct-image-output branch 2 times, most recently from 74fb2a0 to 4a10093 Compare September 7, 2026 16:13
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 4a10093 to 2dde430 Compare September 7, 2026 16:47
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from 2dde430 to c421fde Compare September 8, 2026 06:17
Omit thinkingConfig for title-generation requests so image-capable Gemini
models can return plain text titles. Increase the shared title output
budget from 20 to 128 tokens to accommodate hidden reasoning while keeping
the visible title separately capped at 50 characters.

Preserve explicit no-thinking behavior for MCP sampling and ordinary
requests, including Gemini 3 minimum reasoning settings and Gemini 2.5
zero-budget suppression. Keep user-configured thinking budgets outside
title generation unchanged and test both paths.
@aheritier
aheritier force-pushed the gemini-direct-image-output branch from c421fde to 41bcf76 Compare September 8, 2026 07:58
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