feat(#3996): guard image-output requests across Google surfaces - #4020
Open
aheritier wants to merge 1 commit into
Open
feat(#3996): guard image-output requests across Google surfaces#4020aheritier wants to merge 1 commit into
aheritier wants to merge 1 commit into
Conversation
aheritier
force-pushed
the
gemini-image-request-guard
branch
2 times, most recently
from
August 25, 2026 07:58
ee1c735 to
70bd556
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
2 times, most recently
from
August 26, 2026 11:07
65cfdea to
890abfa
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
2 times, most recently
from
September 1, 2026 16:18
48f364f to
890abfa
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 1, 2026 16:29
890abfa to
d1eeba5
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 6, 2026 16:14
d1eeba5 to
3e02989
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 7, 2026 11:19
3e02989 to
f1e4e19
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 7, 2026 11:34
f1e4e19 to
8ba3b99
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 7, 2026 16:13
8ba3b99 to
4f67ed5
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 7, 2026 16:47
4f67ed5 to
0279445
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 8, 2026 06:17
0279445 to
c126514
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 8, 2026 07:57
c126514 to
2b211fa
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 8, 2026 17:31
2b211fa to
c2b2abd
Compare
aheritier
force-pushed
the
gemini-image-request-guard
branch
from
September 8, 2026 20:33
c2b2abd to
ac6390e
Compare
aheritier
marked this pull request as ready for review
September 8, 2026 20:38
Request TEXT+IMAGE on supported Google surfaces when an explicit override or models.dev enables image output. Before ordinary dispatch, reject custom function tools and structured output while allowing server-side built-ins. Title generation and compaction omit image response modalities and bypass the guard; omission does not explicitly force a TEXT modality. Use catalogue tool_call metadata to distinguish unsupported tools from an image-output combination conflict. Keep unknown support conservative and make the diagnostic accurate for either override or catalogue resolution. Remove dead ToolConfig when no custom tools remain and keep the TUI inline error visible without a misleading footer toast. Cover provider, runtime, and TUI paths, explicit false, unknown support and no-dispatch failures.
dgageot
force-pushed
the
gemini-image-request-guard
branch
from
September 9, 2026 07:41
ac6390e to
10c1904
Compare
dgageot
approved these changes
Sep 9, 2026
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 and why
Request TEXT+IMAGE for eligible ordinary Google calls through the Docker models gateway, direct Gemini API, and Vertex. Reject custom function tools and structured output before dispatch; allow Google Search, Maps, and code-execution built-ins. Title generation and compaction bypass the guard and omit image response modalities. Utility behavior is unchanged. Vertex coverage is deterministic guard/predicate coverage; live Vertex validation remains deferred.
Part of #3996. Review this PR against its immediate parent, #4019, rather than the aggregate stack against
main.Commit inventory
Head:
ac6390e97f8c0f8cb20f890ac59e555dccdcc0d2; parent SHA:51559ff510bf01ea053e3923c329c80ba724dca5.ac6390e97f8c0f8cb20f890ac59e555dccdcc0d2— feat(Epic: Gemini image output with workspace deliverables and portable session copies #3996): reject incompatible image-output Google requestsValidation
Build, test compilation, owning-package tests and the named fixture passed at this PR head.
Exact deterministic fixture command:
Matched top-level tests:
pkg/model/provider/gemini: 7.Deterministic scope: the named local fixture exercises this PR boundary with disposable configuration/stores and fake or loopback providers as applicable. Every listed package ran nonzero matching top-level tests.
Deferred/live scope: No direct/gateway live reproduction was rerun; live Vertex remains deferred. The final stack head passed build, lint, full tests, an uncached full suite, focused race tests and documentation checks in disposable environments. Remote CI is tracked by the checks below; no new paid-provider or active-database validation was run.