Skip to content

Commit 505bc9b

Browse files
marthakellyclaude
andcommitted
test(sdk-python): remove empty-string delta test
ag-ui-protocol 0.1.15 added a validator requiring TextMessageContentEvent.delta to have length >= 1. The test asserted that manually_emit_message with an empty string still emits the full TEXT_MESSAGE_START/CONTENT/END sequence — that behavior is no longer achievable at the protocol layer, and emitting empty content events was never semantically useful. Removing rather than guarding in code: the protocol should fail loudly on empty deltas, not silently drop them in CopilotKit. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 66c6af5 commit 505bc9b

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

sdk-python/tests/test_agui_agent.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -463,25 +463,6 @@ def test_unknown_custom_event_does_not_suppress_reasoning(self, agent):
463463
# Should pass through to super() and return something (not None)
464464
assert result is not None
465465

466-
def test_manually_emit_message_with_empty_string_message(self, agent):
467-
"""ManuallyEmitMessage with an empty string should still emit the text sequence."""
468-
with track_parent_dispatches(agent) as dispatched:
469-
event = CustomEvent(
470-
type=EventType.CUSTOM,
471-
name=CustomEventNames.ManuallyEmitMessage.value,
472-
value={
473-
"message_id": "msg-empty",
474-
"message": "",
475-
"role": "assistant",
476-
},
477-
)
478-
agent._dispatch_event(event)
479-
480-
types = [getattr(e, 'type', None) for e in dispatched]
481-
assert EventType.TEXT_MESSAGE_START in types
482-
assert EventType.TEXT_MESSAGE_CONTENT in types
483-
assert EventType.TEXT_MESSAGE_END in types
484-
485466
def test_manually_emit_tool_call_with_empty_args(self, agent):
486467
"""ManuallyEmitToolCall with empty args dict should still emit the tool call sequence."""
487468
with track_parent_dispatches(agent) as dispatched:

0 commit comments

Comments
 (0)