fix(bot-mode): canonical bot DMs always follow the profile's current config - #91062
Closed
curator8888 wants to merge 1 commit into
Closed
curator8888 wants to merge 1 commit into
curator8888 wants to merge 1 commit into
Conversation
…config Bot-Mode canonical chats (the ONE forever DM per bot) and room plumbing sessions are plugin-owned scratch conversations. They are now created with an explicit follow_profile_config contract, persisted in the session row's model_config, so session.resume rebuilds from the member profile's CURRENT config instead of restoring the stored model/provider pin from an old row. That stale pin is what left bot DMs stuck on a dead provider (e.g. 'out of Nous credits' after the profile was switched to ollama-cloud) while the same bot worked fine in rooms — the mirror image of the room-plumbing bug (NousResearch#89497 class). Normal 1:1 user chats keep the stored-runtime restore: opening an older chat must show the model it actually used. - tui_gateway/methods_session.py: accept follow_profile_config on session.create - tui_gateway/server.py: persist the marker in the row; skip stored-runtime overrides on resume when present - apps/desktop/src/plugins/hermes-bots/plugin.js: send the contract from createCanonicalChat and ensureGroupChatSession - tests: backend override + row-persist coverage; desktop source-contract coverage for both session kinds
Contributor
Author
|
Superseded by #90343 — the DM fix was rebased into the room-plumbing PR so both bot-session contracts (room_plumbing + follow_profile_config) land as one coherent change. |
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.
Fixes the mirror image of #89497: bot DMs stuck on a stale provider pin.
Summary
Bot-Mode canonical chats (the ONE forever DM per bot) and room plumbing sessions are plugin-owned scratch conversations. They are now created with an explicit
follow_profile_configcontract, persisted in the session row'smodel_config, sosession.resumerebuilds from the member profile's CURRENT config instead of restoring the stored model/provider pin from an old row.That stale pin is what left bot DMs stuck on a dead provider (e.g. "out of Nous credits" after the profile was switched to ollama-cloud) while the same bot worked fine in rooms — the mirror image of the room-plumbing bug (#89497 class). Normal 1:1 user chats keep the stored-runtime restore: opening an older chat must show the model it actually used.
How to Test
Verification
_stored_session_runtime_overridesreturns{}for rows carrying the marker (dict and JSONmodel_configshapes); unmarked rows still restore stored runtime;_ensure_session_db_rowpersists the marker only when the contract is set.createCanonicalChatandensureGroupChatSessionboth sendfollow_profile_config: trueonsession.create.test_custom_provider_session_persistence.py, 24/24 withtest_session_resume_db_ownership.py, 57/57 desktop group-chat tests.Type of Change
Checklist