Skip to content

End a requested cascaded reply's conversation with the user, not the assistant - #277

Merged
MikeAlhayek merged 1 commit into
CrestApps:mainfrom
giannik:fix/cascade-requested-reply-ends-with-user
Oct 19, 2026
Merged

MikeAlhayek merged 1 commit into
CrestApps:mainfrom
giannik:fix/cascade-requested-reply-ends-with-user

Conversation

@giannik

@giannik giannik commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #275

A reply the caller asks for right after the assistant's own line no longer sends the chat leg a conversation that ends
with the assistant, which models without assistant prefill (Claude 5.x) refuse.

Changes

  • CascadedRealtimeSession.ConversationFor: for a requested reply (response.create) whose conversation ends
    with an assistant message, a short user turn follows it: "(The user has not said anything new. Reply as your
    instructions for this reply say.)" The text is CascadedRealtimeSession.NothingNewFromTheUser.
  • Unchanged:
    • a requested reply with no history, such as the opening line;
    • every reply to the user;
    • the request's instructions, which still replace the session's for that reply.
  • Docs:
    • core/realtime-voice.md, on requested replies;
    • a changelog entry under cascaded realtime deployments.

Tests

SendAsync_ResponseRequestAfterTheAssistantsLine_EndsTheConversationWithTheUser: after a reply to the user, a
requested reply's conversation ends with the user turn, right after the assistant's line. The existing
SendAsync_ResponseRequest_IsSpokenWithoutATranscript (no history, no user message) still passes.

On our fork, the realtime tests pass, and so does the full test project, except the 2 known failures under a Greek
locale.

Verified on a live call

The call ran through CrestApps.OrchardCore's voice agent on Telnyx, on a cascade of Deepgram nova-3,
claude-haiku-5-5 and ElevenLabs eleven_flash_v2_5.

  • Before: both "are you still there" prompts failed with the error in the issue.
  • After: the prompt after the caller's silence was spoken, and the call went on to the goodbye.

🤖 Generated with Claude Code

…assistant

A reply nobody spoke to ask for, such as a prompt after a silence, can follow
the assistant's own last line, so the conversation the chat leg was given
ended with the assistant. Models that do not continue an assistant's message
refuse that. On a CrestApps.OrchardCore phone call with claude-haiku-5-5 as
the chat leg, both "are you still there" prompts failed with "This model does
not support assistant message prefill. The conversation must end with a user
message."

For a requested reply whose conversation ends with the assistant, a short
user turn now says the user has said nothing new, and the reply is written as
the request's instructions say. A requested reply with no history, such as
the opening line, and every reply to the user are unchanged.

Test: SendAsync_ResponseRequestAfterTheAssistantsLine_EndsTheConversationWithTheUser.
@MikeAlhayek
MikeAlhayek merged commit f454349 into CrestApps:main Oct 19, 2026
9 checks passed
MikeAlhayek added a commit to giannik/CrestApps.Core that referenced this pull request Oct 19, 2026
Keeps both cascade changelog entries after CrestApps#277.
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.

A cascade's requested reply fails on models without assistant prefill (Claude 5.x)

2 participants