Fix: model list (#15860)

### What problem does this PR solve?

Remove tenant_llm call in rag.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2026-06-10 14:59:57 +08:00
committed by GitHub
parent 899f76af6b
commit 478c9846a1
12 changed files with 64 additions and 48 deletions

View File

@@ -35,6 +35,15 @@ class TenantModelService(CommonService):
cls.model.model_name == model_name
)
@classmethod
@DB.connection_context()
def get_by_provider_id_and_instance_id_and_model_type(cls, provider_id, instance_id, model_type):
return cls.model.get_or_none(
cls.model.provider_id == provider_id,
cls.model.instance_id == instance_id,
cls.model.model_type == model_type
)
@classmethod
@DB.connection_context()
def get_models_by_instance_id(cls, instance_id):