Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix: drop static catalog check when resolving tenant default models (#17714)

euvref8b2b1248c7d
diff --git a/internal/service/tenant.go b/internal/service/tenant.go
index e6502bfa45..b11c935b18 100644
--- a/internal/service/tenant.go
+++ b/internal/service/tenant.go
@@ -526,10 +526,9 @@ func (s *TenantService) GetModelInfo(ctx context.Context, tenantID string, defau
return nil, nil, nil, false, err
}
- // Check if the model exists and is active. The tenant_model row is the
- // source of truth here — providers with an empty factory catalog (e.g.
- // OpenAI-API-Compatible, whose models are user-defined) cannot be
- // validated against the catalog. Mirrors Python's _get_model_info.
+ // Check if the model exists and is active. Model type validity is
+ // enforced on the save path against the tenant_model record, so models
+ // added online that are absent from the static catalog still resolve.
modelEntity, err := s.modelDAO.GetModelByProviderIDAndInstanceIDAndModelName(ctx, dao.DB, modelProvider.ID, modelInstance.ID, modelName)
if err != nil {
if !dao.IsNotFoundErr(err) {