fix(gateway): /profile reports the profile serving the source on multiplexed gateways - #62244
Closed
CocaKova wants to merge 2 commits into
Closed
fix(gateway): /profile reports the profile serving the source on multiplexed gateways#62244CocaKova wants to merge 2 commits into
CocaKova wants to merge 2 commits into
Conversation
…e multiplexer's On a multiplexed gateway the process-level active profile is always the multiplexer's own (usually "default"), so /profile answered "default" in every chat regardless of which profile actually served it — making per-chat persona routing look broken when it was working. Report source.profile (stamped by the /p/<profile>/ URL prefix, a per-credential adapter, or a room->profile map) and resolve the displayed home under that profile's runtime scope, mirroring the scoped /reset banner (NousResearch#59003). Unstamped sources fall back to the active profile and default home, so single-profile gateways are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CocaKova
force-pushed
the
pr/profile-command-source-scope
branch
from
July 10, 2026 18:54
881adc8 to
36c9e6d
Compare
Contributor
|
Thanks for targeting a real multiplexing diagnostics gap: current main's Problems
Suggested changes
Automated hermes-sweeper review. |
Review follow-up: honor source.profile and enter _profile_runtime_scope only when gateway.multiplex_profiles is on, mirroring the gating in _run_agent, _reset_notice_session_info, and _resolve_profile_for_key. When multiplexing is off (the default) a stamped source is ignored and /profile reports the active profile and default home, byte-identical to before this PR. The stamped-source test now enables multiplexing (it previously exercised the ungated path under the default config), and a new regression asserts the stamp is ignored when multiplexing is off. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
Both points addressed in 2e93839:
|
Contributor
|
Merged via PR #65700 — both commits cherry-picked onto current main with your authorship preserved in git log (rebase merge). Verified before merging that the bug still reproduced: your test failed on main for URL-prefix and routing-rule stamped sources (secondary-adapter chats were partially masked by the handler scope wrap, but the stamped-source path was fully broken). Thanks! |
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.
On a multiplexed gateway the process-level active profile is always the multiplexer's own (usually
default), so/profileanswers "default" in every chat regardless of which profile actually serves it. When personas are routed per-chat (/p/<profile>/URL prefix, per-credential adapters, or per-chat mapping as in #61689), this makes working routing look broken —/profileis the first thing an operator reaches for to check it.When
gateway.multiplex_profilesis on, this reportssource.profilewhen stamped and resolves the displayed home under that profile's runtime scope, mirroring the scoped/reset//newbanner from #59003. The source-profile lookup and scope entry are gated onmultiplex_profiles— the same gating as_run_agentand_reset_notice_session_info— so with multiplexing off (the default) a stamped source is ignored and single-profile gateways are byte-for-byte unchanged.Tests: stamped source on a multiplexed gateway reports the profile's name and
profiles/<name>home; stamped source with multiplexing off is ignored (regression); unstamped source unchanged; the existing custom-root/profiletest still passes.🤖 Generated with Claude Code