From f4370bf4f66bcc9fd538fc5a72d4ae7e25f65fac Mon Sep 17 00:00:00 2001 From: -LAN- Date: Wed, 6 May 2026 20:07:32 +0800 Subject: [PATCH] chore: add some todo comments Signed-off-by: -LAN- --- api/core/plugin/impl/model_runtime.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/api/core/plugin/impl/model_runtime.py b/api/core/plugin/impl/model_runtime.py index 209e37ad6c..62573ba2f5 100644 --- a/api/core/plugin/impl/model_runtime.py +++ b/api/core/plugin/impl/model_runtime.py @@ -38,8 +38,19 @@ logger = logging.getLogger(__name__) TENANT_SCOPE_SCHEMA_CACHE_USER_ID = "__DIFY_TS__" +# TODO(-LAN-): Move native structured-output invocation into Graphon's LLM node. +# TODO(-LAN-): Remove this Dify-side adapter once Graphon owns structured output end-to-end. class _PluginStructuredOutputModelInstance: - """Reuse the shared structured-output helper without depending on `ModelInstance`.""" + """Bind plugin model identity to the shared structured-output helper. + + The structured-output parser is shared with legacy ``ModelInstance`` flows + and only needs an object exposing ``invoke_llm(...)``. ``PluginModelRuntime`` + intentionally exposes a lower-level API where provider, model, and + credentials are passed per call. This adapter supplies the small bound + ``invoke_llm`` surface the helper needs without constructing a full + ``ModelInstance`` or reintroducing model-manager dependencies into the + plugin runtime path. + """ def __init__( self,