Skip to content

fix(gateway): suppress silent placeholder replies in live chats - #9935

Closed
luoxiao6645 wants to merge 1 commit into
NousResearch:mainfrom
luoxiao6645:fix/runtime-provider-api-mode-detection
Closed

fix(gateway): suppress silent placeholder replies in live chats#9935
luoxiao6645 wants to merge 1 commit into
NousResearch:mainfrom
luoxiao6645:fix/runtime-provider-api-mode-detection

Conversation

@luoxiao6645

@luoxiao6645 luoxiao6645 commented Apr 14, 2026

Copy link
Copy Markdown

Summary

  • suppress placeholder silent replies in the live gateway response path
  • prevent (No message), (No reply), [SILENT], and similar exact silence markers from being sent to Discord and other live messaging platforms
  • add focused regression coverage for silent-response normalization

Problem

In live gateway chats, the model can decide it should stay silent but still emit placeholder text such as (No message), (No reply), or [SILENT].

The gateway was treating those placeholders as normal text and delivering them to Discord instead of suppressing delivery entirely.

Root Cause

The live messaging response path had no normalization step for silence markers before adapter delivery. As a result, placeholder "no reply" outputs were forwarded like ordinary assistant messages.

Changes

  • add _normalize_live_gateway_response() in gateway/run.py
  • suppress exact silence markers before normal live response delivery
  • suppress the same markers in the queued follow-up first-response path
  • preserve real errors and non-placeholder content
  • add regression tests covering placeholder and non-placeholder cases

Testing

  • venv\\Scripts\\python -m pytest tests/gateway/test_live_silent_responses.py -q -n 0

Closes #9840

@luoxiao6645
luoxiao6645 force-pushed the fix/runtime-provider-api-mode-detection branch from 4be465c to c5fd1e2 Compare April 15, 2026 00:10
@luoxiao6645 luoxiao6645 changed the title fix(runtime): normalize provider API mode detection fix(gateway): suppress silent placeholder replies Apr 15, 2026
@luoxiao6645 luoxiao6645 changed the title fix(gateway): suppress silent placeholder replies fix(gateway): suppress silent placeholder replies in live chats Apr 15, 2026
@luoxiao6645

Copy link
Copy Markdown
Author

Closing this PR in favor of #9956.\n\nReason: #9956 is a clean, focused follow-up for #9840 that keeps the silent-placeholder fix and the streaming-path completion in one dedicated PR, without continuing review on the earlier thread.

@luoxiao6645
luoxiao6645 deleted the fix/runtime-provider-api-mode-detection branch April 17, 2026 09:46
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]: Discord replying when it's (No message) instead of not sending any message

1 participant