Skip to content

Release GJ — v0.51.216 (fix consecutive-user-turn rejection on strict chat templates) - #3434

Merged
nesquena-hermes merged 3 commits into
masterfrom
release/stage-p2e
Jun 2, 2026
Merged

nesquena-hermes merged 3 commits into
masterfrom
release/stage-p2e

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release GJ — v0.51.216 (stage-p2e)

Phase 2 medium-risk advance. Single PR — a provider-compatibility fix to the WebUI chat prompt-assembly path.

PR in this release

Maintainer fixes applied during the gate

  1. Codex SILENT MUST-FIX (gateway path): fix: fold session context into ephemeral system prompt instead of prefill (Mistral, Gemma) #3324 moved the context out of the prefill helper, but the gateway-backed WebUI chat path (gateway_chat.py) built its own system message from the bare _WEBUI_PROGRESS_PROMPT + that helper — so it silently dropped connected platforms / home channels / delivery hints / session framing on Gateway-routed chats (same fix: remove duplicate session context prefill that breaks strict chat templates (Mistral, Gemma) #3278 data-drop class, on the path the author missed). Fixed: the gateway request's system message is now built via _webui_ephemeral_system_prompt(surface_context, config_data=cfg). Regression test asserts the delivery context is present in the gateway system message.
  2. Opus MUST-FIX (stale test): rewrote test_webui_session_context_adds_gateway_like_metadata (asserted the removed prefill-user-message API) to assert the metadata now lives in the ephemeral system prompt (connected platforms, paused-platform exclusion, home-channel name shown, chat_id never leaks).

Follow-up filed

Verification

nesquena-hermes and others added 3 commits June 2, 2026 19:36
…prefill user message (#3324, @aether-agent)

Consecutive user turns (session-context prefill + actual message) made models
with strict chat templates (Mistral, Gemma via llama.cpp) reject the request
with a Jinja 500. Move the platform/delivery context (connected platforms, home
channels, scheduled-task delivery hints) from _webui_session_context_message
(a prefill user message) into _webui_delivery_context_prompt, appended to the
ephemeral system prompt. Session framing stays in _webui_surface_context_prompt.
Context is preserved — just role-alternation-safe. Closes #3276.

Co-authored-by: aether-agent <aether-agent@users.noreply.github.com>
… (Codex MUST-FIX on #3324)

#3324 moved the WebUI session/delivery context from a prefill user message into
_webui_ephemeral_system_prompt, but the gateway-backed WebUI chat path built its
own system message from the bare _WEBUI_PROGRESS_PROMPT + prefill helper — which
now returns only recall prefill. That silently dropped connected platforms, home
channels, delivery hints, and session framing on Gateway-routed WebUI chats
(same #3278 data-drop class, on the path the author missed). Build the gateway
request's system message with _webui_ephemeral_system_prompt(surface_context,
config_data=cfg) so the context is preserved. Regression test asserts the
delivery context is present in the gateway system message.
…cation (Opus MUST-FIX)

test_webui_session_context_adds_gateway_like_metadata asserted the removed
prefill-user-message API. Rewrote it to assert (a) the prefill helper no longer
appends a session-context user message, and (b) the same gateway-like metadata
(connected platforms, paused-platform exclusion, home-channel name shown,
chat_id never leaks) is now carried in _webui_ephemeral_system_prompt.
@nesquena-hermes
nesquena-hermes merged commit 67936f5 into master Jun 2, 2026
11 checks passed
@nesquena-hermes
nesquena-hermes deleted the release/stage-p2e branch June 2, 2026 19:57
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
Release GJ — v0.51.216 (fix consecutive-user-turn rejection on strict chat templates)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: consecutive user messages in WebUI prefill cause Jinja 500 with strict chat templates (Mistral, Gemma)

1 participant