fix: generate conversation titles with session model (cherry-pick #3898 to develop) - #3919
Merged
Merged
Conversation
(cherry picked from commit 68b9976)
JasonW404
requested review from
Dallas98,
WMC001 and
jeffwu-1999
as code owners
September 14, 2026 01:47
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
YehongPan
approved these changes
Sep 15, 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.
Summary
Cherry-pick of #3898 (merged into
hotfix/v2.5.1) ontodevelop. The fix was never propagated todevelop, so title generation ondevelopstill ignores the session-selected model.model_idfrom the chat UI to conversation title generationmodel_idis omittedtitle_generation: <model> -> <title>Behavior
Explicit model selections must exist in the current tenant, be active, and have type
llm. Invalid, deleted, cross-tenant, or non-LLM selections return HTTP 422 without generating or persisting a title. The frontend snapshots the model ID used for the Agent run (modelIdForRun), so a later selector change cannot alter the title model.Provenance
fix: generate conversation titles with session model(merged tohotfix/v2.5.1)68b99763e76ada0164aa6436e65d6bd47e34dfa7(squash merge, single parent)origin/develop@96599711f24a0cc7f83c8d143e4ac5ce747cda61git cherry-pick -x; no conflicts, 8 files auto-merged cleanly899a40f2a— 14 files changed, +249 / -20 (identical to fix: generate conversation titles with session model #3898)Verification
Port fidelity — the change set is byte-identical to #3898:
git range-diffreports the commit as equivalent; the only delta is the added(cherry picked from commit ...)trailerdiffemptyBackend focused suites, baseline
origin/developvs this branch (all green, no regressions):test/backend/test_model_consts.pytest/backend/app/test_conversation_management_app.pytest/backend/app/test_northbound_app.pytest/backend/services/test_conversation_management_service.pytest/backend/services/test_northbound_service.pyThe +9 matches exactly the test cases added by #3898, and the new
except ValidationErrorhandlers are covered bytest_generate_title_validation_errorin both app test files.Frontend:
node --test tests/conversationTitle.test.ts: 2 passedtsc --noEmit: error set identical to baseline (234 pre-existing errors, all from unrelatedcomponents/ui/*ande2e/*files); zero errors inchatInterface.tsx,conversationTitle.ts, orconversationService.tsSymbol resolution after auto-merge (guards against silent drift on
develop):ValidationErrorresolves toconsts.exceptions.ValidationErrorin bothapps/northbound_app.pyandapps/conversation_management_app.pyFieldresolves inconsts/model.py;logger,Optional, andget_model_by_model_idall resolve inservices/conversation_management_service.pyRuntime/E2E validation (ARM64 Docker build, Multipass Docker E2E, tenant-admin E2E, observed
title_generationlog) was performed in #3898 and is not repeated here; this is a faithful port of that already-reviewed change.Notes
Pre-existing, unrelated to this PR: running the five backend test files together in a single
pytestinvocation fails collection withAttributeError: module 'consts.model' has no attribute 'ManageTenantModelCreateRequest'. This reproduces identically on cleanorigin/developand is caused bytest/conftest.pyexposing bothbackend.consts.modelandconsts.modelas distinct module objects. Running each file individually passes. Not addressed here.