Skip to content

Emit retriever resources as source parts - #19

Merged
imjposcar merged 1 commit into
warmwind:mainfrom
slegarraga:fix/retriever-resources-source-parts-16
Jun 15, 2026
Merged

Emit retriever resources as source parts#19
imjposcar merged 1 commit into
warmwind:mainfrom
slegarraga:fix/retriever-resources-source-parts-16

Conversation

@slegarraga

@slegarraga slegarraga commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • emit Dify message_end.metadata.retriever_resources as AI SDK document source stream parts
  • preserve the original retriever resource payload in providerMetadata.difyWorkflowData.retrieverResource
  • add regression coverage for streaming retriever resources

Fixes #16.

Validation

  • corepack pnpm@9.15.9 test
  • corepack pnpm@9.15.9 build

Summary by cubic

Emit Dify retriever resources as document source stream parts so clients can display and attribute sources during streaming. Preserve the raw resource in providerMetadata.difyWorkflowData.retrieverResource (fixes #16).

  • New Features
    • Emit message_end.metadata.retriever_resources as source parts (document, text/plain).
    • Include conversationId, messageId, and taskId in providerMetadata.difyWorkflowData.

Written for commit 0b0bdb9. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

@imjposcar
imjposcar merged commit 3000cc0 into warmwind:main Jun 15, 2026
3 checks passed
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.

Provide "retriever_resources" in message part

2 participants