Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor: add missing @override decorator to PluginModelRuntime (#36493)
Sven Weidenmann82b0a03f5a63
diff --git a/api/core/plugin/impl/model_runtime.py b/api/core/plugin/impl/model_runtime.pyindex 62573ba2f53..d555f4d9657 100644--- a/api/core/plugin/impl/model_runtime.py+++ b/api/core/plugin/impl/model_runtime.py@@ -4,7 +4,7 @@ import hashlibimport loggingfrom collections.abc import Generator, Iterable, Sequencefrom threading import Lock-from typing import IO, Any, Literal, cast, overload+from typing import IO, Any, Literal, cast, overload, overridefrom pydantic import ValidationErrorfrom redis import RedisError@@ -118,6 +118,7 @@ class PluginModelRuntime(ModelRuntime):self._provider_entities = Noneself._provider_entities_lock = Lock()+ @overridedef fetch_model_providers(self) -> Sequence[ProviderEntity]:if self._provider_entities is not None:return self._provider_entities@@ -130,6 +131,7 @@ class PluginModelRuntime(ModelRuntime):return self._provider_entities+ @overridedef get_provider_icon(self, *, provider: str, icon_type: str, lang: str) -> tuple[bytes, str]:provider_schema = self._get_provider_schema(provider)@@ -172,6 +174,7 @@ class PluginModelRuntime(ModelRuntime):mime_type = image_mime_types.get(extension, "image/png")return PluginAssetManager().fetch_asset(tenant_id=self.tenant_id, id=file_name), mime_type+ @overridedef validate_provider_credentials(self, *, provider: str, credentials: dict[str, Any]) -> None:plugin_id, provider_name = self._split_provider(provider)self.client.validate_provider_credentials(@@ -182,6 +185,7 @@ class PluginModelRuntime(ModelRuntime):credentials=credentials,)+ @overridedef validate_model_credentials(self,*,@@ -201,6 +205,7 @@ class PluginModelRuntime(ModelRuntime):credentials=credentials,)+ @overridedef get_model_schema(self,*,@@ -294,6 +299,7 @@ class PluginModelRuntime(ModelRuntime):stream: Literal[True],) -> Generator[LLMResultChunk, None, None]: ...+ @overridedef invoke_llm(self,*,@@ -357,6 +363,7 @@ class PluginModelRuntime(ModelRuntime):stream: Literal[True],) -> Generator[LLMResultChunkWithStructuredOutput, None, None]: ...+ @overridedef invoke_llm_with_structured_output(self,*,@@ -396,6 +403,7 @@ class PluginModelRuntime(ModelRuntime):stream=stream,)+ @overridedef get_llm_num_tokens(self,*,@@ -422,6 +430,7 @@ class PluginModelRuntime(ModelRuntime):tools=list(tools) if tools else None,)+ @overridedef invoke_text_embedding(self,*,@@ -443,6 +452,7 @@ class PluginModelRuntime(ModelRuntime):input_type=input_type,)+ @overridedef invoke_multimodal_embedding(self,*,@@ -464,6 +474,7 @@ class PluginModelRuntime(ModelRuntime):input_type=input_type,)+ @overridedef get_text_embedding_num_tokens(self,*,@@ -483,6 +494,7 @@ class PluginModelRuntime(ModelRuntime):texts=texts,)+ @overridedef invoke_rerank(self,*,@@ -508,6 +520,7 @@ class PluginModelRuntime(ModelRuntime):top_n=top_n,)+ @overridedef invoke_multimodal_rerank(self,*,@@ -533,6 +546,7 @@ class PluginModelRuntime(ModelRuntime):top_n=top_n,)+ @overridedef invoke_tts(self,*,@@ -554,6 +568,7 @@ class PluginModelRuntime(ModelRuntime):voice=voice,)+ @overridedef get_tts_model_voices(self,*,@@ -573,6 +588,7 @@ class PluginModelRuntime(ModelRuntime):language=language,)+ @overridedef invoke_speech_to_text(self,*,@@ -592,6 +608,7 @@ class PluginModelRuntime(ModelRuntime):file=file,)+ @overridedef invoke_moderation(self,*,