[PR #31566] feat: support opaque_body from plugin LLM calls #33306

Open
opened 2026-02-21 20:53:02 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/31566

State: open
Merged: No


Summary

This is a part of langgenius/dify-official-plugins#2492

Adds end-to-end support for preserving assistant opaque_body produced by plugin LLM calls.

  • Adds message-level and content-level opaque_body fields in model runtime prompt/message entities.
  • Parses opaque_body from plugin LLM invocations (including streaming tool-call parsing).
  • Captures assistant opaque_body during app run streaming, persists it into message_metadata as assistant_opaque_body, and restores it when rebuilding memory prompt history.

Testing

  • Added unit tests: api/tests/unit_tests/core/model_runtime/__base/test_llm_invoke_opaque_body.py
**Original Pull Request:** https://github.com/langgenius/dify/pull/31566 **State:** open **Merged:** No --- ## Summary This is a part of langgenius/dify-official-plugins#2492 Adds end-to-end support for preserving assistant `opaque_body` produced by plugin LLM calls. - Adds message-level and content-level `opaque_body` fields in model runtime prompt/message entities. - Parses `opaque_body` from plugin LLM invocations (including streaming tool-call parsing). - Captures assistant `opaque_body` during app run streaming, persists it into `message_metadata` as `assistant_opaque_body`, and restores it when rebuilding memory prompt history. ## Testing - Added unit tests: `api/tests/unit_tests/core/model_runtime/__base/test_llm_invoke_opaque_body.py`
yindo added the pull-request label 2026-02-21 20:53:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#33306