OLS-2964: Emit AG-UI events from chat backend#23
Conversation
Replace custom SSE event names with AG-UI JSON events via ag-ui-protocol: RunStarted/Finished/Error, text and reasoning lifecycles, tool calls, and CUSTOM ui_component for ui:type fences. Conversation UUID maps to threadId. Updates chat-api spec and hashed requirements for Konflux. Made-with: Cursor
|
@onmete: This pull request references OLS-2964 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
AI self-review (round 1)Verdict: Pass — implementation matches the approved plan and AC. Checks: Notes:
AI-generated via lightspeed-team-harness: https://github.com/openshift/lightspeed-team-harness |
Add 8 tests for error/timeout terminal events, tool call ID correlation, text message lifecycle, reasoning ordering, content_block_stop closing reasoning, partial fences, malformed JSON, and unclosed fence flush. Add pytest-cov to dev deps. chat.py coverage: 87% → 94%. Made-with: Cursor
|
@onmete: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/hold |
Summary
Implements OLS-2964: replace custom SSE
event:types with AG-UI protocol events (data:JSON withtypediscriminator) usingag-ui-protocol(ag_ui.core+EventEncoder).Scope
RUN_STARTED/RUN_FINISHED/RUN_ERROR; assistant text (TEXT_MESSAGE_*); full reasoning lifecycle; tool call correlation via generatedtoolCallId;CUSTOM+name: ui_componentfor ui:type fences.ag-ui-protocol>=0.1.18(core runtime dependency)..ai/spec/chat-api.mdupdated for AG-UI.uv.lock+requirements.*.txtregenerated.Breaking change
Clients must parse AG-UI
typefrom eachdata:line (no named SSEevent:field). Coordinate with console (OLS-2965).Verification
make verifyandmake testpass locally.Epic: OLS-2963
Made with Cursor