[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2026-03-21 04:58:39 +00:00 committed by GitHub
parent e589ed23a8
commit 184f944fa0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -101,7 +101,7 @@ class ProviderConfiguration(BaseModel):
self.provider.configurate_methods.append(ConfigurateMethod.PREDEFINED_MODEL)
return self
def bind_model_runtime(self, model_runtime: "ModelRuntime") -> None:
def bind_model_runtime(self, model_runtime: ModelRuntime) -> None:
"""Attach the already-composed runtime for request-bound call chains."""
self._bound_model_runtime = model_runtime

View File

@ -467,7 +467,9 @@ def test_get_model_type_instance_and_schema_reuse_bound_runtime_factory() -> Non
mock_factory.get_model_schema.return_value = mock_schema
with (
patch("core.entities.provider_configuration.ModelProviderFactory", return_value=mock_factory) as mock_factory_cls,
patch(
"core.entities.provider_configuration.ModelProviderFactory", return_value=mock_factory
) as mock_factory_cls,
patch("core.entities.provider_configuration.create_plugin_model_provider_factory") as mock_factory_builder,
):
model_type_instance = configuration.get_model_type_instance(ModelType.LLM)

View File

@ -10,7 +10,7 @@ import pytest
from core.plugin.entities.plugin_daemon import PluginModelProviderEntity
from core.plugin.impl import model_runtime as model_runtime_module
from core.plugin.impl.model import PluginModelClient
from core.plugin.impl.model_runtime import PluginModelRuntime, TENANT_SCOPE_SCHEMA_CACHE_USER_ID
from core.plugin.impl.model_runtime import TENANT_SCOPE_SCHEMA_CACHE_USER_ID, PluginModelRuntime
from core.plugin.impl.model_runtime_factory import create_plugin_model_runtime
from dify_graph.model_runtime.entities.common_entities import I18nObject
from dify_graph.model_runtime.entities.model_entities import AIModelEntity, FetchFrom, ModelType