Skip to content

[fix] Patch the SSE parser so it handles the delegated RunOutput event shape correctly#7565

Open
abhi10691 wants to merge 1 commit intoagno-agi:mainfrom
abhi10691:yield_run_output
Open

[fix] Patch the SSE parser so it handles the delegated RunOutput event shape correctly#7565
abhi10691 wants to merge 1 commit intoagno-agi:mainfrom
abhi10691:yield_run_output

Conversation

@abhi10691
Copy link
Copy Markdown
Contributor

@abhi10691 abhi10691 commented Apr 17, 2026

Summary

Patched the SSE parser so it handles the delegated RunOutput event shape correctly (events vs event).

Fixed the streaming parser bug for delegated remote-member runs.

Updated AgentOSClient._parse_sse_events in libs/agno/agno/client/os.py to support both SSE payload shapes:

  • single event payloads with event
  • run-output payloads with events (list of event dicts)

The parser now normalizes payloads and parses each event item, so delegated calls that stream RunOutput no longer trigger ValueError("Unknown event type: ...") just because the top-level object has events instead of event.

Added a regression test in libs/agno/tests/unit/os/test_client.py:

  • test_stream_handles_run_output_payload_with_events_list
  • Verifies that a streamed data: frame containing {"run_id": "...", "events": [...]} correctly yields typed RunStartedEvent and RunCompletedEvent.

(If applicable, issue number: #7517)

Type of change

  • [*] Bug fix
  • New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Checklist

  • Code complies with style guidelines
  • Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • Self-review completed
  • Documentation updated (comments, docstrings)
  • Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • Tested in clean environment
  • Tests added/updated (if applicable)

Duplicate and AI-Generated PR Check

  • I have searched existing open pull requests and confirmed that no other PR already addresses this issue
  • If a similar PR exists, I have explained below why this PR is a better approach
  • Check if this PR was entirely AI-generated (by Copilot, Claude Code, Cursor, etc.)

Additional Notes

Add any important context (deployment instructions, screenshots, security considerations, etc.)

@abhi10691 abhi10691 requested a review from a team as a code owner April 17, 2026 15:03
@github-actions
Copy link
Copy Markdown
Contributor

PR Triage

Needs description: This PR has little or no description beyond the template defaults. Please fill in the Summary section explaining what this PR does and why.

@abhi10691 abhi10691 changed the title [fix] Fix for https://github.com/agno-agi/agno/issues/7517 [fix] Patch the SSE parser so it handles the delegated RunOutput event shape correctly Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant