Repository navigation
refactor: add missing @override decorator to PluginModelRuntime - #36493
Merged
asukaminato0721 merged 1 commit intoMay 21, 2026
Merged
asukaminato0721 merged 1 commit into
asukaminato0721 merged 1 commit into
Conversation
Relates to langgenius#36406. Adds @OverRide (17 decorators) to all ModelRuntime protocol methods implemented in PluginModelRuntime: fetch_model_providers, get_provider_icon, validate_provider_credentials, validate_model_credentials, get_model_schema, invoke_llm, invoke_llm_with_structured_output, get_llm_num_tokens, invoke_text_embedding, invoke_multimodal_embedding, get_text_embedding_num_tokens, invoke_rerank, invoke_multimodal_rerank, invoke_tts, get_tts_model_voices, invoke_speech_to_text, invoke_moderation. @OverRide is placed on the implementation methods only, not on the @overload-decorated stubs of invoke_llm and invoke_llm_with_structured_output (pyrefly's missing-override-decorator check targets the implementation). Uses 'from typing import override' (Python 3.12+ stdlib) per the pattern established in langgenius#36486.
Contributor
Pyrefly Type Coverage
|
This was referenced May 21, 2026
refactor: add missing @override decorator to file access controller and workflow file runtime
#36495
Merged
asukaminato0721
enabled auto-merge
May 21, 2026 19:40
asukaminato0721
approved these changes
May 21, 2026
This was referenced May 22, 2026
Ssazurov
pushed a commit
to Ssazurov/dify
that referenced
this pull request
Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relates to #36406.
Adds
@override(PEP 698,from typing import override) to all 17ModelRuntimeprotocol methods implemented inPluginModelRuntime(api/core/plugin/impl/model_runtime.py):fetch_model_providersget_provider_iconvalidate_provider_credentialsvalidate_model_credentialsget_model_schemainvoke_llminvoke_llm_with_structured_outputget_llm_num_tokensinvoke_text_embeddinginvoke_multimodal_embeddingget_text_embedding_num_tokensinvoke_rerankinvoke_multimodal_rerankinvoke_ttsget_tts_model_voicesinvoke_speech_to_textinvoke_moderation@overrideis placed on the implementation methods only — not on the@overload-decorated stubs ofinvoke_llmandinvoke_llm_with_structured_output(pyrefly's missing-override-decorator check targets the implementation, matching the errors listed in the issue body).Pattern follows the merged example in #36425 and previous slices #36486, #36490, #36491, #36492.