Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: can not find model bug #12051

Merged
merged 2 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/core/entities/provider_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def _get_system_provider_models(
# if llm name not in restricted llm list, remove it
restrict_model_names = [rm.model for rm in restrict_models]
for model in provider_models:
if model.model_type == ModelType.LLM and m.model not in restrict_model_names:
if model.model_type == ModelType.LLM and model.model not in restrict_model_names:
model.status = ModelStatus.NO_PERMISSION
elif not quota_configuration.is_valid:
model.status = ModelStatus.QUOTA_EXCEEDED
Expand Down
4 changes: 2 additions & 2 deletions api/services/entities/model_provider_entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from core.entities.model_entities import (
ModelWithProviderEntity,
ProviderModelWithStatusEntity,
SimpleModelProviderEntity,
)
from core.entities.provider_entities import QuotaConfiguration
from core.model_runtime.entities.common_entities import I18nObject
Expand Down Expand Up @@ -152,7 +151,8 @@ class ModelWithProviderEntityResponse(ModelWithProviderEntity):
Model with provider entity.
"""

provider: SimpleModelProviderEntity
# FIXME type error ignore here
provider: SimpleProviderEntityResponse # type: ignore

def __init__(self, model: ModelWithProviderEntity) -> None:
super().__init__(**model.model_dump())
Loading