From ed2a102953beaf2daaa70b909c5afa37fbc37575 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 11:10:24 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- api/core/app/workflow/layers/llm_quota.py | 2 +- api/core/plugin/impl/model_runtime.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/api/core/app/workflow/layers/llm_quota.py b/api/core/app/workflow/layers/llm_quota.py index cf5a43eac2..be46fbab08 100644 --- a/api/core/app/workflow/layers/llm_quota.py +++ b/api/core/app/workflow/layers/llm_quota.py @@ -118,7 +118,7 @@ class LLMQuotaLayer(GraphEngineLayer): model_instance = cast("ParameterExtractorNode", node).model_instance case BuiltinNodeTypes.QUESTION_CLASSIFIER: typed_node: QuestionClassifierNode = cast("QuestionClassifierNode", node) - model_instance = cast(PreparedLLMProtocol, getattr(typed_node, "_model_instance")) + model_instance = cast(PreparedLLMProtocol, typed_node._model_instance) case _: return None except AttributeError: diff --git a/api/core/plugin/impl/model_runtime.py b/api/core/plugin/impl/model_runtime.py index 51df79b7ea..52c8eece61 100644 --- a/api/core/plugin/impl/model_runtime.py +++ b/api/core/plugin/impl/model_runtime.py @@ -254,7 +254,7 @@ class PluginModelRuntime(ModelRuntime): stop=list(stop) if stop else None, stream=stream, ) - + @overload def invoke_llm_with_structured_output( self, @@ -294,10 +294,7 @@ class PluginModelRuntime(ModelRuntime): prompt_messages: Sequence[PromptMessage], stop: Sequence[str] | None, stream: bool, - ) -> ( - LLMResultWithStructuredOutput - | Generator[LLMResultChunkWithStructuredOutput, None, None] - ): + ) -> LLMResultWithStructuredOutput | Generator[LLMResultChunkWithStructuredOutput, None, None]: # TODO: added to pass type check. # it is a new method from upstream that is not invoked at all. raise NotImplementedError