Skip to content

fix(#3996): keep image-output models eligible for session titles - #4021

Open
aheritier wants to merge 1 commit into
gemini-image-request-guardfrom
title-generation-model-filter
Open

fix(#3996): keep image-output models eligible for session titles#4021
aheritier wants to merge 1 commit into
gemini-image-request-guardfrom
title-generation-model-filter

Conversation

@aheritier

@aheritier aheritier commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

What and why

Build ordered session-title candidates from title_model and the normal agent model. Keep image-output-capable candidates eligible, skip nil candidates, and fall through after an empty or failed candidate. This changes title selection only; it does not guarantee a provider returns a nonempty title.

Part of #3996. Review this PR against its immediate parent, #4020, rather than the aggregate stack against main.

Commit inventory

Head: 13afae4a093aac86a4af104510eac01a9be1c70d; parent SHA: ac6390e97f8c0f8cb20f890ac59e555dccdcc0d2.

Validation

Build, test compilation, owning-package tests and the named fixture passed at this PR head.

Exact deterministic fixture command:

go test -v -count=1 ./pkg/sessiontitle ./pkg/runtime -run 'TestNew_ImageOutputCandidateFallsThroughOnFailure|TestNew_AllImageOutputCandidatesRemainEligible|TestLocalRuntime_TitleGenerator|TestRunStream_ImageOutputOnlyModel_MainStreamUnaffected'

Matched top-level tests: pkg/runtime: 3; pkg/sessiontitle: 2.

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: Live provider, remote CI, and platform execution are not claimed by this deterministic receipt. 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.

@aheritier aheritier added area/docs Documentation changes area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/sessions For features/issues/fixes related to session lifecycle (resume, persistence, export) kind/fix PR fixes a bug (maps to fix:). Use on PRs only. labels Aug 22, 2026
@aheritier
aheritier force-pushed the title-generation-model-filter branch from 5f99757 to 7934627 Compare August 24, 2026 15:13
@aheritier
aheritier force-pushed the title-generation-model-filter branch from 7934627 to 3a3ec50 Compare August 25, 2026 07:58
@aheritier
aheritier force-pushed the title-generation-model-filter branch from 3a3ec50 to 5e7dd33 Compare August 25, 2026 20:24
@aheritier
aheritier force-pushed the title-generation-model-filter branch from 5e7dd33 to 4fc5a8f Compare August 26, 2026 11:07
@aheritier
aheritier force-pushed the title-generation-model-filter branch 2 times, most recently from e77d359 to 4fc5a8f Compare September 1, 2026 16:17
@aheritier
aheritier force-pushed the title-generation-model-filter branch from 4fc5a8f to d5276db Compare September 1, 2026 16:29
aheritier

This comment was marked as resolved.

@aheritier
aheritier force-pushed the title-generation-model-filter branch from 7ec2cad to e3b2104 Compare September 7, 2026 16:47
@aheritier
aheritier force-pushed the title-generation-model-filter branch from e3b2104 to 409eaa9 Compare September 8, 2026 06:17
@aheritier
aheritier force-pushed the title-generation-model-filter branch from 409eaa9 to 6a062ae Compare September 8, 2026 07:57
@aheritier
aheritier force-pushed the title-generation-model-filter branch from 6a062ae to f0ac0eb Compare September 8, 2026 17:31
Add ordered title candidates: an explicit title_model override followed by
the normal agent model, both with WithGeneratingTitle. If the override
cannot be constructed, keep the default candidate instead of failing agent
startup. Do not filter candidates on image-output capability; Gemini
utility calls omit image response modalities and skip the ordinary guard.

Allow sessiontitle.New to accept ordered candidates, skip nil entries and
return nil when none remain. Update runtime, server and debug-title callers
and cover candidate selection and fallback. This changes title selection,
not general inference routing. Its model-reference edit still describes
the historical image-output exclusion; the final reference corrects it.
@aheritier
aheritier force-pushed the title-generation-model-filter branch from f0ac0eb to 13afae4 Compare September 8, 2026 20:33
@aheritier
aheritier marked this pull request as ready for review September 8, 2026 20:38
@aheritier
aheritier requested a review from a team as a code owner September 8, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation changes area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection area/sessions For features/issues/fixes related to session lifecycle (resume, persistence, export) 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