Skip to content

[FEATURE] Unified interface + agent execute stream #3

@jiapingzeng

Description

@jiapingzeng

Is your feature request related to a problem?
The /_execute/stream endpoint does not properly enable streaming when using the new standardized AgentInput format (which does not have RemoteInferenceInputDataSet). Requests return complete non-streaming responses instead of streaming chunks.

Root Cause
When using the new AgentInput format, agentMLInput.getInputDataset() returns null. The streaming endpoint sets the stream parameter via:

inputDataSet.getParameters().put("stream", String.valueOf(true));

Since there's no inputDataSet, the stream parameter is never set, causing the connector to return non-streaming responses.

ref: https://github.com/opensearch-project/ml-commons/blob/main/plugin/src/main/java/org/opensearch/ml/rest/RestMLExecuteStreamAction.java#L384-L398

Current Behavior

  • works: regular execution (/_execute) with new unified agent interface
  • works: streaming (/_execute/stream) with AG-UI agent (since AG-UI agent sets both inputDataset AND agentInput)
  • fails: Streaming (/_execute/stream) with conversational agent registered via unified interface

What solution would you like?
Agent execute stream should work with unified agent interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Amazon Q development agentGenerate new features or iterate code based on issue descriptions and comments.enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions